feedly-widget 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var zk;function fj(){if(zk)return Kt;zk=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),R=Symbol.iterator;function N(B){return B===null||typeof B!="object"?null:(B=R&&B[R]||B["@@iterator"],typeof B=="function"?B:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,P={};function F(B,Q,Le){this.props=B,this.context=Q,this.refs=P,this.updater=Le||A}F.prototype.isReactComponent={},F.prototype.setState=function(B,Q){if(typeof B!="object"&&typeof B!="function"&&B!=null)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,B,Q,"setState")},F.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function Y(){}Y.prototype=F.prototype;function q(B,Q,Le){this.props=B,this.context=Q,this.refs=P,this.updater=Le||A}var I=q.prototype=new Y;I.constructor=q,j(I,F.prototype),I.isPureReactComponent=!0;var ie=Array.isArray,le=Object.prototype.hasOwnProperty,fe={current:null},ne={key:!0,ref:!0,__self:!0,__source:!0};function $e(B,Q,Le){var Ve,st={},wt=null,ct=null;if(Q!=null)for(Ve in Q.ref!==void 0&&(ct=Q.ref),Q.key!==void 0&&(wt=""+Q.key),Q)le.call(Q,Ve)&&!ne.hasOwnProperty(Ve)&&(st[Ve]=Q[Ve]);var ut=arguments.length-2;if(ut===1)st.children=Le;else if(1<ut){for(var Ot=Array(ut),Wt=0;Wt<ut;Wt++)Ot[Wt]=arguments[Wt+2];st.children=Ot}if(B&&B.defaultProps)for(Ve in ut=B.defaultProps,ut)st[Ve]===void 0&&(st[Ve]=ut[Ve]);return{$$typeof:i,type:B,key:wt,ref:ct,props:st,_owner:fe.current}}function oe(B,Q){return{$$typeof:i,type:B.type,key:Q,ref:B.ref,props:B.props,_owner:B._owner}}function _e(B){return typeof B=="object"&&B!==null&&B.$$typeof===i}function ke(B){var Q={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(Le){return Q[Le]})}var me=/\/+/g;function ue(B,Q){return typeof B=="object"&&B!==null&&B.key!=null?ke(""+B.key):Q.toString(36)}function Oe(B,Q,Le,Ve,st){var wt=typeof B;(wt==="undefined"||wt==="boolean")&&(B=null);var ct=!1;if(B===null)ct=!0;else switch(wt){case"string":case"number":ct=!0;break;case"object":switch(B.$$typeof){case i:case n:ct=!0}}if(ct)return ct=B,st=st(ct),B=Ve===""?"."+ue(ct,0):Ve,ie(st)?(Le="",B!=null&&(Le=B.replace(me,"$&/")+"/"),Oe(st,Q,Le,"",function(Wt){return Wt})):st!=null&&(_e(st)&&(st=oe(st,Le+(!st.key||ct&&ct.key===st.key?"":(""+st.key).replace(me,"$&/")+"/")+B)),Q.push(st)),1;if(ct=0,Ve=Ve===""?".":Ve+":",ie(B))for(var ut=0;ut<B.length;ut++){wt=B[ut];var Ot=Ve+ue(wt,ut);ct+=Oe(wt,Q,Le,Ot,st)}else if(Ot=N(B),typeof Ot=="function")for(B=Ot.call(B),ut=0;!(wt=B.next()).done;)wt=wt.value,Ot=Ve+ue(wt,ut++),ct+=Oe(wt,Q,Le,Ot,st);else if(wt==="object")throw Q=String(B),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return ct}function ze(B,Q,Le){if(B==null)return B;var Ve=[],st=0;return Oe(B,Ve,"","",function(wt){return Q.call(Le,wt,st++)}),Ve}function De(B){if(B._status===-1){var Q=B._result;Q=Q(),Q.then(function(Le){(B._status===0||B._status===-1)&&(B._status=1,B._result=Le)},function(Le){(B._status===0||B._status===-1)&&(B._status=2,B._result=Le)}),B._status===-1&&(B._status=0,B._result=Q)}if(B._status===1)return B._result.default;throw B._result}var be={current:null},pe={transition:null},je={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:pe,ReactCurrentOwner:fe};function Re(){throw Error("act(...) is not supported in production builds of React.")}return Kt.Children={map:ze,forEach:function(B,Q,Le){ze(B,function(){Q.apply(this,arguments)},Le)},count:function(B){var Q=0;return ze(B,function(){Q++}),Q},toArray:function(B){return ze(B,function(Q){return Q})||[]},only:function(B){if(!_e(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},Kt.Component=F,Kt.Fragment=s,Kt.Profiler=f,Kt.PureComponent=q,Kt.StrictMode=u,Kt.Suspense=b,Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=je,Kt.act=Re,Kt.cloneElement=function(B,Q,Le){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var Ve=j({},B.props),st=B.key,wt=B.ref,ct=B._owner;if(Q!=null){if(Q.ref!==void 0&&(wt=Q.ref,ct=fe.current),Q.key!==void 0&&(st=""+Q.key),B.type&&B.type.defaultProps)var ut=B.type.defaultProps;for(Ot in Q)le.call(Q,Ot)&&!ne.hasOwnProperty(Ot)&&(Ve[Ot]=Q[Ot]===void 0&&ut!==void 0?ut[Ot]:Q[Ot])}var Ot=arguments.length-2;if(Ot===1)Ve.children=Le;else if(1<Ot){ut=Array(Ot);for(var Wt=0;Wt<Ot;Wt++)ut[Wt]=arguments[Wt+2];Ve.children=ut}return{$$typeof:i,type:B.type,key:st,ref:wt,props:Ve,_owner:ct}},Kt.createContext=function(B){return B={$$typeof:h,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:v,_context:B},B.Consumer=B},Kt.createElement=$e,Kt.createFactory=function(B){var Q=$e.bind(null,B);return Q.type=B,Q},Kt.createRef=function(){return{current:null}},Kt.forwardRef=function(B){return{$$typeof:g,render:B}},Kt.isValidElement=_e,Kt.lazy=function(B){return{$$typeof:k,_payload:{_status:-1,_result:B},_init:De}},Kt.memo=function(B,Q){return{$$typeof:_,type:B,compare:Q===void 0?null:Q}},Kt.startTransition=function(B){var Q=pe.transition;pe.transition={};try{B()}finally{pe.transition=Q}},Kt.unstable_act=Re,Kt.useCallback=function(B,Q){return be.current.useCallback(B,Q)},Kt.useContext=function(B){return be.current.useContext(B)},Kt.useDebugValue=function(){},Kt.useDeferredValue=function(B){return be.current.useDeferredValue(B)},Kt.useEffect=function(B,Q){return be.current.useEffect(B,Q)},Kt.useId=function(){return be.current.useId()},Kt.useImperativeHandle=function(B,Q,Le){return be.current.useImperativeHandle(B,Q,Le)},Kt.useInsertionEffect=function(B,Q){return be.current.useInsertionEffect(B,Q)},Kt.useLayoutEffect=function(B,Q){return be.current.useLayoutEffect(B,Q)},Kt.useMemo=function(B,Q){return be.current.useMemo(B,Q)},Kt.useReducer=function(B,Q,Le){return be.current.useReducer(B,Q,Le)},Kt.useRef=function(B){return be.current.useRef(B)},Kt.useState=function(B){return be.current.useState(B)},Kt.useSyncExternalStore=function(B,Q,Le){return be.current.useSyncExternalStore(B,Q,Le)},Kt.useTransition=function(){return be.current.useTransition()},Kt.version="18.3.1",Kt}var tv={exports:{}};/**
9
+ */var zk;function hj(){if(zk)return Kt;zk=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),R=Symbol.iterator;function N(B){return B===null||typeof B!="object"?null:(B=R&&B[R]||B["@@iterator"],typeof B=="function"?B:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,P={};function F(B,Q,Le){this.props=B,this.context=Q,this.refs=P,this.updater=Le||A}F.prototype.isReactComponent={},F.prototype.setState=function(B,Q){if(typeof B!="object"&&typeof B!="function"&&B!=null)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,B,Q,"setState")},F.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function Y(){}Y.prototype=F.prototype;function q(B,Q,Le){this.props=B,this.context=Q,this.refs=P,this.updater=Le||A}var I=q.prototype=new Y;I.constructor=q,j(I,F.prototype),I.isPureReactComponent=!0;var ie=Array.isArray,le=Object.prototype.hasOwnProperty,fe={current:null},ne={key:!0,ref:!0,__self:!0,__source:!0};function $e(B,Q,Le){var Ve,st={},wt=null,ct=null;if(Q!=null)for(Ve in Q.ref!==void 0&&(ct=Q.ref),Q.key!==void 0&&(wt=""+Q.key),Q)le.call(Q,Ve)&&!ne.hasOwnProperty(Ve)&&(st[Ve]=Q[Ve]);var ut=arguments.length-2;if(ut===1)st.children=Le;else if(1<ut){for(var Ot=Array(ut),Wt=0;Wt<ut;Wt++)Ot[Wt]=arguments[Wt+2];st.children=Ot}if(B&&B.defaultProps)for(Ve in ut=B.defaultProps,ut)st[Ve]===void 0&&(st[Ve]=ut[Ve]);return{$$typeof:i,type:B,key:wt,ref:ct,props:st,_owner:fe.current}}function oe(B,Q){return{$$typeof:i,type:B.type,key:Q,ref:B.ref,props:B.props,_owner:B._owner}}function _e(B){return typeof B=="object"&&B!==null&&B.$$typeof===i}function ke(B){var Q={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(Le){return Q[Le]})}var me=/\/+/g;function ue(B,Q){return typeof B=="object"&&B!==null&&B.key!=null?ke(""+B.key):Q.toString(36)}function Oe(B,Q,Le,Ve,st){var wt=typeof B;(wt==="undefined"||wt==="boolean")&&(B=null);var ct=!1;if(B===null)ct=!0;else switch(wt){case"string":case"number":ct=!0;break;case"object":switch(B.$$typeof){case i:case n:ct=!0}}if(ct)return ct=B,st=st(ct),B=Ve===""?"."+ue(ct,0):Ve,ie(st)?(Le="",B!=null&&(Le=B.replace(me,"$&/")+"/"),Oe(st,Q,Le,"",function(Wt){return Wt})):st!=null&&(_e(st)&&(st=oe(st,Le+(!st.key||ct&&ct.key===st.key?"":(""+st.key).replace(me,"$&/")+"/")+B)),Q.push(st)),1;if(ct=0,Ve=Ve===""?".":Ve+":",ie(B))for(var ut=0;ut<B.length;ut++){wt=B[ut];var Ot=Ve+ue(wt,ut);ct+=Oe(wt,Q,Le,Ot,st)}else if(Ot=N(B),typeof Ot=="function")for(B=Ot.call(B),ut=0;!(wt=B.next()).done;)wt=wt.value,Ot=Ve+ue(wt,ut++),ct+=Oe(wt,Q,Le,Ot,st);else if(wt==="object")throw Q=String(B),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return ct}function ze(B,Q,Le){if(B==null)return B;var Ve=[],st=0;return Oe(B,Ve,"","",function(wt){return Q.call(Le,wt,st++)}),Ve}function De(B){if(B._status===-1){var Q=B._result;Q=Q(),Q.then(function(Le){(B._status===0||B._status===-1)&&(B._status=1,B._result=Le)},function(Le){(B._status===0||B._status===-1)&&(B._status=2,B._result=Le)}),B._status===-1&&(B._status=0,B._result=Q)}if(B._status===1)return B._result.default;throw B._result}var be={current:null},pe={transition:null},je={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:pe,ReactCurrentOwner:fe};function Re(){throw Error("act(...) is not supported in production builds of React.")}return Kt.Children={map:ze,forEach:function(B,Q,Le){ze(B,function(){Q.apply(this,arguments)},Le)},count:function(B){var Q=0;return ze(B,function(){Q++}),Q},toArray:function(B){return ze(B,function(Q){return Q})||[]},only:function(B){if(!_e(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},Kt.Component=F,Kt.Fragment=s,Kt.Profiler=f,Kt.PureComponent=q,Kt.StrictMode=u,Kt.Suspense=b,Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=je,Kt.act=Re,Kt.cloneElement=function(B,Q,Le){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var Ve=j({},B.props),st=B.key,wt=B.ref,ct=B._owner;if(Q!=null){if(Q.ref!==void 0&&(wt=Q.ref,ct=fe.current),Q.key!==void 0&&(st=""+Q.key),B.type&&B.type.defaultProps)var ut=B.type.defaultProps;for(Ot in Q)le.call(Q,Ot)&&!ne.hasOwnProperty(Ot)&&(Ve[Ot]=Q[Ot]===void 0&&ut!==void 0?ut[Ot]:Q[Ot])}var Ot=arguments.length-2;if(Ot===1)Ve.children=Le;else if(1<Ot){ut=Array(Ot);for(var Wt=0;Wt<Ot;Wt++)ut[Wt]=arguments[Wt+2];Ve.children=ut}return{$$typeof:i,type:B.type,key:st,ref:wt,props:Ve,_owner:ct}},Kt.createContext=function(B){return B={$$typeof:h,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:v,_context:B},B.Consumer=B},Kt.createElement=$e,Kt.createFactory=function(B){var Q=$e.bind(null,B);return Q.type=B,Q},Kt.createRef=function(){return{current:null}},Kt.forwardRef=function(B){return{$$typeof:g,render:B}},Kt.isValidElement=_e,Kt.lazy=function(B){return{$$typeof:k,_payload:{_status:-1,_result:B},_init:De}},Kt.memo=function(B,Q){return{$$typeof:_,type:B,compare:Q===void 0?null:Q}},Kt.startTransition=function(B){var Q=pe.transition;pe.transition={};try{B()}finally{pe.transition=Q}},Kt.unstable_act=Re,Kt.useCallback=function(B,Q){return be.current.useCallback(B,Q)},Kt.useContext=function(B){return be.current.useContext(B)},Kt.useDebugValue=function(){},Kt.useDeferredValue=function(B){return be.current.useDeferredValue(B)},Kt.useEffect=function(B,Q){return be.current.useEffect(B,Q)},Kt.useId=function(){return be.current.useId()},Kt.useImperativeHandle=function(B,Q,Le){return be.current.useImperativeHandle(B,Q,Le)},Kt.useInsertionEffect=function(B,Q){return be.current.useInsertionEffect(B,Q)},Kt.useLayoutEffect=function(B,Q){return be.current.useLayoutEffect(B,Q)},Kt.useMemo=function(B,Q){return be.current.useMemo(B,Q)},Kt.useReducer=function(B,Q,Le){return be.current.useReducer(B,Q,Le)},Kt.useRef=function(B){return be.current.useRef(B)},Kt.useState=function(B){return be.current.useState(B)},Kt.useSyncExternalStore=function(B,Q,Le){return be.current.useSyncExternalStore(B,Q,Le)},Kt.useTransition=function(){return be.current.useTransition()},Kt.version="18.3.1",Kt}var tv={exports:{}};/**
10
10
  * @license React
11
11
  * react.development.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */tv.exports;var Fk;function hj(){return Fk||(Fk=1,function(i,n){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var s="18.3.1",u=Symbol.for("react.element"),f=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),_=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),F=Symbol.iterator,Y="@@iterator";function q(C){if(C===null||typeof C!="object")return null;var M=F&&C[F]||C[Y];return typeof M=="function"?M:null}var I={current:null},ie={transition:null},le={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},fe={current:null},ne={},$e=null;function oe(C){$e=C}ne.setExtraStackFrame=function(C){$e=C},ne.getCurrentStack=null,ne.getStackAddendum=function(){var C="";$e&&(C+=$e);var M=ne.getCurrentStack;return M&&(C+=M()||""),C};var _e=!1,ke=!1,me=!1,ue=!1,Oe=!1,ze={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:ie,ReactCurrentOwner:fe};ze.ReactDebugCurrentFrame=ne,ze.ReactCurrentActQueue=le;function De(C){{for(var M=arguments.length,te=new Array(M>1?M-1:0),se=1;se<M;se++)te[se-1]=arguments[se];pe("warn",C,te)}}function be(C){{for(var M=arguments.length,te=new Array(M>1?M-1:0),se=1;se<M;se++)te[se-1]=arguments[se];pe("error",C,te)}}function pe(C,M,te){{var se=ze.ReactDebugCurrentFrame,Ae=se.getStackAddendum();Ae!==""&&(M+="%s",te=te.concat([Ae]));var mt=te.map(function(Me){return String(Me)});mt.unshift("Warning: "+M),Function.prototype.apply.call(console[C],console,mt)}}var je={};function Re(C,M){{var te=C.constructor,se=te&&(te.displayName||te.name)||"ReactClass",Ae=se+"."+M;if(je[Ae])return;be("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",M,se),je[Ae]=!0}}var B={isMounted:function(C){return!1},enqueueForceUpdate:function(C,M,te){Re(C,"forceUpdate")},enqueueReplaceState:function(C,M,te,se){Re(C,"replaceState")},enqueueSetState:function(C,M,te,se){Re(C,"setState")}},Q=Object.assign,Le={};Object.freeze(Le);function Ve(C,M,te){this.props=C,this.context=M,this.refs=Le,this.updater=te||B}Ve.prototype.isReactComponent={},Ve.prototype.setState=function(C,M){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,M,"setState")},Ve.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};{var st={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},wt=function(C,M){Object.defineProperty(Ve.prototype,C,{get:function(){De("%s(...) is deprecated in plain JavaScript React classes. %s",M[0],M[1])}})};for(var ct in st)st.hasOwnProperty(ct)&&wt(ct,st[ct])}function ut(){}ut.prototype=Ve.prototype;function Ot(C,M,te){this.props=C,this.context=M,this.refs=Le,this.updater=te||B}var Wt=Ot.prototype=new ut;Wt.constructor=Ot,Q(Wt,Ve.prototype),Wt.isPureReactComponent=!0;function gn(){var C={current:null};return Object.seal(C),C}var Hn=Array.isArray;function dn(C){return Hn(C)}function pt(C){{var M=typeof Symbol=="function"&&Symbol.toStringTag,te=M&&C[Symbol.toStringTag]||C.constructor.name||"Object";return te}}function An(C){try{return vn(C),!1}catch{return!0}}function vn(C){return""+C}function Wn(C){if(An(C))return be("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pt(C)),vn(C)}function ge(C,M,te){var se=C.displayName;if(se)return se;var Ae=M.displayName||M.name||"";return Ae!==""?te+"("+Ae+")":te}function Qe(C){return C.displayName||"Context"}function Je(C){if(C==null)return null;if(typeof C.tag=="number"&&be("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case v:return"Fragment";case f:return"Portal";case g:return"Profiler";case h:return"StrictMode";case R:return"Suspense";case N:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case _:var M=C;return Qe(M)+".Consumer";case b:var te=C;return Qe(te._context)+".Provider";case k:return ge(C,C.render,"ForwardRef");case A:var se=C.displayName||null;return se!==null?se:Je(C.type)||"Memo";case j:{var Ae=C,mt=Ae._payload,Me=Ae._init;try{return Je(Me(mt))}catch{return null}}}return null}var bt=Object.prototype.hasOwnProperty,Tt={key:!0,ref:!0,__self:!0,__source:!0},It,at,dt;dt={};function qt(C){if(bt.call(C,"ref")){var M=Object.getOwnPropertyDescriptor(C,"ref").get;if(M&&M.isReactWarning)return!1}return C.ref!==void 0}function yn(C){if(bt.call(C,"key")){var M=Object.getOwnPropertyDescriptor(C,"key").get;if(M&&M.isReactWarning)return!1}return C.key!==void 0}function Pe(C,M){var te=function(){It||(It=!0,be("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",M))};te.isReactWarning=!0,Object.defineProperty(C,"key",{get:te,configurable:!0})}function zt(C,M){var te=function(){at||(at=!0,be("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",M))};te.isReactWarning=!0,Object.defineProperty(C,"ref",{get:te,configurable:!0})}function Ee(C){if(typeof C.ref=="string"&&fe.current&&C.__self&&fe.current.stateNode!==C.__self){var M=Je(fe.current.type);dt[M]||(be('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M,C.ref),dt[M]=!0)}}var Ne=function(C,M,te,se,Ae,mt,Me){var St={$$typeof:u,type:C,key:M,ref:te,props:Me,_owner:mt};return St._store={},Object.defineProperty(St._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(St,"_self",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.defineProperty(St,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.freeze&&(Object.freeze(St.props),Object.freeze(St)),St};function nt(C,M,te){var se,Ae={},mt=null,Me=null,St=null,Vt=null;if(M!=null){qt(M)&&(Me=M.ref,Ee(M)),yn(M)&&(Wn(M.key),mt=""+M.key),St=M.__self===void 0?null:M.__self,Vt=M.__source===void 0?null:M.__source;for(se in M)bt.call(M,se)&&!Tt.hasOwnProperty(se)&&(Ae[se]=M[se])}var tn=arguments.length-2;if(tn===1)Ae.children=te;else if(tn>1){for(var Rn=Array(tn),Sn=0;Sn<tn;Sn++)Rn[Sn]=arguments[Sn+2];Object.freeze&&Object.freeze(Rn),Ae.children=Rn}if(C&&C.defaultProps){var $t=C.defaultProps;for(se in $t)Ae[se]===void 0&&(Ae[se]=$t[se])}if(mt||Me){var xn=typeof C=="function"?C.displayName||C.name||"Unknown":C;mt&&Pe(Ae,xn),Me&&zt(Ae,xn)}return Ne(C,mt,Me,St,Vt,fe.current,Ae)}function Ut(C,M){var te=Ne(C.type,M,C.ref,C._self,C._source,C._owner,C.props);return te}function vt(C,M,te){if(C==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var se,Ae=Q({},C.props),mt=C.key,Me=C.ref,St=C._self,Vt=C._source,tn=C._owner;if(M!=null){qt(M)&&(Me=M.ref,tn=fe.current),yn(M)&&(Wn(M.key),mt=""+M.key);var Rn;C.type&&C.type.defaultProps&&(Rn=C.type.defaultProps);for(se in M)bt.call(M,se)&&!Tt.hasOwnProperty(se)&&(M[se]===void 0&&Rn!==void 0?Ae[se]=Rn[se]:Ae[se]=M[se])}var Sn=arguments.length-2;if(Sn===1)Ae.children=te;else if(Sn>1){for(var $t=Array(Sn),xn=0;xn<Sn;xn++)$t[xn]=arguments[xn+2];Ae.children=$t}return Ne(C.type,mt,Me,St,Vt,tn,Ae)}function Yt(C){return typeof C=="object"&&C!==null&&C.$$typeof===u}var rn=".",Ln=":";function mn(C){var M=/[=:]/g,te={"=":"=0",":":"=2"},se=C.replace(M,function(Ae){return te[Ae]});return"$"+se}var fn=!1,wn=/\/+/g;function Ei(C){return C.replace(wn,"$&/")}function Pr(C,M){return typeof C=="object"&&C!==null&&C.key!=null?(Wn(C.key),mn(""+C.key)):M.toString(36)}function Mi(C,M,te,se,Ae){var mt=typeof C;(mt==="undefined"||mt==="boolean")&&(C=null);var Me=!1;if(C===null)Me=!0;else switch(mt){case"string":case"number":Me=!0;break;case"object":switch(C.$$typeof){case u:case f:Me=!0}}if(Me){var St=C,Vt=Ae(St),tn=se===""?rn+Pr(St,0):se;if(dn(Vt)){var Rn="";tn!=null&&(Rn=Ei(tn)+"/"),Mi(Vt,M,Rn,"",function(Kf){return Kf})}else Vt!=null&&(Yt(Vt)&&(Vt.key&&(!St||St.key!==Vt.key)&&Wn(Vt.key),Vt=Ut(Vt,te+(Vt.key&&(!St||St.key!==Vt.key)?Ei(""+Vt.key)+"/":"")+tn)),M.push(Vt));return 1}var Sn,$t,xn=0,$n=se===""?rn:se+Ln;if(dn(C))for(var Io=0;Io<C.length;Io++)Sn=C[Io],$t=$n+Pr(Sn,Io),xn+=Mi(Sn,M,te,$t,Ae);else{var ku=q(C);if(typeof ku=="function"){var to=C;ku===to.entries&&(fn||De("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fn=!0);for(var Cu=ku.call(to),Ds,Gf=0;!(Ds=Cu.next()).done;)Sn=Ds.value,$t=$n+Pr(Sn,Gf++),xn+=Mi(Sn,M,te,$t,Ae)}else if(mt==="object"){var qc=String(C);throw new Error("Objects are not valid as a React child (found: "+(qc==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":qc)+"). If you meant to render a collection of children, use an array instead.")}}return xn}function Qa(C,M,te){if(C==null)return C;var se=[],Ae=0;return Mi(C,se,"","",function(mt){return M.call(te,mt,Ae++)}),se}function xs(C){var M=0;return Qa(C,function(){M++}),M}function _s(C,M,te){Qa(C,function(){M.apply(this,arguments)},te)}function Ao(C){return Qa(C,function(M){return M})||[]}function Do(C){if(!Yt(C))throw new Error("React.Children.only expected to receive a single React element child.");return C}function Es(C){var M={$$typeof:_,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};M.Provider={$$typeof:b,_context:M};var te=!1,se=!1,Ae=!1;{var mt={$$typeof:_,_context:M};Object.defineProperties(mt,{Provider:{get:function(){return se||(se=!0,be("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),M.Provider},set:function(Me){M.Provider=Me}},_currentValue:{get:function(){return M._currentValue},set:function(Me){M._currentValue=Me}},_currentValue2:{get:function(){return M._currentValue2},set:function(Me){M._currentValue2=Me}},_threadCount:{get:function(){return M._threadCount},set:function(Me){M._threadCount=Me}},Consumer:{get:function(){return te||(te=!0,be("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),M.Consumer}},displayName:{get:function(){return M.displayName},set:function(Me){Ae||(De("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Me),Ae=!0)}}}),M.Consumer=mt}return M._currentRenderer=null,M._currentRenderer2=null,M}var Fr=-1,Br=0,br=1,_a=2;function aa(C){if(C._status===Fr){var M=C._result,te=M();if(te.then(function(mt){if(C._status===Br||C._status===Fr){var Me=C;Me._status=br,Me._result=mt}},function(mt){if(C._status===Br||C._status===Fr){var Me=C;Me._status=_a,Me._result=mt}}),C._status===Fr){var se=C;se._status=Br,se._result=te}}if(C._status===br){var Ae=C._result;return Ae===void 0&&be(`lazy: Expected the result of a dynamic import() call. Instead received: %s
17
+ */tv.exports;var Fk;function pj(){return Fk||(Fk=1,function(i,n){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var s="18.3.1",u=Symbol.for("react.element"),f=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),_=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),F=Symbol.iterator,Y="@@iterator";function q(C){if(C===null||typeof C!="object")return null;var M=F&&C[F]||C[Y];return typeof M=="function"?M:null}var I={current:null},ie={transition:null},le={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},fe={current:null},ne={},$e=null;function oe(C){$e=C}ne.setExtraStackFrame=function(C){$e=C},ne.getCurrentStack=null,ne.getStackAddendum=function(){var C="";$e&&(C+=$e);var M=ne.getCurrentStack;return M&&(C+=M()||""),C};var _e=!1,ke=!1,me=!1,ue=!1,Oe=!1,ze={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:ie,ReactCurrentOwner:fe};ze.ReactDebugCurrentFrame=ne,ze.ReactCurrentActQueue=le;function De(C){{for(var M=arguments.length,te=new Array(M>1?M-1:0),se=1;se<M;se++)te[se-1]=arguments[se];pe("warn",C,te)}}function be(C){{for(var M=arguments.length,te=new Array(M>1?M-1:0),se=1;se<M;se++)te[se-1]=arguments[se];pe("error",C,te)}}function pe(C,M,te){{var se=ze.ReactDebugCurrentFrame,Ae=se.getStackAddendum();Ae!==""&&(M+="%s",te=te.concat([Ae]));var mt=te.map(function(Me){return String(Me)});mt.unshift("Warning: "+M),Function.prototype.apply.call(console[C],console,mt)}}var je={};function Re(C,M){{var te=C.constructor,se=te&&(te.displayName||te.name)||"ReactClass",Ae=se+"."+M;if(je[Ae])return;be("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",M,se),je[Ae]=!0}}var B={isMounted:function(C){return!1},enqueueForceUpdate:function(C,M,te){Re(C,"forceUpdate")},enqueueReplaceState:function(C,M,te,se){Re(C,"replaceState")},enqueueSetState:function(C,M,te,se){Re(C,"setState")}},Q=Object.assign,Le={};Object.freeze(Le);function Ve(C,M,te){this.props=C,this.context=M,this.refs=Le,this.updater=te||B}Ve.prototype.isReactComponent={},Ve.prototype.setState=function(C,M){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,M,"setState")},Ve.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};{var st={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},wt=function(C,M){Object.defineProperty(Ve.prototype,C,{get:function(){De("%s(...) is deprecated in plain JavaScript React classes. %s",M[0],M[1])}})};for(var ct in st)st.hasOwnProperty(ct)&&wt(ct,st[ct])}function ut(){}ut.prototype=Ve.prototype;function Ot(C,M,te){this.props=C,this.context=M,this.refs=Le,this.updater=te||B}var Wt=Ot.prototype=new ut;Wt.constructor=Ot,Q(Wt,Ve.prototype),Wt.isPureReactComponent=!0;function gn(){var C={current:null};return Object.seal(C),C}var Hn=Array.isArray;function dn(C){return Hn(C)}function pt(C){{var M=typeof Symbol=="function"&&Symbol.toStringTag,te=M&&C[Symbol.toStringTag]||C.constructor.name||"Object";return te}}function An(C){try{return vn(C),!1}catch{return!0}}function vn(C){return""+C}function Wn(C){if(An(C))return be("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pt(C)),vn(C)}function ge(C,M,te){var se=C.displayName;if(se)return se;var Ae=M.displayName||M.name||"";return Ae!==""?te+"("+Ae+")":te}function Qe(C){return C.displayName||"Context"}function Je(C){if(C==null)return null;if(typeof C.tag=="number"&&be("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case v:return"Fragment";case f:return"Portal";case g:return"Profiler";case h:return"StrictMode";case R:return"Suspense";case N:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case _:var M=C;return Qe(M)+".Consumer";case b:var te=C;return Qe(te._context)+".Provider";case k:return ge(C,C.render,"ForwardRef");case A:var se=C.displayName||null;return se!==null?se:Je(C.type)||"Memo";case j:{var Ae=C,mt=Ae._payload,Me=Ae._init;try{return Je(Me(mt))}catch{return null}}}return null}var bt=Object.prototype.hasOwnProperty,Tt={key:!0,ref:!0,__self:!0,__source:!0},It,at,dt;dt={};function qt(C){if(bt.call(C,"ref")){var M=Object.getOwnPropertyDescriptor(C,"ref").get;if(M&&M.isReactWarning)return!1}return C.ref!==void 0}function yn(C){if(bt.call(C,"key")){var M=Object.getOwnPropertyDescriptor(C,"key").get;if(M&&M.isReactWarning)return!1}return C.key!==void 0}function Pe(C,M){var te=function(){It||(It=!0,be("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",M))};te.isReactWarning=!0,Object.defineProperty(C,"key",{get:te,configurable:!0})}function zt(C,M){var te=function(){at||(at=!0,be("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",M))};te.isReactWarning=!0,Object.defineProperty(C,"ref",{get:te,configurable:!0})}function Ee(C){if(typeof C.ref=="string"&&fe.current&&C.__self&&fe.current.stateNode!==C.__self){var M=Je(fe.current.type);dt[M]||(be('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M,C.ref),dt[M]=!0)}}var Ne=function(C,M,te,se,Ae,mt,Me){var St={$$typeof:u,type:C,key:M,ref:te,props:Me,_owner:mt};return St._store={},Object.defineProperty(St._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(St,"_self",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.defineProperty(St,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.freeze&&(Object.freeze(St.props),Object.freeze(St)),St};function nt(C,M,te){var se,Ae={},mt=null,Me=null,St=null,Vt=null;if(M!=null){qt(M)&&(Me=M.ref,Ee(M)),yn(M)&&(Wn(M.key),mt=""+M.key),St=M.__self===void 0?null:M.__self,Vt=M.__source===void 0?null:M.__source;for(se in M)bt.call(M,se)&&!Tt.hasOwnProperty(se)&&(Ae[se]=M[se])}var tn=arguments.length-2;if(tn===1)Ae.children=te;else if(tn>1){for(var Rn=Array(tn),Sn=0;Sn<tn;Sn++)Rn[Sn]=arguments[Sn+2];Object.freeze&&Object.freeze(Rn),Ae.children=Rn}if(C&&C.defaultProps){var $t=C.defaultProps;for(se in $t)Ae[se]===void 0&&(Ae[se]=$t[se])}if(mt||Me){var xn=typeof C=="function"?C.displayName||C.name||"Unknown":C;mt&&Pe(Ae,xn),Me&&zt(Ae,xn)}return Ne(C,mt,Me,St,Vt,fe.current,Ae)}function Ut(C,M){var te=Ne(C.type,M,C.ref,C._self,C._source,C._owner,C.props);return te}function vt(C,M,te){if(C==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var se,Ae=Q({},C.props),mt=C.key,Me=C.ref,St=C._self,Vt=C._source,tn=C._owner;if(M!=null){qt(M)&&(Me=M.ref,tn=fe.current),yn(M)&&(Wn(M.key),mt=""+M.key);var Rn;C.type&&C.type.defaultProps&&(Rn=C.type.defaultProps);for(se in M)bt.call(M,se)&&!Tt.hasOwnProperty(se)&&(M[se]===void 0&&Rn!==void 0?Ae[se]=Rn[se]:Ae[se]=M[se])}var Sn=arguments.length-2;if(Sn===1)Ae.children=te;else if(Sn>1){for(var $t=Array(Sn),xn=0;xn<Sn;xn++)$t[xn]=arguments[xn+2];Ae.children=$t}return Ne(C.type,mt,Me,St,Vt,tn,Ae)}function Yt(C){return typeof C=="object"&&C!==null&&C.$$typeof===u}var rn=".",Ln=":";function mn(C){var M=/[=:]/g,te={"=":"=0",":":"=2"},se=C.replace(M,function(Ae){return te[Ae]});return"$"+se}var fn=!1,wn=/\/+/g;function Ei(C){return C.replace(wn,"$&/")}function Pr(C,M){return typeof C=="object"&&C!==null&&C.key!=null?(Wn(C.key),mn(""+C.key)):M.toString(36)}function Mi(C,M,te,se,Ae){var mt=typeof C;(mt==="undefined"||mt==="boolean")&&(C=null);var Me=!1;if(C===null)Me=!0;else switch(mt){case"string":case"number":Me=!0;break;case"object":switch(C.$$typeof){case u:case f:Me=!0}}if(Me){var St=C,Vt=Ae(St),tn=se===""?rn+Pr(St,0):se;if(dn(Vt)){var Rn="";tn!=null&&(Rn=Ei(tn)+"/"),Mi(Vt,M,Rn,"",function(Kf){return Kf})}else Vt!=null&&(Yt(Vt)&&(Vt.key&&(!St||St.key!==Vt.key)&&Wn(Vt.key),Vt=Ut(Vt,te+(Vt.key&&(!St||St.key!==Vt.key)?Ei(""+Vt.key)+"/":"")+tn)),M.push(Vt));return 1}var Sn,$t,xn=0,$n=se===""?rn:se+Ln;if(dn(C))for(var Io=0;Io<C.length;Io++)Sn=C[Io],$t=$n+Pr(Sn,Io),xn+=Mi(Sn,M,te,$t,Ae);else{var ku=q(C);if(typeof ku=="function"){var to=C;ku===to.entries&&(fn||De("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fn=!0);for(var Cu=ku.call(to),Ds,Gf=0;!(Ds=Cu.next()).done;)Sn=Ds.value,$t=$n+Pr(Sn,Gf++),xn+=Mi(Sn,M,te,$t,Ae)}else if(mt==="object"){var qc=String(C);throw new Error("Objects are not valid as a React child (found: "+(qc==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":qc)+"). If you meant to render a collection of children, use an array instead.")}}return xn}function Qa(C,M,te){if(C==null)return C;var se=[],Ae=0;return Mi(C,se,"","",function(mt){return M.call(te,mt,Ae++)}),se}function xs(C){var M=0;return Qa(C,function(){M++}),M}function _s(C,M,te){Qa(C,function(){M.apply(this,arguments)},te)}function Ao(C){return Qa(C,function(M){return M})||[]}function Do(C){if(!Yt(C))throw new Error("React.Children.only expected to receive a single React element child.");return C}function Es(C){var M={$$typeof:_,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};M.Provider={$$typeof:b,_context:M};var te=!1,se=!1,Ae=!1;{var mt={$$typeof:_,_context:M};Object.defineProperties(mt,{Provider:{get:function(){return se||(se=!0,be("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),M.Provider},set:function(Me){M.Provider=Me}},_currentValue:{get:function(){return M._currentValue},set:function(Me){M._currentValue=Me}},_currentValue2:{get:function(){return M._currentValue2},set:function(Me){M._currentValue2=Me}},_threadCount:{get:function(){return M._threadCount},set:function(Me){M._threadCount=Me}},Consumer:{get:function(){return te||(te=!0,be("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),M.Consumer}},displayName:{get:function(){return M.displayName},set:function(Me){Ae||(De("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Me),Ae=!0)}}}),M.Consumer=mt}return M._currentRenderer=null,M._currentRenderer2=null,M}var Fr=-1,Br=0,br=1,_a=2;function aa(C){if(C._status===Fr){var M=C._result,te=M();if(te.then(function(mt){if(C._status===Br||C._status===Fr){var Me=C;Me._status=br,Me._result=mt}},function(mt){if(C._status===Br||C._status===Fr){var Me=C;Me._status=_a,Me._result=mt}}),C._status===Fr){var se=C;se._status=Br,se._result=te}}if(C._status===br){var Ae=C._result;return Ae===void 0&&be(`lazy: Expected the result of a dynamic import() call. Instead received: %s
18
18
 
19
19
  Your code should look like:
20
20
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -36,7 +36,7 @@ Check the render method of \``+C+"`."}return""}function xr(C){if(C!==void 0){var
36
36
 
37
37
  Check your code at `+M+":"+te+"."}return""}function Ta(C){return C!=null?xr(C.__source):""}var Vr={};function Ra(C){var M=Cl();if(!M){var te=typeof C=="string"?C:C.displayName||C.name;te&&(M=`
38
38
 
39
- Check the top-level render call using <`+te+">.")}return M}function Nn(C,M){if(!(!C._store||C._store.validated||C.key!=null)){C._store.validated=!0;var te=Ra(M);if(!Vr[te]){Vr[te]=!0;var se="";C&&C._owner&&C._owner!==fe.current&&(se=" It was passed a child from "+Je(C._owner.type)+"."),Ca(C),be('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,se),Ca(null)}}}function bn(C,M){if(typeof C=="object"){if(dn(C))for(var te=0;te<C.length;te++){var se=C[te];Yt(se)&&Nn(se,M)}else if(Yt(C))C._store&&(C._store.validated=!0);else if(C){var Ae=q(C);if(typeof Ae=="function"&&Ae!==C.entries)for(var mt=Ae.call(C),Me;!(Me=mt.next()).done;)Yt(Me.value)&&Nn(Me.value,M)}}}function Uo(C){{var M=C.type;if(M==null||typeof M=="string")return;var te;if(typeof M=="function")te=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===k||M.$$typeof===A))te=M.propTypes;else return;if(te){var se=Je(M);xu(te,C.props,"prop",se,C)}else if(M.PropTypes!==void 0&&!Rt){Rt=!0;var Ae=Je(M);be("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ae||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&be("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(C){{for(var M=Object.keys(C.props),te=0;te<M.length;te++){var se=M[te];if(se!=="children"&&se!=="key"){Ca(C),be("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",se),Ca(null);break}}C.ref!==null&&(Ca(C),be("Invalid attribute `ref` supplied to `React.Fragment`."),Ca(null))}}function Wr(C,M,te){var se=ve(C);if(!se){var Ae="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var mt=Ta(M);mt?Ae+=mt:Ae+=Cl();var Me;C===null?Me="null":dn(C)?Me="array":C!==void 0&&C.$$typeof===u?(Me="<"+(Je(C.type)||"Unknown")+" />",Ae=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof C,be("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,Ae)}var St=nt.apply(this,arguments);if(St==null)return St;if(se)for(var Vt=2;Vt<arguments.length;Vt++)bn(arguments[Vt],C);return C===v?ur(St):Uo(St),St}var $i=!1;function Rs(C){var M=Wr.bind(null,C);return M.type=C,$i||($i=!0,De("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(M,"type",{enumerable:!1,get:function(){return De("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:C}),C}}),M}function _u(C,M,te){for(var se=vt.apply(this,arguments),Ae=2;Ae<arguments.length;Ae++)bn(arguments[Ae],se.type);return Uo(se),se}function Eu(C,M){var te=ie.transition;ie.transition={};var se=ie.transition;ie.transition._updatedFibers=new Set;try{C()}finally{if(ie.transition=te,te===null&&se._updatedFibers){var Ae=se._updatedFibers.size;Ae>10&&De("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),se._updatedFibers.clear()}}}var Mo=!1,Os=null;function Yf(C){if(Os===null)try{var M=("require"+Math.random()).slice(0,7),te=i&&i[M];Os=te.call(i,"timers").setImmediate}catch{Os=function(Ae){Mo===!1&&(Mo=!0,typeof MessageChannel>"u"&&be("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var mt=new MessageChannel;mt.port1.onmessage=Ae,mt.port2.postMessage(void 0)}}return Os(C)}var Ii=0,da=!1;function Oa(C){{var M=Ii;Ii++,le.current===null&&(le.current=[]);var te=le.isBatchingLegacy,se;try{if(le.isBatchingLegacy=!0,se=C(),!te&&le.didScheduleLegacyUpdate){var Ae=le.current;Ae!==null&&(le.didScheduleLegacyUpdate=!1,$o(Ae))}}catch($t){throw zi(M),$t}finally{le.isBatchingLegacy=te}if(se!==null&&typeof se=="object"&&typeof se.then=="function"){var mt=se,Me=!1,St={then:function($t,xn){Me=!0,mt.then(function($n){zi(M),Ii===0?Tl($n,$t,xn):$t($n)},function($n){zi(M),xn($n)})}};return!da&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Me||(da=!0,be("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),St}else{var Vt=se;if(zi(M),Ii===0){var tn=le.current;tn!==null&&($o(tn),le.current=null);var Rn={then:function($t,xn){le.current===null?(le.current=[],Tl(Vt,$t,xn)):$t(Vt)}};return Rn}else{var Sn={then:function($t,xn){$t(Vt)}};return Sn}}}}function zi(C){C!==Ii-1&&be("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ii=C}function Tl(C,M,te){{var se=le.current;if(se!==null)try{$o(se),Yf(function(){se.length===0?(le.current=null,M(C)):Tl(C,M,te)})}catch(Ae){te(Ae)}else M(C)}}var Rl=!1;function $o(C){if(!Rl){Rl=!0;var M=0;try{for(;M<C.length;M++){var te=C[M];do te=te(!0);while(te!==null)}C.length=0}catch(se){throw C=C.slice(M+1),se}finally{Rl=!1}}}var As=Wr,Ol=_u,Al=Rs,fa={map:Qa,forEach:_s,count:xs,toArray:Ao,only:Do};n.Children=fa,n.Component=Ve,n.Fragment=v,n.Profiler=g,n.PureComponent=Ot,n.StrictMode=h,n.Suspense=R,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ze,n.act=Oa,n.cloneElement=Ol,n.createContext=Es,n.createElement=As,n.createFactory=Al,n.createRef=gn,n.forwardRef=ka,n.isValidElement=Yt,n.lazy=Ea,n.memo=Ie,n.startTransition=Eu,n.unstable_act=Oa,n.useCallback=Sr,n.useContext=jt,n.useDebugValue=Lt,n.useDeferredValue=la,n.useEffect=qn,n.useId=ks,n.useImperativeHandle=sa,n.useInsertionEffect=Tn,n.useLayoutEffect=Dn,n.useMemo=oa,n.useReducer=Ht,n.useRef=Ft,n.useState=At,n.useSyncExternalStore=Cs,n.useTransition=Mt,n.version=s,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(tv,tv.exports)),tv.exports}process.env.NODE_ENV==="production"?CS.exports=fj():CS.exports=hj();var G=CS.exports;/**
39
+ Check the top-level render call using <`+te+">.")}return M}function Nn(C,M){if(!(!C._store||C._store.validated||C.key!=null)){C._store.validated=!0;var te=Ra(M);if(!Vr[te]){Vr[te]=!0;var se="";C&&C._owner&&C._owner!==fe.current&&(se=" It was passed a child from "+Je(C._owner.type)+"."),Ca(C),be('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,se),Ca(null)}}}function bn(C,M){if(typeof C=="object"){if(dn(C))for(var te=0;te<C.length;te++){var se=C[te];Yt(se)&&Nn(se,M)}else if(Yt(C))C._store&&(C._store.validated=!0);else if(C){var Ae=q(C);if(typeof Ae=="function"&&Ae!==C.entries)for(var mt=Ae.call(C),Me;!(Me=mt.next()).done;)Yt(Me.value)&&Nn(Me.value,M)}}}function Uo(C){{var M=C.type;if(M==null||typeof M=="string")return;var te;if(typeof M=="function")te=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===k||M.$$typeof===A))te=M.propTypes;else return;if(te){var se=Je(M);xu(te,C.props,"prop",se,C)}else if(M.PropTypes!==void 0&&!Rt){Rt=!0;var Ae=Je(M);be("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ae||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&be("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(C){{for(var M=Object.keys(C.props),te=0;te<M.length;te++){var se=M[te];if(se!=="children"&&se!=="key"){Ca(C),be("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",se),Ca(null);break}}C.ref!==null&&(Ca(C),be("Invalid attribute `ref` supplied to `React.Fragment`."),Ca(null))}}function Wr(C,M,te){var se=ve(C);if(!se){var Ae="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var mt=Ta(M);mt?Ae+=mt:Ae+=Cl();var Me;C===null?Me="null":dn(C)?Me="array":C!==void 0&&C.$$typeof===u?(Me="<"+(Je(C.type)||"Unknown")+" />",Ae=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof C,be("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,Ae)}var St=nt.apply(this,arguments);if(St==null)return St;if(se)for(var Vt=2;Vt<arguments.length;Vt++)bn(arguments[Vt],C);return C===v?ur(St):Uo(St),St}var $i=!1;function Rs(C){var M=Wr.bind(null,C);return M.type=C,$i||($i=!0,De("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(M,"type",{enumerable:!1,get:function(){return De("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:C}),C}}),M}function _u(C,M,te){for(var se=vt.apply(this,arguments),Ae=2;Ae<arguments.length;Ae++)bn(arguments[Ae],se.type);return Uo(se),se}function Eu(C,M){var te=ie.transition;ie.transition={};var se=ie.transition;ie.transition._updatedFibers=new Set;try{C()}finally{if(ie.transition=te,te===null&&se._updatedFibers){var Ae=se._updatedFibers.size;Ae>10&&De("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),se._updatedFibers.clear()}}}var Mo=!1,Os=null;function Yf(C){if(Os===null)try{var M=("require"+Math.random()).slice(0,7),te=i&&i[M];Os=te.call(i,"timers").setImmediate}catch{Os=function(Ae){Mo===!1&&(Mo=!0,typeof MessageChannel>"u"&&be("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var mt=new MessageChannel;mt.port1.onmessage=Ae,mt.port2.postMessage(void 0)}}return Os(C)}var Ii=0,da=!1;function Oa(C){{var M=Ii;Ii++,le.current===null&&(le.current=[]);var te=le.isBatchingLegacy,se;try{if(le.isBatchingLegacy=!0,se=C(),!te&&le.didScheduleLegacyUpdate){var Ae=le.current;Ae!==null&&(le.didScheduleLegacyUpdate=!1,$o(Ae))}}catch($t){throw zi(M),$t}finally{le.isBatchingLegacy=te}if(se!==null&&typeof se=="object"&&typeof se.then=="function"){var mt=se,Me=!1,St={then:function($t,xn){Me=!0,mt.then(function($n){zi(M),Ii===0?Tl($n,$t,xn):$t($n)},function($n){zi(M),xn($n)})}};return!da&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Me||(da=!0,be("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),St}else{var Vt=se;if(zi(M),Ii===0){var tn=le.current;tn!==null&&($o(tn),le.current=null);var Rn={then:function($t,xn){le.current===null?(le.current=[],Tl(Vt,$t,xn)):$t(Vt)}};return Rn}else{var Sn={then:function($t,xn){$t(Vt)}};return Sn}}}}function zi(C){C!==Ii-1&&be("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ii=C}function Tl(C,M,te){{var se=le.current;if(se!==null)try{$o(se),Yf(function(){se.length===0?(le.current=null,M(C)):Tl(C,M,te)})}catch(Ae){te(Ae)}else M(C)}}var Rl=!1;function $o(C){if(!Rl){Rl=!0;var M=0;try{for(;M<C.length;M++){var te=C[M];do te=te(!0);while(te!==null)}C.length=0}catch(se){throw C=C.slice(M+1),se}finally{Rl=!1}}}var As=Wr,Ol=_u,Al=Rs,fa={map:Qa,forEach:_s,count:xs,toArray:Ao,only:Do};n.Children=fa,n.Component=Ve,n.Fragment=v,n.Profiler=g,n.PureComponent=Ot,n.StrictMode=h,n.Suspense=R,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ze,n.act=Oa,n.cloneElement=Ol,n.createContext=Es,n.createElement=As,n.createFactory=Al,n.createRef=gn,n.forwardRef=ka,n.isValidElement=Yt,n.lazy=Ea,n.memo=Ie,n.startTransition=Eu,n.unstable_act=Oa,n.useCallback=Sr,n.useContext=jt,n.useDebugValue=Lt,n.useDeferredValue=la,n.useEffect=qn,n.useId=ks,n.useImperativeHandle=sa,n.useInsertionEffect=Tn,n.useLayoutEffect=Dn,n.useMemo=oa,n.useReducer=Ht,n.useRef=Ft,n.useState=At,n.useSyncExternalStore=Cs,n.useTransition=Mt,n.version=s,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(tv,tv.exports)),tv.exports}process.env.NODE_ENV==="production"?CS.exports=hj():CS.exports=pj();var G=CS.exports;/**
40
40
  * @license React
41
41
  * react-jsx-runtime.production.min.js
42
42
  *
@@ -44,7 +44,7 @@ Check the top-level render call using <`+te+">.")}return M}function Nn(C,M){if(!
44
44
  *
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
- */var Bk;function pj(){if(Bk)return Xp;Bk=1;var i=G,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,f=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function h(g,b,_){var k,R={},N=null,A=null;_!==void 0&&(N=""+_),b.key!==void 0&&(N=""+b.key),b.ref!==void 0&&(A=b.ref);for(k in b)u.call(b,k)&&!v.hasOwnProperty(k)&&(R[k]=b[k]);if(g&&g.defaultProps)for(k in b=g.defaultProps,b)R[k]===void 0&&(R[k]=b[k]);return{$$typeof:n,type:g,key:N,ref:A,props:R,_owner:f.current}}return Xp.Fragment=s,Xp.jsx=h,Xp.jsxs=h,Xp}var Qp={};/**
47
+ */var Bk;function vj(){if(Bk)return Xp;Bk=1;var i=G,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,f=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function h(g,b,_){var k,R={},N=null,A=null;_!==void 0&&(N=""+_),b.key!==void 0&&(N=""+b.key),b.ref!==void 0&&(A=b.ref);for(k in b)u.call(b,k)&&!v.hasOwnProperty(k)&&(R[k]=b[k]);if(g&&g.defaultProps)for(k in b=g.defaultProps,b)R[k]===void 0&&(R[k]=b[k]);return{$$typeof:n,type:g,key:N,ref:A,props:R,_owner:f.current}}return Xp.Fragment=s,Xp.jsx=h,Xp.jsxs=h,Xp}var Qp={};/**
48
48
  * @license React
49
49
  * react-jsx-runtime.development.js
50
50
  *
@@ -52,7 +52,7 @@ Check the top-level render call using <`+te+">.")}return M}function Nn(C,M){if(!
52
52
  *
53
53
  * This source code is licensed under the MIT license found in the
54
54
  * LICENSE file in the root directory of this source tree.
55
- */var Hk;function vj(){return Hk||(Hk=1,process.env.NODE_ENV!=="production"&&function(){var i=G,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),g=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),j=Symbol.iterator,P="@@iterator";function F($){if($===null||typeof $!="object")return null;var ve=j&&$[j]||$[P];return typeof ve=="function"?ve:null}var Y=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function q($){{for(var ve=arguments.length,Ie=new Array(ve>1?ve-1:0),Xe=1;Xe<ve;Xe++)Ie[Xe-1]=arguments[Xe];I("error",$,Ie)}}function I($,ve,Ie){{var Xe=Y.ReactDebugCurrentFrame,jt=Xe.getStackAddendum();jt!==""&&(ve+="%s",Ie=Ie.concat([jt]));var At=Ie.map(function(Ht){return String(Ht)});At.unshift("Warning: "+ve),Function.prototype.apply.call(console[$],console,At)}}var ie=!1,le=!1,fe=!1,ne=!1,$e=!1,oe;oe=Symbol.for("react.module.reference");function _e($){return!!(typeof $=="string"||typeof $=="function"||$===u||$===v||$e||$===f||$===_||$===k||ne||$===A||ie||le||fe||typeof $=="object"&&$!==null&&($.$$typeof===N||$.$$typeof===R||$.$$typeof===h||$.$$typeof===g||$.$$typeof===b||$.$$typeof===oe||$.getModuleId!==void 0))}function ke($,ve,Ie){var Xe=$.displayName;if(Xe)return Xe;var jt=ve.displayName||ve.name||"";return jt!==""?Ie+"("+jt+")":Ie}function me($){return $.displayName||"Context"}function ue($){if($==null)return null;if(typeof $.tag=="number"&&q("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $=="function")return $.displayName||$.name||null;if(typeof $=="string")return $;switch($){case u:return"Fragment";case s:return"Portal";case v:return"Profiler";case f:return"StrictMode";case _:return"Suspense";case k:return"SuspenseList"}if(typeof $=="object")switch($.$$typeof){case g:var ve=$;return me(ve)+".Consumer";case h:var Ie=$;return me(Ie._context)+".Provider";case b:return ke($,$.render,"ForwardRef");case R:var Xe=$.displayName||null;return Xe!==null?Xe:ue($.type)||"Memo";case N:{var jt=$,At=jt._payload,Ht=jt._init;try{return ue(Ht(At))}catch{return null}}}return null}var Oe=Object.assign,ze=0,De,be,pe,je,Re,B,Q;function Le(){}Le.__reactDisabledLog=!0;function Ve(){{if(ze===0){De=console.log,be=console.info,pe=console.warn,je=console.error,Re=console.group,B=console.groupCollapsed,Q=console.groupEnd;var $={configurable:!0,enumerable:!0,value:Le,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}ze++}}function st(){{if(ze--,ze===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Oe({},$,{value:De}),info:Oe({},$,{value:be}),warn:Oe({},$,{value:pe}),error:Oe({},$,{value:je}),group:Oe({},$,{value:Re}),groupCollapsed:Oe({},$,{value:B}),groupEnd:Oe({},$,{value:Q})})}ze<0&&q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var wt=Y.ReactCurrentDispatcher,ct;function ut($,ve,Ie){{if(ct===void 0)try{throw Error()}catch(jt){var Xe=jt.stack.trim().match(/\n( *(at )?)/);ct=Xe&&Xe[1]||""}return`
55
+ */var Hk;function mj(){return Hk||(Hk=1,process.env.NODE_ENV!=="production"&&function(){var i=G,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),g=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),j=Symbol.iterator,P="@@iterator";function F($){if($===null||typeof $!="object")return null;var ve=j&&$[j]||$[P];return typeof ve=="function"?ve:null}var Y=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function q($){{for(var ve=arguments.length,Ie=new Array(ve>1?ve-1:0),Xe=1;Xe<ve;Xe++)Ie[Xe-1]=arguments[Xe];I("error",$,Ie)}}function I($,ve,Ie){{var Xe=Y.ReactDebugCurrentFrame,jt=Xe.getStackAddendum();jt!==""&&(ve+="%s",Ie=Ie.concat([jt]));var At=Ie.map(function(Ht){return String(Ht)});At.unshift("Warning: "+ve),Function.prototype.apply.call(console[$],console,At)}}var ie=!1,le=!1,fe=!1,ne=!1,$e=!1,oe;oe=Symbol.for("react.module.reference");function _e($){return!!(typeof $=="string"||typeof $=="function"||$===u||$===v||$e||$===f||$===_||$===k||ne||$===A||ie||le||fe||typeof $=="object"&&$!==null&&($.$$typeof===N||$.$$typeof===R||$.$$typeof===h||$.$$typeof===g||$.$$typeof===b||$.$$typeof===oe||$.getModuleId!==void 0))}function ke($,ve,Ie){var Xe=$.displayName;if(Xe)return Xe;var jt=ve.displayName||ve.name||"";return jt!==""?Ie+"("+jt+")":Ie}function me($){return $.displayName||"Context"}function ue($){if($==null)return null;if(typeof $.tag=="number"&&q("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $=="function")return $.displayName||$.name||null;if(typeof $=="string")return $;switch($){case u:return"Fragment";case s:return"Portal";case v:return"Profiler";case f:return"StrictMode";case _:return"Suspense";case k:return"SuspenseList"}if(typeof $=="object")switch($.$$typeof){case g:var ve=$;return me(ve)+".Consumer";case h:var Ie=$;return me(Ie._context)+".Provider";case b:return ke($,$.render,"ForwardRef");case R:var Xe=$.displayName||null;return Xe!==null?Xe:ue($.type)||"Memo";case N:{var jt=$,At=jt._payload,Ht=jt._init;try{return ue(Ht(At))}catch{return null}}}return null}var Oe=Object.assign,ze=0,De,be,pe,je,Re,B,Q;function Le(){}Le.__reactDisabledLog=!0;function Ve(){{if(ze===0){De=console.log,be=console.info,pe=console.warn,je=console.error,Re=console.group,B=console.groupCollapsed,Q=console.groupEnd;var $={configurable:!0,enumerable:!0,value:Le,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}ze++}}function st(){{if(ze--,ze===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Oe({},$,{value:De}),info:Oe({},$,{value:be}),warn:Oe({},$,{value:pe}),error:Oe({},$,{value:je}),group:Oe({},$,{value:Re}),groupCollapsed:Oe({},$,{value:B}),groupEnd:Oe({},$,{value:Q})})}ze<0&&q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var wt=Y.ReactCurrentDispatcher,ct;function ut($,ve,Ie){{if(ct===void 0)try{throw Error()}catch(jt){var Xe=jt.stack.trim().match(/\n( *(at )?)/);ct=Xe&&Xe[1]||""}return`
56
56
  `+ct+$}}var Ot=!1,Wt;{var gn=typeof WeakMap=="function"?WeakMap:Map;Wt=new gn}function Hn($,ve){if(!$||Ot)return"";{var Ie=Wt.get($);if(Ie!==void 0)return Ie}var Xe;Ot=!0;var jt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var At;At=wt.current,wt.current=null,Ve();try{if(ve){var Ht=function(){throw Error()};if(Object.defineProperty(Ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ht,[])}catch(Lt){Xe=Lt}Reflect.construct($,[],Ht)}else{try{Ht.call()}catch(Lt){Xe=Lt}$.call(Ht.prototype)}}else{try{throw Error()}catch(Lt){Xe=Lt}$()}}catch(Lt){if(Lt&&Xe&&typeof Lt.stack=="string"){for(var Ft=Lt.stack.split(`
57
57
  `),qn=Xe.stack.split(`
58
58
  `),Tn=Ft.length-1,Dn=qn.length-1;Tn>=1&&Dn>=0&&Ft[Tn]!==qn[Dn];)Dn--;for(;Tn>=1&&Dn>=0;Tn--,Dn--)if(Ft[Tn]!==qn[Dn]){if(Tn!==1||Dn!==1)do if(Tn--,Dn--,Dn<0||Ft[Tn]!==qn[Dn]){var Sr=`
@@ -65,7 +65,7 @@ Check the top-level render call using <`+Ie+">.")}return ve}}function Ao($,ve){{
65
65
  <%s {...props} />
66
66
  React keys must be passed directly to JSX without using spread:
67
67
  let props = %s;
68
- <%s key={someKey} {...props} />`,Mt,sa,la,sa),Br[sa+Mt]=!0}}return $===u?Fr(Dn):Es(Dn),Dn}}function _a($,ve,Ie){return br($,ve,Ie,!0)}function aa($,ve,Ie){return br($,ve,Ie,!1)}var Ea=aa,ka=_a;Qp.Fragment=u,Qp.jsx=Ea,Qp.jsxs=ka}()),Qp}process.env.NODE_ENV==="production"?kS.exports=pj():kS.exports=vj();var O=kS.exports,TS={exports:{}},na={},cy={exports:{}},cS={};/**
68
+ <%s key={someKey} {...props} />`,Mt,sa,la,sa),Br[sa+Mt]=!0}}return $===u?Fr(Dn):Es(Dn),Dn}}function _a($,ve,Ie){return br($,ve,Ie,!0)}function aa($,ve,Ie){return br($,ve,Ie,!1)}var Ea=aa,ka=_a;Qp.Fragment=u,Qp.jsx=Ea,Qp.jsxs=ka}()),Qp}process.env.NODE_ENV==="production"?kS.exports=vj():kS.exports=mj();var O=kS.exports,TS={exports:{}},na={},cy={exports:{}},cS={};/**
69
69
  * @license React
70
70
  * scheduler.production.min.js
71
71
  *
@@ -73,7 +73,7 @@ React keys must be passed directly to JSX without using spread:
73
73
  *
74
74
  * This source code is licensed under the MIT license found in the
75
75
  * LICENSE file in the root directory of this source tree.
76
- */var Vk;function mj(){return Vk||(Vk=1,function(i){function n(pe,je){var Re=pe.length;pe.push(je);e:for(;0<Re;){var B=Re-1>>>1,Q=pe[B];if(0<f(Q,je))pe[B]=je,pe[Re]=Q,Re=B;else break e}}function s(pe){return pe.length===0?null:pe[0]}function u(pe){if(pe.length===0)return null;var je=pe[0],Re=pe.pop();if(Re!==je){pe[0]=Re;e:for(var B=0,Q=pe.length,Le=Q>>>1;B<Le;){var Ve=2*(B+1)-1,st=pe[Ve],wt=Ve+1,ct=pe[wt];if(0>f(st,Re))wt<Q&&0>f(ct,st)?(pe[B]=ct,pe[wt]=Re,B=wt):(pe[B]=st,pe[Ve]=Re,B=Ve);else if(wt<Q&&0>f(ct,Re))pe[B]=ct,pe[wt]=Re,B=wt;else break e}}return je}function f(pe,je){var Re=pe.sortIndex-je.sortIndex;return Re!==0?Re:pe.id-je.id}if(typeof performance=="object"&&typeof performance.now=="function"){var v=performance;i.unstable_now=function(){return v.now()}}else{var h=Date,g=h.now();i.unstable_now=function(){return h.now()-g}}var b=[],_=[],k=1,R=null,N=3,A=!1,j=!1,P=!1,F=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(pe){for(var je=s(_);je!==null;){if(je.callback===null)u(_);else if(je.startTime<=pe)u(_),je.sortIndex=je.expirationTime,n(b,je);else break;je=s(_)}}function ie(pe){if(P=!1,I(pe),!j)if(s(b)!==null)j=!0,De(le);else{var je=s(_);je!==null&&be(ie,je.startTime-pe)}}function le(pe,je){j=!1,P&&(P=!1,Y($e),$e=-1),A=!0;var Re=N;try{for(I(je),R=s(b);R!==null&&(!(R.expirationTime>je)||pe&&!ke());){var B=R.callback;if(typeof B=="function"){R.callback=null,N=R.priorityLevel;var Q=B(R.expirationTime<=je);je=i.unstable_now(),typeof Q=="function"?R.callback=Q:R===s(b)&&u(b),I(je)}else u(b);R=s(b)}if(R!==null)var Le=!0;else{var Ve=s(_);Ve!==null&&be(ie,Ve.startTime-je),Le=!1}return Le}finally{R=null,N=Re,A=!1}}var fe=!1,ne=null,$e=-1,oe=5,_e=-1;function ke(){return!(i.unstable_now()-_e<oe)}function me(){if(ne!==null){var pe=i.unstable_now();_e=pe;var je=!0;try{je=ne(!0,pe)}finally{je?ue():(fe=!1,ne=null)}}else fe=!1}var ue;if(typeof q=="function")ue=function(){q(me)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,ze=Oe.port2;Oe.port1.onmessage=me,ue=function(){ze.postMessage(null)}}else ue=function(){F(me,0)};function De(pe){ne=pe,fe||(fe=!0,ue())}function be(pe,je){$e=F(function(){pe(i.unstable_now())},je)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(pe){pe.callback=null},i.unstable_continueExecution=function(){j||A||(j=!0,De(le))},i.unstable_forceFrameRate=function(pe){0>pe||125<pe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<pe?Math.floor(1e3/pe):5},i.unstable_getCurrentPriorityLevel=function(){return N},i.unstable_getFirstCallbackNode=function(){return s(b)},i.unstable_next=function(pe){switch(N){case 1:case 2:case 3:var je=3;break;default:je=N}var Re=N;N=je;try{return pe()}finally{N=Re}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(pe,je){switch(pe){case 1:case 2:case 3:case 4:case 5:break;default:pe=3}var Re=N;N=pe;try{return je()}finally{N=Re}},i.unstable_scheduleCallback=function(pe,je,Re){var B=i.unstable_now();switch(typeof Re=="object"&&Re!==null?(Re=Re.delay,Re=typeof Re=="number"&&0<Re?B+Re:B):Re=B,pe){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=Re+Q,pe={id:k++,callback:je,priorityLevel:pe,startTime:Re,expirationTime:Q,sortIndex:-1},Re>B?(pe.sortIndex=Re,n(_,pe),s(b)===null&&pe===s(_)&&(P?(Y($e),$e=-1):P=!0,be(ie,Re-B))):(pe.sortIndex=Q,n(b,pe),j||A||(j=!0,De(le))),pe},i.unstable_shouldYield=ke,i.unstable_wrapCallback=function(pe){var je=N;return function(){var Re=N;N=je;try{return pe.apply(this,arguments)}finally{N=Re}}}}(cS)),cS}var dS={};/**
76
+ */var Vk;function gj(){return Vk||(Vk=1,function(i){function n(pe,je){var Re=pe.length;pe.push(je);e:for(;0<Re;){var B=Re-1>>>1,Q=pe[B];if(0<f(Q,je))pe[B]=je,pe[Re]=Q,Re=B;else break e}}function s(pe){return pe.length===0?null:pe[0]}function u(pe){if(pe.length===0)return null;var je=pe[0],Re=pe.pop();if(Re!==je){pe[0]=Re;e:for(var B=0,Q=pe.length,Le=Q>>>1;B<Le;){var Ve=2*(B+1)-1,st=pe[Ve],wt=Ve+1,ct=pe[wt];if(0>f(st,Re))wt<Q&&0>f(ct,st)?(pe[B]=ct,pe[wt]=Re,B=wt):(pe[B]=st,pe[Ve]=Re,B=Ve);else if(wt<Q&&0>f(ct,Re))pe[B]=ct,pe[wt]=Re,B=wt;else break e}}return je}function f(pe,je){var Re=pe.sortIndex-je.sortIndex;return Re!==0?Re:pe.id-je.id}if(typeof performance=="object"&&typeof performance.now=="function"){var v=performance;i.unstable_now=function(){return v.now()}}else{var h=Date,g=h.now();i.unstable_now=function(){return h.now()-g}}var b=[],_=[],k=1,R=null,N=3,A=!1,j=!1,P=!1,F=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(pe){for(var je=s(_);je!==null;){if(je.callback===null)u(_);else if(je.startTime<=pe)u(_),je.sortIndex=je.expirationTime,n(b,je);else break;je=s(_)}}function ie(pe){if(P=!1,I(pe),!j)if(s(b)!==null)j=!0,De(le);else{var je=s(_);je!==null&&be(ie,je.startTime-pe)}}function le(pe,je){j=!1,P&&(P=!1,Y($e),$e=-1),A=!0;var Re=N;try{for(I(je),R=s(b);R!==null&&(!(R.expirationTime>je)||pe&&!ke());){var B=R.callback;if(typeof B=="function"){R.callback=null,N=R.priorityLevel;var Q=B(R.expirationTime<=je);je=i.unstable_now(),typeof Q=="function"?R.callback=Q:R===s(b)&&u(b),I(je)}else u(b);R=s(b)}if(R!==null)var Le=!0;else{var Ve=s(_);Ve!==null&&be(ie,Ve.startTime-je),Le=!1}return Le}finally{R=null,N=Re,A=!1}}var fe=!1,ne=null,$e=-1,oe=5,_e=-1;function ke(){return!(i.unstable_now()-_e<oe)}function me(){if(ne!==null){var pe=i.unstable_now();_e=pe;var je=!0;try{je=ne(!0,pe)}finally{je?ue():(fe=!1,ne=null)}}else fe=!1}var ue;if(typeof q=="function")ue=function(){q(me)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,ze=Oe.port2;Oe.port1.onmessage=me,ue=function(){ze.postMessage(null)}}else ue=function(){F(me,0)};function De(pe){ne=pe,fe||(fe=!0,ue())}function be(pe,je){$e=F(function(){pe(i.unstable_now())},je)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(pe){pe.callback=null},i.unstable_continueExecution=function(){j||A||(j=!0,De(le))},i.unstable_forceFrameRate=function(pe){0>pe||125<pe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<pe?Math.floor(1e3/pe):5},i.unstable_getCurrentPriorityLevel=function(){return N},i.unstable_getFirstCallbackNode=function(){return s(b)},i.unstable_next=function(pe){switch(N){case 1:case 2:case 3:var je=3;break;default:je=N}var Re=N;N=je;try{return pe()}finally{N=Re}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(pe,je){switch(pe){case 1:case 2:case 3:case 4:case 5:break;default:pe=3}var Re=N;N=pe;try{return je()}finally{N=Re}},i.unstable_scheduleCallback=function(pe,je,Re){var B=i.unstable_now();switch(typeof Re=="object"&&Re!==null?(Re=Re.delay,Re=typeof Re=="number"&&0<Re?B+Re:B):Re=B,pe){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=Re+Q,pe={id:k++,callback:je,priorityLevel:pe,startTime:Re,expirationTime:Q,sortIndex:-1},Re>B?(pe.sortIndex=Re,n(_,pe),s(b)===null&&pe===s(_)&&(P?(Y($e),$e=-1):P=!0,be(ie,Re-B))):(pe.sortIndex=Q,n(b,pe),j||A||(j=!0,De(le))),pe},i.unstable_shouldYield=ke,i.unstable_wrapCallback=function(pe){var je=N;return function(){var Re=N;N=je;try{return pe.apply(this,arguments)}finally{N=Re}}}}(cS)),cS}var dS={};/**
77
77
  * @license React
78
78
  * scheduler.development.js
79
79
  *
@@ -81,7 +81,7 @@ React keys must be passed directly to JSX without using spread:
81
81
  *
82
82
  * This source code is licensed under the MIT license found in the
83
83
  * LICENSE file in the root directory of this source tree.
84
- */var Wk;function gj(){return Wk||(Wk=1,function(i){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=!1,s=5;function u(Ee,Ne){var nt=Ee.length;Ee.push(Ne),h(Ee,Ne,nt)}function f(Ee){return Ee.length===0?null:Ee[0]}function v(Ee){if(Ee.length===0)return null;var Ne=Ee[0],nt=Ee.pop();return nt!==Ne&&(Ee[0]=nt,g(Ee,nt,0)),Ne}function h(Ee,Ne,nt){for(var Ut=nt;Ut>0;){var vt=Ut-1>>>1,Yt=Ee[vt];if(b(Yt,Ne)>0)Ee[vt]=Ne,Ee[Ut]=Yt,Ut=vt;else return}}function g(Ee,Ne,nt){for(var Ut=nt,vt=Ee.length,Yt=vt>>>1;Ut<Yt;){var rn=(Ut+1)*2-1,Ln=Ee[rn],mn=rn+1,fn=Ee[mn];if(b(Ln,Ne)<0)mn<vt&&b(fn,Ln)<0?(Ee[Ut]=fn,Ee[mn]=Ne,Ut=mn):(Ee[Ut]=Ln,Ee[rn]=Ne,Ut=rn);else if(mn<vt&&b(fn,Ne)<0)Ee[Ut]=fn,Ee[mn]=Ne,Ut=mn;else return}}function b(Ee,Ne){var nt=Ee.sortIndex-Ne.sortIndex;return nt!==0?nt:Ee.id-Ne.id}var _=1,k=2,R=3,N=4,A=5;function j(Ee,Ne){}var P=typeof performance=="object"&&typeof performance.now=="function";if(P){var F=performance;i.unstable_now=function(){return F.now()}}else{var Y=Date,q=Y.now();i.unstable_now=function(){return Y.now()-q}}var I=1073741823,ie=-1,le=250,fe=5e3,ne=1e4,$e=I,oe=[],_e=[],ke=1,me=null,ue=R,Oe=!1,ze=!1,De=!1,be=typeof setTimeout=="function"?setTimeout:null,pe=typeof clearTimeout=="function"?clearTimeout:null,je=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Re(Ee){for(var Ne=f(_e);Ne!==null;){if(Ne.callback===null)v(_e);else if(Ne.startTime<=Ee)v(_e),Ne.sortIndex=Ne.expirationTime,u(oe,Ne);else return;Ne=f(_e)}}function B(Ee){if(De=!1,Re(Ee),!ze)if(f(oe)!==null)ze=!0,dt(Q);else{var Ne=f(_e);Ne!==null&&qt(B,Ne.startTime-Ee)}}function Q(Ee,Ne){ze=!1,De&&(De=!1,yn()),Oe=!0;var nt=ue;try{var Ut;if(!n)return Le(Ee,Ne)}finally{me=null,ue=nt,Oe=!1}}function Le(Ee,Ne){var nt=Ne;for(Re(nt),me=f(oe);me!==null&&!(me.expirationTime>nt&&(!Ee||ge()));){var Ut=me.callback;if(typeof Ut=="function"){me.callback=null,ue=me.priorityLevel;var vt=me.expirationTime<=nt,Yt=Ut(vt);nt=i.unstable_now(),typeof Yt=="function"?me.callback=Yt:me===f(oe)&&v(oe),Re(nt)}else v(oe);me=f(oe)}if(me!==null)return!0;var rn=f(_e);return rn!==null&&qt(B,rn.startTime-nt),!1}function Ve(Ee,Ne){switch(Ee){case _:case k:case R:case N:case A:break;default:Ee=R}var nt=ue;ue=Ee;try{return Ne()}finally{ue=nt}}function st(Ee){var Ne;switch(ue){case _:case k:case R:Ne=R;break;default:Ne=ue;break}var nt=ue;ue=Ne;try{return Ee()}finally{ue=nt}}function wt(Ee){var Ne=ue;return function(){var nt=ue;ue=Ne;try{return Ee.apply(this,arguments)}finally{ue=nt}}}function ct(Ee,Ne,nt){var Ut=i.unstable_now(),vt;if(typeof nt=="object"&&nt!==null){var Yt=nt.delay;typeof Yt=="number"&&Yt>0?vt=Ut+Yt:vt=Ut}else vt=Ut;var rn;switch(Ee){case _:rn=ie;break;case k:rn=le;break;case A:rn=$e;break;case N:rn=ne;break;case R:default:rn=fe;break}var Ln=vt+rn,mn={id:ke++,callback:Ne,priorityLevel:Ee,startTime:vt,expirationTime:Ln,sortIndex:-1};return vt>Ut?(mn.sortIndex=vt,u(_e,mn),f(oe)===null&&mn===f(_e)&&(De?yn():De=!0,qt(B,vt-Ut))):(mn.sortIndex=Ln,u(oe,mn),!ze&&!Oe&&(ze=!0,dt(Q))),mn}function ut(){}function Ot(){!ze&&!Oe&&(ze=!0,dt(Q))}function Wt(){return f(oe)}function gn(Ee){Ee.callback=null}function Hn(){return ue}var dn=!1,pt=null,An=-1,vn=s,Wn=-1;function ge(){var Ee=i.unstable_now()-Wn;return!(Ee<vn)}function Qe(){}function Je(Ee){if(Ee<0||Ee>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Ee>0?vn=Math.floor(1e3/Ee):vn=s}var bt=function(){if(pt!==null){var Ee=i.unstable_now();Wn=Ee;var Ne=!0,nt=!0;try{nt=pt(Ne,Ee)}finally{nt?Tt():(dn=!1,pt=null)}}else dn=!1},Tt;if(typeof je=="function")Tt=function(){je(bt)};else if(typeof MessageChannel<"u"){var It=new MessageChannel,at=It.port2;It.port1.onmessage=bt,Tt=function(){at.postMessage(null)}}else Tt=function(){be(bt,0)};function dt(Ee){pt=Ee,dn||(dn=!0,Tt())}function qt(Ee,Ne){An=be(function(){Ee(i.unstable_now())},Ne)}function yn(){pe(An),An=-1}var Pe=Qe,zt=null;i.unstable_IdlePriority=A,i.unstable_ImmediatePriority=_,i.unstable_LowPriority=N,i.unstable_NormalPriority=R,i.unstable_Profiling=zt,i.unstable_UserBlockingPriority=k,i.unstable_cancelCallback=gn,i.unstable_continueExecution=Ot,i.unstable_forceFrameRate=Je,i.unstable_getCurrentPriorityLevel=Hn,i.unstable_getFirstCallbackNode=Wt,i.unstable_next=st,i.unstable_pauseExecution=ut,i.unstable_requestPaint=Pe,i.unstable_runWithPriority=Ve,i.unstable_scheduleCallback=ct,i.unstable_shouldYield=ge,i.unstable_wrapCallback=wt,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(dS)),dS}var qk;function a1(){return qk||(qk=1,process.env.NODE_ENV==="production"?cy.exports=mj():cy.exports=gj()),cy.exports}/**
84
+ */var Wk;function yj(){return Wk||(Wk=1,function(i){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=!1,s=5;function u(Ee,Ne){var nt=Ee.length;Ee.push(Ne),h(Ee,Ne,nt)}function f(Ee){return Ee.length===0?null:Ee[0]}function v(Ee){if(Ee.length===0)return null;var Ne=Ee[0],nt=Ee.pop();return nt!==Ne&&(Ee[0]=nt,g(Ee,nt,0)),Ne}function h(Ee,Ne,nt){for(var Ut=nt;Ut>0;){var vt=Ut-1>>>1,Yt=Ee[vt];if(b(Yt,Ne)>0)Ee[vt]=Ne,Ee[Ut]=Yt,Ut=vt;else return}}function g(Ee,Ne,nt){for(var Ut=nt,vt=Ee.length,Yt=vt>>>1;Ut<Yt;){var rn=(Ut+1)*2-1,Ln=Ee[rn],mn=rn+1,fn=Ee[mn];if(b(Ln,Ne)<0)mn<vt&&b(fn,Ln)<0?(Ee[Ut]=fn,Ee[mn]=Ne,Ut=mn):(Ee[Ut]=Ln,Ee[rn]=Ne,Ut=rn);else if(mn<vt&&b(fn,Ne)<0)Ee[Ut]=fn,Ee[mn]=Ne,Ut=mn;else return}}function b(Ee,Ne){var nt=Ee.sortIndex-Ne.sortIndex;return nt!==0?nt:Ee.id-Ne.id}var _=1,k=2,R=3,N=4,A=5;function j(Ee,Ne){}var P=typeof performance=="object"&&typeof performance.now=="function";if(P){var F=performance;i.unstable_now=function(){return F.now()}}else{var Y=Date,q=Y.now();i.unstable_now=function(){return Y.now()-q}}var I=1073741823,ie=-1,le=250,fe=5e3,ne=1e4,$e=I,oe=[],_e=[],ke=1,me=null,ue=R,Oe=!1,ze=!1,De=!1,be=typeof setTimeout=="function"?setTimeout:null,pe=typeof clearTimeout=="function"?clearTimeout:null,je=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Re(Ee){for(var Ne=f(_e);Ne!==null;){if(Ne.callback===null)v(_e);else if(Ne.startTime<=Ee)v(_e),Ne.sortIndex=Ne.expirationTime,u(oe,Ne);else return;Ne=f(_e)}}function B(Ee){if(De=!1,Re(Ee),!ze)if(f(oe)!==null)ze=!0,dt(Q);else{var Ne=f(_e);Ne!==null&&qt(B,Ne.startTime-Ee)}}function Q(Ee,Ne){ze=!1,De&&(De=!1,yn()),Oe=!0;var nt=ue;try{var Ut;if(!n)return Le(Ee,Ne)}finally{me=null,ue=nt,Oe=!1}}function Le(Ee,Ne){var nt=Ne;for(Re(nt),me=f(oe);me!==null&&!(me.expirationTime>nt&&(!Ee||ge()));){var Ut=me.callback;if(typeof Ut=="function"){me.callback=null,ue=me.priorityLevel;var vt=me.expirationTime<=nt,Yt=Ut(vt);nt=i.unstable_now(),typeof Yt=="function"?me.callback=Yt:me===f(oe)&&v(oe),Re(nt)}else v(oe);me=f(oe)}if(me!==null)return!0;var rn=f(_e);return rn!==null&&qt(B,rn.startTime-nt),!1}function Ve(Ee,Ne){switch(Ee){case _:case k:case R:case N:case A:break;default:Ee=R}var nt=ue;ue=Ee;try{return Ne()}finally{ue=nt}}function st(Ee){var Ne;switch(ue){case _:case k:case R:Ne=R;break;default:Ne=ue;break}var nt=ue;ue=Ne;try{return Ee()}finally{ue=nt}}function wt(Ee){var Ne=ue;return function(){var nt=ue;ue=Ne;try{return Ee.apply(this,arguments)}finally{ue=nt}}}function ct(Ee,Ne,nt){var Ut=i.unstable_now(),vt;if(typeof nt=="object"&&nt!==null){var Yt=nt.delay;typeof Yt=="number"&&Yt>0?vt=Ut+Yt:vt=Ut}else vt=Ut;var rn;switch(Ee){case _:rn=ie;break;case k:rn=le;break;case A:rn=$e;break;case N:rn=ne;break;case R:default:rn=fe;break}var Ln=vt+rn,mn={id:ke++,callback:Ne,priorityLevel:Ee,startTime:vt,expirationTime:Ln,sortIndex:-1};return vt>Ut?(mn.sortIndex=vt,u(_e,mn),f(oe)===null&&mn===f(_e)&&(De?yn():De=!0,qt(B,vt-Ut))):(mn.sortIndex=Ln,u(oe,mn),!ze&&!Oe&&(ze=!0,dt(Q))),mn}function ut(){}function Ot(){!ze&&!Oe&&(ze=!0,dt(Q))}function Wt(){return f(oe)}function gn(Ee){Ee.callback=null}function Hn(){return ue}var dn=!1,pt=null,An=-1,vn=s,Wn=-1;function ge(){var Ee=i.unstable_now()-Wn;return!(Ee<vn)}function Qe(){}function Je(Ee){if(Ee<0||Ee>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Ee>0?vn=Math.floor(1e3/Ee):vn=s}var bt=function(){if(pt!==null){var Ee=i.unstable_now();Wn=Ee;var Ne=!0,nt=!0;try{nt=pt(Ne,Ee)}finally{nt?Tt():(dn=!1,pt=null)}}else dn=!1},Tt;if(typeof je=="function")Tt=function(){je(bt)};else if(typeof MessageChannel<"u"){var It=new MessageChannel,at=It.port2;It.port1.onmessage=bt,Tt=function(){at.postMessage(null)}}else Tt=function(){be(bt,0)};function dt(Ee){pt=Ee,dn||(dn=!0,Tt())}function qt(Ee,Ne){An=be(function(){Ee(i.unstable_now())},Ne)}function yn(){pe(An),An=-1}var Pe=Qe,zt=null;i.unstable_IdlePriority=A,i.unstable_ImmediatePriority=_,i.unstable_LowPriority=N,i.unstable_NormalPriority=R,i.unstable_Profiling=zt,i.unstable_UserBlockingPriority=k,i.unstable_cancelCallback=gn,i.unstable_continueExecution=Ot,i.unstable_forceFrameRate=Je,i.unstable_getCurrentPriorityLevel=Hn,i.unstable_getFirstCallbackNode=Wt,i.unstable_next=st,i.unstable_pauseExecution=ut,i.unstable_requestPaint=Pe,i.unstable_runWithPriority=Ve,i.unstable_scheduleCallback=ct,i.unstable_shouldYield=ge,i.unstable_wrapCallback=wt,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(dS)),dS}var qk;function a1(){return qk||(qk=1,process.env.NODE_ENV==="production"?cy.exports=gj():cy.exports=yj()),cy.exports}/**
85
85
  * @license React
86
86
  * react-dom.production.min.js
87
87
  *
@@ -89,7 +89,7 @@ React keys must be passed directly to JSX without using spread:
89
89
  *
90
90
  * This source code is licensed under the MIT license found in the
91
91
  * LICENSE file in the root directory of this source tree.
92
- */var Yk;function yj(){if(Yk)return na;Yk=1;var i=G,n=a1();function s(r){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=new Set,f={};function v(r,a){h(r,a),h(r+"Capture",a)}function h(r,a){for(f[r]=a,r=0;r<a.length;r++)u.add(a[r])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),b=Object.prototype.hasOwnProperty,_=/^[: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]*$/,k={},R={};function N(r){return b.call(R,r)?!0:b.call(k,r)?!1:_.test(r)?R[r]=!0:(k[r]=!0,!1)}function A(r,a,c,p){if(c!==null&&c.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function j(r,a,c,p){if(a===null||typeof a>"u"||A(r,a,c,p))return!0;if(p)return!1;if(c!==null)switch(c.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function P(r,a,c,p,y,S,T){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=r,this.type=a,this.sanitizeURL=S,this.removeEmptyString=T}var F={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){F[r]=new P(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var a=r[0];F[a]=new P(a,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){F[r]=new P(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){F[r]=new P(r,2,!1,r,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(r){F[r]=new P(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){F[r]=new P(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){F[r]=new P(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){F[r]=new P(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){F[r]=new P(r,5,!1,r.toLowerCase(),null,!1,!1)});var Y=/[\-:]([a-z])/g;function q(r){return r[1].toUpperCase()}"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(r){var a=r.replace(Y,q);F[a]=new P(a,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var a=r.replace(Y,q);F[a]=new P(a,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var a=r.replace(Y,q);F[a]=new P(a,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){F[r]=new P(r,1,!1,r.toLowerCase(),null,!1,!1)}),F.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){F[r]=new P(r,1,!1,r.toLowerCase(),null,!0,!0)});function I(r,a,c,p){var y=F.hasOwnProperty(a)?F[a]:null;(y!==null?y.type!==0:p||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(j(a,c,y,p)&&(c=null),p||y===null?N(a)&&(c===null?r.removeAttribute(a):r.setAttribute(a,""+c)):y.mustUseProperty?r[y.propertyName]=c===null?y.type===3?!1:"":c:(a=y.attributeName,p=y.attributeNamespace,c===null?r.removeAttribute(a):(y=y.type,c=y===3||y===4&&c===!0?"":""+c,p?r.setAttributeNS(p,a,c):r.setAttribute(a,c))))}var ie=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,le=Symbol.for("react.element"),fe=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),$e=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),ke=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),Oe=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),De=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),pe=Symbol.iterator;function je(r){return r===null||typeof r!="object"?null:(r=pe&&r[pe]||r["@@iterator"],typeof r=="function"?r:null)}var Re=Object.assign,B;function Q(r){if(B===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);B=a&&a[1]||""}return`
92
+ */var Yk;function wj(){if(Yk)return na;Yk=1;var i=G,n=a1();function s(r){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=new Set,f={};function v(r,a){h(r,a),h(r+"Capture",a)}function h(r,a){for(f[r]=a,r=0;r<a.length;r++)u.add(a[r])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),b=Object.prototype.hasOwnProperty,_=/^[: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]*$/,k={},R={};function N(r){return b.call(R,r)?!0:b.call(k,r)?!1:_.test(r)?R[r]=!0:(k[r]=!0,!1)}function A(r,a,c,p){if(c!==null&&c.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function j(r,a,c,p){if(a===null||typeof a>"u"||A(r,a,c,p))return!0;if(p)return!1;if(c!==null)switch(c.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function P(r,a,c,p,y,S,T){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=r,this.type=a,this.sanitizeURL=S,this.removeEmptyString=T}var F={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){F[r]=new P(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var a=r[0];F[a]=new P(a,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){F[r]=new P(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){F[r]=new P(r,2,!1,r,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(r){F[r]=new P(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){F[r]=new P(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){F[r]=new P(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){F[r]=new P(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){F[r]=new P(r,5,!1,r.toLowerCase(),null,!1,!1)});var Y=/[\-:]([a-z])/g;function q(r){return r[1].toUpperCase()}"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(r){var a=r.replace(Y,q);F[a]=new P(a,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var a=r.replace(Y,q);F[a]=new P(a,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var a=r.replace(Y,q);F[a]=new P(a,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){F[r]=new P(r,1,!1,r.toLowerCase(),null,!1,!1)}),F.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){F[r]=new P(r,1,!1,r.toLowerCase(),null,!0,!0)});function I(r,a,c,p){var y=F.hasOwnProperty(a)?F[a]:null;(y!==null?y.type!==0:p||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(j(a,c,y,p)&&(c=null),p||y===null?N(a)&&(c===null?r.removeAttribute(a):r.setAttribute(a,""+c)):y.mustUseProperty?r[y.propertyName]=c===null?y.type===3?!1:"":c:(a=y.attributeName,p=y.attributeNamespace,c===null?r.removeAttribute(a):(y=y.type,c=y===3||y===4&&c===!0?"":""+c,p?r.setAttributeNS(p,a,c):r.setAttribute(a,c))))}var ie=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,le=Symbol.for("react.element"),fe=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),$e=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),ke=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),Oe=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),De=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),pe=Symbol.iterator;function je(r){return r===null||typeof r!="object"?null:(r=pe&&r[pe]||r["@@iterator"],typeof r=="function"?r:null)}var Re=Object.assign,B;function Q(r){if(B===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);B=a&&a[1]||""}return`
93
93
  `+B+r}var Le=!1;function Ve(r,a){if(!r||Le)return"";Le=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(re){var p=re}Reflect.construct(r,[],a)}else{try{a.call()}catch(re){p=re}r.call(a.prototype)}else{try{throw Error()}catch(re){p=re}r()}}catch(re){if(re&&p&&typeof re.stack=="string"){for(var y=re.stack.split(`
94
94
  `),S=p.stack.split(`
95
95
  `),T=y.length-1,U=S.length-1;1<=T&&0<=U&&y[T]!==S[U];)U--;for(;1<=T&&0<=U;T--,U--)if(y[T]!==S[U]){if(T!==1||U!==1)do if(T--,U--,0>U||y[T]!==S[U]){var z=`
@@ -104,7 +104,7 @@ Error generating stack: `+S.message+`
104
104
  *
105
105
  * This source code is licensed under the MIT license found in the
106
106
  * LICENSE file in the root directory of this source tree.
107
- */var Gk;function wj(){return Gk||(Gk=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var i=G,n=a1(),s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=!1;function f(e){u=e}function v(e){if(!u){for(var t=arguments.length,o=new Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];g("warn",e,o)}}function h(e){if(!u){for(var t=arguments.length,o=new Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];g("error",e,o)}}function g(e,t,o){{var l=s.ReactDebugCurrentFrame,d=l.getStackAddendum();d!==""&&(t+="%s",o=o.concat([d]));var m=o.map(function(w){return String(w)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var b=0,_=1,k=2,R=3,N=4,A=5,j=6,P=7,F=8,Y=9,q=10,I=11,ie=12,le=13,fe=14,ne=15,$e=16,oe=17,_e=18,ke=19,me=21,ue=22,Oe=23,ze=24,De=25,be=!0,pe=!1,je=!1,Re=!1,B=!1,Q=!0,Le=!0,Ve=!0,st=!0,wt=new Set,ct={},ut={};function Ot(e,t){Wt(e,t),Wt(e+"Capture",t)}function Wt(e,t){ct[e]&&h("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ct[e]=t;{var o=e.toLowerCase();ut[o]=e,e==="onDoubleClick"&&(ut.ondblclick=e)}for(var l=0;l<t.length;l++)wt.add(t[l])}var gn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hn=Object.prototype.hasOwnProperty;function dn(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function pt(e){try{return An(e),!1}catch{return!0}}function An(e){return""+e}function vn(e,t){if(pt(e))return h("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,dn(e)),An(e)}function Wn(e){if(pt(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dn(e)),An(e)}function ge(e,t){if(pt(e))return h("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,dn(e)),An(e)}function Qe(e,t){if(pt(e))return h("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,dn(e)),An(e)}function Je(e){if(pt(e))return h("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",dn(e)),An(e)}function bt(e){if(pt(e))return h("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",dn(e)),An(e)}var Tt=0,It=1,at=2,dt=3,qt=4,yn=5,Pe=6,zt=":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",Ee=zt+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ne=new RegExp("^["+zt+"]["+Ee+"]*$"),nt={},Ut={};function vt(e){return Hn.call(Ut,e)?!0:Hn.call(nt,e)?!1:Ne.test(e)?(Ut[e]=!0,!0):(nt[e]=!0,h("Invalid attribute name: `%s`",e),!1)}function Yt(e,t,o){return t!==null?t.type===Tt:o?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function rn(e,t,o,l){if(o!==null&&o.type===Tt)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(l)return!1;if(o!==null)return!o.acceptsBooleans;var d=e.toLowerCase().slice(0,5);return d!=="data-"&&d!=="aria-"}default:return!1}}function Ln(e,t,o,l){if(t===null||typeof t>"u"||rn(e,t,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case dt:return!t;case qt:return t===!1;case yn:return isNaN(t);case Pe:return isNaN(t)||t<1}return!1}function mn(e){return wn.hasOwnProperty(e)?wn[e]:null}function fn(e,t,o,l,d,m,w){this.acceptsBooleans=t===at||t===dt||t===qt,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=m,this.removeEmptyString=w}var wn={},Ei=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ei.forEach(function(e){wn[e]=new fn(e,Tt,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],o=e[1];wn[t]=new fn(t,It,!1,o,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){wn[e]=new fn(e,at,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wn[e]=new fn(e,at,!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"].forEach(function(e){wn[e]=new fn(e,dt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){wn[e]=new fn(e,dt,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){wn[e]=new fn(e,qt,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){wn[e]=new fn(e,Pe,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){wn[e]=new fn(e,yn,!1,e.toLowerCase(),null,!1,!1)});var Pr=/[\-\:]([a-z])/g,Mi=function(e){return e[1].toUpperCase()};["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"].forEach(function(e){var t=e.replace(Pr,Mi);wn[t]=new fn(t,It,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(Pr,Mi);wn[t]=new fn(t,It,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pr,Mi);wn[t]=new fn(t,It,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){wn[e]=new fn(e,It,!1,e.toLowerCase(),null,!1,!1)});var Qa="xlinkHref";wn[Qa]=new fn("xlinkHref",It,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){wn[e]=new fn(e,It,!1,e.toLowerCase(),null,!0,!0)});var xs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,_s=!1;function Ao(e){!_s&&xs.test(e)&&(_s=!0,h("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Do(e,t,o,l){if(l.mustUseProperty){var d=l.propertyName;return e[d]}else{vn(o,t),l.sanitizeURL&&Ao(""+o);var m=l.attributeName,w=null;if(l.type===qt){if(e.hasAttribute(m)){var x=e.getAttribute(m);return x===""?!0:Ln(t,o,l,!1)?x:x===""+o?o:x}}else if(e.hasAttribute(m)){if(Ln(t,o,l,!1))return e.getAttribute(m);if(l.type===dt)return o;w=e.getAttribute(m)}return Ln(t,o,l,!1)?w===null?o:w:w===""+o?o:w}}function Es(e,t,o,l){{if(!vt(t))return;if(!e.hasAttribute(t))return o===void 0?void 0:null;var d=e.getAttribute(t);return vn(o,t),d===""+o?o:d}}function Fr(e,t,o,l){var d=mn(t);if(!Yt(t,d,l)){if(Ln(t,o,d,l)&&(o=null),l||d===null){if(vt(t)){var m=t;o===null?e.removeAttribute(m):(vn(o,t),e.setAttribute(m,""+o))}return}var w=d.mustUseProperty;if(w){var x=d.propertyName;if(o===null){var E=d.type;e[x]=E===dt?!1:""}else e[x]=o;return}var D=d.attributeName,L=d.attributeNamespace;if(o===null)e.removeAttribute(D);else{var W=d.type,H;W===dt||W===qt&&o===!0?H="":(vn(o,D),H=""+o,d.sanitizeURL&&Ao(H.toString())),L?e.setAttributeNS(L,D,H):e.setAttribute(D,H)}}}var Br=Symbol.for("react.element"),br=Symbol.for("react.portal"),_a=Symbol.for("react.fragment"),aa=Symbol.for("react.strict_mode"),Ea=Symbol.for("react.profiler"),ka=Symbol.for("react.provider"),$=Symbol.for("react.context"),ve=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),Xe=Symbol.for("react.suspense_list"),jt=Symbol.for("react.memo"),At=Symbol.for("react.lazy"),Ht=Symbol.for("react.scope"),Ft=Symbol.for("react.debug_trace_mode"),qn=Symbol.for("react.offscreen"),Tn=Symbol.for("react.legacy_hidden"),Dn=Symbol.for("react.cache"),Sr=Symbol.for("react.tracing_marker"),oa=Symbol.iterator,sa="@@iterator";function Lt(e){if(e===null||typeof e!="object")return null;var t=oa&&e[oa]||e[sa];return typeof t=="function"?t:null}var Mt=Object.assign,la=0,ks,Cs,No,bl,jo,si,Su;function Hr(){}Hr.__reactDisabledLog=!0;function Vc(){{if(la===0){ks=console.log,Cs=console.info,No=console.warn,bl=console.error,jo=console.group,si=console.groupCollapsed,Su=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Hr,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}la++}}function Wc(){{if(la--,la===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Mt({},e,{value:ks}),info:Mt({},e,{value:Cs}),warn:Mt({},e,{value:No}),error:Mt({},e,{value:bl}),group:Mt({},e,{value:jo}),groupCollapsed:Mt({},e,{value:si}),groupEnd:Mt({},e,{value:Su})})}la<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Sl=s.ReactCurrentDispatcher,Lo;function ki(e,t,o){{if(Lo===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Lo=l&&l[1]||""}return`
107
+ */var Gk;function bj(){return Gk||(Gk=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var i=G,n=a1(),s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=!1;function f(e){u=e}function v(e){if(!u){for(var t=arguments.length,o=new Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];g("warn",e,o)}}function h(e){if(!u){for(var t=arguments.length,o=new Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];g("error",e,o)}}function g(e,t,o){{var l=s.ReactDebugCurrentFrame,d=l.getStackAddendum();d!==""&&(t+="%s",o=o.concat([d]));var m=o.map(function(w){return String(w)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var b=0,_=1,k=2,R=3,N=4,A=5,j=6,P=7,F=8,Y=9,q=10,I=11,ie=12,le=13,fe=14,ne=15,$e=16,oe=17,_e=18,ke=19,me=21,ue=22,Oe=23,ze=24,De=25,be=!0,pe=!1,je=!1,Re=!1,B=!1,Q=!0,Le=!0,Ve=!0,st=!0,wt=new Set,ct={},ut={};function Ot(e,t){Wt(e,t),Wt(e+"Capture",t)}function Wt(e,t){ct[e]&&h("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ct[e]=t;{var o=e.toLowerCase();ut[o]=e,e==="onDoubleClick"&&(ut.ondblclick=e)}for(var l=0;l<t.length;l++)wt.add(t[l])}var gn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hn=Object.prototype.hasOwnProperty;function dn(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function pt(e){try{return An(e),!1}catch{return!0}}function An(e){return""+e}function vn(e,t){if(pt(e))return h("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,dn(e)),An(e)}function Wn(e){if(pt(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dn(e)),An(e)}function ge(e,t){if(pt(e))return h("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,dn(e)),An(e)}function Qe(e,t){if(pt(e))return h("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,dn(e)),An(e)}function Je(e){if(pt(e))return h("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",dn(e)),An(e)}function bt(e){if(pt(e))return h("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",dn(e)),An(e)}var Tt=0,It=1,at=2,dt=3,qt=4,yn=5,Pe=6,zt=":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",Ee=zt+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ne=new RegExp("^["+zt+"]["+Ee+"]*$"),nt={},Ut={};function vt(e){return Hn.call(Ut,e)?!0:Hn.call(nt,e)?!1:Ne.test(e)?(Ut[e]=!0,!0):(nt[e]=!0,h("Invalid attribute name: `%s`",e),!1)}function Yt(e,t,o){return t!==null?t.type===Tt:o?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function rn(e,t,o,l){if(o!==null&&o.type===Tt)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(l)return!1;if(o!==null)return!o.acceptsBooleans;var d=e.toLowerCase().slice(0,5);return d!=="data-"&&d!=="aria-"}default:return!1}}function Ln(e,t,o,l){if(t===null||typeof t>"u"||rn(e,t,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case dt:return!t;case qt:return t===!1;case yn:return isNaN(t);case Pe:return isNaN(t)||t<1}return!1}function mn(e){return wn.hasOwnProperty(e)?wn[e]:null}function fn(e,t,o,l,d,m,w){this.acceptsBooleans=t===at||t===dt||t===qt,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=m,this.removeEmptyString=w}var wn={},Ei=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ei.forEach(function(e){wn[e]=new fn(e,Tt,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],o=e[1];wn[t]=new fn(t,It,!1,o,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){wn[e]=new fn(e,at,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wn[e]=new fn(e,at,!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"].forEach(function(e){wn[e]=new fn(e,dt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){wn[e]=new fn(e,dt,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){wn[e]=new fn(e,qt,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){wn[e]=new fn(e,Pe,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){wn[e]=new fn(e,yn,!1,e.toLowerCase(),null,!1,!1)});var Pr=/[\-\:]([a-z])/g,Mi=function(e){return e[1].toUpperCase()};["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"].forEach(function(e){var t=e.replace(Pr,Mi);wn[t]=new fn(t,It,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(Pr,Mi);wn[t]=new fn(t,It,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pr,Mi);wn[t]=new fn(t,It,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){wn[e]=new fn(e,It,!1,e.toLowerCase(),null,!1,!1)});var Qa="xlinkHref";wn[Qa]=new fn("xlinkHref",It,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){wn[e]=new fn(e,It,!1,e.toLowerCase(),null,!0,!0)});var xs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,_s=!1;function Ao(e){!_s&&xs.test(e)&&(_s=!0,h("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Do(e,t,o,l){if(l.mustUseProperty){var d=l.propertyName;return e[d]}else{vn(o,t),l.sanitizeURL&&Ao(""+o);var m=l.attributeName,w=null;if(l.type===qt){if(e.hasAttribute(m)){var x=e.getAttribute(m);return x===""?!0:Ln(t,o,l,!1)?x:x===""+o?o:x}}else if(e.hasAttribute(m)){if(Ln(t,o,l,!1))return e.getAttribute(m);if(l.type===dt)return o;w=e.getAttribute(m)}return Ln(t,o,l,!1)?w===null?o:w:w===""+o?o:w}}function Es(e,t,o,l){{if(!vt(t))return;if(!e.hasAttribute(t))return o===void 0?void 0:null;var d=e.getAttribute(t);return vn(o,t),d===""+o?o:d}}function Fr(e,t,o,l){var d=mn(t);if(!Yt(t,d,l)){if(Ln(t,o,d,l)&&(o=null),l||d===null){if(vt(t)){var m=t;o===null?e.removeAttribute(m):(vn(o,t),e.setAttribute(m,""+o))}return}var w=d.mustUseProperty;if(w){var x=d.propertyName;if(o===null){var E=d.type;e[x]=E===dt?!1:""}else e[x]=o;return}var D=d.attributeName,L=d.attributeNamespace;if(o===null)e.removeAttribute(D);else{var W=d.type,H;W===dt||W===qt&&o===!0?H="":(vn(o,D),H=""+o,d.sanitizeURL&&Ao(H.toString())),L?e.setAttributeNS(L,D,H):e.setAttribute(D,H)}}}var Br=Symbol.for("react.element"),br=Symbol.for("react.portal"),_a=Symbol.for("react.fragment"),aa=Symbol.for("react.strict_mode"),Ea=Symbol.for("react.profiler"),ka=Symbol.for("react.provider"),$=Symbol.for("react.context"),ve=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),Xe=Symbol.for("react.suspense_list"),jt=Symbol.for("react.memo"),At=Symbol.for("react.lazy"),Ht=Symbol.for("react.scope"),Ft=Symbol.for("react.debug_trace_mode"),qn=Symbol.for("react.offscreen"),Tn=Symbol.for("react.legacy_hidden"),Dn=Symbol.for("react.cache"),Sr=Symbol.for("react.tracing_marker"),oa=Symbol.iterator,sa="@@iterator";function Lt(e){if(e===null||typeof e!="object")return null;var t=oa&&e[oa]||e[sa];return typeof t=="function"?t:null}var Mt=Object.assign,la=0,ks,Cs,No,bl,jo,si,Su;function Hr(){}Hr.__reactDisabledLog=!0;function Vc(){{if(la===0){ks=console.log,Cs=console.info,No=console.warn,bl=console.error,jo=console.group,si=console.groupCollapsed,Su=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Hr,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}la++}}function Wc(){{if(la--,la===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Mt({},e,{value:ks}),info:Mt({},e,{value:Cs}),warn:Mt({},e,{value:No}),error:Mt({},e,{value:bl}),group:Mt({},e,{value:jo}),groupCollapsed:Mt({},e,{value:si}),groupEnd:Mt({},e,{value:Su})})}la<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Sl=s.ReactCurrentDispatcher,Lo;function ki(e,t,o){{if(Lo===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Lo=l&&l[1]||""}return`
108
108
  `+Lo+e}}var ua=!1,ca;{var xl=typeof WeakMap=="function"?WeakMap:Map;ca=new xl}function Ts(e,t){if(!e||ua)return"";{var o=ca.get(e);if(o!==void 0)return o}var l;ua=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=Sl.current,Sl.current=null,Vc();try{if(t){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(ae){l=ae}Reflect.construct(e,[],w)}else{try{w.call()}catch(ae){l=ae}e.call(w.prototype)}}else{try{throw Error()}catch(ae){l=ae}e()}}catch(ae){if(ae&&l&&typeof ae.stack=="string"){for(var x=ae.stack.split(`
109
109
  `),E=l.stack.split(`
110
110
  `),D=x.length-1,L=E.length-1;D>=1&&L>=0&&x[D]!==E[L];)L--;for(;D>=1&&L>=0;D--,L--)if(x[D]!==E[L]){if(D!==1||L!==1)do if(D--,L--,L<0||x[D]!==E[L]){var W=`
@@ -124,8 +124,8 @@ Check the render method of \``+e+"`.":""}var Io=["value","defaultValue"];functio
124
124
  * @return {boolean} True if the event is supported.
125
125
  * @internal
126
126
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
127
- */function ww(e){if(!gn)return!1;var t="on"+e,o=t in document;if(!o){var l=document.createElement("div");l.setAttribute(t,"return;"),o=typeof l[t]=="function"}return o}function gc(){Ot("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Nm(e,t,o,l){Pl(l);var d=Mm(t,"onChange");if(d.length>0){var m=new Ba("onChange","change",null,o,l);e.push({event:m,listeners:d})}}var is=null,r=null;function a(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function c(e){var t=[];Nm(t,r,e,fh(e)),Vv(p,t)}function p(e){gx(e,0)}function y(e){var t=af(e);if(Oa(t))return e}function S(e,t){if(e==="change")return t}var T=!1;gn&&(T=ww("input")&&(!document.documentMode||document.documentMode>9));function U(e,t){is=e,r=t,is.attachEvent("onpropertychange",re)}function z(){is&&(is.detachEvent("onpropertychange",re),is=null,r=null)}function re(e){e.propertyName==="value"&&y(r)&&c(e)}function Se(e,t,o){e==="focusin"?(z(),U(t,o)):e==="focusout"&&z()}function Ce(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return y(r)}function we(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function qe(e,t){if(e==="click")return y(t)}function Ze(e,t){if(e==="input"||e==="change")return y(t)}function rt(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||mt(e,"number",e.value)}function Xn(e,t,o,l,d,m,w){var x=o?af(o):window,E,D;if(a(x)?E=S:mc(x)?T?E=Ze:(E=Ce,D=Se):we(x)&&(E=qe),E){var L=E(t,o);if(L){Nm(e,L,l,d);return}}D&&D(t,x,o),t==="focusout"&&rt(x)}function K(){Wt("onMouseEnter",["mouseout","mouseover"]),Wt("onMouseLeave",["mouseout","mouseover"]),Wt("onPointerEnter",["pointerout","pointerover"]),Wt("onPointerLeave",["pointerout","pointerover"])}function V(e,t,o,l,d,m,w){var x=t==="mouseover"||t==="pointerover",E=t==="mouseout"||t==="pointerout";if(x&&!ju(l)){var D=l.relatedTarget||l.fromElement;if(D&&(bc(D)||dp(D)))return}if(!(!E&&!x)){var L;if(d.window===d)L=d;else{var W=d.ownerDocument;W?L=W.defaultView||W.parentWindow:L=window}var H,ee;if(E){var ae=l.relatedTarget||l.toElement;if(H=o,ee=ae?bc(ae):null,ee!==null){var ce=Ci(ee);(ee!==ce||ee.tag!==A&&ee.tag!==j)&&(ee=null)}}else H=null,ee=o;if(H!==ee){var Be=Bh,gt="onMouseLeave",ot="onMouseEnter",Zt="mouse";(t==="pointerout"||t==="pointerover")&&(Be=km,gt="onPointerLeave",ot="onPointerEnter",Zt="pointer");var Gt=H==null?L:af(H),J=ee==null?L:af(ee),de=new Be(gt,Zt+"leave",H,l,d);de.target=Gt,de.relatedTarget=J;var X=null,Te=bc(d);if(Te===o){var Ge=new Be(ot,Zt+"enter",ee,l,d);Ge.target=J,Ge.relatedTarget=Gt,X=Ge}VT(e,de,X,H,ee)}}}function Z(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xe=typeof Object.is=="function"?Object.is:Z;function et(e,t){if(xe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),l=Object.keys(t);if(o.length!==l.length)return!1;for(var d=0;d<o.length;d++){var m=o[d];if(!Hn.call(t,m)||!xe(e[m],t[m]))return!1}return!0}function yt(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xt(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function kt(e,t){for(var o=yt(e),l=0,d=0;o;){if(o.nodeType===ro){if(d=l+o.textContent.length,l<=t&&d>=t)return{node:o,offset:t-l};l=d}o=yt(xt(o))}}function gr(e){var t=e.ownerDocument,o=t&&t.defaultView||window,l=o.getSelection&&o.getSelection();if(!l||l.rangeCount===0)return null;var d=l.anchorNode,m=l.anchorOffset,w=l.focusNode,x=l.focusOffset;try{d.nodeType,w.nodeType}catch{return null}return ln(e,d,m,w,x)}function ln(e,t,o,l,d){var m=0,w=-1,x=-1,E=0,D=0,L=e,W=null;e:for(;;){for(var H=null;L===t&&(o===0||L.nodeType===ro)&&(w=m+o),L===l&&(d===0||L.nodeType===ro)&&(x=m+d),L.nodeType===ro&&(m+=L.nodeValue.length),(H=L.firstChild)!==null;)W=L,L=H;for(;;){if(L===e)break e;if(W===t&&++E===o&&(w=m),W===l&&++D===d&&(x=m),(H=L.nextSibling)!==null)break;L=W,W=L.parentNode}L=H}return w===-1||x===-1?null:{start:w,end:x}}function as(e,t){var o=e.ownerDocument||document,l=o&&o.defaultView||window;if(l.getSelection){var d=l.getSelection(),m=e.textContent.length,w=Math.min(t.start,m),x=t.end===void 0?w:Math.min(t.end,m);if(!d.extend&&w>x){var E=x;x=w,w=E}var D=kt(e,w),L=kt(e,x);if(D&&L){if(d.rangeCount===1&&d.anchorNode===D.node&&d.anchorOffset===D.offset&&d.focusNode===L.node&&d.focusOffset===L.offset)return;var W=o.createRange();W.setStart(D.node,D.offset),d.removeAllRanges(),w>x?(d.addRange(W),d.extend(L.node,L.offset)):(W.setEnd(L.node,L.offset),d.addRange(W))}}}function jm(e){return e&&e.nodeType===ro}function ox(e,t){return!e||!t?!1:e===t?!0:jm(e)?!1:jm(t)?ox(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function CT(e){return e&&e.ownerDocument&&ox(e.ownerDocument.documentElement,e)}function TT(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function sx(){for(var e=window,t=zi();t instanceof e.HTMLIFrameElement;){if(TT(t))e=t.contentWindow;else return t;t=zi(e.document)}return t}function bw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RT(){var e=sx();return{focusedElem:e,selectionRange:bw(e)?AT(e):null}}function OT(e){var t=sx(),o=e.focusedElem,l=e.selectionRange;if(t!==o&&CT(o)){l!==null&&bw(o)&&DT(o,l);for(var d=[],m=o;m=m.parentNode;)m.nodeType===li&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});typeof o.focus=="function"&&o.focus();for(var w=0;w<d.length;w++){var x=d[w];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}}function AT(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=gr(e),t||{start:0,end:0}}function DT(e,t){var o=t.start,l=t.end;l===void 0&&(l=o),"selectionStart"in e?(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length)):as(e,t)}var NT=gn&&"documentMode"in document&&document.documentMode<=11;function jT(){Ot("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Zd=null,Sw=null,Qh=null,xw=!1;function LT(e){if("selectionStart"in e&&bw(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,o=t.getSelection();return{anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}}function PT(e){return e.window===e?e.document:e.nodeType===io?e:e.ownerDocument}function lx(e,t,o){var l=PT(o);if(!(xw||Zd==null||Zd!==zi(l))){var d=LT(Zd);if(!Qh||!et(Qh,d)){Qh=d;var m=Mm(Sw,"onSelect");if(m.length>0){var w=new Ba("onSelect","select",null,t,o);e.push({event:w,listeners:m}),w.target=Zd}}}}function UT(e,t,o,l,d,m,w){var x=o?af(o):window;switch(t){case"focusin":(mc(x)||x.contentEditable==="true")&&(Zd=x,Sw=o,Qh=null);break;case"focusout":Zd=null,Sw=null,Qh=null;break;case"mousedown":xw=!0;break;case"contextmenu":case"mouseup":case"dragend":xw=!1,lx(e,l,d);break;case"selectionchange":if(NT)break;case"keydown":case"keyup":lx(e,l,d)}}function Lm(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var ef={animationend:Lm("Animation","AnimationEnd"),animationiteration:Lm("Animation","AnimationIteration"),animationstart:Lm("Animation","AnimationStart"),transitionend:Lm("Transition","TransitionEnd")},_w={},ux={};gn&&(ux=document.createElement("div").style,"AnimationEvent"in window||(delete ef.animationend.animation,delete ef.animationiteration.animation,delete ef.animationstart.animation),"TransitionEvent"in window||delete ef.transitionend.transition);function Pm(e){if(_w[e])return _w[e];if(!ef[e])return e;var t=ef[e];for(var o in t)if(t.hasOwnProperty(o)&&o in ux)return _w[e]=t[o];return e}var cx=Pm("animationend"),dx=Pm("animationiteration"),fx=Pm("animationstart"),hx=Pm("transitionend"),px=new Map,vx=["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"];function Zl(e,t){px.set(e,t),Ot(t,[e])}function MT(){for(var e=0;e<vx.length;e++){var t=vx[e],o=t.toLowerCase(),l=t[0].toUpperCase()+t.slice(1);Zl(o,"on"+l)}Zl(cx,"onAnimationEnd"),Zl(dx,"onAnimationIteration"),Zl(fx,"onAnimationStart"),Zl("dblclick","onDoubleClick"),Zl("focusin","onFocus"),Zl("focusout","onBlur"),Zl(hx,"onTransitionEnd")}function $T(e,t,o,l,d,m,w){var x=px.get(t);if(x!==void 0){var E=Ba,D=t;switch(t){case"keypress":if(ts(l)===0)return;case"keydown":case"keyup":E=Em;break;case"focusin":D="focus",E=po;break;case"focusout":D="blur",E=po;break;case"beforeblur":case"afterblur":E=po;break;case"click":if(l.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":E=Bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=tl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Tm;break;case cx:case dx:case fx:E=wm;break;case hx:E=Ji;break;case"scroll":E=yi;break;case"wheel":E=mw;break;case"copy":case"cut":case"paste":E=Wd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=km;break}var L=(m&Fi)!==0;{var W=!L&&t==="scroll",H=BT(o,x,l.type,L,W);if(H.length>0){var ee=new E(x,D,null,l,d);e.push({event:ee,listeners:H})}}}}MT(),K(),gc(),jT(),gw();function IT(e,t,o,l,d,m,w){$T(e,t,o,l,d,m);var x=(m&dh)===0;x&&(V(e,t,o,l,d),Xn(e,t,o,l,d),UT(e,t,o,l,d),Dm(e,t,o,l,d))}var Zh=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Ew=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Zh));function mx(e,t,o){var l=e.type||"unknown-event";e.currentTarget=o,Na(l,t,void 0,e),e.currentTarget=null}function zT(e,t,o){var l;if(o)for(var d=t.length-1;d>=0;d--){var m=t[d],w=m.instance,x=m.currentTarget,E=m.listener;if(w!==l&&e.isPropagationStopped())return;mx(e,E,x),l=w}else for(var D=0;D<t.length;D++){var L=t[D],W=L.instance,H=L.currentTarget,ee=L.listener;if(W!==l&&e.isPropagationStopped())return;mx(e,ee,H),l=W}}function gx(e,t){for(var o=(t&Fi)!==0,l=0;l<e.length;l++){var d=e[l],m=d.event,w=d.listeners;zT(m,w,o)}Uu()}function FT(e,t,o,l,d){var m=fh(o),w=[];IT(w,e,l,o,m,t),gx(w,t)}function Bn(e,t){Ew.has(e)||h('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var o=!1,l=gO(t),d=WT(e);l.has(d)||(yx(t,e,Zc,o),l.add(d))}function kw(e,t,o){Ew.has(e)&&!t&&h('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var l=0;t&&(l|=Fi),yx(o,e,l,t)}var Um="_reactListening"+Math.random().toString(36).slice(2);function ep(e){if(!e[Um]){e[Um]=!0,wt.forEach(function(o){o!=="selectionchange"&&(Ew.has(o)||kw(o,!1,e),kw(o,!0,e))});var t=e.nodeType===io?e:e.ownerDocument;t!==null&&(t[Um]||(t[Um]=!0,kw("selectionchange",!1,t)))}}function yx(e,t,o,l,d){var m=Cr(e,t,o),w=void 0;Pu&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(w=!0),e=e,l?w!==void 0?Fh(e,t,m,w):gi(e,t,m):w!==void 0?Kl(e,t,m,w):dc(e,t,m)}function wx(e,t){return e===t||e.nodeType===Zn&&e.parentNode===t}function Cw(e,t,o,l,d){var m=l;if(!(t&ch)&&!(t&Zc)){var w=d;if(l!==null){var x=l;e:for(;;){if(x===null)return;var E=x.tag;if(E===R||E===N){var D=x.stateNode.containerInfo;if(wx(D,w))break;if(E===N)for(var L=x.return;L!==null;){var W=L.tag;if(W===R||W===N){var H=L.stateNode.containerInfo;if(wx(H,w))return}L=L.return}for(;D!==null;){var ee=bc(D);if(ee===null)return;var ae=ee.tag;if(ae===A||ae===j){x=m=ee;continue e}D=D.parentNode}}x=x.return}}}Vv(function(){return FT(e,t,o,m)})}function tp(e,t,o){return{instance:e,listener:t,currentTarget:o}}function BT(e,t,o,l,d,m){for(var w=t!==null?t+"Capture":null,x=l?w:t,E=[],D=e,L=null;D!==null;){var W=D,H=W.stateNode,ee=W.tag;if(ee===A&&H!==null&&(L=H,x!==null)){var ae=Bo(D,x);ae!=null&&E.push(tp(D,ae,L))}if(d)break;D=D.return}return E}function Mm(e,t){for(var o=t+"Capture",l=[],d=e;d!==null;){var m=d,w=m.stateNode,x=m.tag;if(x===A&&w!==null){var E=w,D=Bo(d,o);D!=null&&l.unshift(tp(d,D,E));var L=Bo(d,t);L!=null&&l.push(tp(d,L,E))}d=d.return}return l}function tf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==A);return e||null}function HT(e,t){for(var o=e,l=t,d=0,m=o;m;m=tf(m))d++;for(var w=0,x=l;x;x=tf(x))w++;for(;d-w>0;)o=tf(o),d--;for(;w-d>0;)l=tf(l),w--;for(var E=d;E--;){if(o===l||l!==null&&o===l.alternate)return o;o=tf(o),l=tf(l)}return null}function bx(e,t,o,l,d){for(var m=t._reactName,w=[],x=o;x!==null&&x!==l;){var E=x,D=E.alternate,L=E.stateNode,W=E.tag;if(D!==null&&D===l)break;if(W===A&&L!==null){var H=L;if(d){var ee=Bo(x,m);ee!=null&&w.unshift(tp(x,ee,H))}else if(!d){var ae=Bo(x,m);ae!=null&&w.push(tp(x,ae,H))}}x=x.return}w.length!==0&&e.push({event:t,listeners:w})}function VT(e,t,o,l,d){var m=l&&d?HT(l,d):null;l!==null&&bx(e,t,l,m,!1),d!==null&&o!==null&&bx(e,o,d,m,!0)}function WT(e,t){return e+"__bubble"}var Xi=!1,np="dangerouslySetInnerHTML",$m="suppressContentEditableWarning",eu="suppressHydrationWarning",Sx="autoFocus",yc="children",wc="style",Im="__html",Tw,zm,rp,xx,Fm,_x,Ex;Tw={dialog:!0,webview:!0},zm=function(e,t){sh(e,t),Xc(e,t),Fv(e,t,{registrationNameDependencies:ct,possibleRegistrationNames:ut})},_x=gn&&!document.documentMode,rp=function(e,t,o){if(!Xi){var l=Bm(o),d=Bm(t);d!==l&&(Xi=!0,h("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(d),JSON.stringify(l)))}},xx=function(e){if(!Xi){Xi=!0;var t=[];e.forEach(function(o){t.push(o)}),h("Extra attributes from the server: %s",t)}},Fm=function(e,t){t===!1?h("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):h("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},Ex=function(e,t){var o=e.namespaceURI===no?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return o.innerHTML=t,o.innerHTML};var qT=/\r\n?/g,YT=/\u0000|\uFFFD/g;function Bm(e){Je(e);var t=typeof e=="string"?e:""+e;return t.replace(qT,`
128
- `).replace(YT,"")}function Hm(e,t,o,l){var d=Bm(t),m=Bm(e);if(m!==d&&(l&&(Xi||(Xi=!0,h('Text content did not match. Server: "%s" Client: "%s"',m,d))),o&&be))throw new Error("Text content does not match server-rendered HTML.")}function kx(e){return e.nodeType===io?e:e.ownerDocument}function GT(){}function Vm(e){e.onclick=GT}function KT(e,t,o,l,d){for(var m in l)if(l.hasOwnProperty(m)){var w=l[m];if(m===wc)w&&Object.freeze(w),Pv(t,w);else if(m===np){var x=w?w[Im]:void 0;x!=null&&_v(t,x)}else if(m===yc)if(typeof w=="string"){var E=e!=="textarea"||w!=="";E&&Dl(t,w)}else typeof w=="number"&&Dl(t,""+w);else m===$m||m===eu||m===Sx||(ct.hasOwnProperty(m)?w!=null&&(typeof w!="function"&&Fm(m,w),m==="onScroll"&&Bn("scroll",t)):w!=null&&Fr(t,m,w,d))}}function JT(e,t,o,l){for(var d=0;d<t.length;d+=2){var m=t[d],w=t[d+1];m===wc?Pv(e,w):m===np?_v(e,w):m===yc?Dl(e,w):Fr(e,m,w,l)}}function XT(e,t,o,l){var d,m=kx(o),w,x=l;if(x===no&&(x=eh(e)),x===no){if(d=zo(e,t),!d&&e!==e.toLowerCase()&&h("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var E=m.createElement("div");E.innerHTML="<script><\/script>";var D=E.firstChild;w=E.removeChild(D)}else if(typeof t.is=="string")w=m.createElement(e,{is:t.is});else if(w=m.createElement(e),e==="select"){var L=w;t.multiple?L.multiple=!0:t.size&&(L.size=t.size)}}else w=m.createElementNS(x,e);return x===no&&!d&&Object.prototype.toString.call(w)==="[object HTMLUnknownElement]"&&!Hn.call(Tw,e)&&(Tw[e]=!0,h("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),w}function QT(e,t){return kx(t).createTextNode(e)}function ZT(e,t,o,l){var d=zo(t,o);zm(t,o);var m;switch(t){case"dialog":Bn("cancel",e),Bn("close",e),m=o;break;case"iframe":case"object":case"embed":Bn("load",e),m=o;break;case"video":case"audio":for(var w=0;w<Zh.length;w++)Bn(Zh[w],e);m=o;break;case"source":Bn("error",e),m=o;break;case"img":case"image":case"link":Bn("error",e),Bn("load",e),m=o;break;case"details":Bn("toggle",e),m=o;break;case"input":fa(e,o),m=Al(e,o),Bn("invalid",e);break;case"option":tn(e,o),m=o;break;case"select":Ds(e,o),m=Cu(e,o),Bn("invalid",e);break;case"textarea":Xf(e,o),m=Jf(e,o),Bn("invalid",e);break;default:m=o}switch(Kc(t,m),KT(t,e,l,m,d),t){case"input":da(e),te(e,o,!1);break;case"textarea":da(e),Sv(e);break;case"option":Rn(e,o);break;case"select":Gf(e,o);break;default:typeof m.onClick=="function"&&Vm(e);break}}function eR(e,t,o,l,d){zm(t,l);var m=null,w,x;switch(t){case"input":w=Al(e,o),x=Al(e,l),m=[];break;case"select":w=Cu(e,o),x=Cu(e,l),m=[];break;case"textarea":w=Jf(e,o),x=Jf(e,l),m=[];break;default:w=o,x=l,typeof w.onClick!="function"&&typeof x.onClick=="function"&&Vm(e);break}Kc(t,x);var E,D,L=null;for(E in w)if(!(x.hasOwnProperty(E)||!w.hasOwnProperty(E)||w[E]==null))if(E===wc){var W=w[E];for(D in W)W.hasOwnProperty(D)&&(L||(L={}),L[D]="")}else E===np||E===yc||E===$m||E===eu||E===Sx||(ct.hasOwnProperty(E)?m||(m=[]):(m=m||[]).push(E,null));for(E in x){var H=x[E],ee=w!=null?w[E]:void 0;if(!(!x.hasOwnProperty(E)||H===ee||H==null&&ee==null))if(E===wc)if(H&&Object.freeze(H),ee){for(D in ee)ee.hasOwnProperty(D)&&(!H||!H.hasOwnProperty(D))&&(L||(L={}),L[D]="");for(D in H)H.hasOwnProperty(D)&&ee[D]!==H[D]&&(L||(L={}),L[D]=H[D])}else L||(m||(m=[]),m.push(E,L)),L=H;else if(E===np){var ae=H?H[Im]:void 0,ce=ee?ee[Im]:void 0;ae!=null&&ce!==ae&&(m=m||[]).push(E,ae)}else E===yc?(typeof H=="string"||typeof H=="number")&&(m=m||[]).push(E,""+H):E===$m||E===eu||(ct.hasOwnProperty(E)?(H!=null&&(typeof H!="function"&&Fm(E,H),E==="onScroll"&&Bn("scroll",e)),!m&&ee!==H&&(m=[])):(m=m||[]).push(E,H))}return L&&(ew(L,x[wc]),(m=m||[]).push(wc,L)),m}function tR(e,t,o,l,d){o==="input"&&d.type==="radio"&&d.name!=null&&C(e,d);var m=zo(o,l),w=zo(o,d);switch(JT(e,t,m,w),o){case"input":M(e,d);break;case"textarea":bv(e,d);break;case"select":qc(e,d);break}}function nR(e){{var t=e.toLowerCase();return Du.hasOwnProperty(t)&&Du[t]||null}}function rR(e,t,o,l,d,m,w){var x,E;switch(x=zo(t,o),zm(t,o),t){case"dialog":Bn("cancel",e),Bn("close",e);break;case"iframe":case"object":case"embed":Bn("load",e);break;case"video":case"audio":for(var D=0;D<Zh.length;D++)Bn(Zh[D],e);break;case"source":Bn("error",e);break;case"img":case"image":case"link":Bn("error",e),Bn("load",e);break;case"details":Bn("toggle",e);break;case"input":fa(e,o),Bn("invalid",e);break;case"option":tn(e,o);break;case"select":Ds(e,o),Bn("invalid",e);break;case"textarea":Xf(e,o),Bn("invalid",e);break}Kc(t,o);{E=new Set;for(var L=e.attributes,W=0;W<L.length;W++){var H=L[W].name.toLowerCase();switch(H){case"value":break;case"checked":break;case"selected":break;default:E.add(L[W].name)}}}var ee=null;for(var ae in o)if(o.hasOwnProperty(ae)){var ce=o[ae];if(ae===yc)typeof ce=="string"?e.textContent!==ce&&(o[eu]!==!0&&Hm(e.textContent,ce,m,w),ee=[yc,ce]):typeof ce=="number"&&e.textContent!==""+ce&&(o[eu]!==!0&&Hm(e.textContent,ce,m,w),ee=[yc,""+ce]);else if(ct.hasOwnProperty(ae))ce!=null&&(typeof ce!="function"&&Fm(ae,ce),ae==="onScroll"&&Bn("scroll",e));else if(w&&typeof x=="boolean"){var Be=void 0,gt=mn(ae);if(o[eu]!==!0){if(!(ae===$m||ae===eu||ae==="value"||ae==="checked"||ae==="selected")){if(ae===np){var ot=e.innerHTML,Zt=ce?ce[Im]:void 0;if(Zt!=null){var Gt=Ex(e,Zt);Gt!==ot&&rp(ae,ot,Gt)}}else if(ae===wc){if(E.delete(ae),_x){var J=Qy(ce);Be=e.getAttribute("style"),J!==Be&&rp(ae,Be,J)}}else if(x&&!B)E.delete(ae.toLowerCase()),Be=Es(e,ae,ce),ce!==Be&&rp(ae,Be,ce);else if(!Yt(ae,gt,x)&&!Ln(ae,ce,gt,x)){var de=!1;if(gt!==null)E.delete(gt.attributeName),Be=Do(e,ae,ce,gt);else{var X=l;if(X===no&&(X=eh(t)),X===no)E.delete(ae.toLowerCase());else{var Te=nR(ae);Te!==null&&Te!==ae&&(de=!0,E.delete(Te)),E.delete(ae)}Be=Es(e,ae,ce)}var Ge=B;!Ge&&ce!==Be&&!de&&rp(ae,Be,ce)}}}}}switch(w&&E.size>0&&o[eu]!==!0&&xx(E),t){case"input":da(e),te(e,o,!0);break;case"textarea":da(e),Sv(e);break;case"select":case"option":break;default:typeof o.onClick=="function"&&Vm(e);break}return ee}function iR(e,t,o){var l=e.nodeValue!==t;return l}function Rw(e,t){{if(Xi)return;Xi=!0,h("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function Ow(e,t){{if(Xi)return;Xi=!0,h('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function Aw(e,t,o){{if(Xi)return;Xi=!0,h("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function Dw(e,t){{if(t===""||Xi)return;Xi=!0,h('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function aR(e,t,o){switch(t){case"input":se(e,o);return;case"textarea":Gy(e,o);return;case"select":Kf(e,o);return}}var ip=function(){},ap=function(){};{var oR=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Cx=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],sR=Cx.concat(["button"]),lR=["dd","dt","li","option","optgroup","p","rp","rt"],Tx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};ap=function(e,t){var o=Mt({},e||Tx),l={tag:t};return Cx.indexOf(t)!==-1&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),sR.indexOf(t)!==-1&&(o.pTagInButtonScope=null),oR.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(o.listItemTagAutoclosing=null,o.dlItemTagAutoclosing=null),o.current=l,t==="form"&&(o.formTag=l),t==="a"&&(o.aTagInScope=l),t==="button"&&(o.buttonTagInScope=l),t==="nobr"&&(o.nobrTagInScope=l),t==="p"&&(o.pTagInButtonScope=l),t==="li"&&(o.listItemTagAutoclosing=l),(t==="dd"||t==="dt")&&(o.dlItemTagAutoclosing=l),o};var uR=function(e,t){switch(t){case"select":return e==="option"||e==="optgroup"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return lR.indexOf(t)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null}return!0},cR=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},Rx={};ip=function(e,t,o){o=o||Tx;var l=o.current,d=l&&l.tag;t!=null&&(e!=null&&h("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var m=uR(e,d)?null:l,w=m?null:cR(e,o),x=m||w;if(x){var E=x.tag,D=!!m+"|"+e+"|"+E;if(!Rx[D]){Rx[D]=!0;var L=e,W="";if(e==="#text"?/\S/.test(t)?L="Text nodes":(L="Whitespace text nodes",W=" Make sure you don't have any extra whitespace between tags on each line of your source code."):L="<"+e+">",m){var H="";E==="table"&&e==="tr"&&(H+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),h("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",L,E,W,H)}else h("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",L,E)}}}}var Wm="suppressHydrationWarning",qm="$",Ym="/$",op="$?",sp="$!",dR="style",Nw=null,jw=null;function fR(e){var t,o,l=e.nodeType;switch(l){case io:case nh:{t=l===io?"#document":"#fragment";var d=e.documentElement;o=d?d.namespaceURI:th(null,"");break}default:{var m=l===Zn?e.parentNode:e,w=m.namespaceURI||null;t=m.tagName,o=th(w,t);break}}{var x=t.toLowerCase(),E=ap(null,x);return{namespace:o,ancestorInfo:E}}}function hR(e,t,o){{var l=e,d=th(l.namespace,t),m=ap(l.ancestorInfo,t);return{namespace:d,ancestorInfo:m}}}function n$(e){return e}function pR(e){Nw=ar(),jw=RT();var t=null;return fr(!1),t}function vR(e){OT(jw),fr(Nw),Nw=null,jw=null}function mR(e,t,o,l,d){var m;{var w=l;if(ip(e,null,w.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var x=""+t.children,E=ap(w.ancestorInfo,e);ip(null,x,E)}m=w.namespace}var D=XT(e,t,o,m);return cp(d,D),Fw(D,t),D}function gR(e,t){e.appendChild(t)}function yR(e,t,o,l,d){switch(ZT(e,t,o,l),t){case"button":case"input":case"select":case"textarea":return!!o.autoFocus;case"img":return!0;default:return!1}}function wR(e,t,o,l,d,m){{var w=m;if(typeof l.children!=typeof o.children&&(typeof l.children=="string"||typeof l.children=="number")){var x=""+l.children,E=ap(w.ancestorInfo,t);ip(null,x,E)}}return eR(e,t,o,l)}function Lw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function bR(e,t,o,l){{var d=o;ip(null,e,d.ancestorInfo)}var m=QT(e,t);return cp(l,m),m}function SR(){var e=window.event;return e===void 0?Yi:Bd(e.type)}var Pw=typeof setTimeout=="function"?setTimeout:void 0,xR=typeof clearTimeout=="function"?clearTimeout:void 0,Uw=-1,Ox=typeof Promise=="function"?Promise:void 0,_R=typeof queueMicrotask=="function"?queueMicrotask:typeof Ox<"u"?function(e){return Ox.resolve(null).then(e).catch(ER)}:Pw;function ER(e){setTimeout(function(){throw e})}function kR(e,t,o,l){switch(t){case"button":case"input":case"select":case"textarea":o.autoFocus&&e.focus();return;case"img":{o.src&&(e.src=o.src);return}}}function CR(e,t,o,l,d,m){tR(e,t,o,l,d),Fw(e,d)}function Ax(e){Dl(e,"")}function TR(e,t,o){e.nodeValue=o}function RR(e,t){e.appendChild(t)}function OR(e,t){var o;e.nodeType===Zn?(o=e.parentNode,o.insertBefore(t,e)):(o=e,o.appendChild(t));var l=e._reactRootContainer;l==null&&o.onclick===null&&Vm(o)}function AR(e,t,o){e.insertBefore(t,o)}function DR(e,t,o){e.nodeType===Zn?e.parentNode.insertBefore(t,o):e.insertBefore(t,o)}function NR(e,t){e.removeChild(t)}function jR(e,t){e.nodeType===Zn?e.parentNode.removeChild(t):e.removeChild(t)}function Mw(e,t){var o=t,l=0;do{var d=o.nextSibling;if(e.removeChild(o),d&&d.nodeType===Zn){var m=d.data;if(m===Ym)if(l===0){e.removeChild(d),Qs(t);return}else l--;else(m===qm||m===op||m===sp)&&l++}o=d}while(o);Qs(t)}function LR(e,t){e.nodeType===Zn?Mw(e.parentNode,t):e.nodeType===li&&Mw(e,t),Qs(e)}function PR(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function UR(e){e.nodeValue=""}function MR(e,t){e=e;var o=t[dR],l=o!=null&&o.hasOwnProperty("display")?o.display:null;e.style.display=Gc("display",l)}function $R(e,t){e.nodeValue=t}function IR(e){e.nodeType===li?e.textContent="":e.nodeType===io&&e.documentElement&&e.removeChild(e.documentElement)}function zR(e,t,o){return e.nodeType!==li||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function FR(e,t){return t===""||e.nodeType!==ro?null:e}function BR(e){return e.nodeType!==Zn?null:e}function Dx(e){return e.data===op}function $w(e){return e.data===sp}function HR(e){var t=e.nextSibling&&e.nextSibling.dataset,o,l,d;return t&&(o=t.dgst,l=t.msg,d=t.stck),{message:l,digest:o,stack:d}}function VR(e,t){e._reactRetry=t}function Gm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===li||t===ro)break;if(t===Zn){var o=e.data;if(o===qm||o===sp||o===op)break;if(o===Ym)return null}}return e}function lp(e){return Gm(e.nextSibling)}function WR(e){return Gm(e.firstChild)}function qR(e){return Gm(e.firstChild)}function YR(e){return Gm(e.nextSibling)}function GR(e,t,o,l,d,m,w){cp(m,e),Fw(e,o);var x;{var E=d;x=E.namespace}var D=(m.mode&Bt)!==ht;return rR(e,t,o,x,l,D,w)}function KR(e,t,o,l){return cp(o,e),o.mode&Bt,iR(e,t)}function JR(e,t){cp(t,e)}function XR(e){for(var t=e.nextSibling,o=0;t;){if(t.nodeType===Zn){var l=t.data;if(l===Ym){if(o===0)return lp(t);o--}else(l===qm||l===sp||l===op)&&o++}t=t.nextSibling}return null}function Nx(e){for(var t=e.previousSibling,o=0;t;){if(t.nodeType===Zn){var l=t.data;if(l===qm||l===sp||l===op){if(o===0)return t;o--}else l===Ym&&o++}t=t.previousSibling}return null}function QR(e){Qs(e)}function ZR(e){Qs(e)}function eO(e){return e!=="head"&&e!=="body"}function tO(e,t,o,l){var d=!0;Hm(t.nodeValue,o,l,d)}function nO(e,t,o,l,d,m){if(t[Wm]!==!0){var w=!0;Hm(l.nodeValue,d,m,w)}}function rO(e,t){t.nodeType===li?Rw(e,t):t.nodeType===Zn||Ow(e,t)}function iO(e,t){{var o=e.parentNode;o!==null&&(t.nodeType===li?Rw(o,t):t.nodeType===Zn||Ow(o,t))}}function aO(e,t,o,l,d){(d||t[Wm]!==!0)&&(l.nodeType===li?Rw(o,l):l.nodeType===Zn||Ow(o,l))}function oO(e,t,o){Aw(e,t)}function sO(e,t){Dw(e,t)}function lO(e,t,o){{var l=e.parentNode;l!==null&&Aw(l,t)}}function uO(e,t){{var o=e.parentNode;o!==null&&Dw(o,t)}}function cO(e,t,o,l,d,m){(m||t[Wm]!==!0)&&Aw(o,l)}function dO(e,t,o,l,d){(d||t[Wm]!==!0)&&Dw(o,l)}function fO(e){h("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function hO(e){ep(e)}var nf=Math.random().toString(36).slice(2),rf="__reactFiber$"+nf,Iw="__reactProps$"+nf,up="__reactContainer$"+nf,zw="__reactEvents$"+nf,pO="__reactListeners$"+nf,vO="__reactHandles$"+nf;function mO(e){delete e[rf],delete e[Iw],delete e[zw],delete e[pO],delete e[vO]}function cp(e,t){t[rf]=e}function Km(e,t){t[up]=e}function jx(e){e[up]=null}function dp(e){return!!e[up]}function bc(e){var t=e[rf];if(t)return t;for(var o=e.parentNode;o;){if(t=o[up]||o[rf],t){var l=t.alternate;if(t.child!==null||l!==null&&l.child!==null)for(var d=Nx(e);d!==null;){var m=d[rf];if(m)return m;d=Nx(d)}return t}e=o,o=e.parentNode}return null}function tu(e){var t=e[rf]||e[up];return t&&(t.tag===A||t.tag===j||t.tag===le||t.tag===R)?t:null}function af(e){if(e.tag===A||e.tag===j)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Jm(e){return e[Iw]||null}function Fw(e,t){e[Iw]=t}function gO(e){var t=e[zw];return t===void 0&&(t=e[zw]=new Set),t}var Lx={},Px=s.ReactDebugCurrentFrame;function Xm(e){if(e){var t=e._owner,o=Za(e.type,e._source,t?t.type:null);Px.setExtraStackFrame(o)}else Px.setExtraStackFrame(null)}function mo(e,t,o,l,d){{var m=Function.call.bind(Hn);for(var w in e)if(m(e,w)){var x=void 0;try{if(typeof e[w]!="function"){var E=Error((l||"React class")+": "+o+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}x=e[w](t,w,l,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(D){x=D}x&&!(x instanceof Error)&&(Xm(d),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",o,w,typeof x),Xm(null)),x instanceof Error&&!(x.message in Lx)&&(Lx[x.message]=!0,Xm(d),h("Failed %s type: %s",o,x.message),Xm(null))}}}var Bw=[],Qm;Qm=[];var il=-1;function nu(e){return{current:e}}function wi(e,t){if(il<0){h("Unexpected pop.");return}t!==Qm[il]&&h("Unexpected Fiber popped."),e.current=Bw[il],Bw[il]=null,Qm[il]=null,il--}function bi(e,t,o){il++,Bw[il]=e.current,Qm[il]=o,e.current=t}var Hw;Hw={};var wa={};Object.freeze(wa);var al=nu(wa),os=nu(!1),Vw=wa;function of(e,t,o){return o&&ss(t)?Vw:al.current}function Ux(e,t,o){{var l=e.stateNode;l.__reactInternalMemoizedUnmaskedChildContext=t,l.__reactInternalMemoizedMaskedChildContext=o}}function sf(e,t){{var o=e.type,l=o.contextTypes;if(!l)return wa;var d=e.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===t)return d.__reactInternalMemoizedMaskedChildContext;var m={};for(var w in l)m[w]=t[w];{var x=Rt(e)||"Unknown";mo(l,m,"context",x)}return d&&Ux(e,t,m),m}}function Zm(){return os.current}function ss(e){{var t=e.childContextTypes;return t!=null}}function eg(e){wi(os,e),wi(al,e)}function Ww(e){wi(os,e),wi(al,e)}function Mx(e,t,o){{if(al.current!==wa)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");bi(al,t,e),bi(os,o,e)}}function $x(e,t,o){{var l=e.stateNode,d=t.childContextTypes;if(typeof l.getChildContext!="function"){{var m=Rt(e)||"Unknown";Hw[m]||(Hw[m]=!0,h("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",m,m))}return o}var w=l.getChildContext();for(var x in w)if(!(x in d))throw new Error((Rt(e)||"Unknown")+'.getChildContext(): key "'+x+'" is not defined in childContextTypes.');{var E=Rt(e)||"Unknown";mo(d,w,"child context",E)}return Mt({},o,w)}}function tg(e){{var t=e.stateNode,o=t&&t.__reactInternalMemoizedMergedChildContext||wa;return Vw=al.current,bi(al,o,e),bi(os,os.current,e),!0}}function Ix(e,t,o){{var l=e.stateNode;if(!l)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(o){var d=$x(e,t,Vw);l.__reactInternalMemoizedMergedChildContext=d,wi(os,e),wi(al,e),bi(al,d,e),bi(os,o,e)}else wi(os,e),bi(os,o,e)}}function yO(e){{if(!$s(e)||e.tag!==_)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case R:return t.stateNode.context;case _:{var o=t.type;if(ss(o))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var ru=0,ng=1,ol=null,qw=!1,Yw=!1;function zx(e){ol===null?ol=[e]:ol.push(e)}function wO(e){qw=!0,zx(e)}function Fx(){qw&&iu()}function iu(){if(!Yw&&ol!==null){Yw=!0;var e=0,t=Ki();try{var o=!0,l=ol;for(ir(qr);e<l.length;e++){var d=l[e];do d=d(o);while(d!==null)}ol=null,qw=!1}catch(m){throw ol!==null&&(ol=ol.slice(e+1)),ph(Iu,iu),m}finally{ir(t),Yw=!1}}return null}var lf=[],uf=0,rg=null,ig=0,Ha=[],Va=0,Sc=null,sl=1,ll="";function bO(e){return _c(),(e.flags&ja)!==ft}function SO(e){return _c(),ig}function xO(){var e=ll,t=sl,o=t&~_O(t);return o.toString(32)+e}function xc(e,t){_c(),lf[uf++]=ig,lf[uf++]=rg,rg=e,ig=t}function Bx(e,t,o){_c(),Ha[Va++]=sl,Ha[Va++]=ll,Ha[Va++]=Sc,Sc=e;var l=sl,d=ll,m=ag(l)-1,w=l&~(1<<m),x=o+1,E=ag(t)+m;if(E>30){var D=m-m%5,L=(1<<D)-1,W=(w&L).toString(32),H=w>>D,ee=m-D,ae=ag(t)+ee,ce=x<<ee,Be=ce|H,gt=W+d;sl=1<<ae|Be,ll=gt}else{var ot=x<<m,Zt=ot|w,Gt=d;sl=1<<E|Zt,ll=Gt}}function Gw(e){_c();var t=e.return;if(t!==null){var o=1,l=0;xc(e,o),Bx(e,o,l)}}function ag(e){return 32-nr(e)}function _O(e){return 1<<ag(e)-1}function Kw(e){for(;e===rg;)rg=lf[--uf],lf[uf]=null,ig=lf[--uf],lf[uf]=null;for(;e===Sc;)Sc=Ha[--Va],Ha[Va]=null,ll=Ha[--Va],Ha[Va]=null,sl=Ha[--Va],Ha[Va]=null}function EO(){return _c(),Sc!==null?{id:sl,overflow:ll}:null}function kO(e,t){_c(),Ha[Va++]=sl,Ha[Va++]=ll,Ha[Va++]=Sc,sl=t.id,ll=t.overflow,Sc=e}function _c(){Xr()||h("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Jr=null,Wa=null,go=!1,Ec=!1,au=null;function CO(){go&&h("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Hx(){Ec=!0}function TO(){return Ec}function RO(e){var t=e.stateNode.containerInfo;return Wa=qR(t),Jr=e,go=!0,au=null,Ec=!1,!0}function OO(e,t,o){return Wa=YR(t),Jr=e,go=!0,au=null,Ec=!1,o!==null&&kO(e,o),!0}function Vx(e,t){switch(e.tag){case R:{rO(e.stateNode.containerInfo,t);break}case A:{var o=(e.mode&Bt)!==ht;aO(e.type,e.memoizedProps,e.stateNode,t,o);break}case le:{var l=e.memoizedState;l.dehydrated!==null&&iO(l.dehydrated,t);break}}}function Wx(e,t){Vx(e,t);var o=jN();o.stateNode=t,o.return=e;var l=e.deletions;l===null?(e.deletions=[o],e.flags|=Bi):l.push(o)}function Jw(e,t){{if(Ec)return;switch(e.tag){case R:{var o=e.stateNode.containerInfo;switch(t.tag){case A:var l=t.type;t.pendingProps,oO(o,l);break;case j:var d=t.pendingProps;sO(o,d);break}break}case A:{var m=e.type,w=e.memoizedProps,x=e.stateNode;switch(t.tag){case A:{var E=t.type,D=t.pendingProps,L=(e.mode&Bt)!==ht;cO(m,w,x,E,D,L);break}case j:{var W=t.pendingProps,H=(e.mode&Bt)!==ht;dO(m,w,x,W,H);break}}break}case le:{var ee=e.memoizedState,ae=ee.dehydrated;if(ae!==null)switch(t.tag){case A:var ce=t.type;t.pendingProps,lO(ae,ce);break;case j:var Be=t.pendingProps;uO(ae,Be);break}break}default:return}}}function qx(e,t){t.flags=t.flags&~ci|In,Jw(e,t)}function Yx(e,t){switch(e.tag){case A:{var o=e.type;e.pendingProps;var l=zR(t,o);return l!==null?(e.stateNode=l,Jr=e,Wa=WR(l),!0):!1}case j:{var d=e.pendingProps,m=FR(t,d);return m!==null?(e.stateNode=m,Jr=e,Wa=null,!0):!1}case le:{var w=BR(t);if(w!==null){var x={dehydrated:w,treeContext:EO(),retryLane:pi};e.memoizedState=x;var E=LN(w);return E.return=e,e.child=E,Jr=e,Wa=null,!0}return!1}default:return!1}}function Xw(e){return(e.mode&Bt)!==ht&&(e.flags&lt)===ft}function Qw(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Zw(e){if(go){var t=Wa;if(!t){Xw(e)&&(Jw(Jr,e),Qw()),qx(Jr,e),go=!1,Jr=e;return}var o=t;if(!Yx(e,t)){Xw(e)&&(Jw(Jr,e),Qw()),t=lp(o);var l=Jr;if(!t||!Yx(e,t)){qx(Jr,e),go=!1,Jr=e;return}Wx(l,o)}}}function AO(e,t,o){var l=e.stateNode,d=!Ec,m=GR(l,e.type,e.memoizedProps,t,o,e,d);return e.updateQueue=m,m!==null}function DO(e){var t=e.stateNode,o=e.memoizedProps,l=KR(t,o,e);if(l){var d=Jr;if(d!==null)switch(d.tag){case R:{var m=d.stateNode.containerInfo,w=(d.mode&Bt)!==ht;tO(m,t,o,w);break}case A:{var x=d.type,E=d.memoizedProps,D=d.stateNode,L=(d.mode&Bt)!==ht;nO(x,E,D,t,o,L);break}}}return l}function NO(e){var t=e.memoizedState,o=t!==null?t.dehydrated:null;if(!o)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");JR(o,e)}function jO(e){var t=e.memoizedState,o=t!==null?t.dehydrated:null;if(!o)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return XR(o)}function Gx(e){for(var t=e.return;t!==null&&t.tag!==A&&t.tag!==R&&t.tag!==le;)t=t.return;Jr=t}function og(e){if(e!==Jr)return!1;if(!go)return Gx(e),go=!0,!1;if(e.tag!==R&&(e.tag!==A||eO(e.type)&&!Lw(e.type,e.memoizedProps))){var t=Wa;if(t)if(Xw(e))Kx(e),Qw();else for(;t;)Wx(e,t),t=lp(t)}return Gx(e),e.tag===le?Wa=jO(e):Wa=Jr?lp(e.stateNode):null,!0}function LO(){return go&&Wa!==null}function Kx(e){for(var t=Wa;t;)Vx(e,t),t=lp(t)}function cf(){Jr=null,Wa=null,go=!1,Ec=!1}function Jx(){au!==null&&(HE(au),au=null)}function Xr(){return go}function e0(e){au===null?au=[e]:au.push(e)}var PO=s.ReactCurrentBatchConfig,UO=null;function MO(){return PO.transition}var yo={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var $O=function(e){for(var t=null,o=e;o!==null;)o.mode&_n&&(t=o),o=o.return;return t},kc=function(e){var t=[];return e.forEach(function(o){t.push(o)}),t.sort().join(", ")},fp=[],hp=[],pp=[],vp=[],mp=[],gp=[],Cc=new Set;yo.recordUnsafeLifecycleWarnings=function(e,t){Cc.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&fp.push(e),e.mode&_n&&typeof t.UNSAFE_componentWillMount=="function"&&hp.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&pp.push(e),e.mode&_n&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&vp.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&mp.push(e),e.mode&_n&&typeof t.UNSAFE_componentWillUpdate=="function"&&gp.push(e))},yo.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;fp.length>0&&(fp.forEach(function(H){e.add(Rt(H)||"Component"),Cc.add(H.type)}),fp=[]);var t=new Set;hp.length>0&&(hp.forEach(function(H){t.add(Rt(H)||"Component"),Cc.add(H.type)}),hp=[]);var o=new Set;pp.length>0&&(pp.forEach(function(H){o.add(Rt(H)||"Component"),Cc.add(H.type)}),pp=[]);var l=new Set;vp.length>0&&(vp.forEach(function(H){l.add(Rt(H)||"Component"),Cc.add(H.type)}),vp=[]);var d=new Set;mp.length>0&&(mp.forEach(function(H){d.add(Rt(H)||"Component"),Cc.add(H.type)}),mp=[]);var m=new Set;if(gp.length>0&&(gp.forEach(function(H){m.add(Rt(H)||"Component"),Cc.add(H.type)}),gp=[]),t.size>0){var w=kc(t);h(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
127
+ */function ww(e){if(!gn)return!1;var t="on"+e,o=t in document;if(!o){var l=document.createElement("div");l.setAttribute(t,"return;"),o=typeof l[t]=="function"}return o}function gc(){Ot("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Nm(e,t,o,l){Pl(l);var d=Mm(t,"onChange");if(d.length>0){var m=new Ba("onChange","change",null,o,l);e.push({event:m,listeners:d})}}var is=null,r=null;function a(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function c(e){var t=[];Nm(t,r,e,fh(e)),Vv(p,t)}function p(e){gx(e,0)}function y(e){var t=af(e);if(Oa(t))return e}function S(e,t){if(e==="change")return t}var T=!1;gn&&(T=ww("input")&&(!document.documentMode||document.documentMode>9));function U(e,t){is=e,r=t,is.attachEvent("onpropertychange",re)}function z(){is&&(is.detachEvent("onpropertychange",re),is=null,r=null)}function re(e){e.propertyName==="value"&&y(r)&&c(e)}function Se(e,t,o){e==="focusin"?(z(),U(t,o)):e==="focusout"&&z()}function Ce(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return y(r)}function we(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function qe(e,t){if(e==="click")return y(t)}function Ze(e,t){if(e==="input"||e==="change")return y(t)}function rt(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||mt(e,"number",e.value)}function Xn(e,t,o,l,d,m,w){var x=o?af(o):window,E,D;if(a(x)?E=S:mc(x)?T?E=Ze:(E=Ce,D=Se):we(x)&&(E=qe),E){var L=E(t,o);if(L){Nm(e,L,l,d);return}}D&&D(t,x,o),t==="focusout"&&rt(x)}function K(){Wt("onMouseEnter",["mouseout","mouseover"]),Wt("onMouseLeave",["mouseout","mouseover"]),Wt("onPointerEnter",["pointerout","pointerover"]),Wt("onPointerLeave",["pointerout","pointerover"])}function V(e,t,o,l,d,m,w){var x=t==="mouseover"||t==="pointerover",E=t==="mouseout"||t==="pointerout";if(x&&!ju(l)){var D=l.relatedTarget||l.fromElement;if(D&&(bc(D)||dp(D)))return}if(!(!E&&!x)){var L;if(d.window===d)L=d;else{var W=d.ownerDocument;W?L=W.defaultView||W.parentWindow:L=window}var H,ee;if(E){var ae=l.relatedTarget||l.toElement;if(H=o,ee=ae?bc(ae):null,ee!==null){var ce=Ci(ee);(ee!==ce||ee.tag!==A&&ee.tag!==j)&&(ee=null)}}else H=null,ee=o;if(H!==ee){var Be=Bh,gt="onMouseLeave",ot="onMouseEnter",Zt="mouse";(t==="pointerout"||t==="pointerover")&&(Be=km,gt="onPointerLeave",ot="onPointerEnter",Zt="pointer");var Gt=H==null?L:af(H),J=ee==null?L:af(ee),de=new Be(gt,Zt+"leave",H,l,d);de.target=Gt,de.relatedTarget=J;var X=null,Te=bc(d);if(Te===o){var Ge=new Be(ot,Zt+"enter",ee,l,d);Ge.target=J,Ge.relatedTarget=Gt,X=Ge}WT(e,de,X,H,ee)}}}function Z(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xe=typeof Object.is=="function"?Object.is:Z;function et(e,t){if(xe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),l=Object.keys(t);if(o.length!==l.length)return!1;for(var d=0;d<o.length;d++){var m=o[d];if(!Hn.call(t,m)||!xe(e[m],t[m]))return!1}return!0}function yt(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xt(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function kt(e,t){for(var o=yt(e),l=0,d=0;o;){if(o.nodeType===ro){if(d=l+o.textContent.length,l<=t&&d>=t)return{node:o,offset:t-l};l=d}o=yt(xt(o))}}function gr(e){var t=e.ownerDocument,o=t&&t.defaultView||window,l=o.getSelection&&o.getSelection();if(!l||l.rangeCount===0)return null;var d=l.anchorNode,m=l.anchorOffset,w=l.focusNode,x=l.focusOffset;try{d.nodeType,w.nodeType}catch{return null}return ln(e,d,m,w,x)}function ln(e,t,o,l,d){var m=0,w=-1,x=-1,E=0,D=0,L=e,W=null;e:for(;;){for(var H=null;L===t&&(o===0||L.nodeType===ro)&&(w=m+o),L===l&&(d===0||L.nodeType===ro)&&(x=m+d),L.nodeType===ro&&(m+=L.nodeValue.length),(H=L.firstChild)!==null;)W=L,L=H;for(;;){if(L===e)break e;if(W===t&&++E===o&&(w=m),W===l&&++D===d&&(x=m),(H=L.nextSibling)!==null)break;L=W,W=L.parentNode}L=H}return w===-1||x===-1?null:{start:w,end:x}}function as(e,t){var o=e.ownerDocument||document,l=o&&o.defaultView||window;if(l.getSelection){var d=l.getSelection(),m=e.textContent.length,w=Math.min(t.start,m),x=t.end===void 0?w:Math.min(t.end,m);if(!d.extend&&w>x){var E=x;x=w,w=E}var D=kt(e,w),L=kt(e,x);if(D&&L){if(d.rangeCount===1&&d.anchorNode===D.node&&d.anchorOffset===D.offset&&d.focusNode===L.node&&d.focusOffset===L.offset)return;var W=o.createRange();W.setStart(D.node,D.offset),d.removeAllRanges(),w>x?(d.addRange(W),d.extend(L.node,L.offset)):(W.setEnd(L.node,L.offset),d.addRange(W))}}}function jm(e){return e&&e.nodeType===ro}function ox(e,t){return!e||!t?!1:e===t?!0:jm(e)?!1:jm(t)?ox(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function TT(e){return e&&e.ownerDocument&&ox(e.ownerDocument.documentElement,e)}function RT(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function sx(){for(var e=window,t=zi();t instanceof e.HTMLIFrameElement;){if(RT(t))e=t.contentWindow;else return t;t=zi(e.document)}return t}function bw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function OT(){var e=sx();return{focusedElem:e,selectionRange:bw(e)?DT(e):null}}function AT(e){var t=sx(),o=e.focusedElem,l=e.selectionRange;if(t!==o&&TT(o)){l!==null&&bw(o)&&NT(o,l);for(var d=[],m=o;m=m.parentNode;)m.nodeType===li&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});typeof o.focus=="function"&&o.focus();for(var w=0;w<d.length;w++){var x=d[w];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}}function DT(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=gr(e),t||{start:0,end:0}}function NT(e,t){var o=t.start,l=t.end;l===void 0&&(l=o),"selectionStart"in e?(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length)):as(e,t)}var jT=gn&&"documentMode"in document&&document.documentMode<=11;function LT(){Ot("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Zd=null,Sw=null,Qh=null,xw=!1;function PT(e){if("selectionStart"in e&&bw(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,o=t.getSelection();return{anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}}function UT(e){return e.window===e?e.document:e.nodeType===io?e:e.ownerDocument}function lx(e,t,o){var l=UT(o);if(!(xw||Zd==null||Zd!==zi(l))){var d=PT(Zd);if(!Qh||!et(Qh,d)){Qh=d;var m=Mm(Sw,"onSelect");if(m.length>0){var w=new Ba("onSelect","select",null,t,o);e.push({event:w,listeners:m}),w.target=Zd}}}}function MT(e,t,o,l,d,m,w){var x=o?af(o):window;switch(t){case"focusin":(mc(x)||x.contentEditable==="true")&&(Zd=x,Sw=o,Qh=null);break;case"focusout":Zd=null,Sw=null,Qh=null;break;case"mousedown":xw=!0;break;case"contextmenu":case"mouseup":case"dragend":xw=!1,lx(e,l,d);break;case"selectionchange":if(jT)break;case"keydown":case"keyup":lx(e,l,d)}}function Lm(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var ef={animationend:Lm("Animation","AnimationEnd"),animationiteration:Lm("Animation","AnimationIteration"),animationstart:Lm("Animation","AnimationStart"),transitionend:Lm("Transition","TransitionEnd")},_w={},ux={};gn&&(ux=document.createElement("div").style,"AnimationEvent"in window||(delete ef.animationend.animation,delete ef.animationiteration.animation,delete ef.animationstart.animation),"TransitionEvent"in window||delete ef.transitionend.transition);function Pm(e){if(_w[e])return _w[e];if(!ef[e])return e;var t=ef[e];for(var o in t)if(t.hasOwnProperty(o)&&o in ux)return _w[e]=t[o];return e}var cx=Pm("animationend"),dx=Pm("animationiteration"),fx=Pm("animationstart"),hx=Pm("transitionend"),px=new Map,vx=["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"];function Zl(e,t){px.set(e,t),Ot(t,[e])}function $T(){for(var e=0;e<vx.length;e++){var t=vx[e],o=t.toLowerCase(),l=t[0].toUpperCase()+t.slice(1);Zl(o,"on"+l)}Zl(cx,"onAnimationEnd"),Zl(dx,"onAnimationIteration"),Zl(fx,"onAnimationStart"),Zl("dblclick","onDoubleClick"),Zl("focusin","onFocus"),Zl("focusout","onBlur"),Zl(hx,"onTransitionEnd")}function IT(e,t,o,l,d,m,w){var x=px.get(t);if(x!==void 0){var E=Ba,D=t;switch(t){case"keypress":if(ts(l)===0)return;case"keydown":case"keyup":E=Em;break;case"focusin":D="focus",E=po;break;case"focusout":D="blur",E=po;break;case"beforeblur":case"afterblur":E=po;break;case"click":if(l.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":E=Bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=tl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Tm;break;case cx:case dx:case fx:E=wm;break;case hx:E=Ji;break;case"scroll":E=yi;break;case"wheel":E=mw;break;case"copy":case"cut":case"paste":E=Wd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=km;break}var L=(m&Fi)!==0;{var W=!L&&t==="scroll",H=HT(o,x,l.type,L,W);if(H.length>0){var ee=new E(x,D,null,l,d);e.push({event:ee,listeners:H})}}}}$T(),K(),gc(),LT(),gw();function zT(e,t,o,l,d,m,w){IT(e,t,o,l,d,m);var x=(m&dh)===0;x&&(V(e,t,o,l,d),Xn(e,t,o,l,d),MT(e,t,o,l,d),Dm(e,t,o,l,d))}var Zh=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Ew=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Zh));function mx(e,t,o){var l=e.type||"unknown-event";e.currentTarget=o,Na(l,t,void 0,e),e.currentTarget=null}function FT(e,t,o){var l;if(o)for(var d=t.length-1;d>=0;d--){var m=t[d],w=m.instance,x=m.currentTarget,E=m.listener;if(w!==l&&e.isPropagationStopped())return;mx(e,E,x),l=w}else for(var D=0;D<t.length;D++){var L=t[D],W=L.instance,H=L.currentTarget,ee=L.listener;if(W!==l&&e.isPropagationStopped())return;mx(e,ee,H),l=W}}function gx(e,t){for(var o=(t&Fi)!==0,l=0;l<e.length;l++){var d=e[l],m=d.event,w=d.listeners;FT(m,w,o)}Uu()}function BT(e,t,o,l,d){var m=fh(o),w=[];zT(w,e,l,o,m,t),gx(w,t)}function Bn(e,t){Ew.has(e)||h('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var o=!1,l=yO(t),d=qT(e);l.has(d)||(yx(t,e,Zc,o),l.add(d))}function kw(e,t,o){Ew.has(e)&&!t&&h('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var l=0;t&&(l|=Fi),yx(o,e,l,t)}var Um="_reactListening"+Math.random().toString(36).slice(2);function ep(e){if(!e[Um]){e[Um]=!0,wt.forEach(function(o){o!=="selectionchange"&&(Ew.has(o)||kw(o,!1,e),kw(o,!0,e))});var t=e.nodeType===io?e:e.ownerDocument;t!==null&&(t[Um]||(t[Um]=!0,kw("selectionchange",!1,t)))}}function yx(e,t,o,l,d){var m=Cr(e,t,o),w=void 0;Pu&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(w=!0),e=e,l?w!==void 0?Fh(e,t,m,w):gi(e,t,m):w!==void 0?Kl(e,t,m,w):dc(e,t,m)}function wx(e,t){return e===t||e.nodeType===Zn&&e.parentNode===t}function Cw(e,t,o,l,d){var m=l;if(!(t&ch)&&!(t&Zc)){var w=d;if(l!==null){var x=l;e:for(;;){if(x===null)return;var E=x.tag;if(E===R||E===N){var D=x.stateNode.containerInfo;if(wx(D,w))break;if(E===N)for(var L=x.return;L!==null;){var W=L.tag;if(W===R||W===N){var H=L.stateNode.containerInfo;if(wx(H,w))return}L=L.return}for(;D!==null;){var ee=bc(D);if(ee===null)return;var ae=ee.tag;if(ae===A||ae===j){x=m=ee;continue e}D=D.parentNode}}x=x.return}}}Vv(function(){return BT(e,t,o,m)})}function tp(e,t,o){return{instance:e,listener:t,currentTarget:o}}function HT(e,t,o,l,d,m){for(var w=t!==null?t+"Capture":null,x=l?w:t,E=[],D=e,L=null;D!==null;){var W=D,H=W.stateNode,ee=W.tag;if(ee===A&&H!==null&&(L=H,x!==null)){var ae=Bo(D,x);ae!=null&&E.push(tp(D,ae,L))}if(d)break;D=D.return}return E}function Mm(e,t){for(var o=t+"Capture",l=[],d=e;d!==null;){var m=d,w=m.stateNode,x=m.tag;if(x===A&&w!==null){var E=w,D=Bo(d,o);D!=null&&l.unshift(tp(d,D,E));var L=Bo(d,t);L!=null&&l.push(tp(d,L,E))}d=d.return}return l}function tf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==A);return e||null}function VT(e,t){for(var o=e,l=t,d=0,m=o;m;m=tf(m))d++;for(var w=0,x=l;x;x=tf(x))w++;for(;d-w>0;)o=tf(o),d--;for(;w-d>0;)l=tf(l),w--;for(var E=d;E--;){if(o===l||l!==null&&o===l.alternate)return o;o=tf(o),l=tf(l)}return null}function bx(e,t,o,l,d){for(var m=t._reactName,w=[],x=o;x!==null&&x!==l;){var E=x,D=E.alternate,L=E.stateNode,W=E.tag;if(D!==null&&D===l)break;if(W===A&&L!==null){var H=L;if(d){var ee=Bo(x,m);ee!=null&&w.unshift(tp(x,ee,H))}else if(!d){var ae=Bo(x,m);ae!=null&&w.push(tp(x,ae,H))}}x=x.return}w.length!==0&&e.push({event:t,listeners:w})}function WT(e,t,o,l,d){var m=l&&d?VT(l,d):null;l!==null&&bx(e,t,l,m,!1),d!==null&&o!==null&&bx(e,o,d,m,!0)}function qT(e,t){return e+"__bubble"}var Xi=!1,np="dangerouslySetInnerHTML",$m="suppressContentEditableWarning",eu="suppressHydrationWarning",Sx="autoFocus",yc="children",wc="style",Im="__html",Tw,zm,rp,xx,Fm,_x,Ex;Tw={dialog:!0,webview:!0},zm=function(e,t){sh(e,t),Xc(e,t),Fv(e,t,{registrationNameDependencies:ct,possibleRegistrationNames:ut})},_x=gn&&!document.documentMode,rp=function(e,t,o){if(!Xi){var l=Bm(o),d=Bm(t);d!==l&&(Xi=!0,h("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(d),JSON.stringify(l)))}},xx=function(e){if(!Xi){Xi=!0;var t=[];e.forEach(function(o){t.push(o)}),h("Extra attributes from the server: %s",t)}},Fm=function(e,t){t===!1?h("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):h("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},Ex=function(e,t){var o=e.namespaceURI===no?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return o.innerHTML=t,o.innerHTML};var YT=/\r\n?/g,GT=/\u0000|\uFFFD/g;function Bm(e){Je(e);var t=typeof e=="string"?e:""+e;return t.replace(YT,`
128
+ `).replace(GT,"")}function Hm(e,t,o,l){var d=Bm(t),m=Bm(e);if(m!==d&&(l&&(Xi||(Xi=!0,h('Text content did not match. Server: "%s" Client: "%s"',m,d))),o&&be))throw new Error("Text content does not match server-rendered HTML.")}function kx(e){return e.nodeType===io?e:e.ownerDocument}function KT(){}function Vm(e){e.onclick=KT}function JT(e,t,o,l,d){for(var m in l)if(l.hasOwnProperty(m)){var w=l[m];if(m===wc)w&&Object.freeze(w),Pv(t,w);else if(m===np){var x=w?w[Im]:void 0;x!=null&&_v(t,x)}else if(m===yc)if(typeof w=="string"){var E=e!=="textarea"||w!=="";E&&Dl(t,w)}else typeof w=="number"&&Dl(t,""+w);else m===$m||m===eu||m===Sx||(ct.hasOwnProperty(m)?w!=null&&(typeof w!="function"&&Fm(m,w),m==="onScroll"&&Bn("scroll",t)):w!=null&&Fr(t,m,w,d))}}function XT(e,t,o,l){for(var d=0;d<t.length;d+=2){var m=t[d],w=t[d+1];m===wc?Pv(e,w):m===np?_v(e,w):m===yc?Dl(e,w):Fr(e,m,w,l)}}function QT(e,t,o,l){var d,m=kx(o),w,x=l;if(x===no&&(x=eh(e)),x===no){if(d=zo(e,t),!d&&e!==e.toLowerCase()&&h("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var E=m.createElement("div");E.innerHTML="<script><\/script>";var D=E.firstChild;w=E.removeChild(D)}else if(typeof t.is=="string")w=m.createElement(e,{is:t.is});else if(w=m.createElement(e),e==="select"){var L=w;t.multiple?L.multiple=!0:t.size&&(L.size=t.size)}}else w=m.createElementNS(x,e);return x===no&&!d&&Object.prototype.toString.call(w)==="[object HTMLUnknownElement]"&&!Hn.call(Tw,e)&&(Tw[e]=!0,h("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),w}function ZT(e,t){return kx(t).createTextNode(e)}function eR(e,t,o,l){var d=zo(t,o);zm(t,o);var m;switch(t){case"dialog":Bn("cancel",e),Bn("close",e),m=o;break;case"iframe":case"object":case"embed":Bn("load",e),m=o;break;case"video":case"audio":for(var w=0;w<Zh.length;w++)Bn(Zh[w],e);m=o;break;case"source":Bn("error",e),m=o;break;case"img":case"image":case"link":Bn("error",e),Bn("load",e),m=o;break;case"details":Bn("toggle",e),m=o;break;case"input":fa(e,o),m=Al(e,o),Bn("invalid",e);break;case"option":tn(e,o),m=o;break;case"select":Ds(e,o),m=Cu(e,o),Bn("invalid",e);break;case"textarea":Xf(e,o),m=Jf(e,o),Bn("invalid",e);break;default:m=o}switch(Kc(t,m),JT(t,e,l,m,d),t){case"input":da(e),te(e,o,!1);break;case"textarea":da(e),Sv(e);break;case"option":Rn(e,o);break;case"select":Gf(e,o);break;default:typeof m.onClick=="function"&&Vm(e);break}}function tR(e,t,o,l,d){zm(t,l);var m=null,w,x;switch(t){case"input":w=Al(e,o),x=Al(e,l),m=[];break;case"select":w=Cu(e,o),x=Cu(e,l),m=[];break;case"textarea":w=Jf(e,o),x=Jf(e,l),m=[];break;default:w=o,x=l,typeof w.onClick!="function"&&typeof x.onClick=="function"&&Vm(e);break}Kc(t,x);var E,D,L=null;for(E in w)if(!(x.hasOwnProperty(E)||!w.hasOwnProperty(E)||w[E]==null))if(E===wc){var W=w[E];for(D in W)W.hasOwnProperty(D)&&(L||(L={}),L[D]="")}else E===np||E===yc||E===$m||E===eu||E===Sx||(ct.hasOwnProperty(E)?m||(m=[]):(m=m||[]).push(E,null));for(E in x){var H=x[E],ee=w!=null?w[E]:void 0;if(!(!x.hasOwnProperty(E)||H===ee||H==null&&ee==null))if(E===wc)if(H&&Object.freeze(H),ee){for(D in ee)ee.hasOwnProperty(D)&&(!H||!H.hasOwnProperty(D))&&(L||(L={}),L[D]="");for(D in H)H.hasOwnProperty(D)&&ee[D]!==H[D]&&(L||(L={}),L[D]=H[D])}else L||(m||(m=[]),m.push(E,L)),L=H;else if(E===np){var ae=H?H[Im]:void 0,ce=ee?ee[Im]:void 0;ae!=null&&ce!==ae&&(m=m||[]).push(E,ae)}else E===yc?(typeof H=="string"||typeof H=="number")&&(m=m||[]).push(E,""+H):E===$m||E===eu||(ct.hasOwnProperty(E)?(H!=null&&(typeof H!="function"&&Fm(E,H),E==="onScroll"&&Bn("scroll",e)),!m&&ee!==H&&(m=[])):(m=m||[]).push(E,H))}return L&&(ew(L,x[wc]),(m=m||[]).push(wc,L)),m}function nR(e,t,o,l,d){o==="input"&&d.type==="radio"&&d.name!=null&&C(e,d);var m=zo(o,l),w=zo(o,d);switch(XT(e,t,m,w),o){case"input":M(e,d);break;case"textarea":bv(e,d);break;case"select":qc(e,d);break}}function rR(e){{var t=e.toLowerCase();return Du.hasOwnProperty(t)&&Du[t]||null}}function iR(e,t,o,l,d,m,w){var x,E;switch(x=zo(t,o),zm(t,o),t){case"dialog":Bn("cancel",e),Bn("close",e);break;case"iframe":case"object":case"embed":Bn("load",e);break;case"video":case"audio":for(var D=0;D<Zh.length;D++)Bn(Zh[D],e);break;case"source":Bn("error",e);break;case"img":case"image":case"link":Bn("error",e),Bn("load",e);break;case"details":Bn("toggle",e);break;case"input":fa(e,o),Bn("invalid",e);break;case"option":tn(e,o);break;case"select":Ds(e,o),Bn("invalid",e);break;case"textarea":Xf(e,o),Bn("invalid",e);break}Kc(t,o);{E=new Set;for(var L=e.attributes,W=0;W<L.length;W++){var H=L[W].name.toLowerCase();switch(H){case"value":break;case"checked":break;case"selected":break;default:E.add(L[W].name)}}}var ee=null;for(var ae in o)if(o.hasOwnProperty(ae)){var ce=o[ae];if(ae===yc)typeof ce=="string"?e.textContent!==ce&&(o[eu]!==!0&&Hm(e.textContent,ce,m,w),ee=[yc,ce]):typeof ce=="number"&&e.textContent!==""+ce&&(o[eu]!==!0&&Hm(e.textContent,ce,m,w),ee=[yc,""+ce]);else if(ct.hasOwnProperty(ae))ce!=null&&(typeof ce!="function"&&Fm(ae,ce),ae==="onScroll"&&Bn("scroll",e));else if(w&&typeof x=="boolean"){var Be=void 0,gt=mn(ae);if(o[eu]!==!0){if(!(ae===$m||ae===eu||ae==="value"||ae==="checked"||ae==="selected")){if(ae===np){var ot=e.innerHTML,Zt=ce?ce[Im]:void 0;if(Zt!=null){var Gt=Ex(e,Zt);Gt!==ot&&rp(ae,ot,Gt)}}else if(ae===wc){if(E.delete(ae),_x){var J=Qy(ce);Be=e.getAttribute("style"),J!==Be&&rp(ae,Be,J)}}else if(x&&!B)E.delete(ae.toLowerCase()),Be=Es(e,ae,ce),ce!==Be&&rp(ae,Be,ce);else if(!Yt(ae,gt,x)&&!Ln(ae,ce,gt,x)){var de=!1;if(gt!==null)E.delete(gt.attributeName),Be=Do(e,ae,ce,gt);else{var X=l;if(X===no&&(X=eh(t)),X===no)E.delete(ae.toLowerCase());else{var Te=rR(ae);Te!==null&&Te!==ae&&(de=!0,E.delete(Te)),E.delete(ae)}Be=Es(e,ae,ce)}var Ge=B;!Ge&&ce!==Be&&!de&&rp(ae,Be,ce)}}}}}switch(w&&E.size>0&&o[eu]!==!0&&xx(E),t){case"input":da(e),te(e,o,!0);break;case"textarea":da(e),Sv(e);break;case"select":case"option":break;default:typeof o.onClick=="function"&&Vm(e);break}return ee}function aR(e,t,o){var l=e.nodeValue!==t;return l}function Rw(e,t){{if(Xi)return;Xi=!0,h("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function Ow(e,t){{if(Xi)return;Xi=!0,h('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function Aw(e,t,o){{if(Xi)return;Xi=!0,h("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function Dw(e,t){{if(t===""||Xi)return;Xi=!0,h('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function oR(e,t,o){switch(t){case"input":se(e,o);return;case"textarea":Gy(e,o);return;case"select":Kf(e,o);return}}var ip=function(){},ap=function(){};{var sR=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Cx=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],lR=Cx.concat(["button"]),uR=["dd","dt","li","option","optgroup","p","rp","rt"],Tx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};ap=function(e,t){var o=Mt({},e||Tx),l={tag:t};return Cx.indexOf(t)!==-1&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),lR.indexOf(t)!==-1&&(o.pTagInButtonScope=null),sR.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(o.listItemTagAutoclosing=null,o.dlItemTagAutoclosing=null),o.current=l,t==="form"&&(o.formTag=l),t==="a"&&(o.aTagInScope=l),t==="button"&&(o.buttonTagInScope=l),t==="nobr"&&(o.nobrTagInScope=l),t==="p"&&(o.pTagInButtonScope=l),t==="li"&&(o.listItemTagAutoclosing=l),(t==="dd"||t==="dt")&&(o.dlItemTagAutoclosing=l),o};var cR=function(e,t){switch(t){case"select":return e==="option"||e==="optgroup"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return uR.indexOf(t)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null}return!0},dR=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},Rx={};ip=function(e,t,o){o=o||Tx;var l=o.current,d=l&&l.tag;t!=null&&(e!=null&&h("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var m=cR(e,d)?null:l,w=m?null:dR(e,o),x=m||w;if(x){var E=x.tag,D=!!m+"|"+e+"|"+E;if(!Rx[D]){Rx[D]=!0;var L=e,W="";if(e==="#text"?/\S/.test(t)?L="Text nodes":(L="Whitespace text nodes",W=" Make sure you don't have any extra whitespace between tags on each line of your source code."):L="<"+e+">",m){var H="";E==="table"&&e==="tr"&&(H+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),h("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",L,E,W,H)}else h("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",L,E)}}}}var Wm="suppressHydrationWarning",qm="$",Ym="/$",op="$?",sp="$!",fR="style",Nw=null,jw=null;function hR(e){var t,o,l=e.nodeType;switch(l){case io:case nh:{t=l===io?"#document":"#fragment";var d=e.documentElement;o=d?d.namespaceURI:th(null,"");break}default:{var m=l===Zn?e.parentNode:e,w=m.namespaceURI||null;t=m.tagName,o=th(w,t);break}}{var x=t.toLowerCase(),E=ap(null,x);return{namespace:o,ancestorInfo:E}}}function pR(e,t,o){{var l=e,d=th(l.namespace,t),m=ap(l.ancestorInfo,t);return{namespace:d,ancestorInfo:m}}}function n$(e){return e}function vR(e){Nw=ar(),jw=OT();var t=null;return fr(!1),t}function mR(e){AT(jw),fr(Nw),Nw=null,jw=null}function gR(e,t,o,l,d){var m;{var w=l;if(ip(e,null,w.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var x=""+t.children,E=ap(w.ancestorInfo,e);ip(null,x,E)}m=w.namespace}var D=QT(e,t,o,m);return cp(d,D),Fw(D,t),D}function yR(e,t){e.appendChild(t)}function wR(e,t,o,l,d){switch(eR(e,t,o,l),t){case"button":case"input":case"select":case"textarea":return!!o.autoFocus;case"img":return!0;default:return!1}}function bR(e,t,o,l,d,m){{var w=m;if(typeof l.children!=typeof o.children&&(typeof l.children=="string"||typeof l.children=="number")){var x=""+l.children,E=ap(w.ancestorInfo,t);ip(null,x,E)}}return tR(e,t,o,l)}function Lw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function SR(e,t,o,l){{var d=o;ip(null,e,d.ancestorInfo)}var m=ZT(e,t);return cp(l,m),m}function xR(){var e=window.event;return e===void 0?Yi:Bd(e.type)}var Pw=typeof setTimeout=="function"?setTimeout:void 0,_R=typeof clearTimeout=="function"?clearTimeout:void 0,Uw=-1,Ox=typeof Promise=="function"?Promise:void 0,ER=typeof queueMicrotask=="function"?queueMicrotask:typeof Ox<"u"?function(e){return Ox.resolve(null).then(e).catch(kR)}:Pw;function kR(e){setTimeout(function(){throw e})}function CR(e,t,o,l){switch(t){case"button":case"input":case"select":case"textarea":o.autoFocus&&e.focus();return;case"img":{o.src&&(e.src=o.src);return}}}function TR(e,t,o,l,d,m){nR(e,t,o,l,d),Fw(e,d)}function Ax(e){Dl(e,"")}function RR(e,t,o){e.nodeValue=o}function OR(e,t){e.appendChild(t)}function AR(e,t){var o;e.nodeType===Zn?(o=e.parentNode,o.insertBefore(t,e)):(o=e,o.appendChild(t));var l=e._reactRootContainer;l==null&&o.onclick===null&&Vm(o)}function DR(e,t,o){e.insertBefore(t,o)}function NR(e,t,o){e.nodeType===Zn?e.parentNode.insertBefore(t,o):e.insertBefore(t,o)}function jR(e,t){e.removeChild(t)}function LR(e,t){e.nodeType===Zn?e.parentNode.removeChild(t):e.removeChild(t)}function Mw(e,t){var o=t,l=0;do{var d=o.nextSibling;if(e.removeChild(o),d&&d.nodeType===Zn){var m=d.data;if(m===Ym)if(l===0){e.removeChild(d),Qs(t);return}else l--;else(m===qm||m===op||m===sp)&&l++}o=d}while(o);Qs(t)}function PR(e,t){e.nodeType===Zn?Mw(e.parentNode,t):e.nodeType===li&&Mw(e,t),Qs(e)}function UR(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function MR(e){e.nodeValue=""}function $R(e,t){e=e;var o=t[fR],l=o!=null&&o.hasOwnProperty("display")?o.display:null;e.style.display=Gc("display",l)}function IR(e,t){e.nodeValue=t}function zR(e){e.nodeType===li?e.textContent="":e.nodeType===io&&e.documentElement&&e.removeChild(e.documentElement)}function FR(e,t,o){return e.nodeType!==li||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function BR(e,t){return t===""||e.nodeType!==ro?null:e}function HR(e){return e.nodeType!==Zn?null:e}function Dx(e){return e.data===op}function $w(e){return e.data===sp}function VR(e){var t=e.nextSibling&&e.nextSibling.dataset,o,l,d;return t&&(o=t.dgst,l=t.msg,d=t.stck),{message:l,digest:o,stack:d}}function WR(e,t){e._reactRetry=t}function Gm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===li||t===ro)break;if(t===Zn){var o=e.data;if(o===qm||o===sp||o===op)break;if(o===Ym)return null}}return e}function lp(e){return Gm(e.nextSibling)}function qR(e){return Gm(e.firstChild)}function YR(e){return Gm(e.firstChild)}function GR(e){return Gm(e.nextSibling)}function KR(e,t,o,l,d,m,w){cp(m,e),Fw(e,o);var x;{var E=d;x=E.namespace}var D=(m.mode&Bt)!==ht;return iR(e,t,o,x,l,D,w)}function JR(e,t,o,l){return cp(o,e),o.mode&Bt,aR(e,t)}function XR(e,t){cp(t,e)}function QR(e){for(var t=e.nextSibling,o=0;t;){if(t.nodeType===Zn){var l=t.data;if(l===Ym){if(o===0)return lp(t);o--}else(l===qm||l===sp||l===op)&&o++}t=t.nextSibling}return null}function Nx(e){for(var t=e.previousSibling,o=0;t;){if(t.nodeType===Zn){var l=t.data;if(l===qm||l===sp||l===op){if(o===0)return t;o--}else l===Ym&&o++}t=t.previousSibling}return null}function ZR(e){Qs(e)}function eO(e){Qs(e)}function tO(e){return e!=="head"&&e!=="body"}function nO(e,t,o,l){var d=!0;Hm(t.nodeValue,o,l,d)}function rO(e,t,o,l,d,m){if(t[Wm]!==!0){var w=!0;Hm(l.nodeValue,d,m,w)}}function iO(e,t){t.nodeType===li?Rw(e,t):t.nodeType===Zn||Ow(e,t)}function aO(e,t){{var o=e.parentNode;o!==null&&(t.nodeType===li?Rw(o,t):t.nodeType===Zn||Ow(o,t))}}function oO(e,t,o,l,d){(d||t[Wm]!==!0)&&(l.nodeType===li?Rw(o,l):l.nodeType===Zn||Ow(o,l))}function sO(e,t,o){Aw(e,t)}function lO(e,t){Dw(e,t)}function uO(e,t,o){{var l=e.parentNode;l!==null&&Aw(l,t)}}function cO(e,t){{var o=e.parentNode;o!==null&&Dw(o,t)}}function dO(e,t,o,l,d,m){(m||t[Wm]!==!0)&&Aw(o,l)}function fO(e,t,o,l,d){(d||t[Wm]!==!0)&&Dw(o,l)}function hO(e){h("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function pO(e){ep(e)}var nf=Math.random().toString(36).slice(2),rf="__reactFiber$"+nf,Iw="__reactProps$"+nf,up="__reactContainer$"+nf,zw="__reactEvents$"+nf,vO="__reactListeners$"+nf,mO="__reactHandles$"+nf;function gO(e){delete e[rf],delete e[Iw],delete e[zw],delete e[vO],delete e[mO]}function cp(e,t){t[rf]=e}function Km(e,t){t[up]=e}function jx(e){e[up]=null}function dp(e){return!!e[up]}function bc(e){var t=e[rf];if(t)return t;for(var o=e.parentNode;o;){if(t=o[up]||o[rf],t){var l=t.alternate;if(t.child!==null||l!==null&&l.child!==null)for(var d=Nx(e);d!==null;){var m=d[rf];if(m)return m;d=Nx(d)}return t}e=o,o=e.parentNode}return null}function tu(e){var t=e[rf]||e[up];return t&&(t.tag===A||t.tag===j||t.tag===le||t.tag===R)?t:null}function af(e){if(e.tag===A||e.tag===j)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Jm(e){return e[Iw]||null}function Fw(e,t){e[Iw]=t}function yO(e){var t=e[zw];return t===void 0&&(t=e[zw]=new Set),t}var Lx={},Px=s.ReactDebugCurrentFrame;function Xm(e){if(e){var t=e._owner,o=Za(e.type,e._source,t?t.type:null);Px.setExtraStackFrame(o)}else Px.setExtraStackFrame(null)}function mo(e,t,o,l,d){{var m=Function.call.bind(Hn);for(var w in e)if(m(e,w)){var x=void 0;try{if(typeof e[w]!="function"){var E=Error((l||"React class")+": "+o+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}x=e[w](t,w,l,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(D){x=D}x&&!(x instanceof Error)&&(Xm(d),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",o,w,typeof x),Xm(null)),x instanceof Error&&!(x.message in Lx)&&(Lx[x.message]=!0,Xm(d),h("Failed %s type: %s",o,x.message),Xm(null))}}}var Bw=[],Qm;Qm=[];var il=-1;function nu(e){return{current:e}}function wi(e,t){if(il<0){h("Unexpected pop.");return}t!==Qm[il]&&h("Unexpected Fiber popped."),e.current=Bw[il],Bw[il]=null,Qm[il]=null,il--}function bi(e,t,o){il++,Bw[il]=e.current,Qm[il]=o,e.current=t}var Hw;Hw={};var wa={};Object.freeze(wa);var al=nu(wa),os=nu(!1),Vw=wa;function of(e,t,o){return o&&ss(t)?Vw:al.current}function Ux(e,t,o){{var l=e.stateNode;l.__reactInternalMemoizedUnmaskedChildContext=t,l.__reactInternalMemoizedMaskedChildContext=o}}function sf(e,t){{var o=e.type,l=o.contextTypes;if(!l)return wa;var d=e.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===t)return d.__reactInternalMemoizedMaskedChildContext;var m={};for(var w in l)m[w]=t[w];{var x=Rt(e)||"Unknown";mo(l,m,"context",x)}return d&&Ux(e,t,m),m}}function Zm(){return os.current}function ss(e){{var t=e.childContextTypes;return t!=null}}function eg(e){wi(os,e),wi(al,e)}function Ww(e){wi(os,e),wi(al,e)}function Mx(e,t,o){{if(al.current!==wa)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");bi(al,t,e),bi(os,o,e)}}function $x(e,t,o){{var l=e.stateNode,d=t.childContextTypes;if(typeof l.getChildContext!="function"){{var m=Rt(e)||"Unknown";Hw[m]||(Hw[m]=!0,h("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",m,m))}return o}var w=l.getChildContext();for(var x in w)if(!(x in d))throw new Error((Rt(e)||"Unknown")+'.getChildContext(): key "'+x+'" is not defined in childContextTypes.');{var E=Rt(e)||"Unknown";mo(d,w,"child context",E)}return Mt({},o,w)}}function tg(e){{var t=e.stateNode,o=t&&t.__reactInternalMemoizedMergedChildContext||wa;return Vw=al.current,bi(al,o,e),bi(os,os.current,e),!0}}function Ix(e,t,o){{var l=e.stateNode;if(!l)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(o){var d=$x(e,t,Vw);l.__reactInternalMemoizedMergedChildContext=d,wi(os,e),wi(al,e),bi(al,d,e),bi(os,o,e)}else wi(os,e),bi(os,o,e)}}function wO(e){{if(!$s(e)||e.tag!==_)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case R:return t.stateNode.context;case _:{var o=t.type;if(ss(o))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var ru=0,ng=1,ol=null,qw=!1,Yw=!1;function zx(e){ol===null?ol=[e]:ol.push(e)}function bO(e){qw=!0,zx(e)}function Fx(){qw&&iu()}function iu(){if(!Yw&&ol!==null){Yw=!0;var e=0,t=Ki();try{var o=!0,l=ol;for(ir(qr);e<l.length;e++){var d=l[e];do d=d(o);while(d!==null)}ol=null,qw=!1}catch(m){throw ol!==null&&(ol=ol.slice(e+1)),ph(Iu,iu),m}finally{ir(t),Yw=!1}}return null}var lf=[],uf=0,rg=null,ig=0,Ha=[],Va=0,Sc=null,sl=1,ll="";function SO(e){return _c(),(e.flags&ja)!==ft}function xO(e){return _c(),ig}function _O(){var e=ll,t=sl,o=t&~EO(t);return o.toString(32)+e}function xc(e,t){_c(),lf[uf++]=ig,lf[uf++]=rg,rg=e,ig=t}function Bx(e,t,o){_c(),Ha[Va++]=sl,Ha[Va++]=ll,Ha[Va++]=Sc,Sc=e;var l=sl,d=ll,m=ag(l)-1,w=l&~(1<<m),x=o+1,E=ag(t)+m;if(E>30){var D=m-m%5,L=(1<<D)-1,W=(w&L).toString(32),H=w>>D,ee=m-D,ae=ag(t)+ee,ce=x<<ee,Be=ce|H,gt=W+d;sl=1<<ae|Be,ll=gt}else{var ot=x<<m,Zt=ot|w,Gt=d;sl=1<<E|Zt,ll=Gt}}function Gw(e){_c();var t=e.return;if(t!==null){var o=1,l=0;xc(e,o),Bx(e,o,l)}}function ag(e){return 32-nr(e)}function EO(e){return 1<<ag(e)-1}function Kw(e){for(;e===rg;)rg=lf[--uf],lf[uf]=null,ig=lf[--uf],lf[uf]=null;for(;e===Sc;)Sc=Ha[--Va],Ha[Va]=null,ll=Ha[--Va],Ha[Va]=null,sl=Ha[--Va],Ha[Va]=null}function kO(){return _c(),Sc!==null?{id:sl,overflow:ll}:null}function CO(e,t){_c(),Ha[Va++]=sl,Ha[Va++]=ll,Ha[Va++]=Sc,sl=t.id,ll=t.overflow,Sc=e}function _c(){Xr()||h("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Jr=null,Wa=null,go=!1,Ec=!1,au=null;function TO(){go&&h("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Hx(){Ec=!0}function RO(){return Ec}function OO(e){var t=e.stateNode.containerInfo;return Wa=YR(t),Jr=e,go=!0,au=null,Ec=!1,!0}function AO(e,t,o){return Wa=GR(t),Jr=e,go=!0,au=null,Ec=!1,o!==null&&CO(e,o),!0}function Vx(e,t){switch(e.tag){case R:{iO(e.stateNode.containerInfo,t);break}case A:{var o=(e.mode&Bt)!==ht;oO(e.type,e.memoizedProps,e.stateNode,t,o);break}case le:{var l=e.memoizedState;l.dehydrated!==null&&aO(l.dehydrated,t);break}}}function Wx(e,t){Vx(e,t);var o=LN();o.stateNode=t,o.return=e;var l=e.deletions;l===null?(e.deletions=[o],e.flags|=Bi):l.push(o)}function Jw(e,t){{if(Ec)return;switch(e.tag){case R:{var o=e.stateNode.containerInfo;switch(t.tag){case A:var l=t.type;t.pendingProps,sO(o,l);break;case j:var d=t.pendingProps;lO(o,d);break}break}case A:{var m=e.type,w=e.memoizedProps,x=e.stateNode;switch(t.tag){case A:{var E=t.type,D=t.pendingProps,L=(e.mode&Bt)!==ht;dO(m,w,x,E,D,L);break}case j:{var W=t.pendingProps,H=(e.mode&Bt)!==ht;fO(m,w,x,W,H);break}}break}case le:{var ee=e.memoizedState,ae=ee.dehydrated;if(ae!==null)switch(t.tag){case A:var ce=t.type;t.pendingProps,uO(ae,ce);break;case j:var Be=t.pendingProps;cO(ae,Be);break}break}default:return}}}function qx(e,t){t.flags=t.flags&~ci|In,Jw(e,t)}function Yx(e,t){switch(e.tag){case A:{var o=e.type;e.pendingProps;var l=FR(t,o);return l!==null?(e.stateNode=l,Jr=e,Wa=qR(l),!0):!1}case j:{var d=e.pendingProps,m=BR(t,d);return m!==null?(e.stateNode=m,Jr=e,Wa=null,!0):!1}case le:{var w=HR(t);if(w!==null){var x={dehydrated:w,treeContext:kO(),retryLane:pi};e.memoizedState=x;var E=PN(w);return E.return=e,e.child=E,Jr=e,Wa=null,!0}return!1}default:return!1}}function Xw(e){return(e.mode&Bt)!==ht&&(e.flags&lt)===ft}function Qw(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Zw(e){if(go){var t=Wa;if(!t){Xw(e)&&(Jw(Jr,e),Qw()),qx(Jr,e),go=!1,Jr=e;return}var o=t;if(!Yx(e,t)){Xw(e)&&(Jw(Jr,e),Qw()),t=lp(o);var l=Jr;if(!t||!Yx(e,t)){qx(Jr,e),go=!1,Jr=e;return}Wx(l,o)}}}function DO(e,t,o){var l=e.stateNode,d=!Ec,m=KR(l,e.type,e.memoizedProps,t,o,e,d);return e.updateQueue=m,m!==null}function NO(e){var t=e.stateNode,o=e.memoizedProps,l=JR(t,o,e);if(l){var d=Jr;if(d!==null)switch(d.tag){case R:{var m=d.stateNode.containerInfo,w=(d.mode&Bt)!==ht;nO(m,t,o,w);break}case A:{var x=d.type,E=d.memoizedProps,D=d.stateNode,L=(d.mode&Bt)!==ht;rO(x,E,D,t,o,L);break}}}return l}function jO(e){var t=e.memoizedState,o=t!==null?t.dehydrated:null;if(!o)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");XR(o,e)}function LO(e){var t=e.memoizedState,o=t!==null?t.dehydrated:null;if(!o)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return QR(o)}function Gx(e){for(var t=e.return;t!==null&&t.tag!==A&&t.tag!==R&&t.tag!==le;)t=t.return;Jr=t}function og(e){if(e!==Jr)return!1;if(!go)return Gx(e),go=!0,!1;if(e.tag!==R&&(e.tag!==A||tO(e.type)&&!Lw(e.type,e.memoizedProps))){var t=Wa;if(t)if(Xw(e))Kx(e),Qw();else for(;t;)Wx(e,t),t=lp(t)}return Gx(e),e.tag===le?Wa=LO(e):Wa=Jr?lp(e.stateNode):null,!0}function PO(){return go&&Wa!==null}function Kx(e){for(var t=Wa;t;)Vx(e,t),t=lp(t)}function cf(){Jr=null,Wa=null,go=!1,Ec=!1}function Jx(){au!==null&&(HE(au),au=null)}function Xr(){return go}function e0(e){au===null?au=[e]:au.push(e)}var UO=s.ReactCurrentBatchConfig,MO=null;function $O(){return UO.transition}var yo={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var IO=function(e){for(var t=null,o=e;o!==null;)o.mode&_n&&(t=o),o=o.return;return t},kc=function(e){var t=[];return e.forEach(function(o){t.push(o)}),t.sort().join(", ")},fp=[],hp=[],pp=[],vp=[],mp=[],gp=[],Cc=new Set;yo.recordUnsafeLifecycleWarnings=function(e,t){Cc.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&fp.push(e),e.mode&_n&&typeof t.UNSAFE_componentWillMount=="function"&&hp.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&pp.push(e),e.mode&_n&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&vp.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&mp.push(e),e.mode&_n&&typeof t.UNSAFE_componentWillUpdate=="function"&&gp.push(e))},yo.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;fp.length>0&&(fp.forEach(function(H){e.add(Rt(H)||"Component"),Cc.add(H.type)}),fp=[]);var t=new Set;hp.length>0&&(hp.forEach(function(H){t.add(Rt(H)||"Component"),Cc.add(H.type)}),hp=[]);var o=new Set;pp.length>0&&(pp.forEach(function(H){o.add(Rt(H)||"Component"),Cc.add(H.type)}),pp=[]);var l=new Set;vp.length>0&&(vp.forEach(function(H){l.add(Rt(H)||"Component"),Cc.add(H.type)}),vp=[]);var d=new Set;mp.length>0&&(mp.forEach(function(H){d.add(Rt(H)||"Component"),Cc.add(H.type)}),mp=[]);var m=new Set;if(gp.length>0&&(gp.forEach(function(H){m.add(Rt(H)||"Component"),Cc.add(H.type)}),gp=[]),t.size>0){var w=kc(t);h(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
129
129
 
130
130
  * Move code with side effects to componentDidMount, and set initial state in the constructor.
131
131
 
@@ -154,17 +154,17 @@ Please update the following components: %s`,L)}if(d.size>0){var W=kc(d);v(`compo
154
154
  * Move data fetching code or side effects to componentDidUpdate.
155
155
  * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
156
156
 
157
- Please update the following components: %s`,W)}};var sg=new Map,Xx=new Set;yo.recordLegacyContextWarning=function(e,t){var o=$O(e);if(o===null){h("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Xx.has(e.type)){var l=sg.get(o);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(l===void 0&&(l=[],sg.set(o,l)),l.push(e))}},yo.flushLegacyContextWarning=function(){sg.forEach(function(e,t){if(e.length!==0){var o=e[0],l=new Set;e.forEach(function(m){l.add(Rt(m)||"Component"),Xx.add(m.type)});var d=kc(l);try{bn(o),h(`Legacy context API has been detected within a strict-mode tree.
157
+ Please update the following components: %s`,W)}};var sg=new Map,Xx=new Set;yo.recordLegacyContextWarning=function(e,t){var o=IO(e);if(o===null){h("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Xx.has(e.type)){var l=sg.get(o);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(l===void 0&&(l=[],sg.set(o,l)),l.push(e))}},yo.flushLegacyContextWarning=function(){sg.forEach(function(e,t){if(e.length!==0){var o=e[0],l=new Set;e.forEach(function(m){l.add(Rt(m)||"Component"),Xx.add(m.type)});var d=kc(l);try{bn(o),h(`Legacy context API has been detected within a strict-mode tree.
158
158
 
159
159
  The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
160
160
 
161
161
  Please update the following components: %s
162
162
 
163
- Learn more about this warning here: https://reactjs.org/link/legacy-context`,d)}finally{Nn()}}})},yo.discardPendingWarnings=function(){fp=[],hp=[],pp=[],vp=[],mp=[],gp=[],sg=new Map}}var t0,n0,r0,i0,a0,Qx=function(e,t){};t0=!1,n0=!1,r0={},i0={},a0={},Qx=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var o=Rt(t)||"Component";i0[o]||(i0[o]=!0,h('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function IO(e){return e.prototype&&e.prototype.isReactComponent}function yp(e,t,o){var l=o.ref;if(l!==null&&typeof l!="function"&&typeof l!="object"){if((e.mode&_n||Q)&&!(o._owner&&o._self&&o._owner.stateNode!==o._self)&&!(o._owner&&o._owner.tag!==_)&&!(typeof o.type=="function"&&!IO(o.type))&&o._owner){var d=Rt(e)||"Component";r0[d]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,l),r0[d]=!0)}if(o._owner){var m=o._owner,w;if(m){var x=m;if(x.tag!==_)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");w=x.stateNode}if(!w)throw new Error("Missing owner for string ref "+l+". This error is likely caused by a bug in React. Please file an issue.");var E=w;ge(l,"ref");var D=""+l;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===D)return t.ref;var L=function(W){var H=E.refs;W===null?delete H[D]:H[D]=W};return L._stringRef=D,L}else{if(typeof l!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!o._owner)throw new Error("Element ref was specified as a string ("+l+`) but no owner was set. This could happen for one of the following reasons:
163
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,d)}finally{Nn()}}})},yo.discardPendingWarnings=function(){fp=[],hp=[],pp=[],vp=[],mp=[],gp=[],sg=new Map}}var t0,n0,r0,i0,a0,Qx=function(e,t){};t0=!1,n0=!1,r0={},i0={},a0={},Qx=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var o=Rt(t)||"Component";i0[o]||(i0[o]=!0,h('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function zO(e){return e.prototype&&e.prototype.isReactComponent}function yp(e,t,o){var l=o.ref;if(l!==null&&typeof l!="function"&&typeof l!="object"){if((e.mode&_n||Q)&&!(o._owner&&o._self&&o._owner.stateNode!==o._self)&&!(o._owner&&o._owner.tag!==_)&&!(typeof o.type=="function"&&!zO(o.type))&&o._owner){var d=Rt(e)||"Component";r0[d]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,l),r0[d]=!0)}if(o._owner){var m=o._owner,w;if(m){var x=m;if(x.tag!==_)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");w=x.stateNode}if(!w)throw new Error("Missing owner for string ref "+l+". This error is likely caused by a bug in React. Please file an issue.");var E=w;ge(l,"ref");var D=""+l;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===D)return t.ref;var L=function(W){var H=E.refs;W===null?delete H[D]:H[D]=W};return L._stringRef=D,L}else{if(typeof l!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!o._owner)throw new Error("Element ref was specified as a string ("+l+`) but no owner was set. This could happen for one of the following reasons:
164
164
  1. You may be adding a ref to a function component
165
165
  2. You may be adding a ref to a component that was not created inside a component's render method
166
166
  3. You have multiple copies of React loaded
167
- See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return l}function lg(e,t){var o=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}function ug(e){{var t=Rt(e)||"Component";if(a0[t])return;a0[t]=!0,h("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function Zx(e){var t=e._payload,o=e._init;return o(t)}function e_(e){function t(J,de){if(e){var X=J.deletions;X===null?(J.deletions=[de],J.flags|=Bi):X.push(de)}}function o(J,de){if(!e)return null;for(var X=de;X!==null;)t(J,X),X=X.sibling;return null}function l(J,de){for(var X=new Map,Te=de;Te!==null;)Te.key!==null?X.set(Te.key,Te):X.set(Te.index,Te),Te=Te.sibling;return X}function d(J,de){var X=Pc(J,de);return X.index=0,X.sibling=null,X}function m(J,de,X){if(J.index=X,!e)return J.flags|=ja,de;var Te=J.alternate;if(Te!==null){var Ge=Te.index;return Ge<de?(J.flags|=In,de):Ge}else return J.flags|=In,de}function w(J){return e&&J.alternate===null&&(J.flags|=In),J}function x(J,de,X,Te){if(de===null||de.tag!==j){var Ge=eS(X,J.mode,Te);return Ge.return=J,Ge}else{var We=d(de,X);return We.return=J,We}}function E(J,de,X,Te){var Ge=X.type;if(Ge===_a)return L(J,de,X.props.children,Te,X.key);if(de!==null&&(de.elementType===Ge||ak(de,X)||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===At&&Zx(Ge)===de.type)){var We=d(de,X.props);return We.ref=yp(J,de,X),We.return=J,We._debugSource=X._source,We._debugOwner=X._owner,We}var Et=Zb(X,J.mode,Te);return Et.ref=yp(J,de,X),Et.return=J,Et}function D(J,de,X,Te){if(de===null||de.tag!==N||de.stateNode.containerInfo!==X.containerInfo||de.stateNode.implementation!==X.implementation){var Ge=tS(X,J.mode,Te);return Ge.return=J,Ge}else{var We=d(de,X.children||[]);return We.return=J,We}}function L(J,de,X,Te,Ge){if(de===null||de.tag!==P){var We=mu(X,J.mode,Te,Ge);return We.return=J,We}else{var Et=d(de,X);return Et.return=J,Et}}function W(J,de,X){if(typeof de=="string"&&de!==""||typeof de=="number"){var Te=eS(""+de,J.mode,X);return Te.return=J,Te}if(typeof de=="object"&&de!==null){switch(de.$$typeof){case Br:{var Ge=Zb(de,J.mode,X);return Ge.ref=yp(J,null,de),Ge.return=J,Ge}case br:{var We=tS(de,J.mode,X);return We.return=J,We}case At:{var Et=de._payload,Nt=de._init;return W(J,Nt(Et),X)}}if($t(de)||Lt(de)){var kn=mu(de,J.mode,X,null);return kn.return=J,kn}lg(J,de)}return typeof de=="function"&&ug(J),null}function H(J,de,X,Te){var Ge=de!==null?de.key:null;if(typeof X=="string"&&X!==""||typeof X=="number")return Ge!==null?null:x(J,de,""+X,Te);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case Br:return X.key===Ge?E(J,de,X,Te):null;case br:return X.key===Ge?D(J,de,X,Te):null;case At:{var We=X._payload,Et=X._init;return H(J,de,Et(We),Te)}}if($t(X)||Lt(X))return Ge!==null?null:L(J,de,X,Te,null);lg(J,X)}return typeof X=="function"&&ug(J),null}function ee(J,de,X,Te,Ge){if(typeof Te=="string"&&Te!==""||typeof Te=="number"){var We=J.get(X)||null;return x(de,We,""+Te,Ge)}if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Br:{var Et=J.get(Te.key===null?X:Te.key)||null;return E(de,Et,Te,Ge)}case br:{var Nt=J.get(Te.key===null?X:Te.key)||null;return D(de,Nt,Te,Ge)}case At:var kn=Te._payload,un=Te._init;return ee(J,de,X,un(kn),Ge)}if($t(Te)||Lt(Te)){var hr=J.get(X)||null;return L(de,hr,Te,Ge,null)}lg(de,Te)}return typeof Te=="function"&&ug(de),null}function ae(J,de,X){{if(typeof J!="object"||J===null)return de;switch(J.$$typeof){case Br:case br:Qx(J,X);var Te=J.key;if(typeof Te!="string")break;if(de===null){de=new Set,de.add(Te);break}if(!de.has(Te)){de.add(Te);break}h("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Te);break;case At:var Ge=J._payload,We=J._init;ae(We(Ge),de,X);break}}return de}function ce(J,de,X,Te){for(var Ge=null,We=0;We<X.length;We++){var Et=X[We];Ge=ae(Et,Ge,J)}for(var Nt=null,kn=null,un=de,hr=0,cn=0,sr=null;un!==null&&cn<X.length;cn++){un.index>cn?(sr=un,un=null):sr=un.sibling;var xi=H(J,un,X[cn],Te);if(xi===null){un===null&&(un=sr);break}e&&un&&xi.alternate===null&&t(J,un),hr=m(xi,hr,cn),kn===null?Nt=xi:kn.sibling=xi,kn=xi,un=sr}if(cn===X.length){if(o(J,un),Xr()){var ii=cn;xc(J,ii)}return Nt}if(un===null){for(;cn<X.length;cn++){var Sa=W(J,X[cn],Te);Sa!==null&&(hr=m(Sa,hr,cn),kn===null?Nt=Sa:kn.sibling=Sa,kn=Sa)}if(Xr()){var Pi=cn;xc(J,Pi)}return Nt}for(var Ui=l(J,un);cn<X.length;cn++){var _i=ee(Ui,J,cn,X[cn],Te);_i!==null&&(e&&_i.alternate!==null&&Ui.delete(_i.key===null?cn:_i.key),hr=m(_i,hr,cn),kn===null?Nt=_i:kn.sibling=_i,kn=_i)}if(e&&Ui.forEach(function(Of){return t(J,Of)}),Xr()){var vl=cn;xc(J,vl)}return Nt}function Be(J,de,X,Te){var Ge=Lt(X);if(typeof Ge!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&X[Symbol.toStringTag]==="Generator"&&(n0||h("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),n0=!0),X.entries===Ge&&(t0||h("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),t0=!0);var We=Ge.call(X);if(We)for(var Et=null,Nt=We.next();!Nt.done;Nt=We.next()){var kn=Nt.value;Et=ae(kn,Et,J)}}var un=Ge.call(X);if(un==null)throw new Error("An iterable object provided no iterator.");for(var hr=null,cn=null,sr=de,xi=0,ii=0,Sa=null,Pi=un.next();sr!==null&&!Pi.done;ii++,Pi=un.next()){sr.index>ii?(Sa=sr,sr=null):Sa=sr.sibling;var Ui=H(J,sr,Pi.value,Te);if(Ui===null){sr===null&&(sr=Sa);break}e&&sr&&Ui.alternate===null&&t(J,sr),xi=m(Ui,xi,ii),cn===null?hr=Ui:cn.sibling=Ui,cn=Ui,sr=Sa}if(Pi.done){if(o(J,sr),Xr()){var _i=ii;xc(J,_i)}return hr}if(sr===null){for(;!Pi.done;ii++,Pi=un.next()){var vl=W(J,Pi.value,Te);vl!==null&&(xi=m(vl,xi,ii),cn===null?hr=vl:cn.sibling=vl,cn=vl)}if(Xr()){var Of=ii;xc(J,Of)}return hr}for(var Jp=l(J,sr);!Pi.done;ii++,Pi=un.next()){var vs=ee(Jp,J,ii,Pi.value,Te);vs!==null&&(e&&vs.alternate!==null&&Jp.delete(vs.key===null?ii:vs.key),xi=m(vs,xi,ii),cn===null?hr=vs:cn.sibling=vs,cn=vs)}if(e&&Jp.forEach(function(dj){return t(J,dj)}),Xr()){var cj=ii;xc(J,cj)}return hr}function gt(J,de,X,Te){if(de!==null&&de.tag===j){o(J,de.sibling);var Ge=d(de,X);return Ge.return=J,Ge}o(J,de);var We=eS(X,J.mode,Te);return We.return=J,We}function ot(J,de,X,Te){for(var Ge=X.key,We=de;We!==null;){if(We.key===Ge){var Et=X.type;if(Et===_a){if(We.tag===P){o(J,We.sibling);var Nt=d(We,X.props.children);return Nt.return=J,Nt._debugSource=X._source,Nt._debugOwner=X._owner,Nt}}else if(We.elementType===Et||ak(We,X)||typeof Et=="object"&&Et!==null&&Et.$$typeof===At&&Zx(Et)===We.type){o(J,We.sibling);var kn=d(We,X.props);return kn.ref=yp(J,We,X),kn.return=J,kn._debugSource=X._source,kn._debugOwner=X._owner,kn}o(J,We);break}else t(J,We);We=We.sibling}if(X.type===_a){var un=mu(X.props.children,J.mode,Te,X.key);return un.return=J,un}else{var hr=Zb(X,J.mode,Te);return hr.ref=yp(J,de,X),hr.return=J,hr}}function Zt(J,de,X,Te){for(var Ge=X.key,We=de;We!==null;){if(We.key===Ge)if(We.tag===N&&We.stateNode.containerInfo===X.containerInfo&&We.stateNode.implementation===X.implementation){o(J,We.sibling);var Et=d(We,X.children||[]);return Et.return=J,Et}else{o(J,We);break}else t(J,We);We=We.sibling}var Nt=tS(X,J.mode,Te);return Nt.return=J,Nt}function Gt(J,de,X,Te){var Ge=typeof X=="object"&&X!==null&&X.type===_a&&X.key===null;if(Ge&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case Br:return w(ot(J,de,X,Te));case br:return w(Zt(J,de,X,Te));case At:var We=X._payload,Et=X._init;return Gt(J,de,Et(We),Te)}if($t(X))return ce(J,de,X,Te);if(Lt(X))return Be(J,de,X,Te);lg(J,X)}return typeof X=="string"&&X!==""||typeof X=="number"?w(gt(J,de,""+X,Te)):(typeof X=="function"&&ug(J),o(J,de))}return Gt}var df=e_(!0),t_=e_(!1);function zO(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var o=t.child,l=Pc(o,o.pendingProps);for(t.child=l,l.return=t;o.sibling!==null;)o=o.sibling,l=l.sibling=Pc(o,o.pendingProps),l.return=t;l.sibling=null}}function FO(e,t){for(var o=e.child;o!==null;)RN(o,t),o=o.sibling}var o0=nu(null),s0;s0={};var cg=null,ff=null,l0=null,dg=!1;function fg(){cg=null,ff=null,l0=null,dg=!1}function n_(){dg=!0}function r_(){dg=!1}function i_(e,t,o){bi(o0,t._currentValue,e),t._currentValue=o,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==s0&&h("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=s0}function u0(e,t){var o=o0.current;wi(o0,t),e._currentValue=o}function c0(e,t,o){for(var l=e;l!==null;){var d=l.alternate;if(Xs(l.childLanes,t)?d!==null&&!Xs(d.childLanes,t)&&(d.childLanes=Pt(d.childLanes,t)):(l.childLanes=Pt(l.childLanes,t),d!==null&&(d.childLanes=Pt(d.childLanes,t))),l===o)break;l=l.return}l!==o&&h("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function BO(e,t,o){HO(e,t,o)}function HO(e,t,o){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var d=void 0,m=l.dependencies;if(m!==null){d=l.child;for(var w=m.firstContext;w!==null;){if(w.context===t){if(l.tag===_){var x=Zu(o),E=ul(Cn,x);E.tag=pg;var D=l.updateQueue;if(D!==null){var L=D.shared,W=L.pending;W===null?E.next=E:(E.next=W.next,W.next=E),L.pending=E}}l.lanes=Pt(l.lanes,o);var H=l.alternate;H!==null&&(H.lanes=Pt(H.lanes,o)),c0(l.return,o,e),m.lanes=Pt(m.lanes,o);break}w=w.next}}else if(l.tag===q)d=l.type===e.type?null:l.child;else if(l.tag===_e){var ee=l.return;if(ee===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");ee.lanes=Pt(ee.lanes,o);var ae=ee.alternate;ae!==null&&(ae.lanes=Pt(ae.lanes,o)),c0(ee,o,e),d=l.sibling}else d=l.child;if(d!==null)d.return=l;else for(d=l;d!==null;){if(d===e){d=null;break}var ce=d.sibling;if(ce!==null){ce.return=d.return,d=ce;break}d=d.return}l=d}}function hf(e,t){cg=e,ff=null,l0=null;var o=e.dependencies;if(o!==null){var l=o.firstContext;l!==null&&(vi(o.lanes,t)&&jp(),o.firstContext=null)}}function yr(e){dg&&h("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(l0!==e){var o={context:e,memoizedValue:t,next:null};if(ff===null){if(cg===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");ff=o,cg.dependencies={lanes:ye,firstContext:o}}else ff=ff.next=o}return t}var Tc=null;function d0(e){Tc===null?Tc=[e]:Tc.push(e)}function VO(){if(Tc!==null){for(var e=0;e<Tc.length;e++){var t=Tc[e],o=t.interleaved;if(o!==null){t.interleaved=null;var l=o.next,d=t.pending;if(d!==null){var m=d.next;d.next=l,o.next=m}t.pending=o}}Tc=null}}function a_(e,t,o,l){var d=t.interleaved;return d===null?(o.next=o,d0(t)):(o.next=d.next,d.next=o),t.interleaved=o,hg(e,l)}function WO(e,t,o,l){var d=t.interleaved;d===null?(o.next=o,d0(t)):(o.next=d.next,d.next=o),t.interleaved=o}function qO(e,t,o,l){var d=t.interleaved;return d===null?(o.next=o,d0(t)):(o.next=d.next,d.next=o),t.interleaved=o,hg(e,l)}function Qi(e,t){return hg(e,t)}var YO=hg;function hg(e,t){e.lanes=Pt(e.lanes,t);var o=e.alternate;o!==null&&(o.lanes=Pt(o.lanes,t)),o===null&&(e.flags&(In|ci))!==ft&&tk(e);for(var l=e,d=e.return;d!==null;)d.childLanes=Pt(d.childLanes,t),o=d.alternate,o!==null?o.childLanes=Pt(o.childLanes,t):(d.flags&(In|ci))!==ft&&tk(e),l=d,d=d.return;if(l.tag===R){var m=l.stateNode;return m}else return null}var o_=0,s_=1,pg=2,f0=3,vg=!1,h0,mg;h0=!1,mg=null;function p0(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:ye},effects:null};e.updateQueue=t}function l_(e,t){var o=t.updateQueue,l=e.updateQueue;if(o===l){var d={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects};t.updateQueue=d}}function ul(e,t){var o={eventTime:e,lane:t,tag:o_,payload:null,callback:null,next:null};return o}function ou(e,t,o){var l=e.updateQueue;if(l===null)return null;var d=l.shared;if(mg===d&&!h0&&(h("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),h0=!0),WD()){var m=d.pending;return m===null?t.next=t:(t.next=m.next,m.next=t),d.pending=t,YO(e,o)}else return qO(e,d,t,o)}function gg(e,t,o){var l=t.updateQueue;if(l!==null){var d=l.shared;if(Dh(o)){var m=d.lanes;m=jh(m,e.pendingLanes);var w=Pt(m,o);d.lanes=w,$d(e,w)}}}function v0(e,t){var o=e.updateQueue,l=e.alternate;if(l!==null){var d=l.updateQueue;if(o===d){var m=null,w=null,x=o.firstBaseUpdate;if(x!==null){var E=x;do{var D={eventTime:E.eventTime,lane:E.lane,tag:E.tag,payload:E.payload,callback:E.callback,next:null};w===null?m=w=D:(w.next=D,w=D),E=E.next}while(E!==null);w===null?m=w=t:(w.next=t,w=t)}else m=w=t;o={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:w,shared:d.shared,effects:d.effects},e.updateQueue=o;return}}var L=o.lastBaseUpdate;L===null?o.firstBaseUpdate=t:L.next=t,o.lastBaseUpdate=t}function GO(e,t,o,l,d,m){switch(o.tag){case s_:{var w=o.payload;if(typeof w=="function"){n_();var x=w.call(m,l,d);{if(e.mode&_n){zn(!0);try{w.call(m,l,d)}finally{zn(!1)}}r_()}return x}return w}case f0:e.flags=e.flags&~pr|lt;case o_:{var E=o.payload,D;if(typeof E=="function"){n_(),D=E.call(m,l,d);{if(e.mode&_n){zn(!0);try{E.call(m,l,d)}finally{zn(!1)}}r_()}}else D=E;return D==null?l:Mt({},l,D)}case pg:return vg=!0,l}return l}function yg(e,t,o,l){var d=e.updateQueue;vg=!1,mg=d.shared;var m=d.firstBaseUpdate,w=d.lastBaseUpdate,x=d.shared.pending;if(x!==null){d.shared.pending=null;var E=x,D=E.next;E.next=null,w===null?m=D:w.next=D,w=E;var L=e.alternate;if(L!==null){var W=L.updateQueue,H=W.lastBaseUpdate;H!==w&&(H===null?W.firstBaseUpdate=D:H.next=D,W.lastBaseUpdate=E)}}if(m!==null){var ee=d.baseState,ae=ye,ce=null,Be=null,gt=null,ot=m;do{var Zt=ot.lane,Gt=ot.eventTime;if(Xs(l,Zt)){if(gt!==null){var de={eventTime:Gt,lane:nn,tag:ot.tag,payload:ot.payload,callback:ot.callback,next:null};gt=gt.next=de}ee=GO(e,d,ot,ee,t,o);var X=ot.callback;if(X!==null&&ot.lane!==nn){e.flags|=On;var Te=d.effects;Te===null?d.effects=[ot]:Te.push(ot)}}else{var J={eventTime:Gt,lane:Zt,tag:ot.tag,payload:ot.payload,callback:ot.callback,next:null};gt===null?(Be=gt=J,ce=ee):gt=gt.next=J,ae=Pt(ae,Zt)}if(ot=ot.next,ot===null){if(x=d.shared.pending,x===null)break;var Ge=x,We=Ge.next;Ge.next=null,ot=We,d.lastBaseUpdate=Ge,d.shared.pending=null}}while(!0);gt===null&&(ce=ee),d.baseState=ce,d.firstBaseUpdate=Be,d.lastBaseUpdate=gt;var Et=d.shared.interleaved;if(Et!==null){var Nt=Et;do ae=Pt(ae,Nt.lane),Nt=Nt.next;while(Nt!==Et)}else m===null&&(d.shared.lanes=ye);Wp(ae),e.lanes=ae,e.memoizedState=ee}mg=null}function KO(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function u_(){vg=!1}function wg(){return vg}function c_(e,t,o){var l=t.effects;if(t.effects=null,l!==null)for(var d=0;d<l.length;d++){var m=l[d],w=m.callback;w!==null&&(m.callback=null,KO(w,o))}}var wp={},su=nu(wp),bp=nu(wp),bg=nu(wp);function Sg(e){if(e===wp)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function d_(){var e=Sg(bg.current);return e}function m0(e,t){bi(bg,t,e),bi(bp,e,e),bi(su,wp,e);var o=fR(t);wi(su,e),bi(su,o,e)}function pf(e){wi(su,e),wi(bp,e),wi(bg,e)}function g0(){var e=Sg(su.current);return e}function f_(e){Sg(bg.current);var t=Sg(su.current),o=hR(t,e.type);t!==o&&(bi(bp,e,e),bi(su,o,e))}function y0(e){bp.current===e&&(wi(su,e),wi(bp,e))}var JO=0,h_=1,p_=1,Sp=2,wo=nu(JO);function w0(e,t){return(e&t)!==0}function vf(e){return e&h_}function b0(e,t){return e&h_|t}function XO(e,t){return e|t}function lu(e,t){bi(wo,t,e)}function mf(e){wi(wo,e)}function QO(e,t){var o=e.memoizedState;return o!==null?o.dehydrated!==null:(e.memoizedProps,!0)}function xg(e){for(var t=e;t!==null;){if(t.tag===le){var o=t.memoizedState;if(o!==null){var l=o.dehydrated;if(l===null||Dx(l)||$w(l))return t}}else if(t.tag===ke&&t.memoizedProps.revealOrder!==void 0){var d=(t.flags&lt)!==ft;if(d)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zi=0,Tr=1,ls=2,Rr=4,Qr=8,S0=[];function x0(){for(var e=0;e<S0.length;e++){var t=S0[e];t._workInProgressVersionPrimary=null}S0.length=0}function ZO(e,t){var o=t._getVersion,l=o(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,l]:e.mutableSourceEagerHydrationData.push(t,l)}var Ye=s.ReactCurrentDispatcher,xp=s.ReactCurrentBatchConfig,_0,gf;_0=new Set;var Rc=ye,En=null,Or=null,Ar=null,_g=!1,_p=!1,Ep=0,eA=0,tA=25,he=null,qa=null,uu=-1,E0=!1;function pn(){{var e=he;qa===null?qa=[e]:qa.push(e)}}function Ue(){{var e=he;qa!==null&&(uu++,qa[uu]!==e&&nA(e))}}function yf(e){e!=null&&!$t(e)&&h("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",he,typeof e)}function nA(e){{var t=Rt(En);if(!_0.has(t)&&(_0.add(t),qa!==null)){for(var o="",l=30,d=0;d<=uu;d++){for(var m=qa[d],w=d===uu?e:m,x=d+1+". "+m;x.length<l;)x+=" ";x+=w+`
167
+ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return l}function lg(e,t){var o=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}function ug(e){{var t=Rt(e)||"Component";if(a0[t])return;a0[t]=!0,h("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function Zx(e){var t=e._payload,o=e._init;return o(t)}function e_(e){function t(J,de){if(e){var X=J.deletions;X===null?(J.deletions=[de],J.flags|=Bi):X.push(de)}}function o(J,de){if(!e)return null;for(var X=de;X!==null;)t(J,X),X=X.sibling;return null}function l(J,de){for(var X=new Map,Te=de;Te!==null;)Te.key!==null?X.set(Te.key,Te):X.set(Te.index,Te),Te=Te.sibling;return X}function d(J,de){var X=Pc(J,de);return X.index=0,X.sibling=null,X}function m(J,de,X){if(J.index=X,!e)return J.flags|=ja,de;var Te=J.alternate;if(Te!==null){var Ge=Te.index;return Ge<de?(J.flags|=In,de):Ge}else return J.flags|=In,de}function w(J){return e&&J.alternate===null&&(J.flags|=In),J}function x(J,de,X,Te){if(de===null||de.tag!==j){var Ge=eS(X,J.mode,Te);return Ge.return=J,Ge}else{var We=d(de,X);return We.return=J,We}}function E(J,de,X,Te){var Ge=X.type;if(Ge===_a)return L(J,de,X.props.children,Te,X.key);if(de!==null&&(de.elementType===Ge||ak(de,X)||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===At&&Zx(Ge)===de.type)){var We=d(de,X.props);return We.ref=yp(J,de,X),We.return=J,We._debugSource=X._source,We._debugOwner=X._owner,We}var Et=Zb(X,J.mode,Te);return Et.ref=yp(J,de,X),Et.return=J,Et}function D(J,de,X,Te){if(de===null||de.tag!==N||de.stateNode.containerInfo!==X.containerInfo||de.stateNode.implementation!==X.implementation){var Ge=tS(X,J.mode,Te);return Ge.return=J,Ge}else{var We=d(de,X.children||[]);return We.return=J,We}}function L(J,de,X,Te,Ge){if(de===null||de.tag!==P){var We=mu(X,J.mode,Te,Ge);return We.return=J,We}else{var Et=d(de,X);return Et.return=J,Et}}function W(J,de,X){if(typeof de=="string"&&de!==""||typeof de=="number"){var Te=eS(""+de,J.mode,X);return Te.return=J,Te}if(typeof de=="object"&&de!==null){switch(de.$$typeof){case Br:{var Ge=Zb(de,J.mode,X);return Ge.ref=yp(J,null,de),Ge.return=J,Ge}case br:{var We=tS(de,J.mode,X);return We.return=J,We}case At:{var Et=de._payload,Nt=de._init;return W(J,Nt(Et),X)}}if($t(de)||Lt(de)){var kn=mu(de,J.mode,X,null);return kn.return=J,kn}lg(J,de)}return typeof de=="function"&&ug(J),null}function H(J,de,X,Te){var Ge=de!==null?de.key:null;if(typeof X=="string"&&X!==""||typeof X=="number")return Ge!==null?null:x(J,de,""+X,Te);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case Br:return X.key===Ge?E(J,de,X,Te):null;case br:return X.key===Ge?D(J,de,X,Te):null;case At:{var We=X._payload,Et=X._init;return H(J,de,Et(We),Te)}}if($t(X)||Lt(X))return Ge!==null?null:L(J,de,X,Te,null);lg(J,X)}return typeof X=="function"&&ug(J),null}function ee(J,de,X,Te,Ge){if(typeof Te=="string"&&Te!==""||typeof Te=="number"){var We=J.get(X)||null;return x(de,We,""+Te,Ge)}if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Br:{var Et=J.get(Te.key===null?X:Te.key)||null;return E(de,Et,Te,Ge)}case br:{var Nt=J.get(Te.key===null?X:Te.key)||null;return D(de,Nt,Te,Ge)}case At:var kn=Te._payload,un=Te._init;return ee(J,de,X,un(kn),Ge)}if($t(Te)||Lt(Te)){var hr=J.get(X)||null;return L(de,hr,Te,Ge,null)}lg(de,Te)}return typeof Te=="function"&&ug(de),null}function ae(J,de,X){{if(typeof J!="object"||J===null)return de;switch(J.$$typeof){case Br:case br:Qx(J,X);var Te=J.key;if(typeof Te!="string")break;if(de===null){de=new Set,de.add(Te);break}if(!de.has(Te)){de.add(Te);break}h("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Te);break;case At:var Ge=J._payload,We=J._init;ae(We(Ge),de,X);break}}return de}function ce(J,de,X,Te){for(var Ge=null,We=0;We<X.length;We++){var Et=X[We];Ge=ae(Et,Ge,J)}for(var Nt=null,kn=null,un=de,hr=0,cn=0,sr=null;un!==null&&cn<X.length;cn++){un.index>cn?(sr=un,un=null):sr=un.sibling;var xi=H(J,un,X[cn],Te);if(xi===null){un===null&&(un=sr);break}e&&un&&xi.alternate===null&&t(J,un),hr=m(xi,hr,cn),kn===null?Nt=xi:kn.sibling=xi,kn=xi,un=sr}if(cn===X.length){if(o(J,un),Xr()){var ii=cn;xc(J,ii)}return Nt}if(un===null){for(;cn<X.length;cn++){var Sa=W(J,X[cn],Te);Sa!==null&&(hr=m(Sa,hr,cn),kn===null?Nt=Sa:kn.sibling=Sa,kn=Sa)}if(Xr()){var Pi=cn;xc(J,Pi)}return Nt}for(var Ui=l(J,un);cn<X.length;cn++){var _i=ee(Ui,J,cn,X[cn],Te);_i!==null&&(e&&_i.alternate!==null&&Ui.delete(_i.key===null?cn:_i.key),hr=m(_i,hr,cn),kn===null?Nt=_i:kn.sibling=_i,kn=_i)}if(e&&Ui.forEach(function(Of){return t(J,Of)}),Xr()){var vl=cn;xc(J,vl)}return Nt}function Be(J,de,X,Te){var Ge=Lt(X);if(typeof Ge!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&X[Symbol.toStringTag]==="Generator"&&(n0||h("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),n0=!0),X.entries===Ge&&(t0||h("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),t0=!0);var We=Ge.call(X);if(We)for(var Et=null,Nt=We.next();!Nt.done;Nt=We.next()){var kn=Nt.value;Et=ae(kn,Et,J)}}var un=Ge.call(X);if(un==null)throw new Error("An iterable object provided no iterator.");for(var hr=null,cn=null,sr=de,xi=0,ii=0,Sa=null,Pi=un.next();sr!==null&&!Pi.done;ii++,Pi=un.next()){sr.index>ii?(Sa=sr,sr=null):Sa=sr.sibling;var Ui=H(J,sr,Pi.value,Te);if(Ui===null){sr===null&&(sr=Sa);break}e&&sr&&Ui.alternate===null&&t(J,sr),xi=m(Ui,xi,ii),cn===null?hr=Ui:cn.sibling=Ui,cn=Ui,sr=Sa}if(Pi.done){if(o(J,sr),Xr()){var _i=ii;xc(J,_i)}return hr}if(sr===null){for(;!Pi.done;ii++,Pi=un.next()){var vl=W(J,Pi.value,Te);vl!==null&&(xi=m(vl,xi,ii),cn===null?hr=vl:cn.sibling=vl,cn=vl)}if(Xr()){var Of=ii;xc(J,Of)}return hr}for(var Jp=l(J,sr);!Pi.done;ii++,Pi=un.next()){var vs=ee(Jp,J,ii,Pi.value,Te);vs!==null&&(e&&vs.alternate!==null&&Jp.delete(vs.key===null?ii:vs.key),xi=m(vs,xi,ii),cn===null?hr=vs:cn.sibling=vs,cn=vs)}if(e&&Jp.forEach(function(fj){return t(J,fj)}),Xr()){var dj=ii;xc(J,dj)}return hr}function gt(J,de,X,Te){if(de!==null&&de.tag===j){o(J,de.sibling);var Ge=d(de,X);return Ge.return=J,Ge}o(J,de);var We=eS(X,J.mode,Te);return We.return=J,We}function ot(J,de,X,Te){for(var Ge=X.key,We=de;We!==null;){if(We.key===Ge){var Et=X.type;if(Et===_a){if(We.tag===P){o(J,We.sibling);var Nt=d(We,X.props.children);return Nt.return=J,Nt._debugSource=X._source,Nt._debugOwner=X._owner,Nt}}else if(We.elementType===Et||ak(We,X)||typeof Et=="object"&&Et!==null&&Et.$$typeof===At&&Zx(Et)===We.type){o(J,We.sibling);var kn=d(We,X.props);return kn.ref=yp(J,We,X),kn.return=J,kn._debugSource=X._source,kn._debugOwner=X._owner,kn}o(J,We);break}else t(J,We);We=We.sibling}if(X.type===_a){var un=mu(X.props.children,J.mode,Te,X.key);return un.return=J,un}else{var hr=Zb(X,J.mode,Te);return hr.ref=yp(J,de,X),hr.return=J,hr}}function Zt(J,de,X,Te){for(var Ge=X.key,We=de;We!==null;){if(We.key===Ge)if(We.tag===N&&We.stateNode.containerInfo===X.containerInfo&&We.stateNode.implementation===X.implementation){o(J,We.sibling);var Et=d(We,X.children||[]);return Et.return=J,Et}else{o(J,We);break}else t(J,We);We=We.sibling}var Nt=tS(X,J.mode,Te);return Nt.return=J,Nt}function Gt(J,de,X,Te){var Ge=typeof X=="object"&&X!==null&&X.type===_a&&X.key===null;if(Ge&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case Br:return w(ot(J,de,X,Te));case br:return w(Zt(J,de,X,Te));case At:var We=X._payload,Et=X._init;return Gt(J,de,Et(We),Te)}if($t(X))return ce(J,de,X,Te);if(Lt(X))return Be(J,de,X,Te);lg(J,X)}return typeof X=="string"&&X!==""||typeof X=="number"?w(gt(J,de,""+X,Te)):(typeof X=="function"&&ug(J),o(J,de))}return Gt}var df=e_(!0),t_=e_(!1);function FO(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var o=t.child,l=Pc(o,o.pendingProps);for(t.child=l,l.return=t;o.sibling!==null;)o=o.sibling,l=l.sibling=Pc(o,o.pendingProps),l.return=t;l.sibling=null}}function BO(e,t){for(var o=e.child;o!==null;)ON(o,t),o=o.sibling}var o0=nu(null),s0;s0={};var cg=null,ff=null,l0=null,dg=!1;function fg(){cg=null,ff=null,l0=null,dg=!1}function n_(){dg=!0}function r_(){dg=!1}function i_(e,t,o){bi(o0,t._currentValue,e),t._currentValue=o,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==s0&&h("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=s0}function u0(e,t){var o=o0.current;wi(o0,t),e._currentValue=o}function c0(e,t,o){for(var l=e;l!==null;){var d=l.alternate;if(Xs(l.childLanes,t)?d!==null&&!Xs(d.childLanes,t)&&(d.childLanes=Pt(d.childLanes,t)):(l.childLanes=Pt(l.childLanes,t),d!==null&&(d.childLanes=Pt(d.childLanes,t))),l===o)break;l=l.return}l!==o&&h("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function HO(e,t,o){VO(e,t,o)}function VO(e,t,o){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var d=void 0,m=l.dependencies;if(m!==null){d=l.child;for(var w=m.firstContext;w!==null;){if(w.context===t){if(l.tag===_){var x=Zu(o),E=ul(Cn,x);E.tag=pg;var D=l.updateQueue;if(D!==null){var L=D.shared,W=L.pending;W===null?E.next=E:(E.next=W.next,W.next=E),L.pending=E}}l.lanes=Pt(l.lanes,o);var H=l.alternate;H!==null&&(H.lanes=Pt(H.lanes,o)),c0(l.return,o,e),m.lanes=Pt(m.lanes,o);break}w=w.next}}else if(l.tag===q)d=l.type===e.type?null:l.child;else if(l.tag===_e){var ee=l.return;if(ee===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");ee.lanes=Pt(ee.lanes,o);var ae=ee.alternate;ae!==null&&(ae.lanes=Pt(ae.lanes,o)),c0(ee,o,e),d=l.sibling}else d=l.child;if(d!==null)d.return=l;else for(d=l;d!==null;){if(d===e){d=null;break}var ce=d.sibling;if(ce!==null){ce.return=d.return,d=ce;break}d=d.return}l=d}}function hf(e,t){cg=e,ff=null,l0=null;var o=e.dependencies;if(o!==null){var l=o.firstContext;l!==null&&(vi(o.lanes,t)&&jp(),o.firstContext=null)}}function yr(e){dg&&h("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(l0!==e){var o={context:e,memoizedValue:t,next:null};if(ff===null){if(cg===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");ff=o,cg.dependencies={lanes:ye,firstContext:o}}else ff=ff.next=o}return t}var Tc=null;function d0(e){Tc===null?Tc=[e]:Tc.push(e)}function WO(){if(Tc!==null){for(var e=0;e<Tc.length;e++){var t=Tc[e],o=t.interleaved;if(o!==null){t.interleaved=null;var l=o.next,d=t.pending;if(d!==null){var m=d.next;d.next=l,o.next=m}t.pending=o}}Tc=null}}function a_(e,t,o,l){var d=t.interleaved;return d===null?(o.next=o,d0(t)):(o.next=d.next,d.next=o),t.interleaved=o,hg(e,l)}function qO(e,t,o,l){var d=t.interleaved;d===null?(o.next=o,d0(t)):(o.next=d.next,d.next=o),t.interleaved=o}function YO(e,t,o,l){var d=t.interleaved;return d===null?(o.next=o,d0(t)):(o.next=d.next,d.next=o),t.interleaved=o,hg(e,l)}function Qi(e,t){return hg(e,t)}var GO=hg;function hg(e,t){e.lanes=Pt(e.lanes,t);var o=e.alternate;o!==null&&(o.lanes=Pt(o.lanes,t)),o===null&&(e.flags&(In|ci))!==ft&&tk(e);for(var l=e,d=e.return;d!==null;)d.childLanes=Pt(d.childLanes,t),o=d.alternate,o!==null?o.childLanes=Pt(o.childLanes,t):(d.flags&(In|ci))!==ft&&tk(e),l=d,d=d.return;if(l.tag===R){var m=l.stateNode;return m}else return null}var o_=0,s_=1,pg=2,f0=3,vg=!1,h0,mg;h0=!1,mg=null;function p0(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:ye},effects:null};e.updateQueue=t}function l_(e,t){var o=t.updateQueue,l=e.updateQueue;if(o===l){var d={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects};t.updateQueue=d}}function ul(e,t){var o={eventTime:e,lane:t,tag:o_,payload:null,callback:null,next:null};return o}function ou(e,t,o){var l=e.updateQueue;if(l===null)return null;var d=l.shared;if(mg===d&&!h0&&(h("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),h0=!0),qD()){var m=d.pending;return m===null?t.next=t:(t.next=m.next,m.next=t),d.pending=t,GO(e,o)}else return YO(e,d,t,o)}function gg(e,t,o){var l=t.updateQueue;if(l!==null){var d=l.shared;if(Dh(o)){var m=d.lanes;m=jh(m,e.pendingLanes);var w=Pt(m,o);d.lanes=w,$d(e,w)}}}function v0(e,t){var o=e.updateQueue,l=e.alternate;if(l!==null){var d=l.updateQueue;if(o===d){var m=null,w=null,x=o.firstBaseUpdate;if(x!==null){var E=x;do{var D={eventTime:E.eventTime,lane:E.lane,tag:E.tag,payload:E.payload,callback:E.callback,next:null};w===null?m=w=D:(w.next=D,w=D),E=E.next}while(E!==null);w===null?m=w=t:(w.next=t,w=t)}else m=w=t;o={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:w,shared:d.shared,effects:d.effects},e.updateQueue=o;return}}var L=o.lastBaseUpdate;L===null?o.firstBaseUpdate=t:L.next=t,o.lastBaseUpdate=t}function KO(e,t,o,l,d,m){switch(o.tag){case s_:{var w=o.payload;if(typeof w=="function"){n_();var x=w.call(m,l,d);{if(e.mode&_n){zn(!0);try{w.call(m,l,d)}finally{zn(!1)}}r_()}return x}return w}case f0:e.flags=e.flags&~pr|lt;case o_:{var E=o.payload,D;if(typeof E=="function"){n_(),D=E.call(m,l,d);{if(e.mode&_n){zn(!0);try{E.call(m,l,d)}finally{zn(!1)}}r_()}}else D=E;return D==null?l:Mt({},l,D)}case pg:return vg=!0,l}return l}function yg(e,t,o,l){var d=e.updateQueue;vg=!1,mg=d.shared;var m=d.firstBaseUpdate,w=d.lastBaseUpdate,x=d.shared.pending;if(x!==null){d.shared.pending=null;var E=x,D=E.next;E.next=null,w===null?m=D:w.next=D,w=E;var L=e.alternate;if(L!==null){var W=L.updateQueue,H=W.lastBaseUpdate;H!==w&&(H===null?W.firstBaseUpdate=D:H.next=D,W.lastBaseUpdate=E)}}if(m!==null){var ee=d.baseState,ae=ye,ce=null,Be=null,gt=null,ot=m;do{var Zt=ot.lane,Gt=ot.eventTime;if(Xs(l,Zt)){if(gt!==null){var de={eventTime:Gt,lane:nn,tag:ot.tag,payload:ot.payload,callback:ot.callback,next:null};gt=gt.next=de}ee=KO(e,d,ot,ee,t,o);var X=ot.callback;if(X!==null&&ot.lane!==nn){e.flags|=On;var Te=d.effects;Te===null?d.effects=[ot]:Te.push(ot)}}else{var J={eventTime:Gt,lane:Zt,tag:ot.tag,payload:ot.payload,callback:ot.callback,next:null};gt===null?(Be=gt=J,ce=ee):gt=gt.next=J,ae=Pt(ae,Zt)}if(ot=ot.next,ot===null){if(x=d.shared.pending,x===null)break;var Ge=x,We=Ge.next;Ge.next=null,ot=We,d.lastBaseUpdate=Ge,d.shared.pending=null}}while(!0);gt===null&&(ce=ee),d.baseState=ce,d.firstBaseUpdate=Be,d.lastBaseUpdate=gt;var Et=d.shared.interleaved;if(Et!==null){var Nt=Et;do ae=Pt(ae,Nt.lane),Nt=Nt.next;while(Nt!==Et)}else m===null&&(d.shared.lanes=ye);Wp(ae),e.lanes=ae,e.memoizedState=ee}mg=null}function JO(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function u_(){vg=!1}function wg(){return vg}function c_(e,t,o){var l=t.effects;if(t.effects=null,l!==null)for(var d=0;d<l.length;d++){var m=l[d],w=m.callback;w!==null&&(m.callback=null,JO(w,o))}}var wp={},su=nu(wp),bp=nu(wp),bg=nu(wp);function Sg(e){if(e===wp)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function d_(){var e=Sg(bg.current);return e}function m0(e,t){bi(bg,t,e),bi(bp,e,e),bi(su,wp,e);var o=hR(t);wi(su,e),bi(su,o,e)}function pf(e){wi(su,e),wi(bp,e),wi(bg,e)}function g0(){var e=Sg(su.current);return e}function f_(e){Sg(bg.current);var t=Sg(su.current),o=pR(t,e.type);t!==o&&(bi(bp,e,e),bi(su,o,e))}function y0(e){bp.current===e&&(wi(su,e),wi(bp,e))}var XO=0,h_=1,p_=1,Sp=2,wo=nu(XO);function w0(e,t){return(e&t)!==0}function vf(e){return e&h_}function b0(e,t){return e&h_|t}function QO(e,t){return e|t}function lu(e,t){bi(wo,t,e)}function mf(e){wi(wo,e)}function ZO(e,t){var o=e.memoizedState;return o!==null?o.dehydrated!==null:(e.memoizedProps,!0)}function xg(e){for(var t=e;t!==null;){if(t.tag===le){var o=t.memoizedState;if(o!==null){var l=o.dehydrated;if(l===null||Dx(l)||$w(l))return t}}else if(t.tag===ke&&t.memoizedProps.revealOrder!==void 0){var d=(t.flags&lt)!==ft;if(d)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zi=0,Tr=1,ls=2,Rr=4,Qr=8,S0=[];function x0(){for(var e=0;e<S0.length;e++){var t=S0[e];t._workInProgressVersionPrimary=null}S0.length=0}function eA(e,t){var o=t._getVersion,l=o(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,l]:e.mutableSourceEagerHydrationData.push(t,l)}var Ye=s.ReactCurrentDispatcher,xp=s.ReactCurrentBatchConfig,_0,gf;_0=new Set;var Rc=ye,En=null,Or=null,Ar=null,_g=!1,_p=!1,Ep=0,tA=0,nA=25,he=null,qa=null,uu=-1,E0=!1;function pn(){{var e=he;qa===null?qa=[e]:qa.push(e)}}function Ue(){{var e=he;qa!==null&&(uu++,qa[uu]!==e&&rA(e))}}function yf(e){e!=null&&!$t(e)&&h("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",he,typeof e)}function rA(e){{var t=Rt(En);if(!_0.has(t)&&(_0.add(t),qa!==null)){for(var o="",l=30,d=0;d<=uu;d++){for(var m=qa[d],w=d===uu?e:m,x=d+1+". "+m;x.length<l;)x+=" ";x+=w+`
168
168
  `,o+=x}h(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
169
169
 
170
170
  Previous render Next render
@@ -177,7 +177,7 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}retur
177
177
  See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function k0(e,t){if(E0)return!1;if(t===null)return h("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",he),!1;e.length!==t.length&&h(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
178
178
 
179
179
  Previous: %s
180
- Incoming: %s`,he,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<t.length&&o<e.length;o++)if(!xe(e[o],t[o]))return!1;return!0}function wf(e,t,o,l,d,m){Rc=m,En=t,qa=e!==null?e._debugHookTypes:null,uu=-1,E0=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=ye,e!==null&&e.memoizedState!==null?Ye.current=U_:qa!==null?Ye.current=P_:Ye.current=L_;var w=o(l,d);if(_p){var x=0;do{if(_p=!1,Ep=0,x>=tA)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");x+=1,E0=!1,Or=null,Ar=null,t.updateQueue=null,uu=-1,Ye.current=M_,w=o(l,d)}while(_p)}Ye.current=Ug,t._debugHookTypes=qa;var E=Or!==null&&Or.next!==null;if(Rc=ye,En=null,Or=null,Ar=null,he=null,qa=null,uu=-1,e!==null&&(e.flags&tr)!==(t.flags&tr)&&(e.mode&Bt)!==ht&&h("Internal React error: Expected static flag was missing. Please notify the React team."),_g=!1,E)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return w}function bf(){var e=Ep!==0;return Ep=0,e}function v_(e,t,o){t.updateQueue=e.updateQueue,(t.mode&sn)!==ht?t.flags&=-50333701:t.flags&=-2053,e.lanes=ec(e.lanes,o)}function m_(){if(Ye.current=Ug,_g){for(var e=En.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_g=!1}Rc=ye,En=null,Or=null,Ar=null,qa=null,uu=-1,he=null,O_=!1,_p=!1,Ep=0}function us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ar===null?En.memoizedState=Ar=e:Ar=Ar.next=e,Ar}function Ya(){var e;if(Or===null){var t=En.alternate;t!==null?e=t.memoizedState:e=null}else e=Or.next;var o;if(Ar===null?o=En.memoizedState:o=Ar.next,o!==null)Ar=o,o=Ar.next,Or=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");Or=e;var l={memoizedState:Or.memoizedState,baseState:Or.baseState,baseQueue:Or.baseQueue,queue:Or.queue,next:null};Ar===null?En.memoizedState=Ar=l:Ar=Ar.next=l}return Ar}function g_(){return{lastEffect:null,stores:null}}function C0(e,t){return typeof t=="function"?t(e):t}function T0(e,t,o){var l=us(),d;o!==void 0?d=o(t):d=t,l.memoizedState=l.baseState=d;var m={pending:null,interleaved:null,lanes:ye,dispatch:null,lastRenderedReducer:e,lastRenderedState:d};l.queue=m;var w=m.dispatch=oA.bind(null,En,m);return[l.memoizedState,w]}function R0(e,t,o){var l=Ya(),d=l.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=e;var m=Or,w=m.baseQueue,x=d.pending;if(x!==null){if(w!==null){var E=w.next,D=x.next;w.next=D,x.next=E}m.baseQueue!==w&&h("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),m.baseQueue=w=x,d.pending=null}if(w!==null){var L=w.next,W=m.baseState,H=null,ee=null,ae=null,ce=L;do{var Be=ce.lane;if(Xs(Rc,Be)){if(ae!==null){var ot={lane:nn,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};ae=ae.next=ot}if(ce.hasEagerState)W=ce.eagerState;else{var Zt=ce.action;W=e(W,Zt)}}else{var gt={lane:Be,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};ae===null?(ee=ae=gt,H=W):ae=ae.next=gt,En.lanes=Pt(En.lanes,Be),Wp(Be)}ce=ce.next}while(ce!==null&&ce!==L);ae===null?H=W:ae.next=ee,xe(W,l.memoizedState)||jp(),l.memoizedState=W,l.baseState=H,l.baseQueue=ae,d.lastRenderedState=W}var Gt=d.interleaved;if(Gt!==null){var J=Gt;do{var de=J.lane;En.lanes=Pt(En.lanes,de),Wp(de),J=J.next}while(J!==Gt)}else w===null&&(d.lanes=ye);var X=d.dispatch;return[l.memoizedState,X]}function O0(e,t,o){var l=Ya(),d=l.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=e;var m=d.dispatch,w=d.pending,x=l.memoizedState;if(w!==null){d.pending=null;var E=w.next,D=E;do{var L=D.action;x=e(x,L),D=D.next}while(D!==E);xe(x,l.memoizedState)||jp(),l.memoizedState=x,l.baseQueue===null&&(l.baseState=x),d.lastRenderedState=x}return[x,m]}function r$(e,t,o){}function i$(e,t,o){}function A0(e,t,o){var l=En,d=us(),m,w=Xr();if(w){if(o===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");m=o(),gf||m!==o()&&(h("The result of getServerSnapshot should be cached to avoid an infinite loop"),gf=!0)}else{if(m=t(),!gf){var x=t();xe(m,x)||(h("The result of getSnapshot should be cached to avoid an infinite loop"),gf=!0)}var E=ty();if(E===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ud(E,Rc)||y_(l,t,m)}d.memoizedState=m;var D={value:m,getSnapshot:t};return d.queue=D,Rg(b_.bind(null,l,D,e),[e]),l.flags|=ui,kp(Tr|Qr,w_.bind(null,l,D,m,t),void 0,null),m}function Eg(e,t,o){var l=En,d=Ya(),m=t();if(!gf){var w=t();xe(m,w)||(h("The result of getSnapshot should be cached to avoid an infinite loop"),gf=!0)}var x=d.memoizedState,E=!xe(x,m);E&&(d.memoizedState=m,jp());var D=d.queue;if(Tp(b_.bind(null,l,D,e),[e]),D.getSnapshot!==t||E||Ar!==null&&Ar.memoizedState.tag&Tr){l.flags|=ui,kp(Tr|Qr,w_.bind(null,l,D,m,t),void 0,null);var L=ty();if(L===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ud(L,Rc)||y_(l,t,m)}return m}function y_(e,t,o){e.flags|=zl;var l={getSnapshot:t,value:o},d=En.updateQueue;if(d===null)d=g_(),En.updateQueue=d,d.stores=[l];else{var m=d.stores;m===null?d.stores=[l]:m.push(l)}}function w_(e,t,o,l){t.value=o,t.getSnapshot=l,S_(t)&&x_(e)}function b_(e,t,o){var l=function(){S_(t)&&x_(e)};return o(l)}function S_(e){var t=e.getSnapshot,o=e.value;try{var l=t();return!xe(o,l)}catch{return!0}}function x_(e){var t=Qi(e,_t);t!==null&&Lr(t,e,_t,Cn)}function kg(e){var t=us();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var o={pending:null,interleaved:null,lanes:ye,dispatch:null,lastRenderedReducer:C0,lastRenderedState:e};t.queue=o;var l=o.dispatch=sA.bind(null,En,o);return[t.memoizedState,l]}function D0(e){return R0(C0)}function N0(e){return O0(C0)}function kp(e,t,o,l){var d={tag:e,create:t,destroy:o,deps:l,next:null},m=En.updateQueue;if(m===null)m=g_(),En.updateQueue=m,m.lastEffect=d.next=d;else{var w=m.lastEffect;if(w===null)m.lastEffect=d.next=d;else{var x=w.next;w.next=d,d.next=x,m.lastEffect=d}}return d}function j0(e){var t=us();{var o={current:e};return t.memoizedState=o,o}}function Cg(e){var t=Ya();return t.memoizedState}function Cp(e,t,o,l){var d=us(),m=l===void 0?null:l;En.flags|=e,d.memoizedState=kp(Tr|t,o,void 0,m)}function Tg(e,t,o,l){var d=Ya(),m=l===void 0?null:l,w=void 0;if(Or!==null){var x=Or.memoizedState;if(w=x.destroy,m!==null){var E=x.deps;if(k0(m,E)){d.memoizedState=kp(t,o,w,m);return}}}En.flags|=e,d.memoizedState=kp(Tr|t,o,w,m)}function Rg(e,t){return(En.mode&sn)!==ht?Cp(La|ui|ud,Qr,e,t):Cp(ui|ud,Qr,e,t)}function Tp(e,t){return Tg(ui,Qr,e,t)}function L0(e,t){return Cp(Jt,ls,e,t)}function Og(e,t){return Tg(Jt,ls,e,t)}function P0(e,t){var o=Jt;return o|=oo,(En.mode&sn)!==ht&&(o|=Vo),Cp(o,Rr,e,t)}function Ag(e,t){return Tg(Jt,Rr,e,t)}function __(e,t){if(typeof t=="function"){var o=t,l=e();return o(l),function(){o(null)}}else if(t!=null){var d=t;d.hasOwnProperty("current")||h("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(d).join(", ")+"}");var m=e();return d.current=m,function(){d.current=null}}}function U0(e,t,o){typeof t!="function"&&h("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var l=o!=null?o.concat([e]):null,d=Jt;return d|=oo,(En.mode&sn)!==ht&&(d|=Vo),Cp(d,Rr,__.bind(null,t,e),l)}function Dg(e,t,o){typeof t!="function"&&h("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var l=o!=null?o.concat([e]):null;return Tg(Jt,Rr,__.bind(null,t,e),l)}function rA(e,t){}var Ng=rA;function M0(e,t){var o=us(),l=t===void 0?null:t;return o.memoizedState=[e,l],e}function jg(e,t){var o=Ya(),l=t===void 0?null:t,d=o.memoizedState;if(d!==null&&l!==null){var m=d[1];if(k0(l,m))return d[0]}return o.memoizedState=[e,l],e}function $0(e,t){var o=us(),l=t===void 0?null:t,d=e();return o.memoizedState=[d,l],d}function Lg(e,t){var o=Ya(),l=t===void 0?null:t,d=o.memoizedState;if(d!==null&&l!==null){var m=d[1];if(k0(l,m))return d[0]}var w=e();return o.memoizedState=[w,l],w}function I0(e){var t=us();return t.memoizedState=e,e}function E_(e){var t=Ya(),o=Or,l=o.memoizedState;return C_(t,l,e)}function k_(e){var t=Ya();if(Or===null)return t.memoizedState=e,e;var o=Or.memoizedState;return C_(t,o,e)}function C_(e,t,o){var l=!Oh(Rc);if(l){if(!xe(o,t)){var d=Nh();En.lanes=Pt(En.lanes,d),Wp(d),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,jp()),e.memoizedState=o,o}function iA(e,t,o){var l=Ki();ir(dm(l,$a)),e(!0);var d=xp.transition;xp.transition={};var m=xp.transition;xp.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(ir(l),xp.transition=d,d===null&&m._updatedFibers){var w=m._updatedFibers.size;w>10&&v("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),m._updatedFibers.clear()}}}function z0(){var e=kg(!1),t=e[0],o=e[1],l=iA.bind(null,o),d=us();return d.memoizedState=l,[t,l]}function T_(){var e=D0(),t=e[0],o=Ya(),l=o.memoizedState;return[t,l]}function R_(){var e=N0(),t=e[0],o=Ya(),l=o.memoizedState;return[t,l]}var O_=!1;function aA(){return O_}function F0(){var e=us(),t=ty(),o=t.identifierPrefix,l;if(Xr()){var d=xO();l=":"+o+"R"+d;var m=Ep++;m>0&&(l+="H"+m.toString(32)),l+=":"}else{var w=eA++;l=":"+o+"r"+w.toString(32)+":"}return e.memoizedState=l,l}function Pg(){var e=Ya(),t=e.memoizedState;return t}function oA(e,t,o){typeof arguments[3]=="function"&&h("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var l=pu(e),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(A_(e))D_(t,d);else{var m=a_(e,t,d,l);if(m!==null){var w=Li();Lr(m,e,l,w),N_(m,t,l)}}j_(e,l)}function sA(e,t,o){typeof arguments[3]=="function"&&h("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var l=pu(e),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(A_(e))D_(t,d);else{var m=e.alternate;if(e.lanes===ye&&(m===null||m.lanes===ye)){var w=t.lastRenderedReducer;if(w!==null){var x;x=Ye.current,Ye.current=bo;try{var E=t.lastRenderedState,D=w(E,o);if(d.hasEagerState=!0,d.eagerState=D,xe(D,E)){WO(e,t,d,l);return}}catch{}finally{Ye.current=x}}}var L=a_(e,t,d,l);if(L!==null){var W=Li();Lr(L,e,l,W),N_(L,t,l)}}j_(e,l)}function A_(e){var t=e.alternate;return e===En||t!==null&&t===En}function D_(e,t){_p=_g=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function N_(e,t,o){if(Dh(o)){var l=t.lanes;l=jh(l,e.pendingLanes);var d=Pt(l,o);t.lanes=d,$d(e,d)}}function j_(e,t,o){Vu(e,t)}var Ug={readContext:yr,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:pe},L_=null,P_=null,U_=null,M_=null,cs=null,bo=null,Mg=null;{var B0=function(){h("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},Dt=function(){h("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};L_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",pn(),yf(t),M0(e,t)},useContext:function(e){return he="useContext",pn(),yr(e)},useEffect:function(e,t){return he="useEffect",pn(),yf(t),Rg(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",pn(),yf(o),U0(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",pn(),yf(t),L0(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",pn(),yf(t),P0(e,t)},useMemo:function(e,t){he="useMemo",pn(),yf(t);var o=Ye.current;Ye.current=cs;try{return $0(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",pn();var l=Ye.current;Ye.current=cs;try{return T0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",pn(),j0(e)},useState:function(e){he="useState",pn();var t=Ye.current;Ye.current=cs;try{return kg(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",pn(),void 0},useDeferredValue:function(e){return he="useDeferredValue",pn(),I0(e)},useTransition:function(){return he="useTransition",pn(),z0()},useMutableSource:function(e,t,o){return he="useMutableSource",pn(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",pn(),A0(e,t,o)},useId:function(){return he="useId",pn(),F0()},unstable_isNewReconciler:pe},P_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",Ue(),M0(e,t)},useContext:function(e){return he="useContext",Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Ue(),Rg(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Ue(),U0(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Ue(),L0(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Ue(),P0(e,t)},useMemo:function(e,t){he="useMemo",Ue();var o=Ye.current;Ye.current=cs;try{return $0(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Ue();var l=Ye.current;Ye.current=cs;try{return T0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Ue(),j0(e)},useState:function(e){he="useState",Ue();var t=Ye.current;Ye.current=cs;try{return kg(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Ue(),void 0},useDeferredValue:function(e){return he="useDeferredValue",Ue(),I0(e)},useTransition:function(){return he="useTransition",Ue(),z0()},useMutableSource:function(e,t,o){return he="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Ue(),A0(e,t,o)},useId:function(){return he="useId",Ue(),F0()},unstable_isNewReconciler:pe},U_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",Ue(),jg(e,t)},useContext:function(e){return he="useContext",Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Ue();var o=Ye.current;Ye.current=bo;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Ue();var l=Ye.current;Ye.current=bo;try{return R0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Ue(),Cg()},useState:function(e){he="useState",Ue();var t=Ye.current;Ye.current=bo;try{return D0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Ue(),E_(e)},useTransition:function(){return he="useTransition",Ue(),T_()},useMutableSource:function(e,t,o){return he="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Ue(),Eg(e,t)},useId:function(){return he="useId",Ue(),Pg()},unstable_isNewReconciler:pe},M_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",Ue(),jg(e,t)},useContext:function(e){return he="useContext",Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Ue();var o=Ye.current;Ye.current=Mg;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Ue();var l=Ye.current;Ye.current=Mg;try{return O0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Ue(),Cg()},useState:function(e){he="useState",Ue();var t=Ye.current;Ye.current=Mg;try{return N0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Ue(),k_(e)},useTransition:function(){return he="useTransition",Ue(),R_()},useMutableSource:function(e,t,o){return he="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Ue(),Eg(e,t)},useId:function(){return he="useId",Ue(),Pg()},unstable_isNewReconciler:pe},cs={readContext:function(e){return B0(),yr(e)},useCallback:function(e,t){return he="useCallback",Dt(),pn(),M0(e,t)},useContext:function(e){return he="useContext",Dt(),pn(),yr(e)},useEffect:function(e,t){return he="useEffect",Dt(),pn(),Rg(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Dt(),pn(),U0(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Dt(),pn(),L0(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Dt(),pn(),P0(e,t)},useMemo:function(e,t){he="useMemo",Dt(),pn();var o=Ye.current;Ye.current=cs;try{return $0(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Dt(),pn();var l=Ye.current;Ye.current=cs;try{return T0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Dt(),pn(),j0(e)},useState:function(e){he="useState",Dt(),pn();var t=Ye.current;Ye.current=cs;try{return kg(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Dt(),pn(),void 0},useDeferredValue:function(e){return he="useDeferredValue",Dt(),pn(),I0(e)},useTransition:function(){return he="useTransition",Dt(),pn(),z0()},useMutableSource:function(e,t,o){return he="useMutableSource",Dt(),pn(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Dt(),pn(),A0(e,t,o)},useId:function(){return he="useId",Dt(),pn(),F0()},unstable_isNewReconciler:pe},bo={readContext:function(e){return B0(),yr(e)},useCallback:function(e,t){return he="useCallback",Dt(),Ue(),jg(e,t)},useContext:function(e){return he="useContext",Dt(),Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Dt(),Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Dt(),Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Dt(),Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Dt(),Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Dt(),Ue();var o=Ye.current;Ye.current=bo;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Dt(),Ue();var l=Ye.current;Ye.current=bo;try{return R0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Dt(),Ue(),Cg()},useState:function(e){he="useState",Dt(),Ue();var t=Ye.current;Ye.current=bo;try{return D0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Dt(),Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Dt(),Ue(),E_(e)},useTransition:function(){return he="useTransition",Dt(),Ue(),T_()},useMutableSource:function(e,t,o){return he="useMutableSource",Dt(),Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Dt(),Ue(),Eg(e,t)},useId:function(){return he="useId",Dt(),Ue(),Pg()},unstable_isNewReconciler:pe},Mg={readContext:function(e){return B0(),yr(e)},useCallback:function(e,t){return he="useCallback",Dt(),Ue(),jg(e,t)},useContext:function(e){return he="useContext",Dt(),Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Dt(),Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Dt(),Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Dt(),Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Dt(),Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Dt(),Ue();var o=Ye.current;Ye.current=bo;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Dt(),Ue();var l=Ye.current;Ye.current=bo;try{return O0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Dt(),Ue(),Cg()},useState:function(e){he="useState",Dt(),Ue();var t=Ye.current;Ye.current=bo;try{return N0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Dt(),Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Dt(),Ue(),k_(e)},useTransition:function(){return he="useTransition",Dt(),Ue(),R_()},useMutableSource:function(e,t,o){return he="useMutableSource",Dt(),Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Dt(),Ue(),Eg(e,t)},useId:function(){return he="useId",Dt(),Ue(),Pg()},unstable_isNewReconciler:pe}}var cu=n.unstable_now,$_=0,$g=-1,Rp=-1,Ig=-1,H0=!1,zg=!1;function I_(){return H0}function lA(){zg=!0}function uA(){H0=!1,zg=!1}function cA(){H0=zg,zg=!1}function z_(){return $_}function F_(){$_=cu()}function V0(e){Rp=cu(),e.actualStartTime<0&&(e.actualStartTime=cu())}function B_(e){Rp=-1}function Fg(e,t){if(Rp>=0){var o=cu()-Rp;e.actualDuration+=o,t&&(e.selfBaseDuration=o),Rp=-1}}function ds(e){if($g>=0){var t=cu()-$g;$g=-1;for(var o=e.return;o!==null;){switch(o.tag){case R:var l=o.stateNode;l.effectDuration+=t;return;case ie:var d=o.stateNode;d.effectDuration+=t;return}o=o.return}}}function W0(e){if(Ig>=0){var t=cu()-Ig;Ig=-1;for(var o=e.return;o!==null;){switch(o.tag){case R:var l=o.stateNode;l!==null&&(l.passiveEffectDuration+=t);return;case ie:var d=o.stateNode;d!==null&&(d.passiveEffectDuration+=t);return}o=o.return}}}function fs(){$g=cu()}function q0(){Ig=cu()}function Y0(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function So(e,t){if(e&&e.defaultProps){var o=Mt({},t),l=e.defaultProps;for(var d in l)o[d]===void 0&&(o[d]=l[d]);return o}return t}var G0={},K0,J0,X0,Q0,Z0,H_,Bg,eb,tb,nb,Op;{K0=new Set,J0=new Set,X0=new Set,Q0=new Set,eb=new Set,Z0=new Set,tb=new Set,nb=new Set,Op=new Set;var V_=new Set;Bg=function(e,t){if(!(e===null||typeof e=="function")){var o=t+"_"+e;V_.has(o)||(V_.add(o),h("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},H_=function(e,t){if(t===void 0){var o=en(e)||"Component";Z0.has(o)||(Z0.add(o),h("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))}},Object.defineProperty(G0,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(G0)}function rb(e,t,o,l){var d=e.memoizedState,m=o(l,d);{if(e.mode&_n){zn(!0);try{m=o(l,d)}finally{zn(!1)}}H_(t,m)}var w=m==null?d:Mt({},d,m);if(e.memoizedState=w,e.lanes===ye){var x=e.updateQueue;x.baseState=w}}var ib={isMounted:Kv,enqueueSetState:function(e,t,o){var l=Il(e),d=Li(),m=pu(l),w=ul(d,m);w.payload=t,o!=null&&(Bg(o,"setState"),w.callback=o);var x=ou(l,w,m);x!==null&&(Lr(x,l,m,d),gg(x,l,m)),Vu(l,m)},enqueueReplaceState:function(e,t,o){var l=Il(e),d=Li(),m=pu(l),w=ul(d,m);w.tag=s_,w.payload=t,o!=null&&(Bg(o,"replaceState"),w.callback=o);var x=ou(l,w,m);x!==null&&(Lr(x,l,m,d),gg(x,l,m)),Vu(l,m)},enqueueForceUpdate:function(e,t){var o=Il(e),l=Li(),d=pu(o),m=ul(l,d);m.tag=pg,t!=null&&(Bg(t,"forceUpdate"),m.callback=t);var w=ou(o,m,d);w!==null&&(Lr(w,o,d,l),gg(w,o,d)),md(o,d)}};function W_(e,t,o,l,d,m,w){var x=e.stateNode;if(typeof x.shouldComponentUpdate=="function"){var E=x.shouldComponentUpdate(l,m,w);{if(e.mode&_n){zn(!0);try{E=x.shouldComponentUpdate(l,m,w)}finally{zn(!1)}}E===void 0&&h("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",en(t)||"Component")}return E}return t.prototype&&t.prototype.isPureReactComponent?!et(o,l)||!et(d,m):!0}function dA(e,t,o){var l=e.stateNode;{var d=en(t)||"Component",m=l.render;m||(t.prototype&&typeof t.prototype.render=="function"?h("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",d):h("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",d)),l.getInitialState&&!l.getInitialState.isReactClassApproved&&!l.state&&h("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",d),l.getDefaultProps&&!l.getDefaultProps.isReactClassApproved&&h("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",d),l.propTypes&&h("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",d),l.contextType&&h("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),t.childContextTypes&&!Op.has(t)&&(e.mode&_n)===ht&&(Op.add(t),h(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
180
+ Incoming: %s`,he,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<t.length&&o<e.length;o++)if(!xe(e[o],t[o]))return!1;return!0}function wf(e,t,o,l,d,m){Rc=m,En=t,qa=e!==null?e._debugHookTypes:null,uu=-1,E0=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=ye,e!==null&&e.memoizedState!==null?Ye.current=U_:qa!==null?Ye.current=P_:Ye.current=L_;var w=o(l,d);if(_p){var x=0;do{if(_p=!1,Ep=0,x>=nA)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");x+=1,E0=!1,Or=null,Ar=null,t.updateQueue=null,uu=-1,Ye.current=M_,w=o(l,d)}while(_p)}Ye.current=Ug,t._debugHookTypes=qa;var E=Or!==null&&Or.next!==null;if(Rc=ye,En=null,Or=null,Ar=null,he=null,qa=null,uu=-1,e!==null&&(e.flags&tr)!==(t.flags&tr)&&(e.mode&Bt)!==ht&&h("Internal React error: Expected static flag was missing. Please notify the React team."),_g=!1,E)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return w}function bf(){var e=Ep!==0;return Ep=0,e}function v_(e,t,o){t.updateQueue=e.updateQueue,(t.mode&sn)!==ht?t.flags&=-50333701:t.flags&=-2053,e.lanes=ec(e.lanes,o)}function m_(){if(Ye.current=Ug,_g){for(var e=En.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_g=!1}Rc=ye,En=null,Or=null,Ar=null,qa=null,uu=-1,he=null,O_=!1,_p=!1,Ep=0}function us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ar===null?En.memoizedState=Ar=e:Ar=Ar.next=e,Ar}function Ya(){var e;if(Or===null){var t=En.alternate;t!==null?e=t.memoizedState:e=null}else e=Or.next;var o;if(Ar===null?o=En.memoizedState:o=Ar.next,o!==null)Ar=o,o=Ar.next,Or=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");Or=e;var l={memoizedState:Or.memoizedState,baseState:Or.baseState,baseQueue:Or.baseQueue,queue:Or.queue,next:null};Ar===null?En.memoizedState=Ar=l:Ar=Ar.next=l}return Ar}function g_(){return{lastEffect:null,stores:null}}function C0(e,t){return typeof t=="function"?t(e):t}function T0(e,t,o){var l=us(),d;o!==void 0?d=o(t):d=t,l.memoizedState=l.baseState=d;var m={pending:null,interleaved:null,lanes:ye,dispatch:null,lastRenderedReducer:e,lastRenderedState:d};l.queue=m;var w=m.dispatch=sA.bind(null,En,m);return[l.memoizedState,w]}function R0(e,t,o){var l=Ya(),d=l.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=e;var m=Or,w=m.baseQueue,x=d.pending;if(x!==null){if(w!==null){var E=w.next,D=x.next;w.next=D,x.next=E}m.baseQueue!==w&&h("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),m.baseQueue=w=x,d.pending=null}if(w!==null){var L=w.next,W=m.baseState,H=null,ee=null,ae=null,ce=L;do{var Be=ce.lane;if(Xs(Rc,Be)){if(ae!==null){var ot={lane:nn,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};ae=ae.next=ot}if(ce.hasEagerState)W=ce.eagerState;else{var Zt=ce.action;W=e(W,Zt)}}else{var gt={lane:Be,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null};ae===null?(ee=ae=gt,H=W):ae=ae.next=gt,En.lanes=Pt(En.lanes,Be),Wp(Be)}ce=ce.next}while(ce!==null&&ce!==L);ae===null?H=W:ae.next=ee,xe(W,l.memoizedState)||jp(),l.memoizedState=W,l.baseState=H,l.baseQueue=ae,d.lastRenderedState=W}var Gt=d.interleaved;if(Gt!==null){var J=Gt;do{var de=J.lane;En.lanes=Pt(En.lanes,de),Wp(de),J=J.next}while(J!==Gt)}else w===null&&(d.lanes=ye);var X=d.dispatch;return[l.memoizedState,X]}function O0(e,t,o){var l=Ya(),d=l.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=e;var m=d.dispatch,w=d.pending,x=l.memoizedState;if(w!==null){d.pending=null;var E=w.next,D=E;do{var L=D.action;x=e(x,L),D=D.next}while(D!==E);xe(x,l.memoizedState)||jp(),l.memoizedState=x,l.baseQueue===null&&(l.baseState=x),d.lastRenderedState=x}return[x,m]}function r$(e,t,o){}function i$(e,t,o){}function A0(e,t,o){var l=En,d=us(),m,w=Xr();if(w){if(o===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");m=o(),gf||m!==o()&&(h("The result of getServerSnapshot should be cached to avoid an infinite loop"),gf=!0)}else{if(m=t(),!gf){var x=t();xe(m,x)||(h("The result of getSnapshot should be cached to avoid an infinite loop"),gf=!0)}var E=ty();if(E===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ud(E,Rc)||y_(l,t,m)}d.memoizedState=m;var D={value:m,getSnapshot:t};return d.queue=D,Rg(b_.bind(null,l,D,e),[e]),l.flags|=ui,kp(Tr|Qr,w_.bind(null,l,D,m,t),void 0,null),m}function Eg(e,t,o){var l=En,d=Ya(),m=t();if(!gf){var w=t();xe(m,w)||(h("The result of getSnapshot should be cached to avoid an infinite loop"),gf=!0)}var x=d.memoizedState,E=!xe(x,m);E&&(d.memoizedState=m,jp());var D=d.queue;if(Tp(b_.bind(null,l,D,e),[e]),D.getSnapshot!==t||E||Ar!==null&&Ar.memoizedState.tag&Tr){l.flags|=ui,kp(Tr|Qr,w_.bind(null,l,D,m,t),void 0,null);var L=ty();if(L===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ud(L,Rc)||y_(l,t,m)}return m}function y_(e,t,o){e.flags|=zl;var l={getSnapshot:t,value:o},d=En.updateQueue;if(d===null)d=g_(),En.updateQueue=d,d.stores=[l];else{var m=d.stores;m===null?d.stores=[l]:m.push(l)}}function w_(e,t,o,l){t.value=o,t.getSnapshot=l,S_(t)&&x_(e)}function b_(e,t,o){var l=function(){S_(t)&&x_(e)};return o(l)}function S_(e){var t=e.getSnapshot,o=e.value;try{var l=t();return!xe(o,l)}catch{return!0}}function x_(e){var t=Qi(e,_t);t!==null&&Lr(t,e,_t,Cn)}function kg(e){var t=us();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var o={pending:null,interleaved:null,lanes:ye,dispatch:null,lastRenderedReducer:C0,lastRenderedState:e};t.queue=o;var l=o.dispatch=lA.bind(null,En,o);return[t.memoizedState,l]}function D0(e){return R0(C0)}function N0(e){return O0(C0)}function kp(e,t,o,l){var d={tag:e,create:t,destroy:o,deps:l,next:null},m=En.updateQueue;if(m===null)m=g_(),En.updateQueue=m,m.lastEffect=d.next=d;else{var w=m.lastEffect;if(w===null)m.lastEffect=d.next=d;else{var x=w.next;w.next=d,d.next=x,m.lastEffect=d}}return d}function j0(e){var t=us();{var o={current:e};return t.memoizedState=o,o}}function Cg(e){var t=Ya();return t.memoizedState}function Cp(e,t,o,l){var d=us(),m=l===void 0?null:l;En.flags|=e,d.memoizedState=kp(Tr|t,o,void 0,m)}function Tg(e,t,o,l){var d=Ya(),m=l===void 0?null:l,w=void 0;if(Or!==null){var x=Or.memoizedState;if(w=x.destroy,m!==null){var E=x.deps;if(k0(m,E)){d.memoizedState=kp(t,o,w,m);return}}}En.flags|=e,d.memoizedState=kp(Tr|t,o,w,m)}function Rg(e,t){return(En.mode&sn)!==ht?Cp(La|ui|ud,Qr,e,t):Cp(ui|ud,Qr,e,t)}function Tp(e,t){return Tg(ui,Qr,e,t)}function L0(e,t){return Cp(Jt,ls,e,t)}function Og(e,t){return Tg(Jt,ls,e,t)}function P0(e,t){var o=Jt;return o|=oo,(En.mode&sn)!==ht&&(o|=Vo),Cp(o,Rr,e,t)}function Ag(e,t){return Tg(Jt,Rr,e,t)}function __(e,t){if(typeof t=="function"){var o=t,l=e();return o(l),function(){o(null)}}else if(t!=null){var d=t;d.hasOwnProperty("current")||h("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(d).join(", ")+"}");var m=e();return d.current=m,function(){d.current=null}}}function U0(e,t,o){typeof t!="function"&&h("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var l=o!=null?o.concat([e]):null,d=Jt;return d|=oo,(En.mode&sn)!==ht&&(d|=Vo),Cp(d,Rr,__.bind(null,t,e),l)}function Dg(e,t,o){typeof t!="function"&&h("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var l=o!=null?o.concat([e]):null;return Tg(Jt,Rr,__.bind(null,t,e),l)}function iA(e,t){}var Ng=iA;function M0(e,t){var o=us(),l=t===void 0?null:t;return o.memoizedState=[e,l],e}function jg(e,t){var o=Ya(),l=t===void 0?null:t,d=o.memoizedState;if(d!==null&&l!==null){var m=d[1];if(k0(l,m))return d[0]}return o.memoizedState=[e,l],e}function $0(e,t){var o=us(),l=t===void 0?null:t,d=e();return o.memoizedState=[d,l],d}function Lg(e,t){var o=Ya(),l=t===void 0?null:t,d=o.memoizedState;if(d!==null&&l!==null){var m=d[1];if(k0(l,m))return d[0]}var w=e();return o.memoizedState=[w,l],w}function I0(e){var t=us();return t.memoizedState=e,e}function E_(e){var t=Ya(),o=Or,l=o.memoizedState;return C_(t,l,e)}function k_(e){var t=Ya();if(Or===null)return t.memoizedState=e,e;var o=Or.memoizedState;return C_(t,o,e)}function C_(e,t,o){var l=!Oh(Rc);if(l){if(!xe(o,t)){var d=Nh();En.lanes=Pt(En.lanes,d),Wp(d),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,jp()),e.memoizedState=o,o}function aA(e,t,o){var l=Ki();ir(dm(l,$a)),e(!0);var d=xp.transition;xp.transition={};var m=xp.transition;xp.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(ir(l),xp.transition=d,d===null&&m._updatedFibers){var w=m._updatedFibers.size;w>10&&v("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),m._updatedFibers.clear()}}}function z0(){var e=kg(!1),t=e[0],o=e[1],l=aA.bind(null,o),d=us();return d.memoizedState=l,[t,l]}function T_(){var e=D0(),t=e[0],o=Ya(),l=o.memoizedState;return[t,l]}function R_(){var e=N0(),t=e[0],o=Ya(),l=o.memoizedState;return[t,l]}var O_=!1;function oA(){return O_}function F0(){var e=us(),t=ty(),o=t.identifierPrefix,l;if(Xr()){var d=_O();l=":"+o+"R"+d;var m=Ep++;m>0&&(l+="H"+m.toString(32)),l+=":"}else{var w=tA++;l=":"+o+"r"+w.toString(32)+":"}return e.memoizedState=l,l}function Pg(){var e=Ya(),t=e.memoizedState;return t}function sA(e,t,o){typeof arguments[3]=="function"&&h("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var l=pu(e),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(A_(e))D_(t,d);else{var m=a_(e,t,d,l);if(m!==null){var w=Li();Lr(m,e,l,w),N_(m,t,l)}}j_(e,l)}function lA(e,t,o){typeof arguments[3]=="function"&&h("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var l=pu(e),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(A_(e))D_(t,d);else{var m=e.alternate;if(e.lanes===ye&&(m===null||m.lanes===ye)){var w=t.lastRenderedReducer;if(w!==null){var x;x=Ye.current,Ye.current=bo;try{var E=t.lastRenderedState,D=w(E,o);if(d.hasEagerState=!0,d.eagerState=D,xe(D,E)){qO(e,t,d,l);return}}catch{}finally{Ye.current=x}}}var L=a_(e,t,d,l);if(L!==null){var W=Li();Lr(L,e,l,W),N_(L,t,l)}}j_(e,l)}function A_(e){var t=e.alternate;return e===En||t!==null&&t===En}function D_(e,t){_p=_g=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function N_(e,t,o){if(Dh(o)){var l=t.lanes;l=jh(l,e.pendingLanes);var d=Pt(l,o);t.lanes=d,$d(e,d)}}function j_(e,t,o){Vu(e,t)}var Ug={readContext:yr,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:pe},L_=null,P_=null,U_=null,M_=null,cs=null,bo=null,Mg=null;{var B0=function(){h("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},Dt=function(){h("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};L_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",pn(),yf(t),M0(e,t)},useContext:function(e){return he="useContext",pn(),yr(e)},useEffect:function(e,t){return he="useEffect",pn(),yf(t),Rg(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",pn(),yf(o),U0(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",pn(),yf(t),L0(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",pn(),yf(t),P0(e,t)},useMemo:function(e,t){he="useMemo",pn(),yf(t);var o=Ye.current;Ye.current=cs;try{return $0(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",pn();var l=Ye.current;Ye.current=cs;try{return T0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",pn(),j0(e)},useState:function(e){he="useState",pn();var t=Ye.current;Ye.current=cs;try{return kg(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",pn(),void 0},useDeferredValue:function(e){return he="useDeferredValue",pn(),I0(e)},useTransition:function(){return he="useTransition",pn(),z0()},useMutableSource:function(e,t,o){return he="useMutableSource",pn(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",pn(),A0(e,t,o)},useId:function(){return he="useId",pn(),F0()},unstable_isNewReconciler:pe},P_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",Ue(),M0(e,t)},useContext:function(e){return he="useContext",Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Ue(),Rg(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Ue(),U0(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Ue(),L0(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Ue(),P0(e,t)},useMemo:function(e,t){he="useMemo",Ue();var o=Ye.current;Ye.current=cs;try{return $0(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Ue();var l=Ye.current;Ye.current=cs;try{return T0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Ue(),j0(e)},useState:function(e){he="useState",Ue();var t=Ye.current;Ye.current=cs;try{return kg(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Ue(),void 0},useDeferredValue:function(e){return he="useDeferredValue",Ue(),I0(e)},useTransition:function(){return he="useTransition",Ue(),z0()},useMutableSource:function(e,t,o){return he="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Ue(),A0(e,t,o)},useId:function(){return he="useId",Ue(),F0()},unstable_isNewReconciler:pe},U_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",Ue(),jg(e,t)},useContext:function(e){return he="useContext",Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Ue();var o=Ye.current;Ye.current=bo;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Ue();var l=Ye.current;Ye.current=bo;try{return R0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Ue(),Cg()},useState:function(e){he="useState",Ue();var t=Ye.current;Ye.current=bo;try{return D0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Ue(),E_(e)},useTransition:function(){return he="useTransition",Ue(),T_()},useMutableSource:function(e,t,o){return he="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Ue(),Eg(e,t)},useId:function(){return he="useId",Ue(),Pg()},unstable_isNewReconciler:pe},M_={readContext:function(e){return yr(e)},useCallback:function(e,t){return he="useCallback",Ue(),jg(e,t)},useContext:function(e){return he="useContext",Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Ue();var o=Ye.current;Ye.current=Mg;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Ue();var l=Ye.current;Ye.current=Mg;try{return O0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Ue(),Cg()},useState:function(e){he="useState",Ue();var t=Ye.current;Ye.current=Mg;try{return N0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Ue(),k_(e)},useTransition:function(){return he="useTransition",Ue(),R_()},useMutableSource:function(e,t,o){return he="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Ue(),Eg(e,t)},useId:function(){return he="useId",Ue(),Pg()},unstable_isNewReconciler:pe},cs={readContext:function(e){return B0(),yr(e)},useCallback:function(e,t){return he="useCallback",Dt(),pn(),M0(e,t)},useContext:function(e){return he="useContext",Dt(),pn(),yr(e)},useEffect:function(e,t){return he="useEffect",Dt(),pn(),Rg(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Dt(),pn(),U0(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Dt(),pn(),L0(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Dt(),pn(),P0(e,t)},useMemo:function(e,t){he="useMemo",Dt(),pn();var o=Ye.current;Ye.current=cs;try{return $0(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Dt(),pn();var l=Ye.current;Ye.current=cs;try{return T0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Dt(),pn(),j0(e)},useState:function(e){he="useState",Dt(),pn();var t=Ye.current;Ye.current=cs;try{return kg(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Dt(),pn(),void 0},useDeferredValue:function(e){return he="useDeferredValue",Dt(),pn(),I0(e)},useTransition:function(){return he="useTransition",Dt(),pn(),z0()},useMutableSource:function(e,t,o){return he="useMutableSource",Dt(),pn(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Dt(),pn(),A0(e,t,o)},useId:function(){return he="useId",Dt(),pn(),F0()},unstable_isNewReconciler:pe},bo={readContext:function(e){return B0(),yr(e)},useCallback:function(e,t){return he="useCallback",Dt(),Ue(),jg(e,t)},useContext:function(e){return he="useContext",Dt(),Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Dt(),Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Dt(),Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Dt(),Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Dt(),Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Dt(),Ue();var o=Ye.current;Ye.current=bo;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Dt(),Ue();var l=Ye.current;Ye.current=bo;try{return R0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Dt(),Ue(),Cg()},useState:function(e){he="useState",Dt(),Ue();var t=Ye.current;Ye.current=bo;try{return D0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Dt(),Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Dt(),Ue(),E_(e)},useTransition:function(){return he="useTransition",Dt(),Ue(),T_()},useMutableSource:function(e,t,o){return he="useMutableSource",Dt(),Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Dt(),Ue(),Eg(e,t)},useId:function(){return he="useId",Dt(),Ue(),Pg()},unstable_isNewReconciler:pe},Mg={readContext:function(e){return B0(),yr(e)},useCallback:function(e,t){return he="useCallback",Dt(),Ue(),jg(e,t)},useContext:function(e){return he="useContext",Dt(),Ue(),yr(e)},useEffect:function(e,t){return he="useEffect",Dt(),Ue(),Tp(e,t)},useImperativeHandle:function(e,t,o){return he="useImperativeHandle",Dt(),Ue(),Dg(e,t,o)},useInsertionEffect:function(e,t){return he="useInsertionEffect",Dt(),Ue(),Og(e,t)},useLayoutEffect:function(e,t){return he="useLayoutEffect",Dt(),Ue(),Ag(e,t)},useMemo:function(e,t){he="useMemo",Dt(),Ue();var o=Ye.current;Ye.current=bo;try{return Lg(e,t)}finally{Ye.current=o}},useReducer:function(e,t,o){he="useReducer",Dt(),Ue();var l=Ye.current;Ye.current=bo;try{return O0(e,t,o)}finally{Ye.current=l}},useRef:function(e){return he="useRef",Dt(),Ue(),Cg()},useState:function(e){he="useState",Dt(),Ue();var t=Ye.current;Ye.current=bo;try{return N0(e)}finally{Ye.current=t}},useDebugValue:function(e,t){return he="useDebugValue",Dt(),Ue(),Ng()},useDeferredValue:function(e){return he="useDeferredValue",Dt(),Ue(),k_(e)},useTransition:function(){return he="useTransition",Dt(),Ue(),R_()},useMutableSource:function(e,t,o){return he="useMutableSource",Dt(),Ue(),void 0},useSyncExternalStore:function(e,t,o){return he="useSyncExternalStore",Dt(),Ue(),Eg(e,t)},useId:function(){return he="useId",Dt(),Ue(),Pg()},unstable_isNewReconciler:pe}}var cu=n.unstable_now,$_=0,$g=-1,Rp=-1,Ig=-1,H0=!1,zg=!1;function I_(){return H0}function uA(){zg=!0}function cA(){H0=!1,zg=!1}function dA(){H0=zg,zg=!1}function z_(){return $_}function F_(){$_=cu()}function V0(e){Rp=cu(),e.actualStartTime<0&&(e.actualStartTime=cu())}function B_(e){Rp=-1}function Fg(e,t){if(Rp>=0){var o=cu()-Rp;e.actualDuration+=o,t&&(e.selfBaseDuration=o),Rp=-1}}function ds(e){if($g>=0){var t=cu()-$g;$g=-1;for(var o=e.return;o!==null;){switch(o.tag){case R:var l=o.stateNode;l.effectDuration+=t;return;case ie:var d=o.stateNode;d.effectDuration+=t;return}o=o.return}}}function W0(e){if(Ig>=0){var t=cu()-Ig;Ig=-1;for(var o=e.return;o!==null;){switch(o.tag){case R:var l=o.stateNode;l!==null&&(l.passiveEffectDuration+=t);return;case ie:var d=o.stateNode;d!==null&&(d.passiveEffectDuration+=t);return}o=o.return}}}function fs(){$g=cu()}function q0(){Ig=cu()}function Y0(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function So(e,t){if(e&&e.defaultProps){var o=Mt({},t),l=e.defaultProps;for(var d in l)o[d]===void 0&&(o[d]=l[d]);return o}return t}var G0={},K0,J0,X0,Q0,Z0,H_,Bg,eb,tb,nb,Op;{K0=new Set,J0=new Set,X0=new Set,Q0=new Set,eb=new Set,Z0=new Set,tb=new Set,nb=new Set,Op=new Set;var V_=new Set;Bg=function(e,t){if(!(e===null||typeof e=="function")){var o=t+"_"+e;V_.has(o)||(V_.add(o),h("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},H_=function(e,t){if(t===void 0){var o=en(e)||"Component";Z0.has(o)||(Z0.add(o),h("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))}},Object.defineProperty(G0,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(G0)}function rb(e,t,o,l){var d=e.memoizedState,m=o(l,d);{if(e.mode&_n){zn(!0);try{m=o(l,d)}finally{zn(!1)}}H_(t,m)}var w=m==null?d:Mt({},d,m);if(e.memoizedState=w,e.lanes===ye){var x=e.updateQueue;x.baseState=w}}var ib={isMounted:Kv,enqueueSetState:function(e,t,o){var l=Il(e),d=Li(),m=pu(l),w=ul(d,m);w.payload=t,o!=null&&(Bg(o,"setState"),w.callback=o);var x=ou(l,w,m);x!==null&&(Lr(x,l,m,d),gg(x,l,m)),Vu(l,m)},enqueueReplaceState:function(e,t,o){var l=Il(e),d=Li(),m=pu(l),w=ul(d,m);w.tag=s_,w.payload=t,o!=null&&(Bg(o,"replaceState"),w.callback=o);var x=ou(l,w,m);x!==null&&(Lr(x,l,m,d),gg(x,l,m)),Vu(l,m)},enqueueForceUpdate:function(e,t){var o=Il(e),l=Li(),d=pu(o),m=ul(l,d);m.tag=pg,t!=null&&(Bg(t,"forceUpdate"),m.callback=t);var w=ou(o,m,d);w!==null&&(Lr(w,o,d,l),gg(w,o,d)),md(o,d)}};function W_(e,t,o,l,d,m,w){var x=e.stateNode;if(typeof x.shouldComponentUpdate=="function"){var E=x.shouldComponentUpdate(l,m,w);{if(e.mode&_n){zn(!0);try{E=x.shouldComponentUpdate(l,m,w)}finally{zn(!1)}}E===void 0&&h("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",en(t)||"Component")}return E}return t.prototype&&t.prototype.isPureReactComponent?!et(o,l)||!et(d,m):!0}function fA(e,t,o){var l=e.stateNode;{var d=en(t)||"Component",m=l.render;m||(t.prototype&&typeof t.prototype.render=="function"?h("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",d):h("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",d)),l.getInitialState&&!l.getInitialState.isReactClassApproved&&!l.state&&h("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",d),l.getDefaultProps&&!l.getDefaultProps.isReactClassApproved&&h("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",d),l.propTypes&&h("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",d),l.contextType&&h("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),t.childContextTypes&&!Op.has(t)&&(e.mode&_n)===ht&&(Op.add(t),h(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
181
181
 
182
182
  .Learn more about this warning here: https://reactjs.org/link/legacy-context`,d)),t.contextTypes&&!Op.has(t)&&(e.mode&_n)===ht&&(Op.add(t),h(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
183
183
 
@@ -189,13 +189,13 @@ The above lifecycles should be removed. Learn more about this warning here:
189
189
  https://reactjs.org/link/unsafe-component-lifecycles`,Be,gt,ee!==null?`
190
190
  `+ee:"",ae!==null?`
191
191
  `+ae:"",ce!==null?`
192
- `+ce:""))}}}return l&&Ux(e,d,m),L}function fA(e,t){var o=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),o!==t.state&&(h("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Rt(e)||"Component"),ib.enqueueReplaceState(t,t.state,null))}function G_(e,t,o,l){var d=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,l),t.state!==d){{var m=Rt(e)||"Component";K0.has(m)||(K0.add(m),h("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",m))}ib.enqueueReplaceState(t,t.state,null)}}function ab(e,t,o,l){dA(e,t,o);var d=e.stateNode;d.props=o,d.state=e.memoizedState,d.refs={},p0(e);var m=t.contextType;if(typeof m=="object"&&m!==null)d.context=yr(m);else{var w=of(e,t,!0);d.context=sf(e,w)}{if(d.state===o){var x=en(t)||"Component";eb.has(x)||(eb.add(x),h("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",x))}e.mode&_n&&yo.recordLegacyContextWarning(e,d),yo.recordUnsafeLifecycleWarnings(e,d)}d.state=e.memoizedState;var E=t.getDerivedStateFromProps;if(typeof E=="function"&&(rb(e,t,E,o),d.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof d.getSnapshotBeforeUpdate!="function"&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(fA(e,d),yg(e,o,d,l),d.state=e.memoizedState),typeof d.componentDidMount=="function"){var D=Jt;D|=oo,(e.mode&sn)!==ht&&(D|=Vo),e.flags|=D}}function hA(e,t,o,l){var d=e.stateNode,m=e.memoizedProps;d.props=m;var w=d.context,x=t.contextType,E=wa;if(typeof x=="object"&&x!==null)E=yr(x);else{var D=of(e,t,!0);E=sf(e,D)}var L=t.getDerivedStateFromProps,W=typeof L=="function"||typeof d.getSnapshotBeforeUpdate=="function";!W&&(typeof d.UNSAFE_componentWillReceiveProps=="function"||typeof d.componentWillReceiveProps=="function")&&(m!==o||w!==E)&&G_(e,d,o,E),u_();var H=e.memoizedState,ee=d.state=H;if(yg(e,o,d,l),ee=e.memoizedState,m===o&&H===ee&&!Zm()&&!wg()){if(typeof d.componentDidMount=="function"){var ae=Jt;ae|=oo,(e.mode&sn)!==ht&&(ae|=Vo),e.flags|=ae}return!1}typeof L=="function"&&(rb(e,t,L,o),ee=e.memoizedState);var ce=wg()||W_(e,t,m,o,H,ee,E);if(ce){if(!W&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"){var Be=Jt;Be|=oo,(e.mode&sn)!==ht&&(Be|=Vo),e.flags|=Be}}else{if(typeof d.componentDidMount=="function"){var gt=Jt;gt|=oo,(e.mode&sn)!==ht&&(gt|=Vo),e.flags|=gt}e.memoizedProps=o,e.memoizedState=ee}return d.props=o,d.state=ee,d.context=E,ce}function pA(e,t,o,l,d){var m=t.stateNode;l_(e,t);var w=t.memoizedProps,x=t.type===t.elementType?w:So(t.type,w);m.props=x;var E=t.pendingProps,D=m.context,L=o.contextType,W=wa;if(typeof L=="object"&&L!==null)W=yr(L);else{var H=of(t,o,!0);W=sf(t,H)}var ee=o.getDerivedStateFromProps,ae=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function";!ae&&(typeof m.UNSAFE_componentWillReceiveProps=="function"||typeof m.componentWillReceiveProps=="function")&&(w!==E||D!==W)&&G_(t,m,l,W),u_();var ce=t.memoizedState,Be=m.state=ce;if(yg(t,l,m,d),Be=t.memoizedState,w===E&&ce===Be&&!Zm()&&!wg()&&!je)return typeof m.componentDidUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=Jt),typeof m.getSnapshotBeforeUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=cr),!1;typeof ee=="function"&&(rb(t,o,ee,l),Be=t.memoizedState);var gt=wg()||W_(t,o,x,l,ce,Be,W)||je;return gt?(!ae&&(typeof m.UNSAFE_componentWillUpdate=="function"||typeof m.componentWillUpdate=="function")&&(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,Be,W),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,Be,W)),typeof m.componentDidUpdate=="function"&&(t.flags|=Jt),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=cr)):(typeof m.componentDidUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=Jt),typeof m.getSnapshotBeforeUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=cr),t.memoizedProps=l,t.memoizedState=Be),m.props=l,m.state=Be,m.context=W,gt}function Oc(e,t){return{value:e,source:t,stack:eo(t),digest:null}}function ob(e,t,o){return{value:e,source:null,stack:o??null,digest:t??null}}function vA(e,t){return!0}function sb(e,t){try{var o=vA(e,t);if(o===!1)return;var l=t.value,d=t.source,m=t.stack,w=m!==null?m:"";if(l!=null&&l._suppressLogging){if(e.tag===_)return;console.error(l)}var x=d?Rt(d):null,E=x?"The above error occurred in the <"+x+"> component:":"The above error occurred in one of your React components:",D;if(e.tag===R)D=`Consider adding an error boundary to your tree to customize error handling behavior.
192
+ `+ce:""))}}}return l&&Ux(e,d,m),L}function hA(e,t){var o=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),o!==t.state&&(h("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Rt(e)||"Component"),ib.enqueueReplaceState(t,t.state,null))}function G_(e,t,o,l){var d=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,l),t.state!==d){{var m=Rt(e)||"Component";K0.has(m)||(K0.add(m),h("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",m))}ib.enqueueReplaceState(t,t.state,null)}}function ab(e,t,o,l){fA(e,t,o);var d=e.stateNode;d.props=o,d.state=e.memoizedState,d.refs={},p0(e);var m=t.contextType;if(typeof m=="object"&&m!==null)d.context=yr(m);else{var w=of(e,t,!0);d.context=sf(e,w)}{if(d.state===o){var x=en(t)||"Component";eb.has(x)||(eb.add(x),h("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",x))}e.mode&_n&&yo.recordLegacyContextWarning(e,d),yo.recordUnsafeLifecycleWarnings(e,d)}d.state=e.memoizedState;var E=t.getDerivedStateFromProps;if(typeof E=="function"&&(rb(e,t,E,o),d.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof d.getSnapshotBeforeUpdate!="function"&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(hA(e,d),yg(e,o,d,l),d.state=e.memoizedState),typeof d.componentDidMount=="function"){var D=Jt;D|=oo,(e.mode&sn)!==ht&&(D|=Vo),e.flags|=D}}function pA(e,t,o,l){var d=e.stateNode,m=e.memoizedProps;d.props=m;var w=d.context,x=t.contextType,E=wa;if(typeof x=="object"&&x!==null)E=yr(x);else{var D=of(e,t,!0);E=sf(e,D)}var L=t.getDerivedStateFromProps,W=typeof L=="function"||typeof d.getSnapshotBeforeUpdate=="function";!W&&(typeof d.UNSAFE_componentWillReceiveProps=="function"||typeof d.componentWillReceiveProps=="function")&&(m!==o||w!==E)&&G_(e,d,o,E),u_();var H=e.memoizedState,ee=d.state=H;if(yg(e,o,d,l),ee=e.memoizedState,m===o&&H===ee&&!Zm()&&!wg()){if(typeof d.componentDidMount=="function"){var ae=Jt;ae|=oo,(e.mode&sn)!==ht&&(ae|=Vo),e.flags|=ae}return!1}typeof L=="function"&&(rb(e,t,L,o),ee=e.memoizedState);var ce=wg()||W_(e,t,m,o,H,ee,E);if(ce){if(!W&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"){var Be=Jt;Be|=oo,(e.mode&sn)!==ht&&(Be|=Vo),e.flags|=Be}}else{if(typeof d.componentDidMount=="function"){var gt=Jt;gt|=oo,(e.mode&sn)!==ht&&(gt|=Vo),e.flags|=gt}e.memoizedProps=o,e.memoizedState=ee}return d.props=o,d.state=ee,d.context=E,ce}function vA(e,t,o,l,d){var m=t.stateNode;l_(e,t);var w=t.memoizedProps,x=t.type===t.elementType?w:So(t.type,w);m.props=x;var E=t.pendingProps,D=m.context,L=o.contextType,W=wa;if(typeof L=="object"&&L!==null)W=yr(L);else{var H=of(t,o,!0);W=sf(t,H)}var ee=o.getDerivedStateFromProps,ae=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function";!ae&&(typeof m.UNSAFE_componentWillReceiveProps=="function"||typeof m.componentWillReceiveProps=="function")&&(w!==E||D!==W)&&G_(t,m,l,W),u_();var ce=t.memoizedState,Be=m.state=ce;if(yg(t,l,m,d),Be=t.memoizedState,w===E&&ce===Be&&!Zm()&&!wg()&&!je)return typeof m.componentDidUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=Jt),typeof m.getSnapshotBeforeUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=cr),!1;typeof ee=="function"&&(rb(t,o,ee,l),Be=t.memoizedState);var gt=wg()||W_(t,o,x,l,ce,Be,W)||je;return gt?(!ae&&(typeof m.UNSAFE_componentWillUpdate=="function"||typeof m.componentWillUpdate=="function")&&(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,Be,W),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,Be,W)),typeof m.componentDidUpdate=="function"&&(t.flags|=Jt),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=cr)):(typeof m.componentDidUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=Jt),typeof m.getSnapshotBeforeUpdate=="function"&&(w!==e.memoizedProps||ce!==e.memoizedState)&&(t.flags|=cr),t.memoizedProps=l,t.memoizedState=Be),m.props=l,m.state=Be,m.context=W,gt}function Oc(e,t){return{value:e,source:t,stack:eo(t),digest:null}}function ob(e,t,o){return{value:e,source:null,stack:o??null,digest:t??null}}function mA(e,t){return!0}function sb(e,t){try{var o=mA(e,t);if(o===!1)return;var l=t.value,d=t.source,m=t.stack,w=m!==null?m:"";if(l!=null&&l._suppressLogging){if(e.tag===_)return;console.error(l)}var x=d?Rt(d):null,E=x?"The above error occurred in the <"+x+"> component:":"The above error occurred in one of your React components:",D;if(e.tag===R)D=`Consider adding an error boundary to your tree to customize error handling behavior.
193
193
  Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var L=Rt(e)||"Anonymous";D="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+L+".")}var W=E+`
194
194
  `+w+`
195
195
 
196
- `+(""+D);console.error(W)}catch(H){setTimeout(function(){throw H})}}var mA=typeof WeakMap=="function"?WeakMap:Map;function K_(e,t,o){var l=ul(Cn,o);l.tag=f0,l.payload={element:null};var d=t.value;return l.callback=function(){lN(d),sb(e,t)},l}function lb(e,t,o){var l=ul(Cn,o);l.tag=f0;var d=e.type.getDerivedStateFromError;if(typeof d=="function"){var m=t.value;l.payload=function(){return d(m)},l.callback=function(){ok(e),sb(e,t)}}var w=e.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(l.callback=function(){ok(e),sb(e,t),typeof d!="function"&&oN(this);var E=t.value,D=t.stack;this.componentDidCatch(E,{componentStack:D!==null?D:""}),typeof d!="function"&&(vi(e.lanes,_t)||h("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Rt(e)||"Unknown"))}),l}function J_(e,t,o){var l=e.pingCache,d;if(l===null?(l=e.pingCache=new mA,d=new Set,l.set(t,d)):(d=l.get(t),d===void 0&&(d=new Set,l.set(t,d))),!d.has(o)){d.add(o);var m=uN.bind(null,e,t,o);hi&&qp(e,o),t.then(m,m)}}function gA(e,t,o,l){var d=e.updateQueue;if(d===null){var m=new Set;m.add(o),e.updateQueue=m}else d.add(o)}function yA(e,t){var o=e.tag;if((e.mode&Bt)===ht&&(o===b||o===I||o===ne)){var l=e.alternate;l?(e.updateQueue=l.updateQueue,e.memoizedState=l.memoizedState,e.lanes=l.lanes):(e.updateQueue=null,e.memoizedState=null)}}function X_(e){var t=e;do{if(t.tag===le&&QO(t))return t;t=t.return}while(t!==null);return null}function Q_(e,t,o,l,d){if((e.mode&Bt)===ht){if(e===t)e.flags|=pr;else{if(e.flags|=lt,o.flags|=ld,o.flags&=-52805,o.tag===_){var m=o.alternate;if(m===null)o.tag=oe;else{var w=ul(Cn,_t);w.tag=pg,ou(o,w,_t)}}o.lanes=Pt(o.lanes,_t)}return e}return e.flags|=pr,e.lanes=d,e}function wA(e,t,o,l,d){if(o.flags|=$u,hi&&qp(e,d),l!==null&&typeof l=="object"&&typeof l.then=="function"){var m=l;yA(o),Xr()&&o.mode&Bt&&Hx();var w=X_(t);if(w!==null){w.flags&=~Ur,Q_(w,t,o,e,d),w.mode&Bt&&J_(e,m,d),gA(w,e,m);return}else{if(!rm(d)){J_(e,m,d),Fb();return}var x=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");l=x}}else if(Xr()&&o.mode&Bt){Hx();var E=X_(t);if(E!==null){(E.flags&pr)===ft&&(E.flags|=Ur),Q_(E,t,o,e,d),e0(Oc(l,o));return}}l=Oc(l,o),QD(l);var D=t;do{switch(D.tag){case R:{var L=l;D.flags|=pr;var W=Zu(d);D.lanes=Pt(D.lanes,W);var H=K_(D,L,W);v0(D,H);return}case _:var ee=l,ae=D.type,ce=D.stateNode;if((D.flags&lt)===ft&&(typeof ae.getDerivedStateFromError=="function"||ce!==null&&typeof ce.componentDidCatch=="function"&&!XE(ce))){D.flags|=pr;var Be=Zu(d);D.lanes=Pt(D.lanes,Be);var gt=lb(D,ee,Be);v0(D,gt);return}break}D=D.return}while(D!==null)}function bA(){return null}var Ap=s.ReactCurrentOwner,xo=!1,ub,Dp,cb,db,fb,Ac,hb,Hg,Np;ub={},Dp={},cb={},db={},fb={},Ac=!1,hb={},Hg={},Np={};function Ni(e,t,o,l){e===null?t.child=t_(t,null,o,l):t.child=df(t,e.child,o,l)}function SA(e,t,o,l){t.child=df(t,e.child,null,l),t.child=df(t,null,o,l)}function Z_(e,t,o,l,d){if(t.type!==t.elementType){var m=o.propTypes;m&&mo(m,l,"prop",en(o))}var w=o.render,x=t.ref,E,D;hf(t,d),Ri(t);{if(Ap.current=t,ur(!0),E=wf(e,t,w,l,x,d),D=bf(),t.mode&_n){zn(!0);try{E=wf(e,t,w,l,x,d),D=bf()}finally{zn(!1)}}ur(!1)}return Oi(),e!==null&&!xo?(v_(e,t,d),cl(e,t,d)):(Xr()&&D&&Gw(t),t.flags|=pa,Ni(e,t,E,d),t.child)}function eE(e,t,o,l,d){if(e===null){var m=o.type;if(CN(m)&&o.compare===null&&o.defaultProps===void 0){var w=m;return w=Rf(m),t.tag=ne,t.type=w,mb(t,m),tE(e,t,w,l,d)}{var x=m.propTypes;if(x&&mo(x,l,"prop",en(m)),o.defaultProps!==void 0){var E=en(m)||"Unknown";Np[E]||(h("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",E),Np[E]=!0)}}var D=Qb(o.type,null,l,t,t.mode,d);return D.ref=t.ref,D.return=t,t.child=D,D}{var L=o.type,W=L.propTypes;W&&mo(W,l,"prop",en(L))}var H=e.child,ee=xb(e,d);if(!ee){var ae=H.memoizedProps,ce=o.compare;if(ce=ce!==null?ce:et,ce(ae,l)&&e.ref===t.ref)return cl(e,t,d)}t.flags|=pa;var Be=Pc(H,l);return Be.ref=t.ref,Be.return=t,t.child=Be,Be}function tE(e,t,o,l,d){if(t.type!==t.elementType){var m=t.elementType;if(m.$$typeof===At){var w=m,x=w._payload,E=w._init;try{m=E(x)}catch{m=null}var D=m&&m.propTypes;D&&mo(D,l,"prop",en(m))}}if(e!==null){var L=e.memoizedProps;if(et(L,l)&&e.ref===t.ref&&t.type===e.type)if(xo=!1,t.pendingProps=l=L,xb(e,d))(e.flags&ld)!==ft&&(xo=!0);else return t.lanes=e.lanes,cl(e,t,d)}return pb(e,t,o,l,d)}function nE(e,t,o){var l=t.pendingProps,d=l.children,m=e!==null?e.memoizedState:null;if(l.mode==="hidden"||Re)if((t.mode&Bt)===ht){var w={baseLanes:ye,cachePool:null,transitions:null};t.memoizedState=w,ny(t,o)}else if(vi(o,pi)){var W={baseLanes:ye,cachePool:null,transitions:null};t.memoizedState=W;var H=m!==null?m.baseLanes:o;ny(t,H)}else{var x=null,E;if(m!==null){var D=m.baseLanes;E=Pt(D,o)}else E=o;t.lanes=t.childLanes=pi;var L={baseLanes:E,cachePool:x,transitions:null};return t.memoizedState=L,t.updateQueue=null,ny(t,E),null}else{var ee;m!==null?(ee=Pt(m.baseLanes,o),t.memoizedState=null):ee=o,ny(t,ee)}return Ni(e,t,d,o),t.child}function xA(e,t,o){var l=t.pendingProps;return Ni(e,t,l,o),t.child}function _A(e,t,o){var l=t.pendingProps.children;return Ni(e,t,l,o),t.child}function EA(e,t,o){{t.flags|=Jt;{var l=t.stateNode;l.effectDuration=0,l.passiveEffectDuration=0}}var d=t.pendingProps,m=d.children;return Ni(e,t,m,o),t.child}function rE(e,t){var o=t.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(t.flags|=Vn,t.flags|=Fl)}function pb(e,t,o,l,d){if(t.type!==t.elementType){var m=o.propTypes;m&&mo(m,l,"prop",en(o))}var w;{var x=of(t,o,!0);w=sf(t,x)}var E,D;hf(t,d),Ri(t);{if(Ap.current=t,ur(!0),E=wf(e,t,o,l,w,d),D=bf(),t.mode&_n){zn(!0);try{E=wf(e,t,o,l,w,d),D=bf()}finally{zn(!1)}}ur(!1)}return Oi(),e!==null&&!xo?(v_(e,t,d),cl(e,t,d)):(Xr()&&D&&Gw(t),t.flags|=pa,Ni(e,t,E,d),t.child)}function iE(e,t,o,l,d){{switch(FN(t)){case!1:{var m=t.stateNode,w=t.type,x=new w(t.memoizedProps,m.context),E=x.state;m.updater.enqueueSetState(m,E,null);break}case!0:{t.flags|=lt,t.flags|=pr;var D=new Error("Simulated error coming from DevTools"),L=Zu(d);t.lanes=Pt(t.lanes,L);var W=lb(t,Oc(D,t),L);v0(t,W);break}}if(t.type!==t.elementType){var H=o.propTypes;H&&mo(H,l,"prop",en(o))}}var ee;ss(o)?(ee=!0,tg(t)):ee=!1,hf(t,d);var ae=t.stateNode,ce;ae===null?(Wg(e,t),Y_(t,o,l),ab(t,o,l,d),ce=!0):e===null?ce=hA(t,o,l,d):ce=pA(e,t,o,l,d);var Be=vb(e,t,o,ce,ee,d);{var gt=t.stateNode;ce&&gt.props!==l&&(Ac||h("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Rt(t)||"a component"),Ac=!0)}return Be}function vb(e,t,o,l,d,m){rE(e,t);var w=(t.flags&lt)!==ft;if(!l&&!w)return d&&Ix(t,o,!1),cl(e,t,m);var x=t.stateNode;Ap.current=t;var E;if(w&&typeof o.getDerivedStateFromError!="function")E=null,B_();else{Ri(t);{if(ur(!0),E=x.render(),t.mode&_n){zn(!0);try{x.render()}finally{zn(!1)}}ur(!1)}Oi()}return t.flags|=pa,e!==null&&w?SA(e,t,E,m):Ni(e,t,E,m),t.memoizedState=x.state,d&&Ix(t,o,!0),t.child}function aE(e){var t=e.stateNode;t.pendingContext?Mx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mx(e,t.context,!1),m0(e,t.containerInfo)}function kA(e,t,o){if(aE(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var l=t.pendingProps,d=t.memoizedState,m=d.element;l_(e,t),yg(t,l,null,o);var w=t.memoizedState;t.stateNode;var x=w.element;if(d.isDehydrated){var E={element:x,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},D=t.updateQueue;if(D.baseState=E,t.memoizedState=E,t.flags&Ur){var L=Oc(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t);return oE(e,t,x,o,L)}else if(x!==m){var W=Oc(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return oE(e,t,x,o,W)}else{RO(t);var H=t_(t,null,x,o);t.child=H;for(var ee=H;ee;)ee.flags=ee.flags&~In|ci,ee=ee.sibling}}else{if(cf(),x===m)return cl(e,t,o);Ni(e,t,x,o)}return t.child}function oE(e,t,o,l,d){return cf(),e0(d),t.flags|=Ur,Ni(e,t,o,l),t.child}function CA(e,t,o){f_(t),e===null&&Zw(t);var l=t.type,d=t.pendingProps,m=e!==null?e.memoizedProps:null,w=d.children,x=Lw(l,d);return x?w=null:m!==null&&Lw(l,m)&&(t.flags|=Hi),rE(e,t),Ni(e,t,w,o),t.child}function TA(e,t){return e===null&&Zw(t),null}function RA(e,t,o,l){Wg(e,t);var d=t.pendingProps,m=o,w=m._payload,x=m._init,E=x(w);t.type=E;var D=t.tag=TN(E),L=So(E,d),W;switch(D){case b:return mb(t,E),t.type=E=Rf(E),W=pb(null,t,E,L,l),W;case _:return t.type=E=qb(E),W=iE(null,t,E,L,l),W;case I:return t.type=E=Yb(E),W=Z_(null,t,E,L,l),W;case fe:{if(t.type!==t.elementType){var H=E.propTypes;H&&mo(H,L,"prop",en(E))}return W=eE(null,t,E,So(E.type,L),l),W}}var ee="";throw E!==null&&typeof E=="object"&&E.$$typeof===At&&(ee=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+E+". "+("Lazy element type must resolve to a class or function."+ee))}function OA(e,t,o,l,d){Wg(e,t),t.tag=_;var m;return ss(o)?(m=!0,tg(t)):m=!1,hf(t,d),Y_(t,o,l),ab(t,o,l,d),vb(null,t,o,!0,m,d)}function AA(e,t,o,l){Wg(e,t);var d=t.pendingProps,m;{var w=of(t,o,!1);m=sf(t,w)}hf(t,l);var x,E;Ri(t);{if(o.prototype&&typeof o.prototype.render=="function"){var D=en(o)||"Unknown";ub[D]||(h("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",D,D),ub[D]=!0)}t.mode&_n&&yo.recordLegacyContextWarning(t,null),ur(!0),Ap.current=t,x=wf(null,t,o,d,m,l),E=bf(),ur(!1)}if(Oi(),t.flags|=pa,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0){var L=en(o)||"Unknown";Dp[L]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",L,L,L),Dp[L]=!0)}if(typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0){{var W=en(o)||"Unknown";Dp[W]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",W,W,W),Dp[W]=!0)}t.tag=_,t.memoizedState=null,t.updateQueue=null;var H=!1;return ss(o)?(H=!0,tg(t)):H=!1,t.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,p0(t),q_(t,x),ab(t,o,d,l),vb(null,t,o,!0,H,l)}else{if(t.tag=b,t.mode&_n){zn(!0);try{x=wf(null,t,o,d,m,l),E=bf()}finally{zn(!1)}}return Xr()&&E&&Gw(t),Ni(null,t,x,l),mb(t,o),t.child}}function mb(e,t){{if(t&&t.childContextTypes&&h("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var o="",l=Vr();l&&(o+=`
196
+ `+(""+D);console.error(W)}catch(H){setTimeout(function(){throw H})}}var gA=typeof WeakMap=="function"?WeakMap:Map;function K_(e,t,o){var l=ul(Cn,o);l.tag=f0,l.payload={element:null};var d=t.value;return l.callback=function(){uN(d),sb(e,t)},l}function lb(e,t,o){var l=ul(Cn,o);l.tag=f0;var d=e.type.getDerivedStateFromError;if(typeof d=="function"){var m=t.value;l.payload=function(){return d(m)},l.callback=function(){ok(e),sb(e,t)}}var w=e.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(l.callback=function(){ok(e),sb(e,t),typeof d!="function"&&sN(this);var E=t.value,D=t.stack;this.componentDidCatch(E,{componentStack:D!==null?D:""}),typeof d!="function"&&(vi(e.lanes,_t)||h("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Rt(e)||"Unknown"))}),l}function J_(e,t,o){var l=e.pingCache,d;if(l===null?(l=e.pingCache=new gA,d=new Set,l.set(t,d)):(d=l.get(t),d===void 0&&(d=new Set,l.set(t,d))),!d.has(o)){d.add(o);var m=cN.bind(null,e,t,o);hi&&qp(e,o),t.then(m,m)}}function yA(e,t,o,l){var d=e.updateQueue;if(d===null){var m=new Set;m.add(o),e.updateQueue=m}else d.add(o)}function wA(e,t){var o=e.tag;if((e.mode&Bt)===ht&&(o===b||o===I||o===ne)){var l=e.alternate;l?(e.updateQueue=l.updateQueue,e.memoizedState=l.memoizedState,e.lanes=l.lanes):(e.updateQueue=null,e.memoizedState=null)}}function X_(e){var t=e;do{if(t.tag===le&&ZO(t))return t;t=t.return}while(t!==null);return null}function Q_(e,t,o,l,d){if((e.mode&Bt)===ht){if(e===t)e.flags|=pr;else{if(e.flags|=lt,o.flags|=ld,o.flags&=-52805,o.tag===_){var m=o.alternate;if(m===null)o.tag=oe;else{var w=ul(Cn,_t);w.tag=pg,ou(o,w,_t)}}o.lanes=Pt(o.lanes,_t)}return e}return e.flags|=pr,e.lanes=d,e}function bA(e,t,o,l,d){if(o.flags|=$u,hi&&qp(e,d),l!==null&&typeof l=="object"&&typeof l.then=="function"){var m=l;wA(o),Xr()&&o.mode&Bt&&Hx();var w=X_(t);if(w!==null){w.flags&=~Ur,Q_(w,t,o,e,d),w.mode&Bt&&J_(e,m,d),yA(w,e,m);return}else{if(!rm(d)){J_(e,m,d),Fb();return}var x=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");l=x}}else if(Xr()&&o.mode&Bt){Hx();var E=X_(t);if(E!==null){(E.flags&pr)===ft&&(E.flags|=Ur),Q_(E,t,o,e,d),e0(Oc(l,o));return}}l=Oc(l,o),ZD(l);var D=t;do{switch(D.tag){case R:{var L=l;D.flags|=pr;var W=Zu(d);D.lanes=Pt(D.lanes,W);var H=K_(D,L,W);v0(D,H);return}case _:var ee=l,ae=D.type,ce=D.stateNode;if((D.flags&lt)===ft&&(typeof ae.getDerivedStateFromError=="function"||ce!==null&&typeof ce.componentDidCatch=="function"&&!XE(ce))){D.flags|=pr;var Be=Zu(d);D.lanes=Pt(D.lanes,Be);var gt=lb(D,ee,Be);v0(D,gt);return}break}D=D.return}while(D!==null)}function SA(){return null}var Ap=s.ReactCurrentOwner,xo=!1,ub,Dp,cb,db,fb,Ac,hb,Hg,Np;ub={},Dp={},cb={},db={},fb={},Ac=!1,hb={},Hg={},Np={};function Ni(e,t,o,l){e===null?t.child=t_(t,null,o,l):t.child=df(t,e.child,o,l)}function xA(e,t,o,l){t.child=df(t,e.child,null,l),t.child=df(t,null,o,l)}function Z_(e,t,o,l,d){if(t.type!==t.elementType){var m=o.propTypes;m&&mo(m,l,"prop",en(o))}var w=o.render,x=t.ref,E,D;hf(t,d),Ri(t);{if(Ap.current=t,ur(!0),E=wf(e,t,w,l,x,d),D=bf(),t.mode&_n){zn(!0);try{E=wf(e,t,w,l,x,d),D=bf()}finally{zn(!1)}}ur(!1)}return Oi(),e!==null&&!xo?(v_(e,t,d),cl(e,t,d)):(Xr()&&D&&Gw(t),t.flags|=pa,Ni(e,t,E,d),t.child)}function eE(e,t,o,l,d){if(e===null){var m=o.type;if(TN(m)&&o.compare===null&&o.defaultProps===void 0){var w=m;return w=Rf(m),t.tag=ne,t.type=w,mb(t,m),tE(e,t,w,l,d)}{var x=m.propTypes;if(x&&mo(x,l,"prop",en(m)),o.defaultProps!==void 0){var E=en(m)||"Unknown";Np[E]||(h("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",E),Np[E]=!0)}}var D=Qb(o.type,null,l,t,t.mode,d);return D.ref=t.ref,D.return=t,t.child=D,D}{var L=o.type,W=L.propTypes;W&&mo(W,l,"prop",en(L))}var H=e.child,ee=xb(e,d);if(!ee){var ae=H.memoizedProps,ce=o.compare;if(ce=ce!==null?ce:et,ce(ae,l)&&e.ref===t.ref)return cl(e,t,d)}t.flags|=pa;var Be=Pc(H,l);return Be.ref=t.ref,Be.return=t,t.child=Be,Be}function tE(e,t,o,l,d){if(t.type!==t.elementType){var m=t.elementType;if(m.$$typeof===At){var w=m,x=w._payload,E=w._init;try{m=E(x)}catch{m=null}var D=m&&m.propTypes;D&&mo(D,l,"prop",en(m))}}if(e!==null){var L=e.memoizedProps;if(et(L,l)&&e.ref===t.ref&&t.type===e.type)if(xo=!1,t.pendingProps=l=L,xb(e,d))(e.flags&ld)!==ft&&(xo=!0);else return t.lanes=e.lanes,cl(e,t,d)}return pb(e,t,o,l,d)}function nE(e,t,o){var l=t.pendingProps,d=l.children,m=e!==null?e.memoizedState:null;if(l.mode==="hidden"||Re)if((t.mode&Bt)===ht){var w={baseLanes:ye,cachePool:null,transitions:null};t.memoizedState=w,ny(t,o)}else if(vi(o,pi)){var W={baseLanes:ye,cachePool:null,transitions:null};t.memoizedState=W;var H=m!==null?m.baseLanes:o;ny(t,H)}else{var x=null,E;if(m!==null){var D=m.baseLanes;E=Pt(D,o)}else E=o;t.lanes=t.childLanes=pi;var L={baseLanes:E,cachePool:x,transitions:null};return t.memoizedState=L,t.updateQueue=null,ny(t,E),null}else{var ee;m!==null?(ee=Pt(m.baseLanes,o),t.memoizedState=null):ee=o,ny(t,ee)}return Ni(e,t,d,o),t.child}function _A(e,t,o){var l=t.pendingProps;return Ni(e,t,l,o),t.child}function EA(e,t,o){var l=t.pendingProps.children;return Ni(e,t,l,o),t.child}function kA(e,t,o){{t.flags|=Jt;{var l=t.stateNode;l.effectDuration=0,l.passiveEffectDuration=0}}var d=t.pendingProps,m=d.children;return Ni(e,t,m,o),t.child}function rE(e,t){var o=t.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(t.flags|=Vn,t.flags|=Fl)}function pb(e,t,o,l,d){if(t.type!==t.elementType){var m=o.propTypes;m&&mo(m,l,"prop",en(o))}var w;{var x=of(t,o,!0);w=sf(t,x)}var E,D;hf(t,d),Ri(t);{if(Ap.current=t,ur(!0),E=wf(e,t,o,l,w,d),D=bf(),t.mode&_n){zn(!0);try{E=wf(e,t,o,l,w,d),D=bf()}finally{zn(!1)}}ur(!1)}return Oi(),e!==null&&!xo?(v_(e,t,d),cl(e,t,d)):(Xr()&&D&&Gw(t),t.flags|=pa,Ni(e,t,E,d),t.child)}function iE(e,t,o,l,d){{switch(BN(t)){case!1:{var m=t.stateNode,w=t.type,x=new w(t.memoizedProps,m.context),E=x.state;m.updater.enqueueSetState(m,E,null);break}case!0:{t.flags|=lt,t.flags|=pr;var D=new Error("Simulated error coming from DevTools"),L=Zu(d);t.lanes=Pt(t.lanes,L);var W=lb(t,Oc(D,t),L);v0(t,W);break}}if(t.type!==t.elementType){var H=o.propTypes;H&&mo(H,l,"prop",en(o))}}var ee;ss(o)?(ee=!0,tg(t)):ee=!1,hf(t,d);var ae=t.stateNode,ce;ae===null?(Wg(e,t),Y_(t,o,l),ab(t,o,l,d),ce=!0):e===null?ce=pA(t,o,l,d):ce=vA(e,t,o,l,d);var Be=vb(e,t,o,ce,ee,d);{var gt=t.stateNode;ce&&gt.props!==l&&(Ac||h("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Rt(t)||"a component"),Ac=!0)}return Be}function vb(e,t,o,l,d,m){rE(e,t);var w=(t.flags&lt)!==ft;if(!l&&!w)return d&&Ix(t,o,!1),cl(e,t,m);var x=t.stateNode;Ap.current=t;var E;if(w&&typeof o.getDerivedStateFromError!="function")E=null,B_();else{Ri(t);{if(ur(!0),E=x.render(),t.mode&_n){zn(!0);try{x.render()}finally{zn(!1)}}ur(!1)}Oi()}return t.flags|=pa,e!==null&&w?xA(e,t,E,m):Ni(e,t,E,m),t.memoizedState=x.state,d&&Ix(t,o,!0),t.child}function aE(e){var t=e.stateNode;t.pendingContext?Mx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mx(e,t.context,!1),m0(e,t.containerInfo)}function CA(e,t,o){if(aE(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var l=t.pendingProps,d=t.memoizedState,m=d.element;l_(e,t),yg(t,l,null,o);var w=t.memoizedState;t.stateNode;var x=w.element;if(d.isDehydrated){var E={element:x,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},D=t.updateQueue;if(D.baseState=E,t.memoizedState=E,t.flags&Ur){var L=Oc(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t);return oE(e,t,x,o,L)}else if(x!==m){var W=Oc(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return oE(e,t,x,o,W)}else{OO(t);var H=t_(t,null,x,o);t.child=H;for(var ee=H;ee;)ee.flags=ee.flags&~In|ci,ee=ee.sibling}}else{if(cf(),x===m)return cl(e,t,o);Ni(e,t,x,o)}return t.child}function oE(e,t,o,l,d){return cf(),e0(d),t.flags|=Ur,Ni(e,t,o,l),t.child}function TA(e,t,o){f_(t),e===null&&Zw(t);var l=t.type,d=t.pendingProps,m=e!==null?e.memoizedProps:null,w=d.children,x=Lw(l,d);return x?w=null:m!==null&&Lw(l,m)&&(t.flags|=Hi),rE(e,t),Ni(e,t,w,o),t.child}function RA(e,t){return e===null&&Zw(t),null}function OA(e,t,o,l){Wg(e,t);var d=t.pendingProps,m=o,w=m._payload,x=m._init,E=x(w);t.type=E;var D=t.tag=RN(E),L=So(E,d),W;switch(D){case b:return mb(t,E),t.type=E=Rf(E),W=pb(null,t,E,L,l),W;case _:return t.type=E=qb(E),W=iE(null,t,E,L,l),W;case I:return t.type=E=Yb(E),W=Z_(null,t,E,L,l),W;case fe:{if(t.type!==t.elementType){var H=E.propTypes;H&&mo(H,L,"prop",en(E))}return W=eE(null,t,E,So(E.type,L),l),W}}var ee="";throw E!==null&&typeof E=="object"&&E.$$typeof===At&&(ee=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+E+". "+("Lazy element type must resolve to a class or function."+ee))}function AA(e,t,o,l,d){Wg(e,t),t.tag=_;var m;return ss(o)?(m=!0,tg(t)):m=!1,hf(t,d),Y_(t,o,l),ab(t,o,l,d),vb(null,t,o,!0,m,d)}function DA(e,t,o,l){Wg(e,t);var d=t.pendingProps,m;{var w=of(t,o,!1);m=sf(t,w)}hf(t,l);var x,E;Ri(t);{if(o.prototype&&typeof o.prototype.render=="function"){var D=en(o)||"Unknown";ub[D]||(h("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",D,D),ub[D]=!0)}t.mode&_n&&yo.recordLegacyContextWarning(t,null),ur(!0),Ap.current=t,x=wf(null,t,o,d,m,l),E=bf(),ur(!1)}if(Oi(),t.flags|=pa,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0){var L=en(o)||"Unknown";Dp[L]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",L,L,L),Dp[L]=!0)}if(typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0){{var W=en(o)||"Unknown";Dp[W]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",W,W,W),Dp[W]=!0)}t.tag=_,t.memoizedState=null,t.updateQueue=null;var H=!1;return ss(o)?(H=!0,tg(t)):H=!1,t.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,p0(t),q_(t,x),ab(t,o,d,l),vb(null,t,o,!0,H,l)}else{if(t.tag=b,t.mode&_n){zn(!0);try{x=wf(null,t,o,d,m,l),E=bf()}finally{zn(!1)}}return Xr()&&E&&Gw(t),Ni(null,t,x,l),mb(t,o),t.child}}function mb(e,t){{if(t&&t.childContextTypes&&h("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var o="",l=Vr();l&&(o+=`
197
197
 
198
- Check the render method of \``+l+"`.");var d=l||"",m=e._debugSource;m&&(d=m.fileName+":"+m.lineNumber),fb[d]||(fb[d]=!0,h("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",o))}if(t.defaultProps!==void 0){var w=en(t)||"Unknown";Np[w]||(h("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",w),Np[w]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var x=en(t)||"Unknown";db[x]||(h("%s: Function components do not support getDerivedStateFromProps.",x),db[x]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var E=en(t)||"Unknown";cb[E]||(h("%s: Function components do not support contextType.",E),cb[E]=!0)}}}var gb={dehydrated:null,treeContext:null,retryLane:nn};function yb(e){return{baseLanes:e,cachePool:bA(),transitions:null}}function DA(e,t){var o=null;return{baseLanes:Pt(e.baseLanes,t),cachePool:o,transitions:e.transitions}}function NA(e,t,o,l){if(t!==null){var d=t.memoizedState;if(d===null)return!1}return w0(e,Sp)}function jA(e,t){return ec(e.childLanes,t)}function sE(e,t,o){var l=t.pendingProps;BN(t)&&(t.flags|=lt);var d=wo.current,m=!1,w=(t.flags&lt)!==ft;if(w||NA(d,e)?(m=!0,t.flags&=~lt):(e===null||e.memoizedState!==null)&&(d=XO(d,p_)),d=vf(d),lu(t,d),e===null){Zw(t);var x=t.memoizedState;if(x!==null){var E=x.dehydrated;if(E!==null)return $A(t,E)}var D=l.children,L=l.fallback;if(m){var W=LA(t,D,L,o),H=t.child;return H.memoizedState=yb(o),t.memoizedState=gb,W}else return wb(t,D)}else{var ee=e.memoizedState;if(ee!==null){var ae=ee.dehydrated;if(ae!==null)return IA(e,t,w,l,ae,ee,o)}if(m){var ce=l.fallback,Be=l.children,gt=UA(e,t,Be,ce,o),ot=t.child,Zt=e.child.memoizedState;return ot.memoizedState=Zt===null?yb(o):DA(Zt,o),ot.childLanes=jA(e,o),t.memoizedState=gb,gt}else{var Gt=l.children,J=PA(e,t,Gt,o);return t.memoizedState=null,J}}}function wb(e,t,o){var l=e.mode,d={mode:"visible",children:t},m=bb(d,l);return m.return=e,e.child=m,m}function LA(e,t,o,l){var d=e.mode,m=e.child,w={mode:"hidden",children:t},x,E;return(d&Bt)===ht&&m!==null?(x=m,x.childLanes=ye,x.pendingProps=w,e.mode&on&&(x.actualDuration=0,x.actualStartTime=-1,x.selfBaseDuration=0,x.treeBaseDuration=0),E=mu(o,d,l,null)):(x=bb(w,d),E=mu(o,d,l,null)),x.return=e,E.return=e,x.sibling=E,e.child=x,E}function bb(e,t,o){return lk(e,t,ye,null)}function lE(e,t){return Pc(e,t)}function PA(e,t,o,l){var d=e.child,m=d.sibling,w=lE(d,{mode:"visible",children:o});if((t.mode&Bt)===ht&&(w.lanes=l),w.return=t,w.sibling=null,m!==null){var x=t.deletions;x===null?(t.deletions=[m],t.flags|=Bi):x.push(m)}return t.child=w,w}function UA(e,t,o,l,d){var m=t.mode,w=e.child,x=w.sibling,E={mode:"hidden",children:o},D;if((m&Bt)===ht&&t.child!==w){var L=t.child;D=L,D.childLanes=ye,D.pendingProps=E,t.mode&on&&(D.actualDuration=0,D.actualStartTime=-1,D.selfBaseDuration=w.selfBaseDuration,D.treeBaseDuration=w.treeBaseDuration),t.deletions=null}else D=lE(w,E),D.subtreeFlags=w.subtreeFlags&tr;var W;return x!==null?W=Pc(x,l):(W=mu(l,m,d,null),W.flags|=In),W.return=t,D.return=t,D.sibling=W,t.child=D,W}function Vg(e,t,o,l){l!==null&&e0(l),df(t,e.child,null,o);var d=t.pendingProps,m=d.children,w=wb(t,m);return w.flags|=In,t.memoizedState=null,w}function MA(e,t,o,l,d){var m=t.mode,w={mode:"visible",children:o},x=bb(w,m),E=mu(l,m,d,null);return E.flags|=In,x.return=t,E.return=t,x.sibling=E,t.child=x,(t.mode&Bt)!==ht&&df(t,e.child,null,d),E}function $A(e,t,o){return(e.mode&Bt)===ht?(h("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=_t):$w(t)?e.lanes=Mr:e.lanes=pi,null}function IA(e,t,o,l,d,m,w){if(o)if(t.flags&Ur){t.flags&=~Ur;var J=ob(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Vg(e,t,w,J)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=lt,null;var de=l.children,X=l.fallback,Te=MA(e,t,de,X,w),Ge=t.child;return Ge.memoizedState=yb(w),t.memoizedState=gb,Te}else{if(CO(),(t.mode&Bt)===ht)return Vg(e,t,w,null);if($w(d)){var x,E,D;{var L=HR(d);x=L.digest,E=L.message,D=L.stack}var W;E?W=new Error(E):W=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var H=ob(W,x,D);return Vg(e,t,w,H)}var ee=vi(w,e.childLanes);if(xo||ee){var ae=ty();if(ae!==null){var ce=Ph(ae,w);if(ce!==nn&&ce!==m.retryLane){m.retryLane=ce;var Be=Cn;Qi(e,ce),Lr(ae,e,ce,Be)}}Fb();var gt=ob(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return Vg(e,t,w,gt)}else if(Dx(d)){t.flags|=lt,t.child=e.child;var ot=cN.bind(null,e);return VR(d,ot),null}else{OO(t,d,m.treeContext);var Zt=l.children,Gt=wb(t,Zt);return Gt.flags|=ci,Gt}}}function uE(e,t,o){e.lanes=Pt(e.lanes,t);var l=e.alternate;l!==null&&(l.lanes=Pt(l.lanes,t)),c0(e.return,t,o)}function zA(e,t,o){for(var l=t;l!==null;){if(l.tag===le){var d=l.memoizedState;d!==null&&uE(l,o,e)}else if(l.tag===ke)uE(l,o,e);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)return;for(;l.sibling===null;){if(l.return===null||l.return===e)return;l=l.return}l.sibling.return=l.return,l=l.sibling}}function FA(e){for(var t=e,o=null;t!==null;){var l=t.alternate;l!==null&&xg(l)===null&&(o=t),t=t.sibling}return o}function BA(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!hb[e])if(hb[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{h('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{h('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break}default:h('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else h('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function HA(e,t){e!==void 0&&!Hg[e]&&(e!=="collapsed"&&e!=="hidden"?(Hg[e]=!0,h('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Hg[e]=!0,h('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function cE(e,t){{var o=$t(e),l=!o&&typeof Lt(e)=="function";if(o||l){var d=o?"array":"iterable";return h("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",d,t,d),!1}}return!0}function VA(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if($t(e)){for(var o=0;o<e.length;o++)if(!cE(e[o],o))return}else{var l=Lt(e);if(typeof l=="function"){var d=l.call(e);if(d)for(var m=d.next(),w=0;!m.done;m=d.next()){if(!cE(m.value,w))return;w++}}else h('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}function Sb(e,t,o,l,d){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=d)}function dE(e,t,o){var l=t.pendingProps,d=l.revealOrder,m=l.tail,w=l.children;BA(d),HA(m,d),VA(w,d),Ni(e,t,w,o);var x=wo.current,E=w0(x,Sp);if(E)x=b0(x,Sp),t.flags|=lt;else{var D=e!==null&&(e.flags&lt)!==ft;D&&zA(t,t.child,o),x=vf(x)}if(lu(t,x),(t.mode&Bt)===ht)t.memoizedState=null;else switch(d){case"forwards":{var L=FA(t.child),W;L===null?(W=t.child,t.child=null):(W=L.sibling,L.sibling=null),Sb(t,!1,W,L,m);break}case"backwards":{var H=null,ee=t.child;for(t.child=null;ee!==null;){var ae=ee.alternate;if(ae!==null&&xg(ae)===null){t.child=ee;break}var ce=ee.sibling;ee.sibling=H,H=ee,ee=ce}Sb(t,!0,H,null,m);break}case"together":{Sb(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function WA(e,t,o){m0(t,t.stateNode.containerInfo);var l=t.pendingProps;return e===null?t.child=df(t,null,l,o):Ni(e,t,l,o),t.child}var fE=!1;function qA(e,t,o){var l=t.type,d=l._context,m=t.pendingProps,w=t.memoizedProps,x=m.value;{"value"in m||fE||(fE=!0,h("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var E=t.type.propTypes;E&&mo(E,m,"prop","Context.Provider")}if(i_(t,d,x),w!==null){var D=w.value;if(xe(D,x)){if(w.children===m.children&&!Zm())return cl(e,t,o)}else BO(t,d,o)}var L=m.children;return Ni(e,t,L,o),t.child}var hE=!1;function YA(e,t,o){var l=t.type;l._context===void 0?l!==l.Consumer&&(hE||(hE=!0,h("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):l=l._context;var d=t.pendingProps,m=d.children;typeof m!="function"&&h("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),hf(t,o);var w=yr(l);Ri(t);var x;return Ap.current=t,ur(!0),x=m(w),ur(!1),Oi(),t.flags|=pa,Ni(e,t,x,o),t.child}function jp(){xo=!0}function Wg(e,t){(t.mode&Bt)===ht&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=In)}function cl(e,t,o){return e!==null&&(t.dependencies=e.dependencies),B_(),Wp(t.lanes),vi(o,t.childLanes)?(zO(e,t),t.child):null}function GA(e,t,o){{var l=t.return;if(l===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,o.index=t.index,o.sibling=t.sibling,o.return=t.return,o.ref=t.ref,t===l.child)l.child=o;else{var d=l.child;if(d===null)throw new Error("Expected parent to have a child.");for(;d.sibling!==t;)if(d=d.sibling,d===null)throw new Error("Expected to find the previous sibling.");d.sibling=o}var m=l.deletions;return m===null?(l.deletions=[e],l.flags|=Bi):m.push(e),o.flags|=In,o}}function xb(e,t){var o=e.lanes;return!!vi(o,t)}function KA(e,t,o){switch(t.tag){case R:aE(t),t.stateNode,cf();break;case A:f_(t);break;case _:{var l=t.type;ss(l)&&tg(t);break}case N:m0(t,t.stateNode.containerInfo);break;case q:{var d=t.memoizedProps.value,m=t.type._context;i_(t,m,d);break}case ie:{var w=vi(o,t.childLanes);w&&(t.flags|=Jt);{var x=t.stateNode;x.effectDuration=0,x.passiveEffectDuration=0}}break;case le:{var E=t.memoizedState;if(E!==null){if(E.dehydrated!==null)return lu(t,vf(wo.current)),t.flags|=lt,null;var D=t.child,L=D.childLanes;if(vi(o,L))return sE(e,t,o);lu(t,vf(wo.current));var W=cl(e,t,o);return W!==null?W.sibling:null}else lu(t,vf(wo.current));break}case ke:{var H=(e.flags&lt)!==ft,ee=vi(o,t.childLanes);if(H){if(ee)return dE(e,t,o);t.flags|=lt}var ae=t.memoizedState;if(ae!==null&&(ae.rendering=null,ae.tail=null,ae.lastEffect=null),lu(t,wo.current),ee)break;return null}case ue:case Oe:return t.lanes=ye,nE(e,t,o)}return cl(e,t,o)}function pE(e,t,o){if(t._debugNeedsRemount&&e!==null)return GA(e,t,Qb(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var l=e.memoizedProps,d=t.pendingProps;if(l!==d||Zm()||t.type!==e.type)xo=!0;else{var m=xb(e,o);if(!m&&(t.flags&lt)===ft)return xo=!1,KA(e,t,o);(e.flags&ld)!==ft?xo=!0:xo=!1}}else if(xo=!1,Xr()&&bO(t)){var w=t.index,x=SO();Bx(t,x,w)}switch(t.lanes=ye,t.tag){case k:return AA(e,t,t.type,o);case $e:{var E=t.elementType;return RA(e,t,E,o)}case b:{var D=t.type,L=t.pendingProps,W=t.elementType===D?L:So(D,L);return pb(e,t,D,W,o)}case _:{var H=t.type,ee=t.pendingProps,ae=t.elementType===H?ee:So(H,ee);return iE(e,t,H,ae,o)}case R:return kA(e,t,o);case A:return CA(e,t,o);case j:return TA(e,t);case le:return sE(e,t,o);case N:return WA(e,t,o);case I:{var ce=t.type,Be=t.pendingProps,gt=t.elementType===ce?Be:So(ce,Be);return Z_(e,t,ce,gt,o)}case P:return xA(e,t,o);case F:return _A(e,t,o);case ie:return EA(e,t,o);case q:return qA(e,t,o);case Y:return YA(e,t,o);case fe:{var ot=t.type,Zt=t.pendingProps,Gt=So(ot,Zt);if(t.type!==t.elementType){var J=ot.propTypes;J&&mo(J,Gt,"prop",en(ot))}return Gt=So(ot.type,Gt),eE(e,t,ot,Gt,o)}case ne:return tE(e,t,t.type,t.pendingProps,o);case oe:{var de=t.type,X=t.pendingProps,Te=t.elementType===de?X:So(de,X);return OA(e,t,de,Te,o)}case ke:return dE(e,t,o);case me:break;case ue:return nE(e,t,o)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Sf(e){e.flags|=Jt}function vE(e){e.flags|=Vn,e.flags|=Fl}var mE,_b,gE,yE;mE=function(e,t,o,l){for(var d=t.child;d!==null;){if(d.tag===A||d.tag===j)gR(e,d.stateNode);else if(d.tag!==N){if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===t)return;for(;d.sibling===null;){if(d.return===null||d.return===t)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},_b=function(e,t){},gE=function(e,t,o,l,d){var m=e.memoizedProps;if(m!==l){var w=t.stateNode,x=g0(),E=wR(w,o,m,l,d,x);t.updateQueue=E,E&&Sf(t)}},yE=function(e,t,o,l){o!==l&&Sf(t)};function Lp(e,t){if(!Xr())switch(e.tailMode){case"hidden":{for(var o=e.tail,l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?e.tail=null:l.sibling=null;break}case"collapsed":{for(var d=e.tail,m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:m.sibling=null;break}}}function Zr(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=ye,l=ft;if(t){if((e.mode&on)!==ht){for(var E=e.selfBaseDuration,D=e.child;D!==null;)o=Pt(o,Pt(D.lanes,D.childLanes)),l|=D.subtreeFlags&tr,l|=D.flags&tr,E+=D.treeBaseDuration,D=D.sibling;e.treeBaseDuration=E}else for(var L=e.child;L!==null;)o=Pt(o,Pt(L.lanes,L.childLanes)),l|=L.subtreeFlags&tr,l|=L.flags&tr,L.return=e,L=L.sibling;e.subtreeFlags|=l}else{if((e.mode&on)!==ht){for(var d=e.actualDuration,m=e.selfBaseDuration,w=e.child;w!==null;)o=Pt(o,Pt(w.lanes,w.childLanes)),l|=w.subtreeFlags,l|=w.flags,d+=w.actualDuration,m+=w.treeBaseDuration,w=w.sibling;e.actualDuration=d,e.treeBaseDuration=m}else for(var x=e.child;x!==null;)o=Pt(o,Pt(x.lanes,x.childLanes)),l|=x.subtreeFlags,l|=x.flags,x.return=e,x=x.sibling;e.subtreeFlags|=l}return e.childLanes=o,t}function JA(e,t,o){if(LO()&&(t.mode&Bt)!==ht&&(t.flags&lt)===ft)return Kx(t),cf(),t.flags|=Ur|$u|pr,!1;var l=og(t);if(o!==null&&o.dehydrated!==null)if(e===null){if(!l)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(NO(t),Zr(t),(t.mode&on)!==ht){var d=o!==null;if(d){var m=t.child;m!==null&&(t.treeBaseDuration-=m.treeBaseDuration)}}return!1}else{if(cf(),(t.flags&lt)===ft&&(t.memoizedState=null),t.flags|=Jt,Zr(t),(t.mode&on)!==ht){var w=o!==null;if(w){var x=t.child;x!==null&&(t.treeBaseDuration-=x.treeBaseDuration)}}return!1}else return Jx(),!0}function wE(e,t,o){var l=t.pendingProps;switch(Kw(t),t.tag){case k:case $e:case ne:case b:case I:case P:case F:case ie:case Y:case fe:return Zr(t),null;case _:{var d=t.type;return ss(d)&&eg(t),Zr(t),null}case R:{var m=t.stateNode;if(pf(t),Ww(t),x0(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),e===null||e.child===null){var w=og(t);if(w)Sf(t);else if(e!==null){var x=e.memoizedState;(!x.isDehydrated||(t.flags&Ur)!==ft)&&(t.flags|=cr,Jx())}}return _b(e,t),Zr(t),null}case A:{y0(t);var E=d_(),D=t.type;if(e!==null&&t.stateNode!=null)gE(e,t,D,l,E),e.ref!==t.ref&&vE(t);else{if(!l){if(t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Zr(t),null}var L=g0(),W=og(t);if(W)AO(t,E,L)&&Sf(t);else{var H=mR(D,l,E,L,t);mE(H,t,!1,!1),t.stateNode=H,yR(H,D,l,E)&&Sf(t)}t.ref!==null&&vE(t)}return Zr(t),null}case j:{var ee=l;if(e&&t.stateNode!=null){var ae=e.memoizedProps;yE(e,t,ae,ee)}else{if(typeof ee!="string"&&t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var ce=d_(),Be=g0(),gt=og(t);gt?DO(t)&&Sf(t):t.stateNode=bR(ee,ce,Be,t)}return Zr(t),null}case le:{mf(t);var ot=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var Zt=JA(e,t,ot);if(!Zt)return t.flags&pr?t:null}if((t.flags&lt)!==ft)return t.lanes=o,(t.mode&on)!==ht&&Y0(t),t;var Gt=ot!==null,J=e!==null&&e.memoizedState!==null;if(Gt!==J&&Gt){var de=t.child;if(de.flags|=er,(t.mode&Bt)!==ht){var X=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);X||w0(wo.current,p_)?XD():Fb()}}var Te=t.updateQueue;if(Te!==null&&(t.flags|=Jt),Zr(t),(t.mode&on)!==ht&&Gt){var Ge=t.child;Ge!==null&&(t.treeBaseDuration-=Ge.treeBaseDuration)}return null}case N:return pf(t),_b(e,t),e===null&&hO(t.stateNode.containerInfo),Zr(t),null;case q:var We=t.type._context;return u0(We,t),Zr(t),null;case oe:{var Et=t.type;return ss(Et)&&eg(t),Zr(t),null}case ke:{mf(t);var Nt=t.memoizedState;if(Nt===null)return Zr(t),null;var kn=(t.flags&lt)!==ft,un=Nt.rendering;if(un===null)if(kn)Lp(Nt,!1);else{var hr=ZD()&&(e===null||(e.flags&lt)===ft);if(!hr)for(var cn=t.child;cn!==null;){var sr=xg(cn);if(sr!==null){kn=!0,t.flags|=lt,Lp(Nt,!1);var xi=sr.updateQueue;return xi!==null&&(t.updateQueue=xi,t.flags|=Jt),t.subtreeFlags=ft,FO(t,o),lu(t,b0(wo.current,Sp)),t.child}cn=cn.sibling}Nt.tail!==null&&dr()>zE()&&(t.flags|=lt,kn=!0,Lp(Nt,!1),t.lanes=Ch)}else{if(!kn){var ii=xg(un);if(ii!==null){t.flags|=lt,kn=!0;var Sa=ii.updateQueue;if(Sa!==null&&(t.updateQueue=Sa,t.flags|=Jt),Lp(Nt,!0),Nt.tail===null&&Nt.tailMode==="hidden"&&!un.alternate&&!Xr())return Zr(t),null}else dr()*2-Nt.renderingStartTime>zE()&&o!==pi&&(t.flags|=lt,kn=!0,Lp(Nt,!1),t.lanes=Ch)}if(Nt.isBackwards)un.sibling=t.child,t.child=un;else{var Pi=Nt.last;Pi!==null?Pi.sibling=un:t.child=un,Nt.last=un}}if(Nt.tail!==null){var Ui=Nt.tail;Nt.rendering=Ui,Nt.tail=Ui.sibling,Nt.renderingStartTime=dr(),Ui.sibling=null;var _i=wo.current;return kn?_i=b0(_i,Sp):_i=vf(_i),lu(t,_i),Ui}return Zr(t),null}case me:break;case ue:case Oe:{zb(t);var vl=t.memoizedState,Of=vl!==null;if(e!==null){var Jp=e.memoizedState,vs=Jp!==null;vs!==Of&&!Re&&(t.flags|=er)}return!Of||(t.mode&Bt)===ht?Zr(t):vi(ps,pi)&&(Zr(t),t.subtreeFlags&(In|Jt)&&(t.flags|=er)),null}case ze:return null;case De:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function XA(e,t,o){switch(Kw(t),t.tag){case _:{var l=t.type;ss(l)&&eg(t);var d=t.flags;return d&pr?(t.flags=d&~pr|lt,(t.mode&on)!==ht&&Y0(t),t):null}case R:{t.stateNode,pf(t),Ww(t),x0();var m=t.flags;return(m&pr)!==ft&&(m&lt)===ft?(t.flags=m&~pr|lt,t):null}case A:return y0(t),null;case le:{mf(t);var w=t.memoizedState;if(w!==null&&w.dehydrated!==null){if(t.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");cf()}var x=t.flags;return x&pr?(t.flags=x&~pr|lt,(t.mode&on)!==ht&&Y0(t),t):null}case ke:return mf(t),null;case N:return pf(t),null;case q:var E=t.type._context;return u0(E,t),null;case ue:case Oe:return zb(t),null;case ze:return null;default:return null}}function bE(e,t,o){switch(Kw(t),t.tag){case _:{var l=t.type.childContextTypes;l!=null&&eg(t);break}case R:{t.stateNode,pf(t),Ww(t),x0();break}case A:{y0(t);break}case N:pf(t);break;case le:mf(t);break;case ke:mf(t);break;case q:var d=t.type._context;u0(d,t);break;case ue:case Oe:zb(t);break}}var SE=null;SE=new Set;var qg=!1,ei=!1,QA=typeof WeakSet=="function"?WeakSet:Set,tt=null,xf=null,_f=null;function ZA(e){Ho(null,function(){throw e}),Mu()}var eD=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&on)try{fs(),t.componentWillUnmount()}finally{ds(e)}else t.componentWillUnmount()};function xE(e,t){try{du(Rr,e)}catch(o){jn(e,t,o)}}function Eb(e,t,o){try{eD(e,o)}catch(l){jn(e,t,l)}}function tD(e,t,o){try{o.componentDidMount()}catch(l){jn(e,t,l)}}function _E(e,t){try{kE(e)}catch(o){jn(e,t,o)}}function Ef(e,t){var o=e.ref;if(o!==null)if(typeof o=="function"){var l;try{if(Ve&&st&&e.mode&on)try{fs(),l=o(null)}finally{ds(e)}else l=o(null)}catch(d){jn(e,t,d)}typeof l=="function"&&h("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Rt(e))}else o.current=null}function Yg(e,t,o){try{o()}catch(l){jn(e,t,l)}}var EE=!1;function nD(e,t){pR(e.containerInfo),tt=t,rD();var o=EE;return EE=!1,o}function rD(){for(;tt!==null;){var e=tt,t=e.child;(e.subtreeFlags&Wo)!==ft&&t!==null?(t.return=e,tt=t):iD()}}function iD(){for(;tt!==null;){var e=tt;bn(e);try{aD(e)}catch(o){jn(e,e.return,o)}Nn();var t=e.sibling;if(t!==null){t.return=e.return,tt=t;return}tt=e.return}}function aD(e){var t=e.alternate,o=e.flags;if((o&cr)!==ft){switch(bn(e),e.tag){case b:case I:case ne:break;case _:{if(t!==null){var l=t.memoizedProps,d=t.memoizedState,m=e.stateNode;e.type===e.elementType&&!Ac&&(m.props!==e.memoizedProps&&h("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(e)||"instance"),m.state!==e.memoizedState&&h("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(e)||"instance"));var w=m.getSnapshotBeforeUpdate(e.elementType===e.type?l:So(e.type,l),d);{var x=SE;w===void 0&&!x.has(e.type)&&(x.add(e.type),h("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Rt(e)))}m.__reactInternalSnapshotBeforeUpdate=w}break}case R:{{var E=e.stateNode;IR(E.containerInfo)}break}case A:case j:case N:case oe:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Nn()}}function _o(e,t,o){var l=t.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var m=d.next,w=m;do{if((w.tag&e)===e){var x=w.destroy;w.destroy=void 0,x!==void 0&&((e&Qr)!==Zi?uo(t):(e&Rr)!==Zi&&zu(t),(e&ls)!==Zi&&Yp(!0),Yg(t,o,x),(e&ls)!==Zi&&Yp(!1),(e&Qr)!==Zi?Ko():(e&Rr)!==Zi&&Eh())}w=w.next}while(w!==m)}}function du(e,t){var o=t.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var d=l.next,m=d;do{if((m.tag&e)===e){(e&Qr)!==Zi?_h(t):(e&Rr)!==Zi&&pd(t);var w=m.create;(e&ls)!==Zi&&Yp(!0),m.destroy=w(),(e&ls)!==Zi&&Yp(!1),(e&Qr)!==Zi?Qv():(e&Rr)!==Zi&&Zv();{var x=m.destroy;if(x!==void 0&&typeof x!="function"){var E=void 0;(m.tag&Rr)!==ft?E="useLayoutEffect":(m.tag&ls)!==ft?E="useInsertionEffect":E="useEffect";var D=void 0;x===null?D=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof x.then=="function"?D=`
198
+ Check the render method of \``+l+"`.");var d=l||"",m=e._debugSource;m&&(d=m.fileName+":"+m.lineNumber),fb[d]||(fb[d]=!0,h("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",o))}if(t.defaultProps!==void 0){var w=en(t)||"Unknown";Np[w]||(h("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",w),Np[w]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var x=en(t)||"Unknown";db[x]||(h("%s: Function components do not support getDerivedStateFromProps.",x),db[x]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var E=en(t)||"Unknown";cb[E]||(h("%s: Function components do not support contextType.",E),cb[E]=!0)}}}var gb={dehydrated:null,treeContext:null,retryLane:nn};function yb(e){return{baseLanes:e,cachePool:SA(),transitions:null}}function NA(e,t){var o=null;return{baseLanes:Pt(e.baseLanes,t),cachePool:o,transitions:e.transitions}}function jA(e,t,o,l){if(t!==null){var d=t.memoizedState;if(d===null)return!1}return w0(e,Sp)}function LA(e,t){return ec(e.childLanes,t)}function sE(e,t,o){var l=t.pendingProps;HN(t)&&(t.flags|=lt);var d=wo.current,m=!1,w=(t.flags&lt)!==ft;if(w||jA(d,e)?(m=!0,t.flags&=~lt):(e===null||e.memoizedState!==null)&&(d=QO(d,p_)),d=vf(d),lu(t,d),e===null){Zw(t);var x=t.memoizedState;if(x!==null){var E=x.dehydrated;if(E!==null)return IA(t,E)}var D=l.children,L=l.fallback;if(m){var W=PA(t,D,L,o),H=t.child;return H.memoizedState=yb(o),t.memoizedState=gb,W}else return wb(t,D)}else{var ee=e.memoizedState;if(ee!==null){var ae=ee.dehydrated;if(ae!==null)return zA(e,t,w,l,ae,ee,o)}if(m){var ce=l.fallback,Be=l.children,gt=MA(e,t,Be,ce,o),ot=t.child,Zt=e.child.memoizedState;return ot.memoizedState=Zt===null?yb(o):NA(Zt,o),ot.childLanes=LA(e,o),t.memoizedState=gb,gt}else{var Gt=l.children,J=UA(e,t,Gt,o);return t.memoizedState=null,J}}}function wb(e,t,o){var l=e.mode,d={mode:"visible",children:t},m=bb(d,l);return m.return=e,e.child=m,m}function PA(e,t,o,l){var d=e.mode,m=e.child,w={mode:"hidden",children:t},x,E;return(d&Bt)===ht&&m!==null?(x=m,x.childLanes=ye,x.pendingProps=w,e.mode&on&&(x.actualDuration=0,x.actualStartTime=-1,x.selfBaseDuration=0,x.treeBaseDuration=0),E=mu(o,d,l,null)):(x=bb(w,d),E=mu(o,d,l,null)),x.return=e,E.return=e,x.sibling=E,e.child=x,E}function bb(e,t,o){return lk(e,t,ye,null)}function lE(e,t){return Pc(e,t)}function UA(e,t,o,l){var d=e.child,m=d.sibling,w=lE(d,{mode:"visible",children:o});if((t.mode&Bt)===ht&&(w.lanes=l),w.return=t,w.sibling=null,m!==null){var x=t.deletions;x===null?(t.deletions=[m],t.flags|=Bi):x.push(m)}return t.child=w,w}function MA(e,t,o,l,d){var m=t.mode,w=e.child,x=w.sibling,E={mode:"hidden",children:o},D;if((m&Bt)===ht&&t.child!==w){var L=t.child;D=L,D.childLanes=ye,D.pendingProps=E,t.mode&on&&(D.actualDuration=0,D.actualStartTime=-1,D.selfBaseDuration=w.selfBaseDuration,D.treeBaseDuration=w.treeBaseDuration),t.deletions=null}else D=lE(w,E),D.subtreeFlags=w.subtreeFlags&tr;var W;return x!==null?W=Pc(x,l):(W=mu(l,m,d,null),W.flags|=In),W.return=t,D.return=t,D.sibling=W,t.child=D,W}function Vg(e,t,o,l){l!==null&&e0(l),df(t,e.child,null,o);var d=t.pendingProps,m=d.children,w=wb(t,m);return w.flags|=In,t.memoizedState=null,w}function $A(e,t,o,l,d){var m=t.mode,w={mode:"visible",children:o},x=bb(w,m),E=mu(l,m,d,null);return E.flags|=In,x.return=t,E.return=t,x.sibling=E,t.child=x,(t.mode&Bt)!==ht&&df(t,e.child,null,d),E}function IA(e,t,o){return(e.mode&Bt)===ht?(h("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=_t):$w(t)?e.lanes=Mr:e.lanes=pi,null}function zA(e,t,o,l,d,m,w){if(o)if(t.flags&Ur){t.flags&=~Ur;var J=ob(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Vg(e,t,w,J)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=lt,null;var de=l.children,X=l.fallback,Te=$A(e,t,de,X,w),Ge=t.child;return Ge.memoizedState=yb(w),t.memoizedState=gb,Te}else{if(TO(),(t.mode&Bt)===ht)return Vg(e,t,w,null);if($w(d)){var x,E,D;{var L=VR(d);x=L.digest,E=L.message,D=L.stack}var W;E?W=new Error(E):W=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var H=ob(W,x,D);return Vg(e,t,w,H)}var ee=vi(w,e.childLanes);if(xo||ee){var ae=ty();if(ae!==null){var ce=Ph(ae,w);if(ce!==nn&&ce!==m.retryLane){m.retryLane=ce;var Be=Cn;Qi(e,ce),Lr(ae,e,ce,Be)}}Fb();var gt=ob(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return Vg(e,t,w,gt)}else if(Dx(d)){t.flags|=lt,t.child=e.child;var ot=dN.bind(null,e);return WR(d,ot),null}else{AO(t,d,m.treeContext);var Zt=l.children,Gt=wb(t,Zt);return Gt.flags|=ci,Gt}}}function uE(e,t,o){e.lanes=Pt(e.lanes,t);var l=e.alternate;l!==null&&(l.lanes=Pt(l.lanes,t)),c0(e.return,t,o)}function FA(e,t,o){for(var l=t;l!==null;){if(l.tag===le){var d=l.memoizedState;d!==null&&uE(l,o,e)}else if(l.tag===ke)uE(l,o,e);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)return;for(;l.sibling===null;){if(l.return===null||l.return===e)return;l=l.return}l.sibling.return=l.return,l=l.sibling}}function BA(e){for(var t=e,o=null;t!==null;){var l=t.alternate;l!==null&&xg(l)===null&&(o=t),t=t.sibling}return o}function HA(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!hb[e])if(hb[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{h('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{h('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break}default:h('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else h('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function VA(e,t){e!==void 0&&!Hg[e]&&(e!=="collapsed"&&e!=="hidden"?(Hg[e]=!0,h('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Hg[e]=!0,h('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function cE(e,t){{var o=$t(e),l=!o&&typeof Lt(e)=="function";if(o||l){var d=o?"array":"iterable";return h("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",d,t,d),!1}}return!0}function WA(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if($t(e)){for(var o=0;o<e.length;o++)if(!cE(e[o],o))return}else{var l=Lt(e);if(typeof l=="function"){var d=l.call(e);if(d)for(var m=d.next(),w=0;!m.done;m=d.next()){if(!cE(m.value,w))return;w++}}else h('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}function Sb(e,t,o,l,d){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=d)}function dE(e,t,o){var l=t.pendingProps,d=l.revealOrder,m=l.tail,w=l.children;HA(d),VA(m,d),WA(w,d),Ni(e,t,w,o);var x=wo.current,E=w0(x,Sp);if(E)x=b0(x,Sp),t.flags|=lt;else{var D=e!==null&&(e.flags&lt)!==ft;D&&FA(t,t.child,o),x=vf(x)}if(lu(t,x),(t.mode&Bt)===ht)t.memoizedState=null;else switch(d){case"forwards":{var L=BA(t.child),W;L===null?(W=t.child,t.child=null):(W=L.sibling,L.sibling=null),Sb(t,!1,W,L,m);break}case"backwards":{var H=null,ee=t.child;for(t.child=null;ee!==null;){var ae=ee.alternate;if(ae!==null&&xg(ae)===null){t.child=ee;break}var ce=ee.sibling;ee.sibling=H,H=ee,ee=ce}Sb(t,!0,H,null,m);break}case"together":{Sb(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function qA(e,t,o){m0(t,t.stateNode.containerInfo);var l=t.pendingProps;return e===null?t.child=df(t,null,l,o):Ni(e,t,l,o),t.child}var fE=!1;function YA(e,t,o){var l=t.type,d=l._context,m=t.pendingProps,w=t.memoizedProps,x=m.value;{"value"in m||fE||(fE=!0,h("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var E=t.type.propTypes;E&&mo(E,m,"prop","Context.Provider")}if(i_(t,d,x),w!==null){var D=w.value;if(xe(D,x)){if(w.children===m.children&&!Zm())return cl(e,t,o)}else HO(t,d,o)}var L=m.children;return Ni(e,t,L,o),t.child}var hE=!1;function GA(e,t,o){var l=t.type;l._context===void 0?l!==l.Consumer&&(hE||(hE=!0,h("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):l=l._context;var d=t.pendingProps,m=d.children;typeof m!="function"&&h("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),hf(t,o);var w=yr(l);Ri(t);var x;return Ap.current=t,ur(!0),x=m(w),ur(!1),Oi(),t.flags|=pa,Ni(e,t,x,o),t.child}function jp(){xo=!0}function Wg(e,t){(t.mode&Bt)===ht&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=In)}function cl(e,t,o){return e!==null&&(t.dependencies=e.dependencies),B_(),Wp(t.lanes),vi(o,t.childLanes)?(FO(e,t),t.child):null}function KA(e,t,o){{var l=t.return;if(l===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,o.index=t.index,o.sibling=t.sibling,o.return=t.return,o.ref=t.ref,t===l.child)l.child=o;else{var d=l.child;if(d===null)throw new Error("Expected parent to have a child.");for(;d.sibling!==t;)if(d=d.sibling,d===null)throw new Error("Expected to find the previous sibling.");d.sibling=o}var m=l.deletions;return m===null?(l.deletions=[e],l.flags|=Bi):m.push(e),o.flags|=In,o}}function xb(e,t){var o=e.lanes;return!!vi(o,t)}function JA(e,t,o){switch(t.tag){case R:aE(t),t.stateNode,cf();break;case A:f_(t);break;case _:{var l=t.type;ss(l)&&tg(t);break}case N:m0(t,t.stateNode.containerInfo);break;case q:{var d=t.memoizedProps.value,m=t.type._context;i_(t,m,d);break}case ie:{var w=vi(o,t.childLanes);w&&(t.flags|=Jt);{var x=t.stateNode;x.effectDuration=0,x.passiveEffectDuration=0}}break;case le:{var E=t.memoizedState;if(E!==null){if(E.dehydrated!==null)return lu(t,vf(wo.current)),t.flags|=lt,null;var D=t.child,L=D.childLanes;if(vi(o,L))return sE(e,t,o);lu(t,vf(wo.current));var W=cl(e,t,o);return W!==null?W.sibling:null}else lu(t,vf(wo.current));break}case ke:{var H=(e.flags&lt)!==ft,ee=vi(o,t.childLanes);if(H){if(ee)return dE(e,t,o);t.flags|=lt}var ae=t.memoizedState;if(ae!==null&&(ae.rendering=null,ae.tail=null,ae.lastEffect=null),lu(t,wo.current),ee)break;return null}case ue:case Oe:return t.lanes=ye,nE(e,t,o)}return cl(e,t,o)}function pE(e,t,o){if(t._debugNeedsRemount&&e!==null)return KA(e,t,Qb(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var l=e.memoizedProps,d=t.pendingProps;if(l!==d||Zm()||t.type!==e.type)xo=!0;else{var m=xb(e,o);if(!m&&(t.flags&lt)===ft)return xo=!1,JA(e,t,o);(e.flags&ld)!==ft?xo=!0:xo=!1}}else if(xo=!1,Xr()&&SO(t)){var w=t.index,x=xO();Bx(t,x,w)}switch(t.lanes=ye,t.tag){case k:return DA(e,t,t.type,o);case $e:{var E=t.elementType;return OA(e,t,E,o)}case b:{var D=t.type,L=t.pendingProps,W=t.elementType===D?L:So(D,L);return pb(e,t,D,W,o)}case _:{var H=t.type,ee=t.pendingProps,ae=t.elementType===H?ee:So(H,ee);return iE(e,t,H,ae,o)}case R:return CA(e,t,o);case A:return TA(e,t,o);case j:return RA(e,t);case le:return sE(e,t,o);case N:return qA(e,t,o);case I:{var ce=t.type,Be=t.pendingProps,gt=t.elementType===ce?Be:So(ce,Be);return Z_(e,t,ce,gt,o)}case P:return _A(e,t,o);case F:return EA(e,t,o);case ie:return kA(e,t,o);case q:return YA(e,t,o);case Y:return GA(e,t,o);case fe:{var ot=t.type,Zt=t.pendingProps,Gt=So(ot,Zt);if(t.type!==t.elementType){var J=ot.propTypes;J&&mo(J,Gt,"prop",en(ot))}return Gt=So(ot.type,Gt),eE(e,t,ot,Gt,o)}case ne:return tE(e,t,t.type,t.pendingProps,o);case oe:{var de=t.type,X=t.pendingProps,Te=t.elementType===de?X:So(de,X);return AA(e,t,de,Te,o)}case ke:return dE(e,t,o);case me:break;case ue:return nE(e,t,o)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Sf(e){e.flags|=Jt}function vE(e){e.flags|=Vn,e.flags|=Fl}var mE,_b,gE,yE;mE=function(e,t,o,l){for(var d=t.child;d!==null;){if(d.tag===A||d.tag===j)yR(e,d.stateNode);else if(d.tag!==N){if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===t)return;for(;d.sibling===null;){if(d.return===null||d.return===t)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},_b=function(e,t){},gE=function(e,t,o,l,d){var m=e.memoizedProps;if(m!==l){var w=t.stateNode,x=g0(),E=bR(w,o,m,l,d,x);t.updateQueue=E,E&&Sf(t)}},yE=function(e,t,o,l){o!==l&&Sf(t)};function Lp(e,t){if(!Xr())switch(e.tailMode){case"hidden":{for(var o=e.tail,l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?e.tail=null:l.sibling=null;break}case"collapsed":{for(var d=e.tail,m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:m.sibling=null;break}}}function Zr(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=ye,l=ft;if(t){if((e.mode&on)!==ht){for(var E=e.selfBaseDuration,D=e.child;D!==null;)o=Pt(o,Pt(D.lanes,D.childLanes)),l|=D.subtreeFlags&tr,l|=D.flags&tr,E+=D.treeBaseDuration,D=D.sibling;e.treeBaseDuration=E}else for(var L=e.child;L!==null;)o=Pt(o,Pt(L.lanes,L.childLanes)),l|=L.subtreeFlags&tr,l|=L.flags&tr,L.return=e,L=L.sibling;e.subtreeFlags|=l}else{if((e.mode&on)!==ht){for(var d=e.actualDuration,m=e.selfBaseDuration,w=e.child;w!==null;)o=Pt(o,Pt(w.lanes,w.childLanes)),l|=w.subtreeFlags,l|=w.flags,d+=w.actualDuration,m+=w.treeBaseDuration,w=w.sibling;e.actualDuration=d,e.treeBaseDuration=m}else for(var x=e.child;x!==null;)o=Pt(o,Pt(x.lanes,x.childLanes)),l|=x.subtreeFlags,l|=x.flags,x.return=e,x=x.sibling;e.subtreeFlags|=l}return e.childLanes=o,t}function XA(e,t,o){if(PO()&&(t.mode&Bt)!==ht&&(t.flags&lt)===ft)return Kx(t),cf(),t.flags|=Ur|$u|pr,!1;var l=og(t);if(o!==null&&o.dehydrated!==null)if(e===null){if(!l)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(jO(t),Zr(t),(t.mode&on)!==ht){var d=o!==null;if(d){var m=t.child;m!==null&&(t.treeBaseDuration-=m.treeBaseDuration)}}return!1}else{if(cf(),(t.flags&lt)===ft&&(t.memoizedState=null),t.flags|=Jt,Zr(t),(t.mode&on)!==ht){var w=o!==null;if(w){var x=t.child;x!==null&&(t.treeBaseDuration-=x.treeBaseDuration)}}return!1}else return Jx(),!0}function wE(e,t,o){var l=t.pendingProps;switch(Kw(t),t.tag){case k:case $e:case ne:case b:case I:case P:case F:case ie:case Y:case fe:return Zr(t),null;case _:{var d=t.type;return ss(d)&&eg(t),Zr(t),null}case R:{var m=t.stateNode;if(pf(t),Ww(t),x0(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),e===null||e.child===null){var w=og(t);if(w)Sf(t);else if(e!==null){var x=e.memoizedState;(!x.isDehydrated||(t.flags&Ur)!==ft)&&(t.flags|=cr,Jx())}}return _b(e,t),Zr(t),null}case A:{y0(t);var E=d_(),D=t.type;if(e!==null&&t.stateNode!=null)gE(e,t,D,l,E),e.ref!==t.ref&&vE(t);else{if(!l){if(t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Zr(t),null}var L=g0(),W=og(t);if(W)DO(t,E,L)&&Sf(t);else{var H=gR(D,l,E,L,t);mE(H,t,!1,!1),t.stateNode=H,wR(H,D,l,E)&&Sf(t)}t.ref!==null&&vE(t)}return Zr(t),null}case j:{var ee=l;if(e&&t.stateNode!=null){var ae=e.memoizedProps;yE(e,t,ae,ee)}else{if(typeof ee!="string"&&t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var ce=d_(),Be=g0(),gt=og(t);gt?NO(t)&&Sf(t):t.stateNode=SR(ee,ce,Be,t)}return Zr(t),null}case le:{mf(t);var ot=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var Zt=XA(e,t,ot);if(!Zt)return t.flags&pr?t:null}if((t.flags&lt)!==ft)return t.lanes=o,(t.mode&on)!==ht&&Y0(t),t;var Gt=ot!==null,J=e!==null&&e.memoizedState!==null;if(Gt!==J&&Gt){var de=t.child;if(de.flags|=er,(t.mode&Bt)!==ht){var X=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);X||w0(wo.current,p_)?QD():Fb()}}var Te=t.updateQueue;if(Te!==null&&(t.flags|=Jt),Zr(t),(t.mode&on)!==ht&&Gt){var Ge=t.child;Ge!==null&&(t.treeBaseDuration-=Ge.treeBaseDuration)}return null}case N:return pf(t),_b(e,t),e===null&&pO(t.stateNode.containerInfo),Zr(t),null;case q:var We=t.type._context;return u0(We,t),Zr(t),null;case oe:{var Et=t.type;return ss(Et)&&eg(t),Zr(t),null}case ke:{mf(t);var Nt=t.memoizedState;if(Nt===null)return Zr(t),null;var kn=(t.flags&lt)!==ft,un=Nt.rendering;if(un===null)if(kn)Lp(Nt,!1);else{var hr=eN()&&(e===null||(e.flags&lt)===ft);if(!hr)for(var cn=t.child;cn!==null;){var sr=xg(cn);if(sr!==null){kn=!0,t.flags|=lt,Lp(Nt,!1);var xi=sr.updateQueue;return xi!==null&&(t.updateQueue=xi,t.flags|=Jt),t.subtreeFlags=ft,BO(t,o),lu(t,b0(wo.current,Sp)),t.child}cn=cn.sibling}Nt.tail!==null&&dr()>zE()&&(t.flags|=lt,kn=!0,Lp(Nt,!1),t.lanes=Ch)}else{if(!kn){var ii=xg(un);if(ii!==null){t.flags|=lt,kn=!0;var Sa=ii.updateQueue;if(Sa!==null&&(t.updateQueue=Sa,t.flags|=Jt),Lp(Nt,!0),Nt.tail===null&&Nt.tailMode==="hidden"&&!un.alternate&&!Xr())return Zr(t),null}else dr()*2-Nt.renderingStartTime>zE()&&o!==pi&&(t.flags|=lt,kn=!0,Lp(Nt,!1),t.lanes=Ch)}if(Nt.isBackwards)un.sibling=t.child,t.child=un;else{var Pi=Nt.last;Pi!==null?Pi.sibling=un:t.child=un,Nt.last=un}}if(Nt.tail!==null){var Ui=Nt.tail;Nt.rendering=Ui,Nt.tail=Ui.sibling,Nt.renderingStartTime=dr(),Ui.sibling=null;var _i=wo.current;return kn?_i=b0(_i,Sp):_i=vf(_i),lu(t,_i),Ui}return Zr(t),null}case me:break;case ue:case Oe:{zb(t);var vl=t.memoizedState,Of=vl!==null;if(e!==null){var Jp=e.memoizedState,vs=Jp!==null;vs!==Of&&!Re&&(t.flags|=er)}return!Of||(t.mode&Bt)===ht?Zr(t):vi(ps,pi)&&(Zr(t),t.subtreeFlags&(In|Jt)&&(t.flags|=er)),null}case ze:return null;case De:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function QA(e,t,o){switch(Kw(t),t.tag){case _:{var l=t.type;ss(l)&&eg(t);var d=t.flags;return d&pr?(t.flags=d&~pr|lt,(t.mode&on)!==ht&&Y0(t),t):null}case R:{t.stateNode,pf(t),Ww(t),x0();var m=t.flags;return(m&pr)!==ft&&(m&lt)===ft?(t.flags=m&~pr|lt,t):null}case A:return y0(t),null;case le:{mf(t);var w=t.memoizedState;if(w!==null&&w.dehydrated!==null){if(t.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");cf()}var x=t.flags;return x&pr?(t.flags=x&~pr|lt,(t.mode&on)!==ht&&Y0(t),t):null}case ke:return mf(t),null;case N:return pf(t),null;case q:var E=t.type._context;return u0(E,t),null;case ue:case Oe:return zb(t),null;case ze:return null;default:return null}}function bE(e,t,o){switch(Kw(t),t.tag){case _:{var l=t.type.childContextTypes;l!=null&&eg(t);break}case R:{t.stateNode,pf(t),Ww(t),x0();break}case A:{y0(t);break}case N:pf(t);break;case le:mf(t);break;case ke:mf(t);break;case q:var d=t.type._context;u0(d,t);break;case ue:case Oe:zb(t);break}}var SE=null;SE=new Set;var qg=!1,ei=!1,ZA=typeof WeakSet=="function"?WeakSet:Set,tt=null,xf=null,_f=null;function eD(e){Ho(null,function(){throw e}),Mu()}var tD=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&on)try{fs(),t.componentWillUnmount()}finally{ds(e)}else t.componentWillUnmount()};function xE(e,t){try{du(Rr,e)}catch(o){jn(e,t,o)}}function Eb(e,t,o){try{tD(e,o)}catch(l){jn(e,t,l)}}function nD(e,t,o){try{o.componentDidMount()}catch(l){jn(e,t,l)}}function _E(e,t){try{kE(e)}catch(o){jn(e,t,o)}}function Ef(e,t){var o=e.ref;if(o!==null)if(typeof o=="function"){var l;try{if(Ve&&st&&e.mode&on)try{fs(),l=o(null)}finally{ds(e)}else l=o(null)}catch(d){jn(e,t,d)}typeof l=="function"&&h("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Rt(e))}else o.current=null}function Yg(e,t,o){try{o()}catch(l){jn(e,t,l)}}var EE=!1;function rD(e,t){vR(e.containerInfo),tt=t,iD();var o=EE;return EE=!1,o}function iD(){for(;tt!==null;){var e=tt,t=e.child;(e.subtreeFlags&Wo)!==ft&&t!==null?(t.return=e,tt=t):aD()}}function aD(){for(;tt!==null;){var e=tt;bn(e);try{oD(e)}catch(o){jn(e,e.return,o)}Nn();var t=e.sibling;if(t!==null){t.return=e.return,tt=t;return}tt=e.return}}function oD(e){var t=e.alternate,o=e.flags;if((o&cr)!==ft){switch(bn(e),e.tag){case b:case I:case ne:break;case _:{if(t!==null){var l=t.memoizedProps,d=t.memoizedState,m=e.stateNode;e.type===e.elementType&&!Ac&&(m.props!==e.memoizedProps&&h("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(e)||"instance"),m.state!==e.memoizedState&&h("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(e)||"instance"));var w=m.getSnapshotBeforeUpdate(e.elementType===e.type?l:So(e.type,l),d);{var x=SE;w===void 0&&!x.has(e.type)&&(x.add(e.type),h("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Rt(e)))}m.__reactInternalSnapshotBeforeUpdate=w}break}case R:{{var E=e.stateNode;zR(E.containerInfo)}break}case A:case j:case N:case oe:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Nn()}}function _o(e,t,o){var l=t.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var m=d.next,w=m;do{if((w.tag&e)===e){var x=w.destroy;w.destroy=void 0,x!==void 0&&((e&Qr)!==Zi?uo(t):(e&Rr)!==Zi&&zu(t),(e&ls)!==Zi&&Yp(!0),Yg(t,o,x),(e&ls)!==Zi&&Yp(!1),(e&Qr)!==Zi?Ko():(e&Rr)!==Zi&&Eh())}w=w.next}while(w!==m)}}function du(e,t){var o=t.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var d=l.next,m=d;do{if((m.tag&e)===e){(e&Qr)!==Zi?_h(t):(e&Rr)!==Zi&&pd(t);var w=m.create;(e&ls)!==Zi&&Yp(!0),m.destroy=w(),(e&ls)!==Zi&&Yp(!1),(e&Qr)!==Zi?Qv():(e&Rr)!==Zi&&Zv();{var x=m.destroy;if(x!==void 0&&typeof x!="function"){var E=void 0;(m.tag&Rr)!==ft?E="useLayoutEffect":(m.tag&ls)!==ft?E="useInsertionEffect":E="useEffect";var D=void 0;x===null?D=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof x.then=="function"?D=`
199
199
 
200
200
  It looks like you wrote `+E+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
201
201
 
@@ -208,11 +208,11 @@ It looks like you wrote `+E+`(async () => ...) or returned a Promise. Instead, w
208
208
  fetchData();
209
209
  }, [someId]); // Or [] if effect doesn't need props or state
210
210
 
211
- Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:D=" You returned: "+x,h("%s must not return anything besides a function, which is used for clean-up.%s",E,D)}}}m=m.next}while(m!==d)}}function oD(e,t){if((t.flags&Jt)!==ft)switch(t.tag){case ie:{var o=t.stateNode.passiveEffectDuration,l=t.memoizedProps,d=l.id,m=l.onPostCommit,w=z_(),x=t.alternate===null?"mount":"update";I_()&&(x="nested-update"),typeof m=="function"&&m(d,x,o,w);var E=t.return;e:for(;E!==null;){switch(E.tag){case R:var D=E.stateNode;D.passiveEffectDuration+=o;break e;case ie:var L=E.stateNode;L.passiveEffectDuration+=o;break e}E=E.return}break}}}function sD(e,t,o,l){if((o.flags&Yo)!==ft)switch(o.tag){case b:case I:case ne:{if(!ei)if(o.mode&on)try{fs(),du(Rr|Tr,o)}finally{ds(o)}else du(Rr|Tr,o);break}case _:{var d=o.stateNode;if(o.flags&Jt&&!ei)if(t===null)if(o.type===o.elementType&&!Ac&&(d.props!==o.memoizedProps&&h("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(o)||"instance"),d.state!==o.memoizedState&&h("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(o)||"instance")),o.mode&on)try{fs(),d.componentDidMount()}finally{ds(o)}else d.componentDidMount();else{var m=o.elementType===o.type?t.memoizedProps:So(o.type,t.memoizedProps),w=t.memoizedState;if(o.type===o.elementType&&!Ac&&(d.props!==o.memoizedProps&&h("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(o)||"instance"),d.state!==o.memoizedState&&h("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(o)||"instance")),o.mode&on)try{fs(),d.componentDidUpdate(m,w,d.__reactInternalSnapshotBeforeUpdate)}finally{ds(o)}else d.componentDidUpdate(m,w,d.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&(o.type===o.elementType&&!Ac&&(d.props!==o.memoizedProps&&h("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(o)||"instance"),d.state!==o.memoizedState&&h("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(o)||"instance")),c_(o,x,d));break}case R:{var E=o.updateQueue;if(E!==null){var D=null;if(o.child!==null)switch(o.child.tag){case A:D=o.child.stateNode;break;case _:D=o.child.stateNode;break}c_(o,E,D)}break}case A:{var L=o.stateNode;if(t===null&&o.flags&Jt){var W=o.type,H=o.memoizedProps;kR(L,W,H)}break}case j:break;case N:break;case ie:{{var ee=o.memoizedProps,ae=ee.onCommit,ce=ee.onRender,Be=o.stateNode.effectDuration,gt=z_(),ot=t===null?"mount":"update";I_()&&(ot="nested-update"),typeof ce=="function"&&ce(o.memoizedProps.id,ot,o.actualDuration,o.treeBaseDuration,o.actualStartTime,gt);{typeof ae=="function"&&ae(o.memoizedProps.id,ot,Be,gt),iN(o);var Zt=o.return;e:for(;Zt!==null;){switch(Zt.tag){case R:var Gt=Zt.stateNode;Gt.effectDuration+=Be;break e;case ie:var J=Zt.stateNode;J.effectDuration+=Be;break e}Zt=Zt.return}}}break}case le:{vD(e,o);break}case ke:case oe:case me:case ue:case Oe:case De:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}ei||o.flags&Vn&&kE(o)}function lD(e){switch(e.tag){case b:case I:case ne:{if(e.mode&on)try{fs(),xE(e,e.return)}finally{ds(e)}else xE(e,e.return);break}case _:{var t=e.stateNode;typeof t.componentDidMount=="function"&&tD(e,e.return,t),_E(e,e.return);break}case A:{_E(e,e.return);break}}}function uD(e,t){for(var o=null,l=e;;){if(l.tag===A){if(o===null){o=l;try{var d=l.stateNode;t?PR(d):MR(l.stateNode,l.memoizedProps)}catch(w){jn(e,e.return,w)}}}else if(l.tag===j){if(o===null)try{var m=l.stateNode;t?UR(m):$R(m,l.memoizedProps)}catch(w){jn(e,e.return,w)}}else if(!((l.tag===ue||l.tag===Oe)&&l.memoizedState!==null&&l!==e)){if(l.child!==null){l.child.return=l,l=l.child;continue}}if(l===e)return;for(;l.sibling===null;){if(l.return===null||l.return===e)return;o===l&&(o=null),l=l.return}o===l&&(o=null),l.sibling.return=l.return,l=l.sibling}}function kE(e){var t=e.ref;if(t!==null){var o=e.stateNode,l;switch(e.tag){case A:l=o;break;default:l=o}if(typeof t=="function"){var d;if(e.mode&on)try{fs(),d=t(l)}finally{ds(e)}else d=t(l);typeof d=="function"&&h("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Rt(e))}else t.hasOwnProperty("current")||h("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Rt(e)),t.current=l}}function cD(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function CE(e){var t=e.alternate;t!==null&&(e.alternate=null,CE(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===A){var o=e.stateNode;o!==null&&mO(o)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function dD(e){for(var t=e.return;t!==null;){if(TE(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function TE(e){return e.tag===A||e.tag===R||e.tag===N}function RE(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||TE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==A&&t.tag!==j&&t.tag!==_e;){if(t.flags&In||t.child===null||t.tag===N)continue e;t.child.return=t,t=t.child}if(!(t.flags&In))return t.stateNode}}function fD(e){var t=dD(e);switch(t.tag){case A:{var o=t.stateNode;t.flags&Hi&&(Ax(o),t.flags&=~Hi);var l=RE(e);Cb(e,l,o);break}case R:case N:{var d=t.stateNode.containerInfo,m=RE(e);kb(e,m,d);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function kb(e,t,o){var l=e.tag,d=l===A||l===j;if(d){var m=e.stateNode;t?DR(o,m,t):OR(o,m)}else if(l!==N){var w=e.child;if(w!==null){kb(w,t,o);for(var x=w.sibling;x!==null;)kb(x,t,o),x=x.sibling}}}function Cb(e,t,o){var l=e.tag,d=l===A||l===j;if(d){var m=e.stateNode;t?AR(o,m,t):RR(o,m)}else if(l!==N){var w=e.child;if(w!==null){Cb(w,t,o);for(var x=w.sibling;x!==null;)Cb(x,t,o),x=x.sibling}}}var ti=null,Eo=!1;function hD(e,t,o){{var l=t;e:for(;l!==null;){switch(l.tag){case A:{ti=l.stateNode,Eo=!1;break e}case R:{ti=l.stateNode.containerInfo,Eo=!0;break e}case N:{ti=l.stateNode.containerInfo,Eo=!0;break e}}l=l.return}if(ti===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");OE(e,t,o),ti=null,Eo=!1}cD(o)}function fu(e,t,o){for(var l=o.child;l!==null;)OE(e,t,l),l=l.sibling}function OE(e,t,o){switch(bh(o),o.tag){case A:ei||Ef(o,t);case j:{{var l=ti,d=Eo;ti=null,fu(e,t,o),ti=l,Eo=d,ti!==null&&(Eo?jR(ti,o.stateNode):NR(ti,o.stateNode))}return}case _e:{ti!==null&&(Eo?LR(ti,o.stateNode):Mw(ti,o.stateNode));return}case N:{{var m=ti,w=Eo;ti=o.stateNode.containerInfo,Eo=!0,fu(e,t,o),ti=m,Eo=w}return}case b:case I:case fe:case ne:{if(!ei){var x=o.updateQueue;if(x!==null){var E=x.lastEffect;if(E!==null){var D=E.next,L=D;do{var W=L,H=W.destroy,ee=W.tag;H!==void 0&&((ee&ls)!==Zi?Yg(o,t,H):(ee&Rr)!==Zi&&(zu(o),o.mode&on?(fs(),Yg(o,t,H),ds(o)):Yg(o,t,H),Eh())),L=L.next}while(L!==D)}}}fu(e,t,o);return}case _:{if(!ei){Ef(o,t);var ae=o.stateNode;typeof ae.componentWillUnmount=="function"&&Eb(o,t,ae)}fu(e,t,o);return}case me:{fu(e,t,o);return}case ue:{if(o.mode&Bt){var ce=ei;ei=ce||o.memoizedState!==null,fu(e,t,o),ei=ce}else fu(e,t,o);break}default:{fu(e,t,o);return}}}function pD(e){e.memoizedState}function vD(e,t){var o=t.memoizedState;if(o===null){var l=t.alternate;if(l!==null){var d=l.memoizedState;if(d!==null){var m=d.dehydrated;m!==null&&ZR(m)}}}}function AE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new QA),t.forEach(function(l){var d=dN.bind(null,e,l);if(!o.has(l)){if(o.add(l),hi)if(xf!==null&&_f!==null)qp(_f,xf);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");l.then(d,d)}})}}function mD(e,t,o){xf=o,_f=e,bn(t),DE(t,e),bn(t),xf=null,_f=null}function ko(e,t,o){var l=t.deletions;if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];try{hD(e,t,m)}catch(E){jn(m,t,E)}}var w=Uo();if(t.subtreeFlags&qo)for(var x=t.child;x!==null;)bn(x),DE(x,e),x=x.sibling;bn(w)}function DE(e,t,o){var l=e.alternate,d=e.flags;switch(e.tag){case b:case I:case fe:case ne:{if(ko(t,e),hs(e),d&Jt){try{_o(ls|Tr,e,e.return),du(ls|Tr,e)}catch(Et){jn(e,e.return,Et)}if(e.mode&on){try{fs(),_o(Rr|Tr,e,e.return)}catch(Et){jn(e,e.return,Et)}ds(e)}else try{_o(Rr|Tr,e,e.return)}catch(Et){jn(e,e.return,Et)}}return}case _:{ko(t,e),hs(e),d&Vn&&l!==null&&Ef(l,l.return);return}case A:{ko(t,e),hs(e),d&Vn&&l!==null&&Ef(l,l.return);{if(e.flags&Hi){var m=e.stateNode;try{Ax(m)}catch(Et){jn(e,e.return,Et)}}if(d&Jt){var w=e.stateNode;if(w!=null){var x=e.memoizedProps,E=l!==null?l.memoizedProps:x,D=e.type,L=e.updateQueue;if(e.updateQueue=null,L!==null)try{CR(w,L,D,E,x,e)}catch(Et){jn(e,e.return,Et)}}}}return}case j:{if(ko(t,e),hs(e),d&Jt){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var W=e.stateNode,H=e.memoizedProps,ee=l!==null?l.memoizedProps:H;try{TR(W,ee,H)}catch(Et){jn(e,e.return,Et)}}return}case R:{if(ko(t,e),hs(e),d&Jt&&l!==null){var ae=l.memoizedState;if(ae.isDehydrated)try{QR(t.containerInfo)}catch(Et){jn(e,e.return,Et)}}return}case N:{ko(t,e),hs(e);return}case le:{ko(t,e),hs(e);var ce=e.child;if(ce.flags&er){var Be=ce.stateNode,gt=ce.memoizedState,ot=gt!==null;if(Be.isHidden=ot,ot){var Zt=ce.alternate!==null&&ce.alternate.memoizedState!==null;Zt||JD()}}if(d&Jt){try{pD(e)}catch(Et){jn(e,e.return,Et)}AE(e)}return}case ue:{var Gt=l!==null&&l.memoizedState!==null;if(e.mode&Bt){var J=ei;ei=J||Gt,ko(t,e),ei=J}else ko(t,e);if(hs(e),d&er){var de=e.stateNode,X=e.memoizedState,Te=X!==null,Ge=e;if(de.isHidden=Te,Te&&!Gt&&(Ge.mode&Bt)!==ht){tt=Ge;for(var We=Ge.child;We!==null;)tt=We,yD(We),We=We.sibling}uD(Ge,Te)}return}case ke:{ko(t,e),hs(e),d&Jt&&AE(e);return}case me:return;default:{ko(t,e),hs(e);return}}}function hs(e){var t=e.flags;if(t&In){try{fD(e)}catch(o){jn(e,e.return,o)}e.flags&=~In}t&ci&&(e.flags&=~ci)}function gD(e,t,o){xf=o,_f=t,tt=e,NE(e,t,o),xf=null,_f=null}function NE(e,t,o){for(var l=(e.mode&Bt)!==ht;tt!==null;){var d=tt,m=d.child;if(d.tag===ue&&l){var w=d.memoizedState!==null,x=w||qg;if(x){Tb(e,t,o);continue}else{var E=d.alternate,D=E!==null&&E.memoizedState!==null,L=D||ei,W=qg,H=ei;qg=x,ei=L,ei&&!H&&(tt=d,wD(d));for(var ee=m;ee!==null;)tt=ee,NE(ee,t,o),ee=ee.sibling;tt=d,qg=W,ei=H,Tb(e,t,o);continue}}(d.subtreeFlags&Yo)!==ft&&m!==null?(m.return=d,tt=m):Tb(e,t,o)}}function Tb(e,t,o){for(;tt!==null;){var l=tt;if((l.flags&Yo)!==ft){var d=l.alternate;bn(l);try{sD(t,d,l,o)}catch(w){jn(l,l.return,w)}Nn()}if(l===e){tt=null;return}var m=l.sibling;if(m!==null){m.return=l.return,tt=m;return}tt=l.return}}function yD(e){for(;tt!==null;){var t=tt,o=t.child;switch(t.tag){case b:case I:case fe:case ne:{if(t.mode&on)try{fs(),_o(Rr,t,t.return)}finally{ds(t)}else _o(Rr,t,t.return);break}case _:{Ef(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Eb(t,t.return,l);break}case A:{Ef(t,t.return);break}case ue:{var d=t.memoizedState!==null;if(d){jE(e);continue}break}}o!==null?(o.return=t,tt=o):jE(e)}}function jE(e){for(;tt!==null;){var t=tt;if(t===e){tt=null;return}var o=t.sibling;if(o!==null){o.return=t.return,tt=o;return}tt=t.return}}function wD(e){for(;tt!==null;){var t=tt,o=t.child;if(t.tag===ue){var l=t.memoizedState!==null;if(l){LE(e);continue}}o!==null?(o.return=t,tt=o):LE(e)}}function LE(e){for(;tt!==null;){var t=tt;bn(t);try{lD(t)}catch(l){jn(t,t.return,l)}if(Nn(),t===e){tt=null;return}var o=t.sibling;if(o!==null){o.return=t.return,tt=o;return}tt=t.return}}function bD(e,t,o,l){tt=t,SD(t,e,o,l)}function SD(e,t,o,l){for(;tt!==null;){var d=tt,m=d.child;(d.subtreeFlags&so)!==ft&&m!==null?(m.return=d,tt=m):xD(e,t,o,l)}}function xD(e,t,o,l){for(;tt!==null;){var d=tt;if((d.flags&ui)!==ft){bn(d);try{_D(t,d,o,l)}catch(w){jn(d,d.return,w)}Nn()}if(d===e){tt=null;return}var m=d.sibling;if(m!==null){m.return=d.return,tt=m;return}tt=d.return}}function _D(e,t,o,l){switch(t.tag){case b:case I:case ne:{if(t.mode&on){q0();try{du(Qr|Tr,t)}finally{W0(t)}}else du(Qr|Tr,t);break}}}function ED(e){tt=e,kD()}function kD(){for(;tt!==null;){var e=tt,t=e.child;if((tt.flags&Bi)!==ft){var o=e.deletions;if(o!==null){for(var l=0;l<o.length;l++){var d=o[l];tt=d,RD(d,e)}{var m=e.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}}tt=e}}(e.subtreeFlags&so)!==ft&&t!==null?(t.return=e,tt=t):CD()}}function CD(){for(;tt!==null;){var e=tt;(e.flags&ui)!==ft&&(bn(e),TD(e),Nn());var t=e.sibling;if(t!==null){t.return=e.return,tt=t;return}tt=e.return}}function TD(e){switch(e.tag){case b:case I:case ne:{e.mode&on?(q0(),_o(Qr|Tr,e,e.return),W0(e)):_o(Qr|Tr,e,e.return);break}}}function RD(e,t){for(;tt!==null;){var o=tt;bn(o),AD(o,t),Nn();var l=o.child;l!==null?(l.return=o,tt=l):OD(e)}}function OD(e){for(;tt!==null;){var t=tt,o=t.sibling,l=t.return;if(CE(t),t===e){tt=null;return}if(o!==null){o.return=l,tt=o;return}tt=l}}function AD(e,t){switch(e.tag){case b:case I:case ne:{e.mode&on?(q0(),_o(Qr,e,t),W0(e)):_o(Qr,e,t);break}}}function DD(e){switch(e.tag){case b:case I:case ne:{try{du(Rr|Tr,e)}catch(o){jn(e,e.return,o)}break}case _:{var t=e.stateNode;try{t.componentDidMount()}catch(o){jn(e,e.return,o)}break}}}function ND(e){switch(e.tag){case b:case I:case ne:{try{du(Qr|Tr,e)}catch(t){jn(e,e.return,t)}break}}}function jD(e){switch(e.tag){case b:case I:case ne:{try{_o(Rr|Tr,e,e.return)}catch(o){jn(e,e.return,o)}break}case _:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Eb(e,e.return,t);break}}}function LD(e){switch(e.tag){case b:case I:case ne:try{_o(Qr|Tr,e,e.return)}catch(t){jn(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Pp=Symbol.for;Pp("selector.component"),Pp("selector.has_pseudo_class"),Pp("selector.role"),Pp("selector.test_id"),Pp("selector.text")}var PD=[];function UD(){PD.forEach(function(e){return e()})}var MD=s.ReactCurrentActQueue;function $D(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,o=typeof jest<"u";return o&&t!==!1}}function PE(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&MD.current!==null&&h("The current testing environment is not configured to support act(...)"),e}}var ID=Math.ceil,Rb=s.ReactCurrentDispatcher,Ob=s.ReactCurrentOwner,ni=s.ReactCurrentBatchConfig,Co=s.ReactCurrentActQueue,Dr=0,UE=1,ri=2,Ga=4,dl=0,Up=1,Dc=2,Gg=3,Mp=4,ME=5,Ab=6,Qt=Dr,ji=null,Qn=null,Nr=ye,ps=ye,Db=nu(ye),jr=dl,$p=null,Kg=ye,Ip=ye,Jg=ye,zp=null,ea=null,Nb=0,$E=500,IE=1/0,zD=500,fl=null;function Fp(){IE=dr()+zD}function zE(){return IE}var Xg=!1,jb=null,kf=null,Nc=!1,hu=null,Bp=ye,Lb=[],Pb=null,FD=50,Hp=0,Ub=null,Mb=!1,Qg=!1,BD=50,Cf=0,Zg=null,Vp=Cn,ey=ye,FE=!1;function ty(){return ji}function Li(){return(Qt&(ri|Ga))!==Dr?dr():(Vp!==Cn||(Vp=dr()),Vp)}function pu(e){var t=e.mode;if((t&Bt)===ht)return _t;if((Qt&ri)!==Dr&&Nr!==ye)return Zu(Nr);var o=MO()!==UO;if(o){if(ni.transition!==null){var l=ni.transition;l._updatedFibers||(l._updatedFibers=new Set),l._updatedFibers.add(e)}return ey===nn&&(ey=Nh()),ey}var d=Ki();if(d!==nn)return d;var m=SR();return m}function HD(e){var t=e.mode;return(t&Bt)===ht?_t:am()}function Lr(e,t,o,l){hN(),FE&&h("useInsertionEffect must not schedule updates."),Mb&&(Qg=!0),Wl(e,o,l),(Qt&ri)!==ye&&e===ji?mN(t):(hi&&nc(e,t,o),gN(t),e===ji&&((Qt&ri)===Dr&&(Ip=Pt(Ip,o)),jr===Mp&&vu(e,Nr)),ta(e,l),o===_t&&Qt===Dr&&(t.mode&Bt)===ht&&!Co.isBatchingLegacy&&(Fp(),Fx()))}function VD(e,t,o){var l=e.current;l.lanes=t,Wl(e,t,o),ta(e,o)}function WD(e){return(Qt&ri)!==Dr}function ta(e,t){var o=e.callbackNode;Ld(e,t);var l=jd(e,e===ji?Nr:ye);if(l===ye){o!==null&&rk(o),e.callbackNode=null,e.callbackPriority=nn;return}var d=Qo(l),m=e.callbackPriority;if(m===d&&!(Co.current!==null&&o!==Vb)){o==null&&m!==_t&&h("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}o!=null&&rk(o);var w;if(d===_t)e.tag===ru?(Co.isBatchingLegacy!==null&&(Co.didScheduleLegacyUpdate=!0),wO(VE.bind(null,e))):zx(VE.bind(null,e)),Co.current!==null?Co.current.push(iu):_R(function(){(Qt&(ri|Ga))===Dr&&iu()}),w=null;else{var x;switch(fm(l)){case qr:x=Iu;break;case $a:x=Go;break;case Yi:x=lo;break;case Gi:x=Is;break;default:x=lo;break}w=Wb(x,BE.bind(null,e))}e.callbackPriority=d,e.callbackNode=w}function BE(e,t){if(uA(),Vp=Cn,ey=ye,(Qt&(ri|Ga))!==Dr)throw new Error("Should not already be working.");var o=e.callbackNode,l=pl();if(l&&e.callbackNode!==o)return null;var d=jd(e,e===ji?Nr:ye);if(d===ye)return null;var m=!Ud(e,d)&&!im(e,d)&&!t,w=m?tN(e,d):ry(e,d);if(w!==dl){if(w===Dc){var x=Pd(e);x!==ye&&(d=x,w=$b(e,x))}if(w===Up){var E=$p;throw jc(e,ye),vu(e,d),ta(e,dr()),E}if(w===Ab)vu(e,d);else{var D=!Ud(e,d),L=e.current.alternate;if(D&&!YD(L)){if(w=ry(e,d),w===Dc){var W=Pd(e);W!==ye&&(d=W,w=$b(e,W))}if(w===Up){var H=$p;throw jc(e,ye),vu(e,d),ta(e,dr()),H}}e.finishedWork=L,e.finishedLanes=d,qD(e,w,d)}}return ta(e,dr()),e.callbackNode===o?BE.bind(null,e):null}function $b(e,t){var o=zp;if(Id(e)){var l=jc(e,t);l.flags|=Ur,fO(e.containerInfo)}var d=ry(e,t);if(d!==Dc){var m=ea;ea=o,m!==null&&HE(m)}return d}function HE(e){ea===null?ea=e:ea.push.apply(ea,e)}function qD(e,t,o){switch(t){case dl:case Up:throw new Error("Root did not complete. This is a bug in React.");case Dc:{Lc(e,ea,fl);break}case Gg:{if(vu(e,o),Js(o)&&!ik()){var l=Nb+$E-dr();if(l>10){var d=jd(e,ye);if(d!==ye)break;var m=e.suspendedLanes;if(!Xs(m,o)){Li(),Md(e,m);break}e.timeoutHandle=Pw(Lc.bind(null,e,ea,fl),l);break}}Lc(e,ea,fl);break}case Mp:{if(vu(e,o),Ah(o))break;if(!ik()){var w=ma(e,o),x=w,E=dr()-x,D=fN(E)-E;if(D>10){e.timeoutHandle=Pw(Lc.bind(null,e,ea,fl),D);break}}Lc(e,ea,fl);break}case ME:{Lc(e,ea,fl);break}default:throw new Error("Unknown root exit status.")}}function YD(e){for(var t=e;;){if(t.flags&zl){var o=t.updateQueue;if(o!==null){var l=o.stores;if(l!==null)for(var d=0;d<l.length;d++){var m=l[d],w=m.getSnapshot,x=m.value;try{if(!xe(w(),x))return!1}catch{return!1}}}}var E=t.child;if(t.subtreeFlags&zl&&E!==null){E.return=t,t=E;continue}if(t===e)return!0;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}return!0}function vu(e,t){t=ec(t,Jg),t=ec(t,Ip),lm(e,t)}function VE(e){if(cA(),(Qt&(ri|Ga))!==Dr)throw new Error("Should not already be working.");pl();var t=jd(e,ye);if(!vi(t,_t))return ta(e,dr()),null;var o=ry(e,t);if(e.tag!==ru&&o===Dc){var l=Pd(e);l!==ye&&(t=l,o=$b(e,l))}if(o===Up){var d=$p;throw jc(e,ye),vu(e,t),ta(e,dr()),d}if(o===Ab)throw new Error("Root did not complete. This is a bug in React.");var m=e.current.alternate;return e.finishedWork=m,e.finishedLanes=t,Lc(e,ea,fl),ta(e,dr()),null}function GD(e,t){t!==ye&&($d(e,Pt(t,_t)),ta(e,dr()),(Qt&(ri|Ga))===Dr&&(Fp(),iu()))}function Ib(e,t){var o=Qt;Qt|=UE;try{return e(t)}finally{Qt=o,Qt===Dr&&!Co.isBatchingLegacy&&(Fp(),Fx())}}function KD(e,t,o,l,d){var m=Ki(),w=ni.transition;try{return ni.transition=null,ir(qr),e(t,o,l,d)}finally{ir(m),ni.transition=w,Qt===Dr&&Fp()}}function hl(e){hu!==null&&hu.tag===ru&&(Qt&(ri|Ga))===Dr&&pl();var t=Qt;Qt|=UE;var o=ni.transition,l=Ki();try{return ni.transition=null,ir(qr),e?e():void 0}finally{ir(l),ni.transition=o,Qt=t,(Qt&(ri|Ga))===Dr&&iu()}}function WE(){return(Qt&(ri|Ga))!==Dr}function ny(e,t){bi(Db,ps,e),ps=Pt(ps,t)}function zb(e){ps=Db.current,wi(Db,e)}function jc(e,t){e.finishedWork=null,e.finishedLanes=ye;var o=e.timeoutHandle;if(o!==Uw&&(e.timeoutHandle=Uw,xR(o)),Qn!==null)for(var l=Qn.return;l!==null;){var d=l.alternate;bE(d,l),l=l.return}ji=e;var m=Pc(e.current,null);return Qn=m,Nr=ps=t,jr=dl,$p=null,Kg=ye,Ip=ye,Jg=ye,zp=null,ea=null,VO(),yo.discardPendingWarnings(),m}function qE(e,t){do{var o=Qn;try{if(fg(),m_(),Nn(),Ob.current=null,o===null||o.return===null){jr=Up,$p=t,Qn=null;return}if(Ve&&o.mode&on&&Fg(o,!0),Le)if(Oi(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var l=t;Ma(o,l,Nr)}else Fu(o,t,Nr);wA(e,o.return,o,t,Nr),JE(o)}catch(d){t=d,Qn===o&&o!==null?(o=o.return,Qn=o):o=Qn;continue}return}while(!0)}function YE(){var e=Rb.current;return Rb.current=Ug,e===null?Ug:e}function GE(e){Rb.current=e}function JD(){Nb=dr()}function Wp(e){Kg=Pt(e,Kg)}function XD(){jr===dl&&(jr=Gg)}function Fb(){(jr===dl||jr===Gg||jr===Dc)&&(jr=Mp),ji!==null&&(Qu(Kg)||Qu(Ip))&&vu(ji,Nr)}function QD(e){jr!==Mp&&(jr=Dc),zp===null?zp=[e]:zp.push(e)}function ZD(){return jr===dl}function ry(e,t){var o=Qt;Qt|=ri;var l=YE();if(ji!==e||Nr!==t){if(hi){var d=e.memoizedUpdaters;d.size>0&&(qp(e,Nr),d.clear()),um(e,t)}fl=Uh(),jc(e,t)}Hs(t);do try{eN();break}catch(m){qE(e,m)}while(!0);if(fg(),Qt=o,GE(l),Qn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return vd(),ji=null,Nr=ye,jr}function eN(){for(;Qn!==null;)KE(Qn)}function tN(e,t){var o=Qt;Qt|=ri;var l=YE();if(ji!==e||Nr!==t){if(hi){var d=e.memoizedUpdaters;d.size>0&&(qp(e,Nr),d.clear()),um(e,t)}fl=Uh(),Fp(),jc(e,t)}Hs(t);do try{nN();break}catch(m){qE(e,m)}while(!0);return fg(),GE(l),Qt=o,Qn!==null?(em(),dl):(vd(),ji=null,Nr=ye,jr)}function nN(){for(;Qn!==null&&!vh();)KE(Qn)}function KE(e){var t=e.alternate;bn(e);var o;(e.mode&on)!==ht?(V0(e),o=Bb(t,e,ps),Fg(e,!0)):o=Bb(t,e,ps),Nn(),e.memoizedProps=e.pendingProps,o===null?JE(e):Qn=o,Ob.current=null}function JE(e){var t=e;do{var o=t.alternate,l=t.return;if((t.flags&$u)===ft){bn(t);var d=void 0;if((t.mode&on)===ht?d=wE(o,t,ps):(V0(t),d=wE(o,t,ps),Fg(t,!1)),Nn(),d!==null){Qn=d;return}}else{var m=XA(o,t);if(m!==null){m.flags&=Gv,Qn=m;return}if((t.mode&on)!==ht){Fg(t,!1);for(var w=t.actualDuration,x=t.child;x!==null;)w+=x.actualDuration,x=x.sibling;t.actualDuration=w}if(l!==null)l.flags|=$u,l.subtreeFlags=ft,l.deletions=null;else{jr=Ab,Qn=null;return}}var E=t.sibling;if(E!==null){Qn=E;return}t=l,Qn=t}while(t!==null);jr===dl&&(jr=ME)}function Lc(e,t,o){var l=Ki(),d=ni.transition;try{ni.transition=null,ir(qr),rN(e,t,o,l)}finally{ni.transition=d,ir(l)}return null}function rN(e,t,o,l){do pl();while(hu!==null);if(pN(),(Qt&(ri|Ga))!==Dr)throw new Error("Should not already be working.");var d=e.finishedWork,m=e.finishedLanes;if(Sh(m),d===null)return xh(),null;if(m===ye&&h("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=ye,d===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=nn;var w=Pt(d.lanes,d.childLanes);Lh(e,w),e===ji&&(ji=null,Qn=null,Nr=ye),((d.subtreeFlags&so)!==ft||(d.flags&so)!==ft)&&(Nc||(Nc=!0,Pb=o,Wb(lo,function(){return pl(),null})));var x=(d.subtreeFlags&(Wo|qo|Yo|so))!==ft,E=(d.flags&(Wo|qo|Yo|so))!==ft;if(x||E){var D=ni.transition;ni.transition=null;var L=Ki();ir(qr);var W=Qt;Qt|=Ga,Ob.current=null,nD(e,d),F_(),mD(e,d,m),vR(e.containerInfo),e.current=d,Bu(m),gD(d,e,m),Hu(),mh(),Qt=W,ir(L),ni.transition=D}else e.current=d,F_();var H=Nc;if(Nc?(Nc=!1,hu=e,Bp=m):(Cf=0,Zg=null),w=e.pendingLanes,w===ye&&(kf=null),H||ek(e.current,!1),yh(d.stateNode,l),hi&&e.memoizedUpdaters.clear(),UD(),ta(e,dr()),t!==null)for(var ee=e.onRecoverableError,ae=0;ae<t.length;ae++){var ce=t[ae],Be=ce.stack,gt=ce.digest;ee(ce.value,{componentStack:Be,digest:gt})}if(Xg){Xg=!1;var ot=jb;throw jb=null,ot}return vi(Bp,_t)&&e.tag!==ru&&pl(),w=e.pendingLanes,vi(w,_t)?(lA(),e===Ub?Hp++:(Hp=0,Ub=e)):Hp=0,iu(),xh(),null}function pl(){if(hu!==null){var e=fm(Bp),t=ic(Yi,e),o=ni.transition,l=Ki();try{return ni.transition=null,ir(t),aN()}finally{ir(l),ni.transition=o}}return!1}function iN(e){Lb.push(e),Nc||(Nc=!0,Wb(lo,function(){return pl(),null}))}function aN(){if(hu===null)return!1;var e=Pb;Pb=null;var t=hu,o=Bp;if(hu=null,Bp=ye,(Qt&(ri|Ga))!==Dr)throw new Error("Cannot flush passive effects while already rendering.");Mb=!0,Qg=!1,Bs(o);var l=Qt;Qt|=Ga,ED(t.current),bD(t,t.current,o,e);{var d=Lb;Lb=[];for(var m=0;m<d.length;m++){var w=d[m];oD(t,w)}}kh(),ek(t.current,!0),Qt=l,iu(),Qg?t===Zg?Cf++:(Cf=0,Zg=t):Cf=0,Mb=!1,Qg=!1,wh(t);{var x=t.current.stateNode;x.effectDuration=0,x.passiveEffectDuration=0}return!0}function XE(e){return kf!==null&&kf.has(e)}function oN(e){kf===null?kf=new Set([e]):kf.add(e)}function sN(e){Xg||(Xg=!0,jb=e)}var lN=sN;function QE(e,t,o){var l=Oc(o,t),d=K_(e,l,_t),m=ou(e,d,_t),w=Li();m!==null&&(Wl(m,_t,w),ta(m,w))}function jn(e,t,o){if(ZA(o),Yp(!1),e.tag===R){QE(e,e,o);return}var l=null;for(l=t;l!==null;){if(l.tag===R){QE(l,e,o);return}else if(l.tag===_){var d=l.type,m=l.stateNode;if(typeof d.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&!XE(m)){var w=Oc(o,e),x=lb(l,w,_t),E=ou(l,x,_t),D=Li();E!==null&&(Wl(E,_t,D),ta(E,D));return}}l=l.return}h(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
211
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:D=" You returned: "+x,h("%s must not return anything besides a function, which is used for clean-up.%s",E,D)}}}m=m.next}while(m!==d)}}function sD(e,t){if((t.flags&Jt)!==ft)switch(t.tag){case ie:{var o=t.stateNode.passiveEffectDuration,l=t.memoizedProps,d=l.id,m=l.onPostCommit,w=z_(),x=t.alternate===null?"mount":"update";I_()&&(x="nested-update"),typeof m=="function"&&m(d,x,o,w);var E=t.return;e:for(;E!==null;){switch(E.tag){case R:var D=E.stateNode;D.passiveEffectDuration+=o;break e;case ie:var L=E.stateNode;L.passiveEffectDuration+=o;break e}E=E.return}break}}}function lD(e,t,o,l){if((o.flags&Yo)!==ft)switch(o.tag){case b:case I:case ne:{if(!ei)if(o.mode&on)try{fs(),du(Rr|Tr,o)}finally{ds(o)}else du(Rr|Tr,o);break}case _:{var d=o.stateNode;if(o.flags&Jt&&!ei)if(t===null)if(o.type===o.elementType&&!Ac&&(d.props!==o.memoizedProps&&h("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(o)||"instance"),d.state!==o.memoizedState&&h("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(o)||"instance")),o.mode&on)try{fs(),d.componentDidMount()}finally{ds(o)}else d.componentDidMount();else{var m=o.elementType===o.type?t.memoizedProps:So(o.type,t.memoizedProps),w=t.memoizedState;if(o.type===o.elementType&&!Ac&&(d.props!==o.memoizedProps&&h("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(o)||"instance"),d.state!==o.memoizedState&&h("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(o)||"instance")),o.mode&on)try{fs(),d.componentDidUpdate(m,w,d.__reactInternalSnapshotBeforeUpdate)}finally{ds(o)}else d.componentDidUpdate(m,w,d.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&(o.type===o.elementType&&!Ac&&(d.props!==o.memoizedProps&&h("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Rt(o)||"instance"),d.state!==o.memoizedState&&h("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Rt(o)||"instance")),c_(o,x,d));break}case R:{var E=o.updateQueue;if(E!==null){var D=null;if(o.child!==null)switch(o.child.tag){case A:D=o.child.stateNode;break;case _:D=o.child.stateNode;break}c_(o,E,D)}break}case A:{var L=o.stateNode;if(t===null&&o.flags&Jt){var W=o.type,H=o.memoizedProps;CR(L,W,H)}break}case j:break;case N:break;case ie:{{var ee=o.memoizedProps,ae=ee.onCommit,ce=ee.onRender,Be=o.stateNode.effectDuration,gt=z_(),ot=t===null?"mount":"update";I_()&&(ot="nested-update"),typeof ce=="function"&&ce(o.memoizedProps.id,ot,o.actualDuration,o.treeBaseDuration,o.actualStartTime,gt);{typeof ae=="function"&&ae(o.memoizedProps.id,ot,Be,gt),aN(o);var Zt=o.return;e:for(;Zt!==null;){switch(Zt.tag){case R:var Gt=Zt.stateNode;Gt.effectDuration+=Be;break e;case ie:var J=Zt.stateNode;J.effectDuration+=Be;break e}Zt=Zt.return}}}break}case le:{mD(e,o);break}case ke:case oe:case me:case ue:case Oe:case De:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}ei||o.flags&Vn&&kE(o)}function uD(e){switch(e.tag){case b:case I:case ne:{if(e.mode&on)try{fs(),xE(e,e.return)}finally{ds(e)}else xE(e,e.return);break}case _:{var t=e.stateNode;typeof t.componentDidMount=="function"&&nD(e,e.return,t),_E(e,e.return);break}case A:{_E(e,e.return);break}}}function cD(e,t){for(var o=null,l=e;;){if(l.tag===A){if(o===null){o=l;try{var d=l.stateNode;t?UR(d):$R(l.stateNode,l.memoizedProps)}catch(w){jn(e,e.return,w)}}}else if(l.tag===j){if(o===null)try{var m=l.stateNode;t?MR(m):IR(m,l.memoizedProps)}catch(w){jn(e,e.return,w)}}else if(!((l.tag===ue||l.tag===Oe)&&l.memoizedState!==null&&l!==e)){if(l.child!==null){l.child.return=l,l=l.child;continue}}if(l===e)return;for(;l.sibling===null;){if(l.return===null||l.return===e)return;o===l&&(o=null),l=l.return}o===l&&(o=null),l.sibling.return=l.return,l=l.sibling}}function kE(e){var t=e.ref;if(t!==null){var o=e.stateNode,l;switch(e.tag){case A:l=o;break;default:l=o}if(typeof t=="function"){var d;if(e.mode&on)try{fs(),d=t(l)}finally{ds(e)}else d=t(l);typeof d=="function"&&h("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Rt(e))}else t.hasOwnProperty("current")||h("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Rt(e)),t.current=l}}function dD(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function CE(e){var t=e.alternate;t!==null&&(e.alternate=null,CE(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===A){var o=e.stateNode;o!==null&&gO(o)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function fD(e){for(var t=e.return;t!==null;){if(TE(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function TE(e){return e.tag===A||e.tag===R||e.tag===N}function RE(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||TE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==A&&t.tag!==j&&t.tag!==_e;){if(t.flags&In||t.child===null||t.tag===N)continue e;t.child.return=t,t=t.child}if(!(t.flags&In))return t.stateNode}}function hD(e){var t=fD(e);switch(t.tag){case A:{var o=t.stateNode;t.flags&Hi&&(Ax(o),t.flags&=~Hi);var l=RE(e);Cb(e,l,o);break}case R:case N:{var d=t.stateNode.containerInfo,m=RE(e);kb(e,m,d);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function kb(e,t,o){var l=e.tag,d=l===A||l===j;if(d){var m=e.stateNode;t?NR(o,m,t):AR(o,m)}else if(l!==N){var w=e.child;if(w!==null){kb(w,t,o);for(var x=w.sibling;x!==null;)kb(x,t,o),x=x.sibling}}}function Cb(e,t,o){var l=e.tag,d=l===A||l===j;if(d){var m=e.stateNode;t?DR(o,m,t):OR(o,m)}else if(l!==N){var w=e.child;if(w!==null){Cb(w,t,o);for(var x=w.sibling;x!==null;)Cb(x,t,o),x=x.sibling}}}var ti=null,Eo=!1;function pD(e,t,o){{var l=t;e:for(;l!==null;){switch(l.tag){case A:{ti=l.stateNode,Eo=!1;break e}case R:{ti=l.stateNode.containerInfo,Eo=!0;break e}case N:{ti=l.stateNode.containerInfo,Eo=!0;break e}}l=l.return}if(ti===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");OE(e,t,o),ti=null,Eo=!1}dD(o)}function fu(e,t,o){for(var l=o.child;l!==null;)OE(e,t,l),l=l.sibling}function OE(e,t,o){switch(bh(o),o.tag){case A:ei||Ef(o,t);case j:{{var l=ti,d=Eo;ti=null,fu(e,t,o),ti=l,Eo=d,ti!==null&&(Eo?LR(ti,o.stateNode):jR(ti,o.stateNode))}return}case _e:{ti!==null&&(Eo?PR(ti,o.stateNode):Mw(ti,o.stateNode));return}case N:{{var m=ti,w=Eo;ti=o.stateNode.containerInfo,Eo=!0,fu(e,t,o),ti=m,Eo=w}return}case b:case I:case fe:case ne:{if(!ei){var x=o.updateQueue;if(x!==null){var E=x.lastEffect;if(E!==null){var D=E.next,L=D;do{var W=L,H=W.destroy,ee=W.tag;H!==void 0&&((ee&ls)!==Zi?Yg(o,t,H):(ee&Rr)!==Zi&&(zu(o),o.mode&on?(fs(),Yg(o,t,H),ds(o)):Yg(o,t,H),Eh())),L=L.next}while(L!==D)}}}fu(e,t,o);return}case _:{if(!ei){Ef(o,t);var ae=o.stateNode;typeof ae.componentWillUnmount=="function"&&Eb(o,t,ae)}fu(e,t,o);return}case me:{fu(e,t,o);return}case ue:{if(o.mode&Bt){var ce=ei;ei=ce||o.memoizedState!==null,fu(e,t,o),ei=ce}else fu(e,t,o);break}default:{fu(e,t,o);return}}}function vD(e){e.memoizedState}function mD(e,t){var o=t.memoizedState;if(o===null){var l=t.alternate;if(l!==null){var d=l.memoizedState;if(d!==null){var m=d.dehydrated;m!==null&&eO(m)}}}}function AE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new ZA),t.forEach(function(l){var d=fN.bind(null,e,l);if(!o.has(l)){if(o.add(l),hi)if(xf!==null&&_f!==null)qp(_f,xf);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");l.then(d,d)}})}}function gD(e,t,o){xf=o,_f=e,bn(t),DE(t,e),bn(t),xf=null,_f=null}function ko(e,t,o){var l=t.deletions;if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];try{pD(e,t,m)}catch(E){jn(m,t,E)}}var w=Uo();if(t.subtreeFlags&qo)for(var x=t.child;x!==null;)bn(x),DE(x,e),x=x.sibling;bn(w)}function DE(e,t,o){var l=e.alternate,d=e.flags;switch(e.tag){case b:case I:case fe:case ne:{if(ko(t,e),hs(e),d&Jt){try{_o(ls|Tr,e,e.return),du(ls|Tr,e)}catch(Et){jn(e,e.return,Et)}if(e.mode&on){try{fs(),_o(Rr|Tr,e,e.return)}catch(Et){jn(e,e.return,Et)}ds(e)}else try{_o(Rr|Tr,e,e.return)}catch(Et){jn(e,e.return,Et)}}return}case _:{ko(t,e),hs(e),d&Vn&&l!==null&&Ef(l,l.return);return}case A:{ko(t,e),hs(e),d&Vn&&l!==null&&Ef(l,l.return);{if(e.flags&Hi){var m=e.stateNode;try{Ax(m)}catch(Et){jn(e,e.return,Et)}}if(d&Jt){var w=e.stateNode;if(w!=null){var x=e.memoizedProps,E=l!==null?l.memoizedProps:x,D=e.type,L=e.updateQueue;if(e.updateQueue=null,L!==null)try{TR(w,L,D,E,x,e)}catch(Et){jn(e,e.return,Et)}}}}return}case j:{if(ko(t,e),hs(e),d&Jt){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var W=e.stateNode,H=e.memoizedProps,ee=l!==null?l.memoizedProps:H;try{RR(W,ee,H)}catch(Et){jn(e,e.return,Et)}}return}case R:{if(ko(t,e),hs(e),d&Jt&&l!==null){var ae=l.memoizedState;if(ae.isDehydrated)try{ZR(t.containerInfo)}catch(Et){jn(e,e.return,Et)}}return}case N:{ko(t,e),hs(e);return}case le:{ko(t,e),hs(e);var ce=e.child;if(ce.flags&er){var Be=ce.stateNode,gt=ce.memoizedState,ot=gt!==null;if(Be.isHidden=ot,ot){var Zt=ce.alternate!==null&&ce.alternate.memoizedState!==null;Zt||XD()}}if(d&Jt){try{vD(e)}catch(Et){jn(e,e.return,Et)}AE(e)}return}case ue:{var Gt=l!==null&&l.memoizedState!==null;if(e.mode&Bt){var J=ei;ei=J||Gt,ko(t,e),ei=J}else ko(t,e);if(hs(e),d&er){var de=e.stateNode,X=e.memoizedState,Te=X!==null,Ge=e;if(de.isHidden=Te,Te&&!Gt&&(Ge.mode&Bt)!==ht){tt=Ge;for(var We=Ge.child;We!==null;)tt=We,wD(We),We=We.sibling}cD(Ge,Te)}return}case ke:{ko(t,e),hs(e),d&Jt&&AE(e);return}case me:return;default:{ko(t,e),hs(e);return}}}function hs(e){var t=e.flags;if(t&In){try{hD(e)}catch(o){jn(e,e.return,o)}e.flags&=~In}t&ci&&(e.flags&=~ci)}function yD(e,t,o){xf=o,_f=t,tt=e,NE(e,t,o),xf=null,_f=null}function NE(e,t,o){for(var l=(e.mode&Bt)!==ht;tt!==null;){var d=tt,m=d.child;if(d.tag===ue&&l){var w=d.memoizedState!==null,x=w||qg;if(x){Tb(e,t,o);continue}else{var E=d.alternate,D=E!==null&&E.memoizedState!==null,L=D||ei,W=qg,H=ei;qg=x,ei=L,ei&&!H&&(tt=d,bD(d));for(var ee=m;ee!==null;)tt=ee,NE(ee,t,o),ee=ee.sibling;tt=d,qg=W,ei=H,Tb(e,t,o);continue}}(d.subtreeFlags&Yo)!==ft&&m!==null?(m.return=d,tt=m):Tb(e,t,o)}}function Tb(e,t,o){for(;tt!==null;){var l=tt;if((l.flags&Yo)!==ft){var d=l.alternate;bn(l);try{lD(t,d,l,o)}catch(w){jn(l,l.return,w)}Nn()}if(l===e){tt=null;return}var m=l.sibling;if(m!==null){m.return=l.return,tt=m;return}tt=l.return}}function wD(e){for(;tt!==null;){var t=tt,o=t.child;switch(t.tag){case b:case I:case fe:case ne:{if(t.mode&on)try{fs(),_o(Rr,t,t.return)}finally{ds(t)}else _o(Rr,t,t.return);break}case _:{Ef(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Eb(t,t.return,l);break}case A:{Ef(t,t.return);break}case ue:{var d=t.memoizedState!==null;if(d){jE(e);continue}break}}o!==null?(o.return=t,tt=o):jE(e)}}function jE(e){for(;tt!==null;){var t=tt;if(t===e){tt=null;return}var o=t.sibling;if(o!==null){o.return=t.return,tt=o;return}tt=t.return}}function bD(e){for(;tt!==null;){var t=tt,o=t.child;if(t.tag===ue){var l=t.memoizedState!==null;if(l){LE(e);continue}}o!==null?(o.return=t,tt=o):LE(e)}}function LE(e){for(;tt!==null;){var t=tt;bn(t);try{uD(t)}catch(l){jn(t,t.return,l)}if(Nn(),t===e){tt=null;return}var o=t.sibling;if(o!==null){o.return=t.return,tt=o;return}tt=t.return}}function SD(e,t,o,l){tt=t,xD(t,e,o,l)}function xD(e,t,o,l){for(;tt!==null;){var d=tt,m=d.child;(d.subtreeFlags&so)!==ft&&m!==null?(m.return=d,tt=m):_D(e,t,o,l)}}function _D(e,t,o,l){for(;tt!==null;){var d=tt;if((d.flags&ui)!==ft){bn(d);try{ED(t,d,o,l)}catch(w){jn(d,d.return,w)}Nn()}if(d===e){tt=null;return}var m=d.sibling;if(m!==null){m.return=d.return,tt=m;return}tt=d.return}}function ED(e,t,o,l){switch(t.tag){case b:case I:case ne:{if(t.mode&on){q0();try{du(Qr|Tr,t)}finally{W0(t)}}else du(Qr|Tr,t);break}}}function kD(e){tt=e,CD()}function CD(){for(;tt!==null;){var e=tt,t=e.child;if((tt.flags&Bi)!==ft){var o=e.deletions;if(o!==null){for(var l=0;l<o.length;l++){var d=o[l];tt=d,OD(d,e)}{var m=e.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}}tt=e}}(e.subtreeFlags&so)!==ft&&t!==null?(t.return=e,tt=t):TD()}}function TD(){for(;tt!==null;){var e=tt;(e.flags&ui)!==ft&&(bn(e),RD(e),Nn());var t=e.sibling;if(t!==null){t.return=e.return,tt=t;return}tt=e.return}}function RD(e){switch(e.tag){case b:case I:case ne:{e.mode&on?(q0(),_o(Qr|Tr,e,e.return),W0(e)):_o(Qr|Tr,e,e.return);break}}}function OD(e,t){for(;tt!==null;){var o=tt;bn(o),DD(o,t),Nn();var l=o.child;l!==null?(l.return=o,tt=l):AD(e)}}function AD(e){for(;tt!==null;){var t=tt,o=t.sibling,l=t.return;if(CE(t),t===e){tt=null;return}if(o!==null){o.return=l,tt=o;return}tt=l}}function DD(e,t){switch(e.tag){case b:case I:case ne:{e.mode&on?(q0(),_o(Qr,e,t),W0(e)):_o(Qr,e,t);break}}}function ND(e){switch(e.tag){case b:case I:case ne:{try{du(Rr|Tr,e)}catch(o){jn(e,e.return,o)}break}case _:{var t=e.stateNode;try{t.componentDidMount()}catch(o){jn(e,e.return,o)}break}}}function jD(e){switch(e.tag){case b:case I:case ne:{try{du(Qr|Tr,e)}catch(t){jn(e,e.return,t)}break}}}function LD(e){switch(e.tag){case b:case I:case ne:{try{_o(Rr|Tr,e,e.return)}catch(o){jn(e,e.return,o)}break}case _:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Eb(e,e.return,t);break}}}function PD(e){switch(e.tag){case b:case I:case ne:try{_o(Qr|Tr,e,e.return)}catch(t){jn(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Pp=Symbol.for;Pp("selector.component"),Pp("selector.has_pseudo_class"),Pp("selector.role"),Pp("selector.test_id"),Pp("selector.text")}var UD=[];function MD(){UD.forEach(function(e){return e()})}var $D=s.ReactCurrentActQueue;function ID(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,o=typeof jest<"u";return o&&t!==!1}}function PE(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&$D.current!==null&&h("The current testing environment is not configured to support act(...)"),e}}var zD=Math.ceil,Rb=s.ReactCurrentDispatcher,Ob=s.ReactCurrentOwner,ni=s.ReactCurrentBatchConfig,Co=s.ReactCurrentActQueue,Dr=0,UE=1,ri=2,Ga=4,dl=0,Up=1,Dc=2,Gg=3,Mp=4,ME=5,Ab=6,Qt=Dr,ji=null,Qn=null,Nr=ye,ps=ye,Db=nu(ye),jr=dl,$p=null,Kg=ye,Ip=ye,Jg=ye,zp=null,ea=null,Nb=0,$E=500,IE=1/0,FD=500,fl=null;function Fp(){IE=dr()+FD}function zE(){return IE}var Xg=!1,jb=null,kf=null,Nc=!1,hu=null,Bp=ye,Lb=[],Pb=null,BD=50,Hp=0,Ub=null,Mb=!1,Qg=!1,HD=50,Cf=0,Zg=null,Vp=Cn,ey=ye,FE=!1;function ty(){return ji}function Li(){return(Qt&(ri|Ga))!==Dr?dr():(Vp!==Cn||(Vp=dr()),Vp)}function pu(e){var t=e.mode;if((t&Bt)===ht)return _t;if((Qt&ri)!==Dr&&Nr!==ye)return Zu(Nr);var o=$O()!==MO;if(o){if(ni.transition!==null){var l=ni.transition;l._updatedFibers||(l._updatedFibers=new Set),l._updatedFibers.add(e)}return ey===nn&&(ey=Nh()),ey}var d=Ki();if(d!==nn)return d;var m=xR();return m}function VD(e){var t=e.mode;return(t&Bt)===ht?_t:am()}function Lr(e,t,o,l){pN(),FE&&h("useInsertionEffect must not schedule updates."),Mb&&(Qg=!0),Wl(e,o,l),(Qt&ri)!==ye&&e===ji?gN(t):(hi&&nc(e,t,o),yN(t),e===ji&&((Qt&ri)===Dr&&(Ip=Pt(Ip,o)),jr===Mp&&vu(e,Nr)),ta(e,l),o===_t&&Qt===Dr&&(t.mode&Bt)===ht&&!Co.isBatchingLegacy&&(Fp(),Fx()))}function WD(e,t,o){var l=e.current;l.lanes=t,Wl(e,t,o),ta(e,o)}function qD(e){return(Qt&ri)!==Dr}function ta(e,t){var o=e.callbackNode;Ld(e,t);var l=jd(e,e===ji?Nr:ye);if(l===ye){o!==null&&rk(o),e.callbackNode=null,e.callbackPriority=nn;return}var d=Qo(l),m=e.callbackPriority;if(m===d&&!(Co.current!==null&&o!==Vb)){o==null&&m!==_t&&h("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}o!=null&&rk(o);var w;if(d===_t)e.tag===ru?(Co.isBatchingLegacy!==null&&(Co.didScheduleLegacyUpdate=!0),bO(VE.bind(null,e))):zx(VE.bind(null,e)),Co.current!==null?Co.current.push(iu):ER(function(){(Qt&(ri|Ga))===Dr&&iu()}),w=null;else{var x;switch(fm(l)){case qr:x=Iu;break;case $a:x=Go;break;case Yi:x=lo;break;case Gi:x=Is;break;default:x=lo;break}w=Wb(x,BE.bind(null,e))}e.callbackPriority=d,e.callbackNode=w}function BE(e,t){if(cA(),Vp=Cn,ey=ye,(Qt&(ri|Ga))!==Dr)throw new Error("Should not already be working.");var o=e.callbackNode,l=pl();if(l&&e.callbackNode!==o)return null;var d=jd(e,e===ji?Nr:ye);if(d===ye)return null;var m=!Ud(e,d)&&!im(e,d)&&!t,w=m?nN(e,d):ry(e,d);if(w!==dl){if(w===Dc){var x=Pd(e);x!==ye&&(d=x,w=$b(e,x))}if(w===Up){var E=$p;throw jc(e,ye),vu(e,d),ta(e,dr()),E}if(w===Ab)vu(e,d);else{var D=!Ud(e,d),L=e.current.alternate;if(D&&!GD(L)){if(w=ry(e,d),w===Dc){var W=Pd(e);W!==ye&&(d=W,w=$b(e,W))}if(w===Up){var H=$p;throw jc(e,ye),vu(e,d),ta(e,dr()),H}}e.finishedWork=L,e.finishedLanes=d,YD(e,w,d)}}return ta(e,dr()),e.callbackNode===o?BE.bind(null,e):null}function $b(e,t){var o=zp;if(Id(e)){var l=jc(e,t);l.flags|=Ur,hO(e.containerInfo)}var d=ry(e,t);if(d!==Dc){var m=ea;ea=o,m!==null&&HE(m)}return d}function HE(e){ea===null?ea=e:ea.push.apply(ea,e)}function YD(e,t,o){switch(t){case dl:case Up:throw new Error("Root did not complete. This is a bug in React.");case Dc:{Lc(e,ea,fl);break}case Gg:{if(vu(e,o),Js(o)&&!ik()){var l=Nb+$E-dr();if(l>10){var d=jd(e,ye);if(d!==ye)break;var m=e.suspendedLanes;if(!Xs(m,o)){Li(),Md(e,m);break}e.timeoutHandle=Pw(Lc.bind(null,e,ea,fl),l);break}}Lc(e,ea,fl);break}case Mp:{if(vu(e,o),Ah(o))break;if(!ik()){var w=ma(e,o),x=w,E=dr()-x,D=hN(E)-E;if(D>10){e.timeoutHandle=Pw(Lc.bind(null,e,ea,fl),D);break}}Lc(e,ea,fl);break}case ME:{Lc(e,ea,fl);break}default:throw new Error("Unknown root exit status.")}}function GD(e){for(var t=e;;){if(t.flags&zl){var o=t.updateQueue;if(o!==null){var l=o.stores;if(l!==null)for(var d=0;d<l.length;d++){var m=l[d],w=m.getSnapshot,x=m.value;try{if(!xe(w(),x))return!1}catch{return!1}}}}var E=t.child;if(t.subtreeFlags&zl&&E!==null){E.return=t,t=E;continue}if(t===e)return!0;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}return!0}function vu(e,t){t=ec(t,Jg),t=ec(t,Ip),lm(e,t)}function VE(e){if(dA(),(Qt&(ri|Ga))!==Dr)throw new Error("Should not already be working.");pl();var t=jd(e,ye);if(!vi(t,_t))return ta(e,dr()),null;var o=ry(e,t);if(e.tag!==ru&&o===Dc){var l=Pd(e);l!==ye&&(t=l,o=$b(e,l))}if(o===Up){var d=$p;throw jc(e,ye),vu(e,t),ta(e,dr()),d}if(o===Ab)throw new Error("Root did not complete. This is a bug in React.");var m=e.current.alternate;return e.finishedWork=m,e.finishedLanes=t,Lc(e,ea,fl),ta(e,dr()),null}function KD(e,t){t!==ye&&($d(e,Pt(t,_t)),ta(e,dr()),(Qt&(ri|Ga))===Dr&&(Fp(),iu()))}function Ib(e,t){var o=Qt;Qt|=UE;try{return e(t)}finally{Qt=o,Qt===Dr&&!Co.isBatchingLegacy&&(Fp(),Fx())}}function JD(e,t,o,l,d){var m=Ki(),w=ni.transition;try{return ni.transition=null,ir(qr),e(t,o,l,d)}finally{ir(m),ni.transition=w,Qt===Dr&&Fp()}}function hl(e){hu!==null&&hu.tag===ru&&(Qt&(ri|Ga))===Dr&&pl();var t=Qt;Qt|=UE;var o=ni.transition,l=Ki();try{return ni.transition=null,ir(qr),e?e():void 0}finally{ir(l),ni.transition=o,Qt=t,(Qt&(ri|Ga))===Dr&&iu()}}function WE(){return(Qt&(ri|Ga))!==Dr}function ny(e,t){bi(Db,ps,e),ps=Pt(ps,t)}function zb(e){ps=Db.current,wi(Db,e)}function jc(e,t){e.finishedWork=null,e.finishedLanes=ye;var o=e.timeoutHandle;if(o!==Uw&&(e.timeoutHandle=Uw,_R(o)),Qn!==null)for(var l=Qn.return;l!==null;){var d=l.alternate;bE(d,l),l=l.return}ji=e;var m=Pc(e.current,null);return Qn=m,Nr=ps=t,jr=dl,$p=null,Kg=ye,Ip=ye,Jg=ye,zp=null,ea=null,WO(),yo.discardPendingWarnings(),m}function qE(e,t){do{var o=Qn;try{if(fg(),m_(),Nn(),Ob.current=null,o===null||o.return===null){jr=Up,$p=t,Qn=null;return}if(Ve&&o.mode&on&&Fg(o,!0),Le)if(Oi(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var l=t;Ma(o,l,Nr)}else Fu(o,t,Nr);bA(e,o.return,o,t,Nr),JE(o)}catch(d){t=d,Qn===o&&o!==null?(o=o.return,Qn=o):o=Qn;continue}return}while(!0)}function YE(){var e=Rb.current;return Rb.current=Ug,e===null?Ug:e}function GE(e){Rb.current=e}function XD(){Nb=dr()}function Wp(e){Kg=Pt(e,Kg)}function QD(){jr===dl&&(jr=Gg)}function Fb(){(jr===dl||jr===Gg||jr===Dc)&&(jr=Mp),ji!==null&&(Qu(Kg)||Qu(Ip))&&vu(ji,Nr)}function ZD(e){jr!==Mp&&(jr=Dc),zp===null?zp=[e]:zp.push(e)}function eN(){return jr===dl}function ry(e,t){var o=Qt;Qt|=ri;var l=YE();if(ji!==e||Nr!==t){if(hi){var d=e.memoizedUpdaters;d.size>0&&(qp(e,Nr),d.clear()),um(e,t)}fl=Uh(),jc(e,t)}Hs(t);do try{tN();break}catch(m){qE(e,m)}while(!0);if(fg(),Qt=o,GE(l),Qn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return vd(),ji=null,Nr=ye,jr}function tN(){for(;Qn!==null;)KE(Qn)}function nN(e,t){var o=Qt;Qt|=ri;var l=YE();if(ji!==e||Nr!==t){if(hi){var d=e.memoizedUpdaters;d.size>0&&(qp(e,Nr),d.clear()),um(e,t)}fl=Uh(),Fp(),jc(e,t)}Hs(t);do try{rN();break}catch(m){qE(e,m)}while(!0);return fg(),GE(l),Qt=o,Qn!==null?(em(),dl):(vd(),ji=null,Nr=ye,jr)}function rN(){for(;Qn!==null&&!vh();)KE(Qn)}function KE(e){var t=e.alternate;bn(e);var o;(e.mode&on)!==ht?(V0(e),o=Bb(t,e,ps),Fg(e,!0)):o=Bb(t,e,ps),Nn(),e.memoizedProps=e.pendingProps,o===null?JE(e):Qn=o,Ob.current=null}function JE(e){var t=e;do{var o=t.alternate,l=t.return;if((t.flags&$u)===ft){bn(t);var d=void 0;if((t.mode&on)===ht?d=wE(o,t,ps):(V0(t),d=wE(o,t,ps),Fg(t,!1)),Nn(),d!==null){Qn=d;return}}else{var m=QA(o,t);if(m!==null){m.flags&=Gv,Qn=m;return}if((t.mode&on)!==ht){Fg(t,!1);for(var w=t.actualDuration,x=t.child;x!==null;)w+=x.actualDuration,x=x.sibling;t.actualDuration=w}if(l!==null)l.flags|=$u,l.subtreeFlags=ft,l.deletions=null;else{jr=Ab,Qn=null;return}}var E=t.sibling;if(E!==null){Qn=E;return}t=l,Qn=t}while(t!==null);jr===dl&&(jr=ME)}function Lc(e,t,o){var l=Ki(),d=ni.transition;try{ni.transition=null,ir(qr),iN(e,t,o,l)}finally{ni.transition=d,ir(l)}return null}function iN(e,t,o,l){do pl();while(hu!==null);if(vN(),(Qt&(ri|Ga))!==Dr)throw new Error("Should not already be working.");var d=e.finishedWork,m=e.finishedLanes;if(Sh(m),d===null)return xh(),null;if(m===ye&&h("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=ye,d===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=nn;var w=Pt(d.lanes,d.childLanes);Lh(e,w),e===ji&&(ji=null,Qn=null,Nr=ye),((d.subtreeFlags&so)!==ft||(d.flags&so)!==ft)&&(Nc||(Nc=!0,Pb=o,Wb(lo,function(){return pl(),null})));var x=(d.subtreeFlags&(Wo|qo|Yo|so))!==ft,E=(d.flags&(Wo|qo|Yo|so))!==ft;if(x||E){var D=ni.transition;ni.transition=null;var L=Ki();ir(qr);var W=Qt;Qt|=Ga,Ob.current=null,rD(e,d),F_(),gD(e,d,m),mR(e.containerInfo),e.current=d,Bu(m),yD(d,e,m),Hu(),mh(),Qt=W,ir(L),ni.transition=D}else e.current=d,F_();var H=Nc;if(Nc?(Nc=!1,hu=e,Bp=m):(Cf=0,Zg=null),w=e.pendingLanes,w===ye&&(kf=null),H||ek(e.current,!1),yh(d.stateNode,l),hi&&e.memoizedUpdaters.clear(),MD(),ta(e,dr()),t!==null)for(var ee=e.onRecoverableError,ae=0;ae<t.length;ae++){var ce=t[ae],Be=ce.stack,gt=ce.digest;ee(ce.value,{componentStack:Be,digest:gt})}if(Xg){Xg=!1;var ot=jb;throw jb=null,ot}return vi(Bp,_t)&&e.tag!==ru&&pl(),w=e.pendingLanes,vi(w,_t)?(uA(),e===Ub?Hp++:(Hp=0,Ub=e)):Hp=0,iu(),xh(),null}function pl(){if(hu!==null){var e=fm(Bp),t=ic(Yi,e),o=ni.transition,l=Ki();try{return ni.transition=null,ir(t),oN()}finally{ir(l),ni.transition=o}}return!1}function aN(e){Lb.push(e),Nc||(Nc=!0,Wb(lo,function(){return pl(),null}))}function oN(){if(hu===null)return!1;var e=Pb;Pb=null;var t=hu,o=Bp;if(hu=null,Bp=ye,(Qt&(ri|Ga))!==Dr)throw new Error("Cannot flush passive effects while already rendering.");Mb=!0,Qg=!1,Bs(o);var l=Qt;Qt|=Ga,kD(t.current),SD(t,t.current,o,e);{var d=Lb;Lb=[];for(var m=0;m<d.length;m++){var w=d[m];sD(t,w)}}kh(),ek(t.current,!0),Qt=l,iu(),Qg?t===Zg?Cf++:(Cf=0,Zg=t):Cf=0,Mb=!1,Qg=!1,wh(t);{var x=t.current.stateNode;x.effectDuration=0,x.passiveEffectDuration=0}return!0}function XE(e){return kf!==null&&kf.has(e)}function sN(e){kf===null?kf=new Set([e]):kf.add(e)}function lN(e){Xg||(Xg=!0,jb=e)}var uN=lN;function QE(e,t,o){var l=Oc(o,t),d=K_(e,l,_t),m=ou(e,d,_t),w=Li();m!==null&&(Wl(m,_t,w),ta(m,w))}function jn(e,t,o){if(eD(o),Yp(!1),e.tag===R){QE(e,e,o);return}var l=null;for(l=t;l!==null;){if(l.tag===R){QE(l,e,o);return}else if(l.tag===_){var d=l.type,m=l.stateNode;if(typeof d.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&!XE(m)){var w=Oc(o,e),x=lb(l,w,_t),E=ou(l,x,_t),D=Li();E!==null&&(Wl(E,_t,D),ta(E,D));return}}l=l.return}h(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
212
212
 
213
213
  Error message:
214
214
 
215
- %s`,o)}function uN(e,t,o){var l=e.pingCache;l!==null&&l.delete(t);var d=Li();Md(e,o),yN(e),ji===e&&Xs(Nr,o)&&(jr===Mp||jr===Gg&&Js(Nr)&&dr()-Nb<$E?jc(e,ye):Jg=Pt(Jg,o)),ta(e,d)}function ZE(e,t){t===nn&&(t=HD(e));var o=Li(),l=Qi(e,t);l!==null&&(Wl(l,t,o),ta(l,o))}function cN(e){var t=e.memoizedState,o=nn;t!==null&&(o=t.retryLane),ZE(e,o)}function dN(e,t){var o=nn,l;switch(e.tag){case le:l=e.stateNode;var d=e.memoizedState;d!==null&&(o=d.retryLane);break;case ke:l=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}l!==null&&l.delete(t),ZE(e,o)}function fN(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:ID(e/1960)*1960}function hN(){if(Hp>FD)throw Hp=0,Ub=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Cf>BD&&(Cf=0,Zg=null,h("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function pN(){yo.flushLegacyContextWarning(),yo.flushPendingUnsafeLifecycleWarnings()}function ek(e,t){bn(e),iy(e,Vo,jD),t&&iy(e,La,LD),iy(e,Vo,DD),t&&iy(e,La,ND),Nn()}function iy(e,t,o){for(var l=e,d=null;l!==null;){var m=l.subtreeFlags&t;l!==d&&l.child!==null&&m!==ft?l=l.child:((l.flags&t)!==ft&&o(l),l.sibling!==null?l=l.sibling:l=d=l.return)}}var ay=null;function tk(e){{if((Qt&ri)!==Dr||!(e.mode&Bt))return;var t=e.tag;if(t!==k&&t!==R&&t!==_&&t!==b&&t!==I&&t!==fe&&t!==ne)return;var o=Rt(e)||"ReactComponent";if(ay!==null){if(ay.has(o))return;ay.add(o)}else ay=new Set([o]);var l=xr;try{bn(e),h("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{l?bn(e):Nn()}}}var Bb;{var vN=null;Bb=function(e,t,o){var l=uk(vN,t);try{return pE(e,t,o)}catch(m){if(TO()||m!==null&&typeof m=="object"&&typeof m.then=="function")throw m;if(fg(),m_(),bE(e,t),uk(t,l),t.mode&on&&V0(t),Ho(null,pE,null,e,t,o),ao()){var d=Mu();typeof d=="object"&&d!==null&&d._suppressLogging&&typeof m=="object"&&m!==null&&!m._suppressLogging&&(m._suppressLogging=!0)}throw m}}}var nk=!1,Hb;Hb=new Set;function mN(e){if(Ta&&!aA())switch(e.tag){case b:case I:case ne:{var t=Qn&&Rt(Qn)||"Unknown",o=t;if(!Hb.has(o)){Hb.add(o);var l=Rt(e)||"Unknown";h("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",l,t,t)}break}case _:{nk||(h("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),nk=!0);break}}}function qp(e,t){if(hi){var o=e.memoizedUpdaters;o.forEach(function(l){nc(e,l,t)})}}var Vb={};function Wb(e,t){{var o=Co.current;return o!==null?(o.push(t),Vb):ph(e,t)}}function rk(e){if(e!==Vb)return Jv(e)}function ik(){return Co.current!==null}function gN(e){{if(e.mode&Bt){if(!PE())return}else if(!$D()||Qt!==Dr||e.tag!==b&&e.tag!==I&&e.tag!==ne)return;if(Co.current===null){var t=xr;try{bn(e),h(`An update to %s inside a test was not wrapped in act(...).
215
+ %s`,o)}function cN(e,t,o){var l=e.pingCache;l!==null&&l.delete(t);var d=Li();Md(e,o),wN(e),ji===e&&Xs(Nr,o)&&(jr===Mp||jr===Gg&&Js(Nr)&&dr()-Nb<$E?jc(e,ye):Jg=Pt(Jg,o)),ta(e,d)}function ZE(e,t){t===nn&&(t=VD(e));var o=Li(),l=Qi(e,t);l!==null&&(Wl(l,t,o),ta(l,o))}function dN(e){var t=e.memoizedState,o=nn;t!==null&&(o=t.retryLane),ZE(e,o)}function fN(e,t){var o=nn,l;switch(e.tag){case le:l=e.stateNode;var d=e.memoizedState;d!==null&&(o=d.retryLane);break;case ke:l=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}l!==null&&l.delete(t),ZE(e,o)}function hN(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:zD(e/1960)*1960}function pN(){if(Hp>BD)throw Hp=0,Ub=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Cf>HD&&(Cf=0,Zg=null,h("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function vN(){yo.flushLegacyContextWarning(),yo.flushPendingUnsafeLifecycleWarnings()}function ek(e,t){bn(e),iy(e,Vo,LD),t&&iy(e,La,PD),iy(e,Vo,ND),t&&iy(e,La,jD),Nn()}function iy(e,t,o){for(var l=e,d=null;l!==null;){var m=l.subtreeFlags&t;l!==d&&l.child!==null&&m!==ft?l=l.child:((l.flags&t)!==ft&&o(l),l.sibling!==null?l=l.sibling:l=d=l.return)}}var ay=null;function tk(e){{if((Qt&ri)!==Dr||!(e.mode&Bt))return;var t=e.tag;if(t!==k&&t!==R&&t!==_&&t!==b&&t!==I&&t!==fe&&t!==ne)return;var o=Rt(e)||"ReactComponent";if(ay!==null){if(ay.has(o))return;ay.add(o)}else ay=new Set([o]);var l=xr;try{bn(e),h("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{l?bn(e):Nn()}}}var Bb;{var mN=null;Bb=function(e,t,o){var l=uk(mN,t);try{return pE(e,t,o)}catch(m){if(RO()||m!==null&&typeof m=="object"&&typeof m.then=="function")throw m;if(fg(),m_(),bE(e,t),uk(t,l),t.mode&on&&V0(t),Ho(null,pE,null,e,t,o),ao()){var d=Mu();typeof d=="object"&&d!==null&&d._suppressLogging&&typeof m=="object"&&m!==null&&!m._suppressLogging&&(m._suppressLogging=!0)}throw m}}}var nk=!1,Hb;Hb=new Set;function gN(e){if(Ta&&!oA())switch(e.tag){case b:case I:case ne:{var t=Qn&&Rt(Qn)||"Unknown",o=t;if(!Hb.has(o)){Hb.add(o);var l=Rt(e)||"Unknown";h("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",l,t,t)}break}case _:{nk||(h("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),nk=!0);break}}}function qp(e,t){if(hi){var o=e.memoizedUpdaters;o.forEach(function(l){nc(e,l,t)})}}var Vb={};function Wb(e,t){{var o=Co.current;return o!==null?(o.push(t),Vb):ph(e,t)}}function rk(e){if(e!==Vb)return Jv(e)}function ik(){return Co.current!==null}function yN(e){{if(e.mode&Bt){if(!PE())return}else if(!ID()||Qt!==Dr||e.tag!==b&&e.tag!==I&&e.tag!==ne)return;if(Co.current===null){var t=xr;try{bn(e),h(`An update to %s inside a test was not wrapped in act(...).
216
216
 
217
217
  When testing, code that causes React state updates should be wrapped into act(...):
218
218
 
@@ -221,7 +221,7 @@ act(() => {
221
221
  });
222
222
  /* assert on the output */
223
223
 
224
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,Rt(e))}finally{t?bn(e):Nn()}}}}function yN(e){e.tag!==ru&&PE()&&Co.current===null&&h(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
224
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,Rt(e))}finally{t?bn(e):Nn()}}}}function wN(e){e.tag!==ru&&PE()&&Co.current===null&&h(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
225
225
 
226
226
  When testing, code that resolves suspended data should be wrapped into act(...):
227
227
 
@@ -230,28 +230,28 @@ act(() => {
230
230
  });
231
231
  /* assert on the output */
232
232
 
233
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function Yp(e){FE=e}var Ka=null,Tf=null,wN=function(e){Ka=e};function Rf(e){{if(Ka===null)return e;var t=Ka(e);return t===void 0?e:t.current}}function qb(e){return Rf(e)}function Yb(e){{if(Ka===null)return e;var t=Ka(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var o=Rf(e.render);if(e.render!==o){var l={$$typeof:ve,render:o};return e.displayName!==void 0&&(l.displayName=e.displayName),l}}return e}return t.current}}function ak(e,t){{if(Ka===null)return!1;var o=e.elementType,l=t.type,d=!1,m=typeof l=="object"&&l!==null?l.$$typeof:null;switch(e.tag){case _:{typeof l=="function"&&(d=!0);break}case b:{(typeof l=="function"||m===At)&&(d=!0);break}case I:{(m===ve||m===At)&&(d=!0);break}case fe:case ne:{(m===jt||m===At)&&(d=!0);break}default:return!1}if(d){var w=Ka(o);if(w!==void 0&&w===Ka(l))return!0}return!1}}function ok(e){{if(Ka===null||typeof WeakSet!="function")return;Tf===null&&(Tf=new WeakSet),Tf.add(e)}}var bN=function(e,t){{if(Ka===null)return;var o=t.staleFamilies,l=t.updatedFamilies;pl(),hl(function(){Gb(e.current,l,o)})}},SN=function(e,t){{if(e.context!==wa)return;pl(),hl(function(){Gp(t,e,null,null)})}};function Gb(e,t,o){{var l=e.alternate,d=e.child,m=e.sibling,w=e.tag,x=e.type,E=null;switch(w){case b:case ne:case _:E=x;break;case I:E=x.render;break}if(Ka===null)throw new Error("Expected resolveFamily to be set during hot reload.");var D=!1,L=!1;if(E!==null){var W=Ka(E);W!==void 0&&(o.has(W)?L=!0:t.has(W)&&(w===_?L=!0:D=!0))}if(Tf!==null&&(Tf.has(e)||l!==null&&Tf.has(l))&&(L=!0),L&&(e._debugNeedsRemount=!0),L||D){var H=Qi(e,_t);H!==null&&Lr(H,e,_t,Cn)}d!==null&&!L&&Gb(d,t,o),m!==null&&Gb(m,t,o)}}var xN=function(e,t){{var o=new Set,l=new Set(t.map(function(d){return d.current}));return Kb(e.current,l,o),o}};function Kb(e,t,o){{var l=e.child,d=e.sibling,m=e.tag,w=e.type,x=null;switch(m){case b:case ne:case _:x=w;break;case I:x=w.render;break}var E=!1;x!==null&&t.has(x)&&(E=!0),E?_N(e,o):l!==null&&Kb(l,t,o),d!==null&&Kb(d,t,o)}}function _N(e,t){{var o=EN(e,t);if(o)return;for(var l=e;;){switch(l.tag){case A:t.add(l.stateNode);return;case N:t.add(l.stateNode.containerInfo);return;case R:t.add(l.stateNode.containerInfo);return}if(l.return===null)throw new Error("Expected to reach root first.");l=l.return}}}function EN(e,t){for(var o=e,l=!1;;){if(o.tag===A)l=!0,t.add(o.stateNode);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)return l;for(;o.sibling===null;){if(o.return===null||o.return===e)return l;o=o.return}o.sibling.return=o.return,o=o.sibling}return!1}var Jb;{Jb=!1;try{var sk=Object.preventExtensions({})}catch{Jb=!0}}function kN(e,t,o,l){this.tag=e,this.key=o,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=l,this.flags=ft,this.subtreeFlags=ft,this.deletions=null,this.lanes=ye,this.childLanes=ye,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!Jb&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var ba=function(e,t,o,l){return new kN(e,t,o,l)};function Xb(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function CN(e){return typeof e=="function"&&!Xb(e)&&e.defaultProps===void 0}function TN(e){if(typeof e=="function")return Xb(e)?_:b;if(e!=null){var t=e.$$typeof;if(t===ve)return I;if(t===jt)return fe}return k}function Pc(e,t){var o=e.alternate;o===null?(o=ba(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugSource=e._debugSource,o._debugOwner=e._debugOwner,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=ft,o.subtreeFlags=ft,o.deletions=null,o.actualDuration=0,o.actualStartTime=-1),o.flags=e.flags&tr,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue;var l=e.dependencies;switch(o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case k:case b:case ne:o.type=Rf(e.type);break;case _:o.type=qb(e.type);break;case I:o.type=Yb(e.type);break}return o}function RN(e,t){e.flags&=tr|In;var o=e.alternate;if(o===null)e.childLanes=ye,e.lanes=t,e.child=null,e.subtreeFlags=ft,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=ft,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type;var l=o.dependencies;e.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration}return e}function ON(e,t,o){var l;return e===ng?(l=Bt,t===!0&&(l|=_n,l|=sn)):l=ht,hi&&(l|=on),ba(R,null,null,l)}function Qb(e,t,o,l,d,m){var w=k,x=e;if(typeof e=="function")Xb(e)?(w=_,x=qb(x)):x=Rf(x);else if(typeof e=="string")w=A;else e:switch(e){case _a:return mu(o.children,d,m,t);case aa:w=F,d|=_n,(d&Bt)!==ht&&(d|=sn);break;case Ea:return AN(o,d,m,t);case Ie:return DN(o,d,m,t);case Xe:return NN(o,d,m,t);case qn:return lk(o,d,m,t);case Tn:case Ht:case Dn:case Sr:case Ft:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ka:w=q;break e;case $:w=Y;break e;case ve:w=I,x=Yb(x);break e;case jt:w=fe;break e;case At:w=$e,x=null;break e}var E="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var D=l?Rt(l):null;D&&(E+=`
233
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function Yp(e){FE=e}var Ka=null,Tf=null,bN=function(e){Ka=e};function Rf(e){{if(Ka===null)return e;var t=Ka(e);return t===void 0?e:t.current}}function qb(e){return Rf(e)}function Yb(e){{if(Ka===null)return e;var t=Ka(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var o=Rf(e.render);if(e.render!==o){var l={$$typeof:ve,render:o};return e.displayName!==void 0&&(l.displayName=e.displayName),l}}return e}return t.current}}function ak(e,t){{if(Ka===null)return!1;var o=e.elementType,l=t.type,d=!1,m=typeof l=="object"&&l!==null?l.$$typeof:null;switch(e.tag){case _:{typeof l=="function"&&(d=!0);break}case b:{(typeof l=="function"||m===At)&&(d=!0);break}case I:{(m===ve||m===At)&&(d=!0);break}case fe:case ne:{(m===jt||m===At)&&(d=!0);break}default:return!1}if(d){var w=Ka(o);if(w!==void 0&&w===Ka(l))return!0}return!1}}function ok(e){{if(Ka===null||typeof WeakSet!="function")return;Tf===null&&(Tf=new WeakSet),Tf.add(e)}}var SN=function(e,t){{if(Ka===null)return;var o=t.staleFamilies,l=t.updatedFamilies;pl(),hl(function(){Gb(e.current,l,o)})}},xN=function(e,t){{if(e.context!==wa)return;pl(),hl(function(){Gp(t,e,null,null)})}};function Gb(e,t,o){{var l=e.alternate,d=e.child,m=e.sibling,w=e.tag,x=e.type,E=null;switch(w){case b:case ne:case _:E=x;break;case I:E=x.render;break}if(Ka===null)throw new Error("Expected resolveFamily to be set during hot reload.");var D=!1,L=!1;if(E!==null){var W=Ka(E);W!==void 0&&(o.has(W)?L=!0:t.has(W)&&(w===_?L=!0:D=!0))}if(Tf!==null&&(Tf.has(e)||l!==null&&Tf.has(l))&&(L=!0),L&&(e._debugNeedsRemount=!0),L||D){var H=Qi(e,_t);H!==null&&Lr(H,e,_t,Cn)}d!==null&&!L&&Gb(d,t,o),m!==null&&Gb(m,t,o)}}var _N=function(e,t){{var o=new Set,l=new Set(t.map(function(d){return d.current}));return Kb(e.current,l,o),o}};function Kb(e,t,o){{var l=e.child,d=e.sibling,m=e.tag,w=e.type,x=null;switch(m){case b:case ne:case _:x=w;break;case I:x=w.render;break}var E=!1;x!==null&&t.has(x)&&(E=!0),E?EN(e,o):l!==null&&Kb(l,t,o),d!==null&&Kb(d,t,o)}}function EN(e,t){{var o=kN(e,t);if(o)return;for(var l=e;;){switch(l.tag){case A:t.add(l.stateNode);return;case N:t.add(l.stateNode.containerInfo);return;case R:t.add(l.stateNode.containerInfo);return}if(l.return===null)throw new Error("Expected to reach root first.");l=l.return}}}function kN(e,t){for(var o=e,l=!1;;){if(o.tag===A)l=!0,t.add(o.stateNode);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)return l;for(;o.sibling===null;){if(o.return===null||o.return===e)return l;o=o.return}o.sibling.return=o.return,o=o.sibling}return!1}var Jb;{Jb=!1;try{var sk=Object.preventExtensions({})}catch{Jb=!0}}function CN(e,t,o,l){this.tag=e,this.key=o,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=l,this.flags=ft,this.subtreeFlags=ft,this.deletions=null,this.lanes=ye,this.childLanes=ye,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!Jb&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var ba=function(e,t,o,l){return new CN(e,t,o,l)};function Xb(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function TN(e){return typeof e=="function"&&!Xb(e)&&e.defaultProps===void 0}function RN(e){if(typeof e=="function")return Xb(e)?_:b;if(e!=null){var t=e.$$typeof;if(t===ve)return I;if(t===jt)return fe}return k}function Pc(e,t){var o=e.alternate;o===null?(o=ba(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugSource=e._debugSource,o._debugOwner=e._debugOwner,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=ft,o.subtreeFlags=ft,o.deletions=null,o.actualDuration=0,o.actualStartTime=-1),o.flags=e.flags&tr,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue;var l=e.dependencies;switch(o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case k:case b:case ne:o.type=Rf(e.type);break;case _:o.type=qb(e.type);break;case I:o.type=Yb(e.type);break}return o}function ON(e,t){e.flags&=tr|In;var o=e.alternate;if(o===null)e.childLanes=ye,e.lanes=t,e.child=null,e.subtreeFlags=ft,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=ft,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type;var l=o.dependencies;e.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration}return e}function AN(e,t,o){var l;return e===ng?(l=Bt,t===!0&&(l|=_n,l|=sn)):l=ht,hi&&(l|=on),ba(R,null,null,l)}function Qb(e,t,o,l,d,m){var w=k,x=e;if(typeof e=="function")Xb(e)?(w=_,x=qb(x)):x=Rf(x);else if(typeof e=="string")w=A;else e:switch(e){case _a:return mu(o.children,d,m,t);case aa:w=F,d|=_n,(d&Bt)!==ht&&(d|=sn);break;case Ea:return DN(o,d,m,t);case Ie:return NN(o,d,m,t);case Xe:return jN(o,d,m,t);case qn:return lk(o,d,m,t);case Tn:case Ht:case Dn:case Sr:case Ft:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ka:w=q;break e;case $:w=Y;break e;case ve:w=I,x=Yb(x);break e;case jt:w=fe;break e;case At:w=$e,x=null;break e}var E="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var D=l?Rt(l):null;D&&(E+=`
234
234
 
235
- Check the render method of \``+D+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+E))}}var L=ba(w,o,t,d);return L.elementType=e,L.type=x,L.lanes=m,L._debugOwner=l,L}function Zb(e,t,o){var l=null;l=e._owner;var d=e.type,m=e.key,w=e.props,x=Qb(d,m,w,l,t,o);return x._debugSource=e._source,x._debugOwner=e._owner,x}function mu(e,t,o,l){var d=ba(P,e,l,t);return d.lanes=o,d}function AN(e,t,o,l){typeof e.id!="string"&&h('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var d=ba(ie,e,l,t|on);return d.elementType=Ea,d.lanes=o,d.stateNode={effectDuration:0,passiveEffectDuration:0},d}function DN(e,t,o,l){var d=ba(le,e,l,t);return d.elementType=Ie,d.lanes=o,d}function NN(e,t,o,l){var d=ba(ke,e,l,t);return d.elementType=Xe,d.lanes=o,d}function lk(e,t,o,l){var d=ba(ue,e,l,t);d.elementType=qn,d.lanes=o;var m={isHidden:!1};return d.stateNode=m,d}function eS(e,t,o){var l=ba(j,e,null,t);return l.lanes=o,l}function jN(){var e=ba(A,null,null,ht);return e.elementType="DELETED",e}function LN(e){var t=ba(_e,null,null,ht);return t.stateNode=e,t}function tS(e,t,o){var l=e.children!==null?e.children:[],d=ba(N,l,e.key,t);return d.lanes=o,d.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},d}function uk(e,t){return e===null&&(e=ba(k,null,null,ht)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function PN(e,t,o,l,d){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Uw,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=nn,this.eventTimes=tc(ye),this.expirationTimes=tc(Cn),this.pendingLanes=ye,this.suspendedLanes=ye,this.pingedLanes=ye,this.expiredLanes=ye,this.mutableReadLanes=ye,this.finishedLanes=ye,this.entangledLanes=ye,this.entanglements=tc(ye),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var m=this.pendingUpdatersLaneMap=[],w=0;w<Vs;w++)m.push(new Set)}switch(t){case ng:this._debugRootType=o?"hydrateRoot()":"createRoot()";break;case ru:this._debugRootType=o?"hydrate()":"render()";break}}function ck(e,t,o,l,d,m,w,x,E,D){var L=new PN(e,t,o,x,E),W=ON(t,m);L.current=W,W.stateNode=L;{var H={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null};W.memoizedState=H}return p0(W),L}var nS="18.3.1";function UN(e,t,o){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Wn(l),{$$typeof:br,key:l==null?null:""+l,children:e,containerInfo:t,implementation:o}}var rS,iS;rS=!1,iS={};function dk(e){if(!e)return wa;var t=Il(e),o=yO(t);if(t.tag===_){var l=t.type;if(ss(l))return $x(t,l,o)}return o}function MN(e,t){{var o=Il(e);if(o===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var l=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+l)}var d=di(o);if(d===null)return null;if(d.mode&_n){var m=Rt(o)||"Component";if(!iS[m]){iS[m]=!0;var w=xr;try{bn(d),o.mode&_n?h("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,m):h("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,m)}finally{w?bn(w):Nn()}}}return d.stateNode}}function fk(e,t,o,l,d,m,w,x){var E=!1,D=null;return ck(e,t,E,D,o,l,d,m,w)}function hk(e,t,o,l,d,m,w,x,E,D){var L=!0,W=ck(o,l,L,e,d,m,w,x,E);W.context=dk(null);var H=W.current,ee=Li(),ae=pu(H),ce=ul(ee,ae);return ce.callback=t??null,ou(H,ce,ae),VD(W,ae,ee),W}function Gp(e,t,o,l){gh(t,e);var d=t.current,m=Li(),w=pu(d);Fn(w);var x=dk(o);t.context===null?t.context=x:t.pendingContext=x,Ta&&xr!==null&&!rS&&(rS=!0,h(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
235
+ Check the render method of \``+D+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+E))}}var L=ba(w,o,t,d);return L.elementType=e,L.type=x,L.lanes=m,L._debugOwner=l,L}function Zb(e,t,o){var l=null;l=e._owner;var d=e.type,m=e.key,w=e.props,x=Qb(d,m,w,l,t,o);return x._debugSource=e._source,x._debugOwner=e._owner,x}function mu(e,t,o,l){var d=ba(P,e,l,t);return d.lanes=o,d}function DN(e,t,o,l){typeof e.id!="string"&&h('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var d=ba(ie,e,l,t|on);return d.elementType=Ea,d.lanes=o,d.stateNode={effectDuration:0,passiveEffectDuration:0},d}function NN(e,t,o,l){var d=ba(le,e,l,t);return d.elementType=Ie,d.lanes=o,d}function jN(e,t,o,l){var d=ba(ke,e,l,t);return d.elementType=Xe,d.lanes=o,d}function lk(e,t,o,l){var d=ba(ue,e,l,t);d.elementType=qn,d.lanes=o;var m={isHidden:!1};return d.stateNode=m,d}function eS(e,t,o){var l=ba(j,e,null,t);return l.lanes=o,l}function LN(){var e=ba(A,null,null,ht);return e.elementType="DELETED",e}function PN(e){var t=ba(_e,null,null,ht);return t.stateNode=e,t}function tS(e,t,o){var l=e.children!==null?e.children:[],d=ba(N,l,e.key,t);return d.lanes=o,d.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},d}function uk(e,t){return e===null&&(e=ba(k,null,null,ht)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function UN(e,t,o,l,d){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Uw,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=nn,this.eventTimes=tc(ye),this.expirationTimes=tc(Cn),this.pendingLanes=ye,this.suspendedLanes=ye,this.pingedLanes=ye,this.expiredLanes=ye,this.mutableReadLanes=ye,this.finishedLanes=ye,this.entangledLanes=ye,this.entanglements=tc(ye),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var m=this.pendingUpdatersLaneMap=[],w=0;w<Vs;w++)m.push(new Set)}switch(t){case ng:this._debugRootType=o?"hydrateRoot()":"createRoot()";break;case ru:this._debugRootType=o?"hydrate()":"render()";break}}function ck(e,t,o,l,d,m,w,x,E,D){var L=new UN(e,t,o,x,E),W=AN(t,m);L.current=W,W.stateNode=L;{var H={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null};W.memoizedState=H}return p0(W),L}var nS="18.3.1";function MN(e,t,o){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Wn(l),{$$typeof:br,key:l==null?null:""+l,children:e,containerInfo:t,implementation:o}}var rS,iS;rS=!1,iS={};function dk(e){if(!e)return wa;var t=Il(e),o=wO(t);if(t.tag===_){var l=t.type;if(ss(l))return $x(t,l,o)}return o}function $N(e,t){{var o=Il(e);if(o===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var l=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+l)}var d=di(o);if(d===null)return null;if(d.mode&_n){var m=Rt(o)||"Component";if(!iS[m]){iS[m]=!0;var w=xr;try{bn(d),o.mode&_n?h("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,m):h("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,m)}finally{w?bn(w):Nn()}}}return d.stateNode}}function fk(e,t,o,l,d,m,w,x){var E=!1,D=null;return ck(e,t,E,D,o,l,d,m,w)}function hk(e,t,o,l,d,m,w,x,E,D){var L=!0,W=ck(o,l,L,e,d,m,w,x,E);W.context=dk(null);var H=W.current,ee=Li(),ae=pu(H),ce=ul(ee,ae);return ce.callback=t??null,ou(H,ce,ae),WD(W,ae,ee),W}function Gp(e,t,o,l){gh(t,e);var d=t.current,m=Li(),w=pu(d);Fn(w);var x=dk(o);t.context===null?t.context=x:t.pendingContext=x,Ta&&xr!==null&&!rS&&(rS=!0,h(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
236
236
 
237
- Check the render method of %s.`,Rt(xr)||"Unknown"));var E=ul(m,w);E.payload={element:e},l=l===void 0?null:l,l!==null&&(typeof l!="function"&&h("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",l),E.callback=l);var D=ou(d,E,w);return D!==null&&(Lr(D,d,w,m),gg(D,d,w)),w}function oy(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case A:return t.child.stateNode;default:return t.child.stateNode}}function $N(e){switch(e.tag){case R:{var t=e.stateNode;if(Id(t)){var o=nm(t);GD(t,o)}break}case le:{hl(function(){var d=Qi(e,_t);if(d!==null){var m=Li();Lr(d,e,_t,m)}});var l=_t;aS(e,l);break}}}function pk(e,t){var o=e.memoizedState;o!==null&&o.dehydrated!==null&&(o.retryLane=sm(o.retryLane,t))}function aS(e,t){pk(e,t);var o=e.alternate;o&&pk(o,t)}function IN(e){if(e.tag===le){var t=Ku,o=Qi(e,t);if(o!==null){var l=Li();Lr(o,e,t,l)}aS(e,t)}}function zN(e){if(e.tag===le){var t=pu(e),o=Qi(e,t);if(o!==null){var l=Li();Lr(o,e,t,l)}aS(e,t)}}function vk(e){var t=Pn(e);return t===null?null:t.stateNode}var mk=function(e){return null};function FN(e){return mk(e)}var gk=function(e){return!1};function BN(e){return gk(e)}var yk=null,wk=null,bk=null,Sk=null,xk=null,_k=null,Ek=null,kk=null,Ck=null;{var Tk=function(e,t,o){var l=t[o],d=$t(e)?e.slice():Mt({},e);return o+1===t.length?($t(d)?d.splice(l,1):delete d[l],d):(d[l]=Tk(e[l],t,o+1),d)},Rk=function(e,t){return Tk(e,t,0)},Ok=function(e,t,o,l){var d=t[l],m=$t(e)?e.slice():Mt({},e);if(l+1===t.length){var w=o[l];m[w]=m[d],$t(m)?m.splice(d,1):delete m[d]}else m[d]=Ok(e[d],t,o,l+1);return m},Ak=function(e,t,o){if(t.length!==o.length){v("copyWithRename() expects paths of the same length");return}else for(var l=0;l<o.length-1;l++)if(t[l]!==o[l]){v("copyWithRename() expects paths to be the same except for the deepest key");return}return Ok(e,t,o,0)},Dk=function(e,t,o,l){if(o>=t.length)return l;var d=t[o],m=$t(e)?e.slice():Mt({},e);return m[d]=Dk(e[d],t,o+1,l),m},Nk=function(e,t,o){return Dk(e,t,0,o)},oS=function(e,t){for(var o=e.memoizedState;o!==null&&t>0;)o=o.next,t--;return o};yk=function(e,t,o,l){var d=oS(e,t);if(d!==null){var m=Nk(d.memoizedState,o,l);d.memoizedState=m,d.baseState=m,e.memoizedProps=Mt({},e.memoizedProps);var w=Qi(e,_t);w!==null&&Lr(w,e,_t,Cn)}},wk=function(e,t,o){var l=oS(e,t);if(l!==null){var d=Rk(l.memoizedState,o);l.memoizedState=d,l.baseState=d,e.memoizedProps=Mt({},e.memoizedProps);var m=Qi(e,_t);m!==null&&Lr(m,e,_t,Cn)}},bk=function(e,t,o,l){var d=oS(e,t);if(d!==null){var m=Ak(d.memoizedState,o,l);d.memoizedState=m,d.baseState=m,e.memoizedProps=Mt({},e.memoizedProps);var w=Qi(e,_t);w!==null&&Lr(w,e,_t,Cn)}},Sk=function(e,t,o){e.pendingProps=Nk(e.memoizedProps,t,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var l=Qi(e,_t);l!==null&&Lr(l,e,_t,Cn)},xk=function(e,t){e.pendingProps=Rk(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var o=Qi(e,_t);o!==null&&Lr(o,e,_t,Cn)},_k=function(e,t,o){e.pendingProps=Ak(e.memoizedProps,t,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var l=Qi(e,_t);l!==null&&Lr(l,e,_t,Cn)},Ek=function(e){var t=Qi(e,_t);t!==null&&Lr(t,e,_t,Cn)},kk=function(e){mk=e},Ck=function(e){gk=e}}function HN(e){var t=di(e);return t===null?null:t.stateNode}function VN(e){return null}function WN(){return xr}function qN(e){var t=e.findFiberByHostInstance,o=s.ReactCurrentDispatcher;return Bl({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:yk,overrideHookStateDeletePath:wk,overrideHookStateRenamePath:bk,overrideProps:Sk,overridePropsDeletePath:xk,overridePropsRenamePath:_k,setErrorHandler:kk,setSuspenseHandler:Ck,scheduleUpdate:Ek,currentDispatcherRef:o,findHostInstanceByFiber:HN,findFiberByHostInstance:t||VN,findHostInstancesForRefresh:xN,scheduleRefresh:bN,scheduleRoot:SN,setRefreshHandler:wN,getCurrentFiber:WN,reconcilerVersion:nS})}var jk=typeof reportError=="function"?reportError:function(e){console.error(e)};function sS(e){this._internalRoot=e}sy.prototype.render=sS.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?h("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):ly(arguments[1])?h("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&h("You passed a second argument to root.render(...) but it only accepts one argument.");var o=t.containerInfo;if(o.nodeType!==Zn){var l=vk(t.current);l&&l.parentNode!==o&&h("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}Gp(e,t,null,null)},sy.prototype.unmount=sS.prototype.unmount=function(){typeof arguments[0]=="function"&&h("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;WE()&&h("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),hl(function(){Gp(null,e,null,null)}),jx(t)}};function YN(e,t){if(!ly(e))throw new Error("createRoot(...): Target container is not a DOM element.");Lk(e);var o=!1,l=!1,d="",m=jk;t!=null&&(t.hydrate?v("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Br&&h(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
237
+ Check the render method of %s.`,Rt(xr)||"Unknown"));var E=ul(m,w);E.payload={element:e},l=l===void 0?null:l,l!==null&&(typeof l!="function"&&h("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",l),E.callback=l);var D=ou(d,E,w);return D!==null&&(Lr(D,d,w,m),gg(D,d,w)),w}function oy(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case A:return t.child.stateNode;default:return t.child.stateNode}}function IN(e){switch(e.tag){case R:{var t=e.stateNode;if(Id(t)){var o=nm(t);KD(t,o)}break}case le:{hl(function(){var d=Qi(e,_t);if(d!==null){var m=Li();Lr(d,e,_t,m)}});var l=_t;aS(e,l);break}}}function pk(e,t){var o=e.memoizedState;o!==null&&o.dehydrated!==null&&(o.retryLane=sm(o.retryLane,t))}function aS(e,t){pk(e,t);var o=e.alternate;o&&pk(o,t)}function zN(e){if(e.tag===le){var t=Ku,o=Qi(e,t);if(o!==null){var l=Li();Lr(o,e,t,l)}aS(e,t)}}function FN(e){if(e.tag===le){var t=pu(e),o=Qi(e,t);if(o!==null){var l=Li();Lr(o,e,t,l)}aS(e,t)}}function vk(e){var t=Pn(e);return t===null?null:t.stateNode}var mk=function(e){return null};function BN(e){return mk(e)}var gk=function(e){return!1};function HN(e){return gk(e)}var yk=null,wk=null,bk=null,Sk=null,xk=null,_k=null,Ek=null,kk=null,Ck=null;{var Tk=function(e,t,o){var l=t[o],d=$t(e)?e.slice():Mt({},e);return o+1===t.length?($t(d)?d.splice(l,1):delete d[l],d):(d[l]=Tk(e[l],t,o+1),d)},Rk=function(e,t){return Tk(e,t,0)},Ok=function(e,t,o,l){var d=t[l],m=$t(e)?e.slice():Mt({},e);if(l+1===t.length){var w=o[l];m[w]=m[d],$t(m)?m.splice(d,1):delete m[d]}else m[d]=Ok(e[d],t,o,l+1);return m},Ak=function(e,t,o){if(t.length!==o.length){v("copyWithRename() expects paths of the same length");return}else for(var l=0;l<o.length-1;l++)if(t[l]!==o[l]){v("copyWithRename() expects paths to be the same except for the deepest key");return}return Ok(e,t,o,0)},Dk=function(e,t,o,l){if(o>=t.length)return l;var d=t[o],m=$t(e)?e.slice():Mt({},e);return m[d]=Dk(e[d],t,o+1,l),m},Nk=function(e,t,o){return Dk(e,t,0,o)},oS=function(e,t){for(var o=e.memoizedState;o!==null&&t>0;)o=o.next,t--;return o};yk=function(e,t,o,l){var d=oS(e,t);if(d!==null){var m=Nk(d.memoizedState,o,l);d.memoizedState=m,d.baseState=m,e.memoizedProps=Mt({},e.memoizedProps);var w=Qi(e,_t);w!==null&&Lr(w,e,_t,Cn)}},wk=function(e,t,o){var l=oS(e,t);if(l!==null){var d=Rk(l.memoizedState,o);l.memoizedState=d,l.baseState=d,e.memoizedProps=Mt({},e.memoizedProps);var m=Qi(e,_t);m!==null&&Lr(m,e,_t,Cn)}},bk=function(e,t,o,l){var d=oS(e,t);if(d!==null){var m=Ak(d.memoizedState,o,l);d.memoizedState=m,d.baseState=m,e.memoizedProps=Mt({},e.memoizedProps);var w=Qi(e,_t);w!==null&&Lr(w,e,_t,Cn)}},Sk=function(e,t,o){e.pendingProps=Nk(e.memoizedProps,t,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var l=Qi(e,_t);l!==null&&Lr(l,e,_t,Cn)},xk=function(e,t){e.pendingProps=Rk(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var o=Qi(e,_t);o!==null&&Lr(o,e,_t,Cn)},_k=function(e,t,o){e.pendingProps=Ak(e.memoizedProps,t,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var l=Qi(e,_t);l!==null&&Lr(l,e,_t,Cn)},Ek=function(e){var t=Qi(e,_t);t!==null&&Lr(t,e,_t,Cn)},kk=function(e){mk=e},Ck=function(e){gk=e}}function VN(e){var t=di(e);return t===null?null:t.stateNode}function WN(e){return null}function qN(){return xr}function YN(e){var t=e.findFiberByHostInstance,o=s.ReactCurrentDispatcher;return Bl({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:yk,overrideHookStateDeletePath:wk,overrideHookStateRenamePath:bk,overrideProps:Sk,overridePropsDeletePath:xk,overridePropsRenamePath:_k,setErrorHandler:kk,setSuspenseHandler:Ck,scheduleUpdate:Ek,currentDispatcherRef:o,findHostInstanceByFiber:VN,findFiberByHostInstance:t||WN,findHostInstancesForRefresh:_N,scheduleRefresh:SN,scheduleRoot:xN,setRefreshHandler:bN,getCurrentFiber:qN,reconcilerVersion:nS})}var jk=typeof reportError=="function"?reportError:function(e){console.error(e)};function sS(e){this._internalRoot=e}sy.prototype.render=sS.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?h("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):ly(arguments[1])?h("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&h("You passed a second argument to root.render(...) but it only accepts one argument.");var o=t.containerInfo;if(o.nodeType!==Zn){var l=vk(t.current);l&&l.parentNode!==o&&h("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}Gp(e,t,null,null)},sy.prototype.unmount=sS.prototype.unmount=function(){typeof arguments[0]=="function"&&h("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;WE()&&h("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),hl(function(){Gp(null,e,null,null)}),jx(t)}};function GN(e,t){if(!ly(e))throw new Error("createRoot(...): Target container is not a DOM element.");Lk(e);var o=!1,l=!1,d="",m=jk;t!=null&&(t.hydrate?v("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Br&&h(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
238
238
 
239
239
  let root = createRoot(domContainer);
240
- root.render(<App />);`),t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(d=t.identifierPrefix),t.onRecoverableError!==void 0&&(m=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var w=fk(e,ng,null,o,l,d,m);Km(w.current,e);var x=e.nodeType===Zn?e.parentNode:e;return ep(x),new sS(w)}function sy(e){this._internalRoot=e}function GN(e){e&&gm(e)}sy.prototype.unstable_scheduleHydration=GN;function KN(e,t,o){if(!ly(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");Lk(e),t===void 0&&h("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var l=o??null,d=o!=null&&o.hydratedSources||null,m=!1,w=!1,x="",E=jk;o!=null&&(o.unstable_strictMode===!0&&(m=!0),o.identifierPrefix!==void 0&&(x=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError));var D=hk(t,null,e,ng,l,m,w,x,E);if(Km(D.current,e),ep(e),d)for(var L=0;L<d.length;L++){var W=d[L];ZO(D,W)}return new sy(D)}function ly(e){return!!(e&&(e.nodeType===li||e.nodeType===io||e.nodeType===nh))}function Kp(e){return!!(e&&(e.nodeType===li||e.nodeType===io||e.nodeType===nh||e.nodeType===Zn&&e.nodeValue===" react-mount-point-unstable "))}function Lk(e){e.nodeType===li&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&h("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),dp(e)&&(e._reactRootContainer?h("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):h("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var JN=s.ReactCurrentOwner,Pk;Pk=function(e){if(e._reactRootContainer&&e.nodeType!==Zn){var t=vk(e._reactRootContainer.current);t&&t.parentNode!==e&&h("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var o=!!e._reactRootContainer,l=lS(e),d=!!(l&&tu(l));d&&!o&&h("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===li&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&h("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function lS(e){return e?e.nodeType===io?e.documentElement:e.firstChild:null}function Uk(){}function XN(e,t,o,l,d){if(d){if(typeof l=="function"){var m=l;l=function(){var H=oy(w);m.call(H)}}var w=hk(t,l,e,ru,null,!1,!1,"",Uk);e._reactRootContainer=w,Km(w.current,e);var x=e.nodeType===Zn?e.parentNode:e;return ep(x),hl(),w}else{for(var E;E=e.lastChild;)e.removeChild(E);if(typeof l=="function"){var D=l;l=function(){var H=oy(L);D.call(H)}}var L=fk(e,ru,null,!1,!1,"",Uk);e._reactRootContainer=L,Km(L.current,e);var W=e.nodeType===Zn?e.parentNode:e;return ep(W),hl(function(){Gp(t,L,o,l)}),L}}function QN(e,t){e!==null&&typeof e!="function"&&h("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function uy(e,t,o,l,d){Pk(o),QN(d===void 0?null:d,"render");var m=o._reactRootContainer,w;if(!m)w=XN(o,t,e,d,l);else{if(w=m,typeof d=="function"){var x=d;d=function(){var E=oy(w);x.call(E)}}Gp(t,w,e,d)}return oy(w)}var Mk=!1;function ZN(e){{Mk||(Mk=!0,h("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=JN.current;if(t!==null&&t.stateNode!==null){var o=t.stateNode._warnedAboutRefsInRender;o||h("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",en(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===li?e:MN(e,"findDOMNode")}function ej(e,t,o){if(h("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Kp(t))throw new Error("Target container is not a DOM element.");{var l=dp(t)&&t._reactRootContainer===void 0;l&&h("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return uy(null,e,t,!0,o)}function tj(e,t,o){if(h("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Kp(t))throw new Error("Target container is not a DOM element.");{var l=dp(t)&&t._reactRootContainer===void 0;l&&h("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return uy(null,e,t,!1,o)}function nj(e,t,o,l){if(h("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Kp(o))throw new Error("Target container is not a DOM element.");if(e==null||!aw(e))throw new Error("parentComponent must be a valid React Component");return uy(e,t,o,!1,l)}var $k=!1;function rj(e){if($k||($k=!0,h("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!Kp(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=dp(e)&&e._reactRootContainer===void 0;t&&h("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var o=lS(e),l=o&&!tu(o);l&&h("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return hl(function(){uy(null,null,e,!1,function(){e._reactRootContainer=null,jx(e)})}),!0}else{{var d=lS(e),m=!!(d&&tu(d)),w=e.nodeType===li&&Kp(e.parentNode)&&!!e.parentNode._reactRootContainer;m&&h("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",w?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}$r($N),ql(IN),hm(zN),oc(Ki),Mh(cm),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&h("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),nd(aR),iw(Ib,KD,hl);function ij(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ly(t))throw new Error("Target container is not a DOM element.");return UN(e,t,null,o)}function aj(e,t,o,l){return nj(e,t,o,l)}var uS={usingClientEntryPoint:!1,Events:[tu,af,Jm,Pl,rd,Ib]};function oj(e,t){return uS.usingClientEntryPoint||h('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),YN(e,t)}function sj(e,t,o){return uS.usingClientEntryPoint||h('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),KN(e,t,o)}function lj(e){return WE()&&h("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),hl(e)}var uj=qN({findFiberByHostInstance:bc,bundleType:1,version:nS,rendererPackageName:"react-dom"});if(!uj&&gn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var Ik=window.location.protocol;/^(https?|file):$/.test(Ik)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(Ik==="file:"?`
241
- You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}ra.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uS,ra.createPortal=ij,ra.createRoot=oj,ra.findDOMNode=ZN,ra.flushSync=lj,ra.hydrate=ej,ra.hydrateRoot=sj,ra.render=tj,ra.unmountComponentAtNode=rj,ra.unstable_batchedUpdates=Ib,ra.unstable_renderSubtreeIntoContainer=aj,ra.version=nS,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ra}function o1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o1)}catch(i){console.error(i)}}}process.env.NODE_ENV==="production"?(o1(),TS.exports=yj()):TS.exports=wj();var s1=TS.exports,RS,dy=s1;if(process.env.NODE_ENV==="production")RS=dy.createRoot,dy.hydrateRoot;else{var Kk=dy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;RS=function(i,n){Kk.usingClientEntryPoint=!0;try{return dy.createRoot(i,n)}finally{Kk.usingClientEntryPoint=!1}}}function zy(i,n){var s={};for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&n.indexOf(u)<0&&(s[u]=i[u]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,u=Object.getOwnPropertySymbols(i);f<u.length;f++)n.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(i,u[f])&&(s[u[f]]=i[u[f]]);return s}function bj(i,n,s,u){function f(v){return v instanceof s?v:new s(function(h){h(v)})}return new(s||(s=Promise))(function(v,h){function g(k){try{_(u.next(k))}catch(R){h(R)}}function b(k){try{_(u.throw(k))}catch(R){h(R)}}function _(k){k.done?v(k.value):f(k.value).then(g,b)}_((u=u.apply(i,n||[])).next())})}const Sj=i=>i?(...n)=>i(...n):(...n)=>fetch(...n);class ZS extends Error{constructor(n,s="FunctionsError",u){super(n),this.name=s,this.context=u}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class xj extends ZS{constructor(n){super("Failed to send a request to the Edge Function","FunctionsFetchError",n)}}class Jk extends ZS{constructor(n){super("Relay Error invoking the Edge Function","FunctionsRelayError",n)}}class Xk extends ZS{constructor(n){super("Edge Function returned a non-2xx status code","FunctionsHttpError",n)}}var OS;(function(i){i.Any="any",i.ApNortheast1="ap-northeast-1",i.ApNortheast2="ap-northeast-2",i.ApSouth1="ap-south-1",i.ApSoutheast1="ap-southeast-1",i.ApSoutheast2="ap-southeast-2",i.CaCentral1="ca-central-1",i.EuCentral1="eu-central-1",i.EuWest1="eu-west-1",i.EuWest2="eu-west-2",i.EuWest3="eu-west-3",i.SaEast1="sa-east-1",i.UsEast1="us-east-1",i.UsWest1="us-west-1",i.UsWest2="us-west-2"})(OS||(OS={}));class _j{constructor(n,{headers:s={},customFetch:u,region:f=OS.Any}={}){this.url=n,this.headers=s,this.region=f,this.fetch=Sj(u)}setAuth(n){this.headers.Authorization=`Bearer ${n}`}invoke(n){return bj(this,arguments,void 0,function*(s,u={}){var f;let v,h;try{const{headers:g,method:b,body:_,signal:k,timeout:R}=u;let N={},{region:A}=u;A||(A=this.region);const j=new URL(`${this.url}/${s}`);A&&A!=="any"&&(N["x-region"]=A,j.searchParams.set("forceFunctionRegion",A));let P;_&&(g&&!Object.prototype.hasOwnProperty.call(g,"Content-Type")||!g)?typeof Blob<"u"&&_ instanceof Blob||_ instanceof ArrayBuffer?(N["Content-Type"]="application/octet-stream",P=_):typeof _=="string"?(N["Content-Type"]="text/plain",P=_):typeof FormData<"u"&&_ instanceof FormData?P=_:(N["Content-Type"]="application/json",P=JSON.stringify(_)):_&&typeof _!="string"&&!(typeof Blob<"u"&&_ instanceof Blob)&&!(_ instanceof ArrayBuffer)&&!(typeof FormData<"u"&&_ instanceof FormData)?P=JSON.stringify(_):P=_;let F=k;R&&(h=new AbortController,v=setTimeout(()=>h.abort(),R),k?(F=h.signal,k.addEventListener("abort",()=>h.abort())):F=h.signal);const Y=yield this.fetch(j.toString(),{method:b||"POST",headers:Object.assign(Object.assign(Object.assign({},N),this.headers),g),body:P,signal:F}).catch(le=>{throw new xj(le)}),q=Y.headers.get("x-relay-error");if(q&&q==="true")throw new Jk(Y);if(!Y.ok)throw new Xk(Y);let I=((f=Y.headers.get("Content-Type"))!==null&&f!==void 0?f:"text/plain").split(";")[0].trim(),ie;return I==="application/json"?ie=yield Y.json():I==="application/octet-stream"||I==="application/pdf"?ie=yield Y.blob():I==="text/event-stream"?ie=Y:I==="multipart/form-data"?ie=yield Y.formData():ie=yield Y.text(),{data:ie,error:null,response:Y}}catch(g){return{data:null,error:g,response:g instanceof Xk||g instanceof Jk?g.context:void 0}}finally{v&&clearTimeout(v)}})}}const l1=3,Qk=i=>Math.min(1e3*2**i,3e4),Ej=[520,503],u1=["GET","HEAD","OPTIONS"];var kj=class extends Error{constructor(i){super(i.message),this.name="PostgrestError",this.details=i.details,this.hint=i.hint,this.code=i.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Zk(i,n){return new Promise(s=>{if(n!=null&&n.aborted){s();return}const u=setTimeout(()=>{n==null||n.removeEventListener("abort",f),s()},i);function f(){clearTimeout(u),s()}n==null||n.addEventListener("abort",f)})}function Cj(i,n,s,u){return!(!u||s>=l1||!u1.includes(i)||!Ej.includes(n))}var Tj=class{constructor(i){var n,s,u,f,v;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=i.method,this.url=i.url,this.headers=new Headers(i.headers),this.schema=i.schema,this.body=i.body,this.shouldThrowOnError=(n=i.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=i.signal,this.isMaybeSingle=(s=i.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(u=i.shouldStripNulls)!==null&&u!==void 0?u:!1,this.urlLengthLimit=(f=i.urlLengthLimit)!==null&&f!==void 0?f:8e3,this.retryEnabled=(v=i.retry)!==null&&v!==void 0?v:!0,i.fetch?this.fetch=i.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(i,n){return this.headers=new Headers(this.headers),this.headers.set(i,n),this}retry(i){return this.retryEnabled=i,this}then(i,n){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const h=this.headers.get("Accept");h==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!h||h==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const u=this.fetch;let v=(async()=>{let h=0;for(;;){const _=new Headers(s.headers);h>0&&_.set("X-Retry-Count",String(h));let k;try{k=await u(s.url.toString(),{method:s.method,headers:_,body:JSON.stringify(s.body,(R,N)=>typeof N=="bigint"?N.toString():N),signal:s.signal})}catch(R){if((R==null?void 0:R.name)==="AbortError"||(R==null?void 0:R.code)==="ABORT_ERR"||!u1.includes(s.method))throw R;if(s.retryEnabled&&h<l1){const N=Qk(h);h++,await Zk(N,s.signal);continue}throw R}if(Cj(s.method,k.status,h,s.retryEnabled)){var g,b;const R=(g=(b=k.headers)===null||b===void 0?void 0:b.get("Retry-After"))!==null&&g!==void 0?g:null,N=R!==null?Math.max(0,parseInt(R,10)||0)*1e3:Qk(h);await k.text(),h++,await Zk(N,s.signal);continue}return await s.processResponse(k)}})();return this.shouldThrowOnError||(v=v.catch(h=>{var g;let b="",_="",k="";const R=h==null?void 0:h.cause;if(R){var N,A,j,P;const q=(N=R==null?void 0:R.message)!==null&&N!==void 0?N:"",I=(A=R==null?void 0:R.code)!==null&&A!==void 0?A:"";b=`${(j=h==null?void 0:h.name)!==null&&j!==void 0?j:"FetchError"}: ${h==null?void 0:h.message}`,b+=`
240
+ root.render(<App />);`),t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(d=t.identifierPrefix),t.onRecoverableError!==void 0&&(m=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var w=fk(e,ng,null,o,l,d,m);Km(w.current,e);var x=e.nodeType===Zn?e.parentNode:e;return ep(x),new sS(w)}function sy(e){this._internalRoot=e}function KN(e){e&&gm(e)}sy.prototype.unstable_scheduleHydration=KN;function JN(e,t,o){if(!ly(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");Lk(e),t===void 0&&h("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var l=o??null,d=o!=null&&o.hydratedSources||null,m=!1,w=!1,x="",E=jk;o!=null&&(o.unstable_strictMode===!0&&(m=!0),o.identifierPrefix!==void 0&&(x=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError));var D=hk(t,null,e,ng,l,m,w,x,E);if(Km(D.current,e),ep(e),d)for(var L=0;L<d.length;L++){var W=d[L];eA(D,W)}return new sy(D)}function ly(e){return!!(e&&(e.nodeType===li||e.nodeType===io||e.nodeType===nh))}function Kp(e){return!!(e&&(e.nodeType===li||e.nodeType===io||e.nodeType===nh||e.nodeType===Zn&&e.nodeValue===" react-mount-point-unstable "))}function Lk(e){e.nodeType===li&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&h("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),dp(e)&&(e._reactRootContainer?h("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):h("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var XN=s.ReactCurrentOwner,Pk;Pk=function(e){if(e._reactRootContainer&&e.nodeType!==Zn){var t=vk(e._reactRootContainer.current);t&&t.parentNode!==e&&h("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var o=!!e._reactRootContainer,l=lS(e),d=!!(l&&tu(l));d&&!o&&h("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===li&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&h("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function lS(e){return e?e.nodeType===io?e.documentElement:e.firstChild:null}function Uk(){}function QN(e,t,o,l,d){if(d){if(typeof l=="function"){var m=l;l=function(){var H=oy(w);m.call(H)}}var w=hk(t,l,e,ru,null,!1,!1,"",Uk);e._reactRootContainer=w,Km(w.current,e);var x=e.nodeType===Zn?e.parentNode:e;return ep(x),hl(),w}else{for(var E;E=e.lastChild;)e.removeChild(E);if(typeof l=="function"){var D=l;l=function(){var H=oy(L);D.call(H)}}var L=fk(e,ru,null,!1,!1,"",Uk);e._reactRootContainer=L,Km(L.current,e);var W=e.nodeType===Zn?e.parentNode:e;return ep(W),hl(function(){Gp(t,L,o,l)}),L}}function ZN(e,t){e!==null&&typeof e!="function"&&h("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function uy(e,t,o,l,d){Pk(o),ZN(d===void 0?null:d,"render");var m=o._reactRootContainer,w;if(!m)w=QN(o,t,e,d,l);else{if(w=m,typeof d=="function"){var x=d;d=function(){var E=oy(w);x.call(E)}}Gp(t,w,e,d)}return oy(w)}var Mk=!1;function ej(e){{Mk||(Mk=!0,h("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=XN.current;if(t!==null&&t.stateNode!==null){var o=t.stateNode._warnedAboutRefsInRender;o||h("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",en(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===li?e:$N(e,"findDOMNode")}function tj(e,t,o){if(h("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Kp(t))throw new Error("Target container is not a DOM element.");{var l=dp(t)&&t._reactRootContainer===void 0;l&&h("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return uy(null,e,t,!0,o)}function nj(e,t,o){if(h("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Kp(t))throw new Error("Target container is not a DOM element.");{var l=dp(t)&&t._reactRootContainer===void 0;l&&h("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return uy(null,e,t,!1,o)}function rj(e,t,o,l){if(h("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Kp(o))throw new Error("Target container is not a DOM element.");if(e==null||!aw(e))throw new Error("parentComponent must be a valid React Component");return uy(e,t,o,!1,l)}var $k=!1;function ij(e){if($k||($k=!0,h("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!Kp(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=dp(e)&&e._reactRootContainer===void 0;t&&h("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var o=lS(e),l=o&&!tu(o);l&&h("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return hl(function(){uy(null,null,e,!1,function(){e._reactRootContainer=null,jx(e)})}),!0}else{{var d=lS(e),m=!!(d&&tu(d)),w=e.nodeType===li&&Kp(e.parentNode)&&!!e.parentNode._reactRootContainer;m&&h("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",w?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}$r(IN),ql(zN),hm(FN),oc(Ki),Mh(cm),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&h("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),nd(oR),iw(Ib,JD,hl);function aj(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ly(t))throw new Error("Target container is not a DOM element.");return MN(e,t,null,o)}function oj(e,t,o,l){return rj(e,t,o,l)}var uS={usingClientEntryPoint:!1,Events:[tu,af,Jm,Pl,rd,Ib]};function sj(e,t){return uS.usingClientEntryPoint||h('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),GN(e,t)}function lj(e,t,o){return uS.usingClientEntryPoint||h('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),JN(e,t,o)}function uj(e){return WE()&&h("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),hl(e)}var cj=YN({findFiberByHostInstance:bc,bundleType:1,version:nS,rendererPackageName:"react-dom"});if(!cj&&gn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var Ik=window.location.protocol;/^(https?|file):$/.test(Ik)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(Ik==="file:"?`
241
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}ra.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uS,ra.createPortal=aj,ra.createRoot=sj,ra.findDOMNode=ej,ra.flushSync=uj,ra.hydrate=tj,ra.hydrateRoot=lj,ra.render=nj,ra.unmountComponentAtNode=ij,ra.unstable_batchedUpdates=Ib,ra.unstable_renderSubtreeIntoContainer=oj,ra.version=nS,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ra}function o1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o1)}catch(i){console.error(i)}}}process.env.NODE_ENV==="production"?(o1(),TS.exports=wj()):TS.exports=bj();var s1=TS.exports,RS,dy=s1;if(process.env.NODE_ENV==="production")RS=dy.createRoot,dy.hydrateRoot;else{var Kk=dy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;RS=function(i,n){Kk.usingClientEntryPoint=!0;try{return dy.createRoot(i,n)}finally{Kk.usingClientEntryPoint=!1}}}function zy(i,n){var s={};for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&n.indexOf(u)<0&&(s[u]=i[u]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,u=Object.getOwnPropertySymbols(i);f<u.length;f++)n.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(i,u[f])&&(s[u[f]]=i[u[f]]);return s}function Sj(i,n,s,u){function f(v){return v instanceof s?v:new s(function(h){h(v)})}return new(s||(s=Promise))(function(v,h){function g(k){try{_(u.next(k))}catch(R){h(R)}}function b(k){try{_(u.throw(k))}catch(R){h(R)}}function _(k){k.done?v(k.value):f(k.value).then(g,b)}_((u=u.apply(i,n||[])).next())})}const xj=i=>i?(...n)=>i(...n):(...n)=>fetch(...n);class ZS extends Error{constructor(n,s="FunctionsError",u){super(n),this.name=s,this.context=u}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class _j extends ZS{constructor(n){super("Failed to send a request to the Edge Function","FunctionsFetchError",n)}}class Jk extends ZS{constructor(n){super("Relay Error invoking the Edge Function","FunctionsRelayError",n)}}class Xk extends ZS{constructor(n){super("Edge Function returned a non-2xx status code","FunctionsHttpError",n)}}var OS;(function(i){i.Any="any",i.ApNortheast1="ap-northeast-1",i.ApNortheast2="ap-northeast-2",i.ApSouth1="ap-south-1",i.ApSoutheast1="ap-southeast-1",i.ApSoutheast2="ap-southeast-2",i.CaCentral1="ca-central-1",i.EuCentral1="eu-central-1",i.EuWest1="eu-west-1",i.EuWest2="eu-west-2",i.EuWest3="eu-west-3",i.SaEast1="sa-east-1",i.UsEast1="us-east-1",i.UsWest1="us-west-1",i.UsWest2="us-west-2"})(OS||(OS={}));class Ej{constructor(n,{headers:s={},customFetch:u,region:f=OS.Any}={}){this.url=n,this.headers=s,this.region=f,this.fetch=xj(u)}setAuth(n){this.headers.Authorization=`Bearer ${n}`}invoke(n){return Sj(this,arguments,void 0,function*(s,u={}){var f;let v,h;try{const{headers:g,method:b,body:_,signal:k,timeout:R}=u;let N={},{region:A}=u;A||(A=this.region);const j=new URL(`${this.url}/${s}`);A&&A!=="any"&&(N["x-region"]=A,j.searchParams.set("forceFunctionRegion",A));let P;_&&(g&&!Object.prototype.hasOwnProperty.call(g,"Content-Type")||!g)?typeof Blob<"u"&&_ instanceof Blob||_ instanceof ArrayBuffer?(N["Content-Type"]="application/octet-stream",P=_):typeof _=="string"?(N["Content-Type"]="text/plain",P=_):typeof FormData<"u"&&_ instanceof FormData?P=_:(N["Content-Type"]="application/json",P=JSON.stringify(_)):_&&typeof _!="string"&&!(typeof Blob<"u"&&_ instanceof Blob)&&!(_ instanceof ArrayBuffer)&&!(typeof FormData<"u"&&_ instanceof FormData)?P=JSON.stringify(_):P=_;let F=k;R&&(h=new AbortController,v=setTimeout(()=>h.abort(),R),k?(F=h.signal,k.addEventListener("abort",()=>h.abort())):F=h.signal);const Y=yield this.fetch(j.toString(),{method:b||"POST",headers:Object.assign(Object.assign(Object.assign({},N),this.headers),g),body:P,signal:F}).catch(le=>{throw new _j(le)}),q=Y.headers.get("x-relay-error");if(q&&q==="true")throw new Jk(Y);if(!Y.ok)throw new Xk(Y);let I=((f=Y.headers.get("Content-Type"))!==null&&f!==void 0?f:"text/plain").split(";")[0].trim(),ie;return I==="application/json"?ie=yield Y.json():I==="application/octet-stream"||I==="application/pdf"?ie=yield Y.blob():I==="text/event-stream"?ie=Y:I==="multipart/form-data"?ie=yield Y.formData():ie=yield Y.text(),{data:ie,error:null,response:Y}}catch(g){return{data:null,error:g,response:g instanceof Xk||g instanceof Jk?g.context:void 0}}finally{v&&clearTimeout(v)}})}}const l1=3,Qk=i=>Math.min(1e3*2**i,3e4),kj=[520,503],u1=["GET","HEAD","OPTIONS"];var Cj=class extends Error{constructor(i){super(i.message),this.name="PostgrestError",this.details=i.details,this.hint=i.hint,this.code=i.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Zk(i,n){return new Promise(s=>{if(n!=null&&n.aborted){s();return}const u=setTimeout(()=>{n==null||n.removeEventListener("abort",f),s()},i);function f(){clearTimeout(u),s()}n==null||n.addEventListener("abort",f)})}function Tj(i,n,s,u){return!(!u||s>=l1||!u1.includes(i)||!kj.includes(n))}var Rj=class{constructor(i){var n,s,u,f,v;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=i.method,this.url=i.url,this.headers=new Headers(i.headers),this.schema=i.schema,this.body=i.body,this.shouldThrowOnError=(n=i.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=i.signal,this.isMaybeSingle=(s=i.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(u=i.shouldStripNulls)!==null&&u!==void 0?u:!1,this.urlLengthLimit=(f=i.urlLengthLimit)!==null&&f!==void 0?f:8e3,this.retryEnabled=(v=i.retry)!==null&&v!==void 0?v:!0,i.fetch?this.fetch=i.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(i,n){return this.headers=new Headers(this.headers),this.headers.set(i,n),this}retry(i){return this.retryEnabled=i,this}then(i,n){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const h=this.headers.get("Accept");h==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!h||h==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const u=this.fetch;let v=(async()=>{let h=0;for(;;){const _=new Headers(s.headers);h>0&&_.set("X-Retry-Count",String(h));let k;try{k=await u(s.url.toString(),{method:s.method,headers:_,body:JSON.stringify(s.body,(R,N)=>typeof N=="bigint"?N.toString():N),signal:s.signal})}catch(R){if((R==null?void 0:R.name)==="AbortError"||(R==null?void 0:R.code)==="ABORT_ERR"||!u1.includes(s.method))throw R;if(s.retryEnabled&&h<l1){const N=Qk(h);h++,await Zk(N,s.signal);continue}throw R}if(Tj(s.method,k.status,h,s.retryEnabled)){var g,b;const R=(g=(b=k.headers)===null||b===void 0?void 0:b.get("Retry-After"))!==null&&g!==void 0?g:null,N=R!==null?Math.max(0,parseInt(R,10)||0)*1e3:Qk(h);await k.text(),h++,await Zk(N,s.signal);continue}return await s.processResponse(k)}})();return this.shouldThrowOnError||(v=v.catch(h=>{var g;let b="",_="",k="";const R=h==null?void 0:h.cause;if(R){var N,A,j,P;const q=(N=R==null?void 0:R.message)!==null&&N!==void 0?N:"",I=(A=R==null?void 0:R.code)!==null&&A!==void 0?A:"";b=`${(j=h==null?void 0:h.name)!==null&&j!==void 0?j:"FetchError"}: ${h==null?void 0:h.message}`,b+=`
242
242
 
243
243
  Caused by: ${(P=R==null?void 0:R.name)!==null&&P!==void 0?P:"Error"}: ${q}`,I&&(b+=` (${I})`),R!=null&&R.stack&&(b+=`
244
- ${R.stack}`)}else{var F;b=(F=h==null?void 0:h.stack)!==null&&F!==void 0?F:""}const Y=this.url.toString().length;return(h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"?(k="",_="Request was aborted (timeout or manual cancellation)",Y>this.urlLengthLimit&&(_+=`. Note: Your request URL is ${Y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((R==null?void 0:R.name)==="HeadersOverflowError"||(R==null?void 0:R.code)==="UND_ERR_HEADERS_OVERFLOW")&&(k="",_="HTTP headers exceeded server limits (typically 16KB)",Y>this.urlLengthLimit&&(_+=`. Your request URL is ${Y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(g=h==null?void 0:h.name)!==null&&g!==void 0?g:"FetchError"}: ${h==null?void 0:h.message}`,details:b,hint:_,code:k},data:null,count:null,status:0,statusText:""}})),v.then(i,n)}async processResponse(i){var n=this;let s=null,u=null,f=null,v=i.status,h=i.statusText;if(i.ok){var g,b;if(n.method!=="HEAD"){var _;const N=await i.text();N===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((_=n.headers.get("Accept"))===null||_===void 0)&&_.includes("application/vnd.pgrst.plan+text"))?u=N:u=JSON.parse(N))}const k=(g=n.headers.get("Prefer"))===null||g===void 0?void 0:g.match(/count=(exact|planned|estimated)/),R=(b=i.headers.get("content-range"))===null||b===void 0?void 0:b.split("/");k&&R&&R.length>1&&(f=parseInt(R[1])),n.isMaybeSingle&&Array.isArray(u)&&(u.length>1?(s={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,f=null,v=406,h="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const k=await i.text();try{s=JSON.parse(k),Array.isArray(s)&&i.status===404&&(u=[],s=null,v=200,h="OK")}catch{i.status===404&&k===""?(v=204,h="No Content"):s={message:k}}if(s&&n.shouldThrowOnError)throw new kj(s)}return{success:s===null,error:s,data:u,count:f,status:v,statusText:h}}returns(){return this}overrideTypes(){return this}},Rj=class extends Tj{select(i){let n=!1;const s=(i??"*").split("").map(u=>/\s/.test(u)&&!n?"":(u==='"'&&(n=!n),u)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(i,{ascending:n=!0,nullsFirst:s,foreignTable:u,referencedTable:f=u}={}){const v=f?`${f}.order`:"order",h=this.url.searchParams.get(v);return this.url.searchParams.set(v,`${h?`${h},`:""}${i}.${n?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:n,referencedTable:s=n}={}){const u=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(u,`${i}`),this}range(i,n,{foreignTable:s,referencedTable:u=s}={}){const f=typeof u>"u"?"offset":`${u}.offset`,v=typeof u>"u"?"limit":`${u}.limit`;return this.url.searchParams.set(f,`${i}`),this.url.searchParams.set(v,`${n-i+1}`),this}abortSignal(i){return this.signal=i,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:i=!1,verbose:n=!1,settings:s=!1,buffers:u=!1,wal:f=!1,format:v="text"}={}){var h;const g=[i?"analyze":null,n?"verbose":null,s?"settings":null,u?"buffers":null,f?"wal":null].filter(Boolean).join("|"),b=(h=this.headers.get("Accept"))!==null&&h!==void 0?h:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${v}; for="${b}"; options=${g};`),v==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(i){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${i}`),this}};const eC=new RegExp("[,()]");var Pf=class extends Rj{eq(i,n){return this.url.searchParams.append(i,`eq.${n}`),this}neq(i,n){return this.url.searchParams.append(i,`neq.${n}`),this}gt(i,n){return this.url.searchParams.append(i,`gt.${n}`),this}gte(i,n){return this.url.searchParams.append(i,`gte.${n}`),this}lt(i,n){return this.url.searchParams.append(i,`lt.${n}`),this}lte(i,n){return this.url.searchParams.append(i,`lte.${n}`),this}like(i,n){return this.url.searchParams.append(i,`like.${n}`),this}likeAllOf(i,n){return this.url.searchParams.append(i,`like(all).{${n.join(",")}}`),this}likeAnyOf(i,n){return this.url.searchParams.append(i,`like(any).{${n.join(",")}}`),this}ilike(i,n){return this.url.searchParams.append(i,`ilike.${n}`),this}ilikeAllOf(i,n){return this.url.searchParams.append(i,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(i,n){return this.url.searchParams.append(i,`ilike(any).{${n.join(",")}}`),this}regexMatch(i,n){return this.url.searchParams.append(i,`match.${n}`),this}regexIMatch(i,n){return this.url.searchParams.append(i,`imatch.${n}`),this}is(i,n){return this.url.searchParams.append(i,`is.${n}`),this}isDistinct(i,n){return this.url.searchParams.append(i,`isdistinct.${n}`),this}in(i,n){const s=Array.from(new Set(n)).map(u=>typeof u=="string"&&eC.test(u)?`"${u}"`:`${u}`).join(",");return this.url.searchParams.append(i,`in.(${s})`),this}notIn(i,n){const s=Array.from(new Set(n)).map(u=>typeof u=="string"&&eC.test(u)?`"${u}"`:`${u}`).join(",");return this.url.searchParams.append(i,`not.in.(${s})`),this}contains(i,n){return typeof n=="string"?this.url.searchParams.append(i,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(i,`cs.{${n.join(",")}}`):this.url.searchParams.append(i,`cs.${JSON.stringify(n)}`),this}containedBy(i,n){return typeof n=="string"?this.url.searchParams.append(i,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(i,`cd.{${n.join(",")}}`):this.url.searchParams.append(i,`cd.${JSON.stringify(n)}`),this}rangeGt(i,n){return this.url.searchParams.append(i,`sr.${n}`),this}rangeGte(i,n){return this.url.searchParams.append(i,`nxl.${n}`),this}rangeLt(i,n){return this.url.searchParams.append(i,`sl.${n}`),this}rangeLte(i,n){return this.url.searchParams.append(i,`nxr.${n}`),this}rangeAdjacent(i,n){return this.url.searchParams.append(i,`adj.${n}`),this}overlaps(i,n){return typeof n=="string"?this.url.searchParams.append(i,`ov.${n}`):this.url.searchParams.append(i,`ov.{${n.join(",")}}`),this}textSearch(i,n,{config:s,type:u}={}){let f="";u==="plain"?f="pl":u==="phrase"?f="ph":u==="websearch"&&(f="w");const v=s===void 0?"":`(${s})`;return this.url.searchParams.append(i,`${f}fts${v}.${n}`),this}match(i){return Object.entries(i).filter(([n,s])=>s!==void 0).forEach(([n,s])=>{this.url.searchParams.append(n,`eq.${s}`)}),this}not(i,n,s){return this.url.searchParams.append(i,`not.${n}.${s}`),this}or(i,{foreignTable:n,referencedTable:s=n}={}){const u=s?`${s}.or`:"or";return this.url.searchParams.append(u,`(${i})`),this}filter(i,n,s){return this.url.searchParams.append(i,`${n}.${s}`),this}},Oj=class{constructor(i,{headers:n={},schema:s,fetch:u,urlLengthLimit:f=8e3,retry:v}){this.url=i,this.headers=new Headers(n),this.schema=s,this.fetch=u,this.urlLengthLimit=f,this.retry=v}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(i,n){const{head:s=!1,count:u}=n??{},f=s?"HEAD":"GET";let v=!1;const h=(i??"*").split("").map(_=>/\s/.test(_)&&!v?"":(_==='"'&&(v=!v),_)).join(""),{url:g,headers:b}=this.cloneRequestState();return g.searchParams.set("select",h),u&&b.append("Prefer",`count=${u}`),new Pf({method:f,url:g,headers:b,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(i,{count:n,defaultToNull:s=!0}={}){var u;const f="POST",{url:v,headers:h}=this.cloneRequestState();if(n&&h.append("Prefer",`count=${n}`),s||h.append("Prefer","missing=default"),Array.isArray(i)){const g=i.reduce((b,_)=>b.concat(Object.keys(_)),[]);if(g.length>0){const b=[...new Set(g)].map(_=>`"${_}"`);v.searchParams.set("columns",b.join(","))}}return new Pf({method:f,url:v,headers:h,schema:this.schema,body:i,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(i,{onConflict:n,ignoreDuplicates:s=!1,count:u,defaultToNull:f=!0}={}){var v;const h="POST",{url:g,headers:b}=this.cloneRequestState();if(b.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),n!==void 0&&g.searchParams.set("on_conflict",n),u&&b.append("Prefer",`count=${u}`),f||b.append("Prefer","missing=default"),Array.isArray(i)){const _=i.reduce((k,R)=>k.concat(Object.keys(R)),[]);if(_.length>0){const k=[...new Set(_)].map(R=>`"${R}"`);g.searchParams.set("columns",k.join(","))}}return new Pf({method:h,url:g,headers:b,schema:this.schema,body:i,fetch:(v=this.fetch)!==null&&v!==void 0?v:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(i,{count:n}={}){var s;const u="PATCH",{url:f,headers:v}=this.cloneRequestState();return n&&v.append("Prefer",`count=${n}`),new Pf({method:u,url:f,headers:v,schema:this.schema,body:i,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:i}={}){var n;const s="DELETE",{url:u,headers:f}=this.cloneRequestState();return i&&f.append("Prefer",`count=${i}`),new Pf({method:s,url:u,headers:f,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function sv(i){"@babel/helpers - typeof";return sv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sv(i)}function Aj(i,n){if(sv(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var u=s.call(i,n);if(sv(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function Dj(i){var n=Aj(i,"string");return sv(n)=="symbol"?n:n+""}function Nj(i,n,s){return(n=Dj(n))in i?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,i}function tC(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);n&&(u=u.filter(function(f){return Object.getOwnPropertyDescriptor(i,f).enumerable})),s.push.apply(s,u)}return s}function fy(i){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?tC(Object(s),!0).forEach(function(u){Nj(i,u,s[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):tC(Object(s)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(s,u))})}return i}var jj=class c1{constructor(n,{headers:s={},schema:u,fetch:f,timeout:v,urlLengthLimit:h=8e3,retry:g}={}){this.url=n,this.headers=new Headers(s),this.schemaName=u,this.urlLengthLimit=h;const b=f??globalThis.fetch;v!==void 0&&v>0?this.fetch=(_,k)=>{const R=new AbortController,N=setTimeout(()=>R.abort(),v),A=k==null?void 0:k.signal;if(A){if(A.aborted)return clearTimeout(N),b(_,k);const j=()=>{clearTimeout(N),R.abort()};return A.addEventListener("abort",j,{once:!0}),b(_,fy(fy({},k),{},{signal:R.signal})).finally(()=>{clearTimeout(N),A.removeEventListener("abort",j)})}return b(_,fy(fy({},k),{},{signal:R.signal})).finally(()=>clearTimeout(N))}:this.fetch=b,this.retry=g}from(n){if(!n||typeof n!="string"||n.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Oj(new URL(`${this.url}/${n}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(n){return new c1(this.url,{headers:this.headers,schema:n,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(n,s={},{head:u=!1,get:f=!1,count:v}={}){var h;let g;const b=new URL(`${this.url}/rpc/${n}`);let _;const k=A=>A!==null&&typeof A=="object"&&(!Array.isArray(A)||A.some(k)),R=u&&Object.values(s).some(k);R?(g="POST",_=s):u||f?(g=u?"HEAD":"GET",Object.entries(s).filter(([A,j])=>j!==void 0).map(([A,j])=>[A,Array.isArray(j)?`{${j.join(",")}}`:`${j}`]).forEach(([A,j])=>{b.searchParams.append(A,j)})):(g="POST",_=s);const N=new Headers(this.headers);return R?N.set("Prefer",v?`count=${v},return=minimal`:"return=minimal"):v&&N.set("Prefer",`count=${v}`),new Pf({method:g,url:b,headers:N,schema:this.schemaName,body:_,fetch:(h=this.fetch)!==null&&h!==void 0?h:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Lj{constructor(){}static detectEnvironment(){var n;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const u=typeof global<"u"?global:void 0;if(u&&typeof u.WebSocket<"u")return{type:"native",wsConstructor:u.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((n=navigator.userAgent)===null||n===void 0)&&n.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const f=globalThis.process;if(f){const v=f.versions;if(v&&v.node){const h=v.node,g=parseInt(h.replace(/^v/,"").split(".")[0]);return g>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${g} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${g} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
244
+ ${R.stack}`)}else{var F;b=(F=h==null?void 0:h.stack)!==null&&F!==void 0?F:""}const Y=this.url.toString().length;return(h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"?(k="",_="Request was aborted (timeout or manual cancellation)",Y>this.urlLengthLimit&&(_+=`. Note: Your request URL is ${Y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((R==null?void 0:R.name)==="HeadersOverflowError"||(R==null?void 0:R.code)==="UND_ERR_HEADERS_OVERFLOW")&&(k="",_="HTTP headers exceeded server limits (typically 16KB)",Y>this.urlLengthLimit&&(_+=`. Your request URL is ${Y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(g=h==null?void 0:h.name)!==null&&g!==void 0?g:"FetchError"}: ${h==null?void 0:h.message}`,details:b,hint:_,code:k},data:null,count:null,status:0,statusText:""}})),v.then(i,n)}async processResponse(i){var n=this;let s=null,u=null,f=null,v=i.status,h=i.statusText;if(i.ok){var g,b;if(n.method!=="HEAD"){var _;const N=await i.text();N===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((_=n.headers.get("Accept"))===null||_===void 0)&&_.includes("application/vnd.pgrst.plan+text"))?u=N:u=JSON.parse(N))}const k=(g=n.headers.get("Prefer"))===null||g===void 0?void 0:g.match(/count=(exact|planned|estimated)/),R=(b=i.headers.get("content-range"))===null||b===void 0?void 0:b.split("/");k&&R&&R.length>1&&(f=parseInt(R[1])),n.isMaybeSingle&&Array.isArray(u)&&(u.length>1?(s={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,f=null,v=406,h="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const k=await i.text();try{s=JSON.parse(k),Array.isArray(s)&&i.status===404&&(u=[],s=null,v=200,h="OK")}catch{i.status===404&&k===""?(v=204,h="No Content"):s={message:k}}if(s&&n.shouldThrowOnError)throw new Cj(s)}return{success:s===null,error:s,data:u,count:f,status:v,statusText:h}}returns(){return this}overrideTypes(){return this}},Oj=class extends Rj{select(i){let n=!1;const s=(i??"*").split("").map(u=>/\s/.test(u)&&!n?"":(u==='"'&&(n=!n),u)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(i,{ascending:n=!0,nullsFirst:s,foreignTable:u,referencedTable:f=u}={}){const v=f?`${f}.order`:"order",h=this.url.searchParams.get(v);return this.url.searchParams.set(v,`${h?`${h},`:""}${i}.${n?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:n,referencedTable:s=n}={}){const u=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(u,`${i}`),this}range(i,n,{foreignTable:s,referencedTable:u=s}={}){const f=typeof u>"u"?"offset":`${u}.offset`,v=typeof u>"u"?"limit":`${u}.limit`;return this.url.searchParams.set(f,`${i}`),this.url.searchParams.set(v,`${n-i+1}`),this}abortSignal(i){return this.signal=i,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:i=!1,verbose:n=!1,settings:s=!1,buffers:u=!1,wal:f=!1,format:v="text"}={}){var h;const g=[i?"analyze":null,n?"verbose":null,s?"settings":null,u?"buffers":null,f?"wal":null].filter(Boolean).join("|"),b=(h=this.headers.get("Accept"))!==null&&h!==void 0?h:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${v}; for="${b}"; options=${g};`),v==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(i){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${i}`),this}};const eC=new RegExp("[,()]");var Pf=class extends Oj{eq(i,n){return this.url.searchParams.append(i,`eq.${n}`),this}neq(i,n){return this.url.searchParams.append(i,`neq.${n}`),this}gt(i,n){return this.url.searchParams.append(i,`gt.${n}`),this}gte(i,n){return this.url.searchParams.append(i,`gte.${n}`),this}lt(i,n){return this.url.searchParams.append(i,`lt.${n}`),this}lte(i,n){return this.url.searchParams.append(i,`lte.${n}`),this}like(i,n){return this.url.searchParams.append(i,`like.${n}`),this}likeAllOf(i,n){return this.url.searchParams.append(i,`like(all).{${n.join(",")}}`),this}likeAnyOf(i,n){return this.url.searchParams.append(i,`like(any).{${n.join(",")}}`),this}ilike(i,n){return this.url.searchParams.append(i,`ilike.${n}`),this}ilikeAllOf(i,n){return this.url.searchParams.append(i,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(i,n){return this.url.searchParams.append(i,`ilike(any).{${n.join(",")}}`),this}regexMatch(i,n){return this.url.searchParams.append(i,`match.${n}`),this}regexIMatch(i,n){return this.url.searchParams.append(i,`imatch.${n}`),this}is(i,n){return this.url.searchParams.append(i,`is.${n}`),this}isDistinct(i,n){return this.url.searchParams.append(i,`isdistinct.${n}`),this}in(i,n){const s=Array.from(new Set(n)).map(u=>typeof u=="string"&&eC.test(u)?`"${u}"`:`${u}`).join(",");return this.url.searchParams.append(i,`in.(${s})`),this}notIn(i,n){const s=Array.from(new Set(n)).map(u=>typeof u=="string"&&eC.test(u)?`"${u}"`:`${u}`).join(",");return this.url.searchParams.append(i,`not.in.(${s})`),this}contains(i,n){return typeof n=="string"?this.url.searchParams.append(i,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(i,`cs.{${n.join(",")}}`):this.url.searchParams.append(i,`cs.${JSON.stringify(n)}`),this}containedBy(i,n){return typeof n=="string"?this.url.searchParams.append(i,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(i,`cd.{${n.join(",")}}`):this.url.searchParams.append(i,`cd.${JSON.stringify(n)}`),this}rangeGt(i,n){return this.url.searchParams.append(i,`sr.${n}`),this}rangeGte(i,n){return this.url.searchParams.append(i,`nxl.${n}`),this}rangeLt(i,n){return this.url.searchParams.append(i,`sl.${n}`),this}rangeLte(i,n){return this.url.searchParams.append(i,`nxr.${n}`),this}rangeAdjacent(i,n){return this.url.searchParams.append(i,`adj.${n}`),this}overlaps(i,n){return typeof n=="string"?this.url.searchParams.append(i,`ov.${n}`):this.url.searchParams.append(i,`ov.{${n.join(",")}}`),this}textSearch(i,n,{config:s,type:u}={}){let f="";u==="plain"?f="pl":u==="phrase"?f="ph":u==="websearch"&&(f="w");const v=s===void 0?"":`(${s})`;return this.url.searchParams.append(i,`${f}fts${v}.${n}`),this}match(i){return Object.entries(i).filter(([n,s])=>s!==void 0).forEach(([n,s])=>{this.url.searchParams.append(n,`eq.${s}`)}),this}not(i,n,s){return this.url.searchParams.append(i,`not.${n}.${s}`),this}or(i,{foreignTable:n,referencedTable:s=n}={}){const u=s?`${s}.or`:"or";return this.url.searchParams.append(u,`(${i})`),this}filter(i,n,s){return this.url.searchParams.append(i,`${n}.${s}`),this}},Aj=class{constructor(i,{headers:n={},schema:s,fetch:u,urlLengthLimit:f=8e3,retry:v}){this.url=i,this.headers=new Headers(n),this.schema=s,this.fetch=u,this.urlLengthLimit=f,this.retry=v}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(i,n){const{head:s=!1,count:u}=n??{},f=s?"HEAD":"GET";let v=!1;const h=(i??"*").split("").map(_=>/\s/.test(_)&&!v?"":(_==='"'&&(v=!v),_)).join(""),{url:g,headers:b}=this.cloneRequestState();return g.searchParams.set("select",h),u&&b.append("Prefer",`count=${u}`),new Pf({method:f,url:g,headers:b,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(i,{count:n,defaultToNull:s=!0}={}){var u;const f="POST",{url:v,headers:h}=this.cloneRequestState();if(n&&h.append("Prefer",`count=${n}`),s||h.append("Prefer","missing=default"),Array.isArray(i)){const g=i.reduce((b,_)=>b.concat(Object.keys(_)),[]);if(g.length>0){const b=[...new Set(g)].map(_=>`"${_}"`);v.searchParams.set("columns",b.join(","))}}return new Pf({method:f,url:v,headers:h,schema:this.schema,body:i,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(i,{onConflict:n,ignoreDuplicates:s=!1,count:u,defaultToNull:f=!0}={}){var v;const h="POST",{url:g,headers:b}=this.cloneRequestState();if(b.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),n!==void 0&&g.searchParams.set("on_conflict",n),u&&b.append("Prefer",`count=${u}`),f||b.append("Prefer","missing=default"),Array.isArray(i)){const _=i.reduce((k,R)=>k.concat(Object.keys(R)),[]);if(_.length>0){const k=[...new Set(_)].map(R=>`"${R}"`);g.searchParams.set("columns",k.join(","))}}return new Pf({method:h,url:g,headers:b,schema:this.schema,body:i,fetch:(v=this.fetch)!==null&&v!==void 0?v:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(i,{count:n}={}){var s;const u="PATCH",{url:f,headers:v}=this.cloneRequestState();return n&&v.append("Prefer",`count=${n}`),new Pf({method:u,url:f,headers:v,schema:this.schema,body:i,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:i}={}){var n;const s="DELETE",{url:u,headers:f}=this.cloneRequestState();return i&&f.append("Prefer",`count=${i}`),new Pf({method:s,url:u,headers:f,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function sv(i){"@babel/helpers - typeof";return sv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sv(i)}function Dj(i,n){if(sv(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var u=s.call(i,n);if(sv(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function Nj(i){var n=Dj(i,"string");return sv(n)=="symbol"?n:n+""}function jj(i,n,s){return(n=Nj(n))in i?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,i}function tC(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);n&&(u=u.filter(function(f){return Object.getOwnPropertyDescriptor(i,f).enumerable})),s.push.apply(s,u)}return s}function fy(i){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?tC(Object(s),!0).forEach(function(u){jj(i,u,s[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):tC(Object(s)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(s,u))})}return i}var Lj=class c1{constructor(n,{headers:s={},schema:u,fetch:f,timeout:v,urlLengthLimit:h=8e3,retry:g}={}){this.url=n,this.headers=new Headers(s),this.schemaName=u,this.urlLengthLimit=h;const b=f??globalThis.fetch;v!==void 0&&v>0?this.fetch=(_,k)=>{const R=new AbortController,N=setTimeout(()=>R.abort(),v),A=k==null?void 0:k.signal;if(A){if(A.aborted)return clearTimeout(N),b(_,k);const j=()=>{clearTimeout(N),R.abort()};return A.addEventListener("abort",j,{once:!0}),b(_,fy(fy({},k),{},{signal:R.signal})).finally(()=>{clearTimeout(N),A.removeEventListener("abort",j)})}return b(_,fy(fy({},k),{},{signal:R.signal})).finally(()=>clearTimeout(N))}:this.fetch=b,this.retry=g}from(n){if(!n||typeof n!="string"||n.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Aj(new URL(`${this.url}/${n}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(n){return new c1(this.url,{headers:this.headers,schema:n,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(n,s={},{head:u=!1,get:f=!1,count:v}={}){var h;let g;const b=new URL(`${this.url}/rpc/${n}`);let _;const k=A=>A!==null&&typeof A=="object"&&(!Array.isArray(A)||A.some(k)),R=u&&Object.values(s).some(k);R?(g="POST",_=s):u||f?(g=u?"HEAD":"GET",Object.entries(s).filter(([A,j])=>j!==void 0).map(([A,j])=>[A,Array.isArray(j)?`{${j.join(",")}}`:`${j}`]).forEach(([A,j])=>{b.searchParams.append(A,j)})):(g="POST",_=s);const N=new Headers(this.headers);return R?N.set("Prefer",v?`count=${v},return=minimal`:"return=minimal"):v&&N.set("Prefer",`count=${v}`),new Pf({method:g,url:b,headers:N,schema:this.schemaName,body:_,fetch:(h=this.fetch)!==null&&h!==void 0?h:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Pj{constructor(){}static detectEnvironment(){var n;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const u=typeof global<"u"?global:void 0;if(u&&typeof u.WebSocket<"u")return{type:"native",wsConstructor:u.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((n=navigator.userAgent)===null||n===void 0)&&n.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const f=globalThis.process;if(f){const v=f.versions;if(v&&v.node){const h=v.node,g=parseInt(h.replace(/^v/,"").split(".")[0]);return g>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${g} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${g} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
245
245
  import ws from "ws"
246
246
  new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const n=this.detectEnvironment();if(n.wsConstructor)return n.wsConstructor;let s=n.error||"WebSocket not supported in this environment.";throw n.workaround&&(s+=`
247
247
 
248
- Suggested solution: ${n.workaround}`),new Error(s)}static isWebSocketSupported(){try{const n=this.detectEnvironment();return n.type==="native"||n.type==="ws"}catch{return!1}}}const Pj="2.106.1",Uj=`realtime-js/${Pj}`,Mj="1.0.0",d1="2.0.0",$j=d1,Ij=1e4,zj=100,yu={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},f1={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},AS={connecting:"connecting",closing:"closing",closed:"closed"};class Fj{constructor(n){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=n??[]}encode(n,s){if(n.event===this.BROADCAST_EVENT&&!(n.payload instanceof ArrayBuffer)&&typeof n.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(n));let u=[n.join_ref,n.ref,n.topic,n.event,n.payload];return s(JSON.stringify(u))}_binaryEncodeUserBroadcastPush(n){var s;return this._isArrayBuffer((s=n.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(n):this._encodeJsonUserBroadcastPush(n)}_encodeBinaryUserBroadcastPush(n){var s,u;const f=(u=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&u!==void 0?u:new ArrayBuffer(0);return this._encodeUserBroadcastPush(n,this.BINARY_ENCODING,f)}_encodeJsonUserBroadcastPush(n){var s,u;const f=(u=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&u!==void 0?u:{},h=new TextEncoder().encode(JSON.stringify(f)).buffer;return this._encodeUserBroadcastPush(n,this.JSON_ENCODING,h)}_encodeUserBroadcastPush(n,s,u){var f,v;const h=n.topic,g=(f=n.ref)!==null&&f!==void 0?f:"",b=(v=n.join_ref)!==null&&v!==void 0?v:"",_=n.payload.event,k=this.allowedMetadataKeys?this._pick(n.payload,this.allowedMetadataKeys):{},R=Object.keys(k).length===0?"":JSON.stringify(k);if(b.length>255)throw new Error(`joinRef length ${b.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`ref length ${g.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`topic length ${h.length} exceeds maximum of 255`);if(_.length>255)throw new Error(`userEvent length ${_.length} exceeds maximum of 255`);if(R.length>255)throw new Error(`metadata length ${R.length} exceeds maximum of 255`);const N=this.USER_BROADCAST_PUSH_META_LENGTH+b.length+g.length+h.length+_.length+R.length,A=new ArrayBuffer(this.HEADER_LENGTH+N);let j=new DataView(A),P=0;j.setUint8(P++,this.KINDS.userBroadcastPush),j.setUint8(P++,b.length),j.setUint8(P++,g.length),j.setUint8(P++,h.length),j.setUint8(P++,_.length),j.setUint8(P++,R.length),j.setUint8(P++,s),Array.from(b,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(g,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(h,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(_,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(R,Y=>j.setUint8(P++,Y.charCodeAt(0)));var F=new Uint8Array(A.byteLength+u.byteLength);return F.set(new Uint8Array(A),0),F.set(new Uint8Array(u),A.byteLength),F.buffer}decode(n,s){if(this._isArrayBuffer(n)){let u=this._binaryDecode(n);return s(u)}if(typeof n=="string"){const u=JSON.parse(n),[f,v,h,g,b]=u;return s({join_ref:f,ref:v,topic:h,event:g,payload:b})}return s({})}_binaryDecode(n){const s=new DataView(n),u=s.getUint8(0),f=new TextDecoder;switch(u){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(n,s,f)}}_decodeUserBroadcast(n,s,u){const f=s.getUint8(1),v=s.getUint8(2),h=s.getUint8(3),g=s.getUint8(4);let b=this.HEADER_LENGTH+4;const _=u.decode(n.slice(b,b+f));b=b+f;const k=u.decode(n.slice(b,b+v));b=b+v;const R=u.decode(n.slice(b,b+h));b=b+h;const N=n.slice(b,n.byteLength),A=g===this.JSON_ENCODING?JSON.parse(u.decode(N)):N,j={type:this.BROADCAST_EVENT,event:k,payload:A};return h>0&&(j.meta=JSON.parse(R)),{join_ref:null,ref:null,topic:_,event:this.BROADCAST_EVENT,payload:j}}_isArrayBuffer(n){var s;return n instanceof ArrayBuffer||((s=n==null?void 0:n.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(n,s){return!n||typeof n!="object"?{}:Object.fromEntries(Object.entries(n).filter(([u])=>s.includes(u)))}}var Mn;(function(i){i.abstime="abstime",i.bool="bool",i.date="date",i.daterange="daterange",i.float4="float4",i.float8="float8",i.int2="int2",i.int4="int4",i.int4range="int4range",i.int8="int8",i.int8range="int8range",i.json="json",i.jsonb="jsonb",i.money="money",i.numeric="numeric",i.oid="oid",i.reltime="reltime",i.text="text",i.time="time",i.timestamp="timestamp",i.timestamptz="timestamptz",i.timetz="timetz",i.tsrange="tsrange",i.tstzrange="tstzrange"})(Mn||(Mn={}));const nC=(i,n,s={})=>{var u;const f=(u=s.skipTypes)!==null&&u!==void 0?u:[];return n?Object.keys(n).reduce((v,h)=>(v[h]=Bj(h,i,n,f),v),{}):{}},Bj=(i,n,s,u)=>{const f=n.find(g=>g.name===i),v=f==null?void 0:f.type,h=s[i];return v&&!u.includes(v)?h1(v,h):DS(h)},h1=(i,n)=>{if(i.charAt(0)==="_"){const s=i.slice(1,i.length);return qj(n,s)}switch(i){case Mn.bool:return Hj(n);case Mn.float4:case Mn.float8:case Mn.int2:case Mn.int4:case Mn.int8:case Mn.numeric:case Mn.oid:return Vj(n);case Mn.json:case Mn.jsonb:return Wj(n);case Mn.timestamp:return Yj(n);case Mn.abstime:case Mn.date:case Mn.daterange:case Mn.int4range:case Mn.int8range:case Mn.money:case Mn.reltime:case Mn.text:case Mn.time:case Mn.timestamptz:case Mn.timetz:case Mn.tsrange:case Mn.tstzrange:return DS(n);default:return DS(n)}},DS=i=>i,Hj=i=>{switch(i){case"t":return!0;case"f":return!1;default:return i}},Vj=i=>{if(typeof i=="string"){const n=parseFloat(i);if(!Number.isNaN(n))return n}return i},Wj=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch{return i}return i},qj=(i,n)=>{if(typeof i!="string")return i;const s=i.length-1,u=i[s];if(i[0]==="{"&&u==="}"){let v;const h=i.slice(1,s);try{v=JSON.parse("["+h+"]")}catch{v=h?h.split(","):[]}return v.map(g=>h1(n,g))}return i},Yj=i=>typeof i=="string"?i.replace(" ","T"):i,p1=i=>{const n=new URL(i);return n.protocol=n.protocol.replace(/^ws/i,"http"),n.pathname=n.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),n.pathname===""||n.pathname==="/"?n.pathname="/api/broadcast":n.pathname=n.pathname+"/api/broadcast",n.href};var iv=i=>typeof i=="function"?i:function(){return i},Gj=typeof self<"u"?self:null,Uf=typeof window<"u"?window:null,gs=Gj||Uf||globalThis,Kj="2.0.0",Jj=1e4,Xj=1e3,ws={connecting:0,open:1,closing:2,closed:3},ia={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},gl={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},NS={longpoll:"longpoll",websocket:"websocket"},Qj={complete:4},jS="base64url.bearer.phx.",hy=class{constructor(i,n,s,u){this.channel=i,this.event=n,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=u,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,n){return this.hasReceived(i)&&n(this.receivedResp.response),this.recHooks.push({status:i,callback:n}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:i,response:n,_ref:s}){this.recHooks.filter(u=>u.status===i).forEach(u=>u.callback(n))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,n){this.channel.trigger(this.refEvent,{status:i,response:n})}},v1=class{constructor(i,n){this.callback=i,this.timerCalc=n,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Zj=class{constructor(i,n,s){this.state=ia.closed,this.topic=i,this.params=iv(n||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new hy(this,gl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new v1(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=ia.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(u=>u.send()),this.pushBuffer=[]}),this.joinPush.receive("error",u=>{this.state=ia.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,u),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=ia.closed,this.socket.remove(this)}),this.onError(u=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,u),this.isJoining()&&this.joinPush.reset(),this.state=ia.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new hy(this,gl.leave,iv({}),this.timeout).send(),this.state=ia.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(gl.reply,(u,f)=>{this.trigger(this.replyEventName(f),u)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(i=>i.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ia.closed,this.bindings=[]}onClose(i){this.on(gl.close,i)}onError(i){return this.on(gl.error,n=>i(n))}on(i,n){let s=this.bindingRef++;return this.bindings.push({event:i,ref:s,callback:n}),s}off(i,n){this.bindings=this.bindings.filter(s=>!(s.event===i&&(typeof n>"u"||n===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,n,s=this.timeout){if(n=n||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let u=new hy(this,i,function(){return n},s);return this.canPush()?u.send():(u.startTimeout(),this.pushBuffer.push(u)),u}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ia.leaving;let n=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(gl.close,"leave")},s=new hy(this,gl.leave,iv({}),i);return s.receive("ok",()=>n()).receive("timeout",()=>n()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(i,n,s){return n}filterBindings(i,n,s){return!0}isMember(i,n,s,u){return this.topic!==i?!1:u&&u!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:n,payload:s,joinRef:u}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ia.joining,this.joinPush.resend(i))}trigger(i,n,s,u){let f=this.onMessage(i,n,s,u);if(n&&!f)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let v=this.bindings.filter(h=>h.event===i&&this.filterBindings(h,n,s));for(let h=0;h<v.length;h++)v[h].callback(f,s,u||this.joinRef())}replyEventName(i){return`chan_reply_${i}`}isClosed(){return this.state===ia.closed}isErrored(){return this.state===ia.errored}isJoined(){return this.state===ia.joined}isJoining(){return this.state===ia.joining}isLeaving(){return this.state===ia.leaving}},Ay=class{static request(i,n,s,u,f,v,h){if(gs.XDomainRequest){let g=new gs.XDomainRequest;return this.xdomainRequest(g,i,n,u,f,v,h)}else if(gs.XMLHttpRequest){let g=new gs.XMLHttpRequest;return this.xhrRequest(g,i,n,s,u,f,v,h)}else{if(gs.fetch&&gs.AbortController)return this.fetchRequest(i,n,s,u,f,v,h);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(i,n,s,u,f,v,h){let g={method:i,headers:s,body:u},b=null;return f&&(b=new AbortController,setTimeout(()=>b.abort(),f),g.signal=b.signal),gs.fetch(n,g).then(_=>_.text()).then(_=>this.parseJSON(_)).then(_=>h&&h(_)).catch(_=>{_.name==="AbortError"&&v?v():h&&h(null)}),b}static xdomainRequest(i,n,s,u,f,v,h){return i.timeout=f,i.open(n,s),i.onload=()=>{let g=this.parseJSON(i.responseText);h&&h(g)},v&&(i.ontimeout=v),i.onprogress=()=>{},i.send(u),i}static xhrRequest(i,n,s,u,f,v,h,g){i.open(n,s,!0),i.timeout=v;for(let[b,_]of Object.entries(u))i.setRequestHeader(b,_);return i.onerror=()=>g&&g(null),i.onreadystatechange=()=>{if(i.readyState===Qj.complete&&g){let b=this.parseJSON(i.responseText);g(b)}},h&&(i.ontimeout=h),i.send(f),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch{return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,n){let s=[];for(var u in i){if(!Object.prototype.hasOwnProperty.call(i,u))continue;let f=n?`${n}[${u}]`:u,v=i[u];typeof v=="object"?s.push(this.serialize(v,f)):s.push(encodeURIComponent(f)+"="+encodeURIComponent(v))}return s.join("&")}static appendParams(i,n){if(Object.keys(n).length===0)return i;let s=i.match(/\?/)?"&":"?";return`${i}${s}${this.serialize(n)}`}},eL=i=>{let n="",s=new Uint8Array(i),u=s.byteLength;for(let f=0;f<u;f++)n+=String.fromCharCode(s[f]);return btoa(n)},Af=class{constructor(i,n){n&&n.length===2&&n[1].startsWith(jS)&&(this.authToken=atob(n[1].slice(jS.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=ws.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+NS.websocket),"$1/"+NS.longpoll)}endpointURL(){return Ay.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,n,s){this.close(i,n,s),this.readyState=ws.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ws.open||this.readyState===ws.connecting}poll(){const i={Accept:"application/json"};this.authToken&&(i["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",i,null,()=>this.ontimeout(),n=>{if(n){var{status:s,token:u,messages:f}=n;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=u}else s=0;switch(s){case 200:f.forEach(v=>{setTimeout(()=>this.onmessage({data:v}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ws.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(i){typeof i!="string"&&(i=eL(i)),this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},i.join(`
249
- `),()=>this.onerror("timeout"),n=>{this.awaitingBatchAck=!1,!n||n.status!==200?(this.onerror(n&&n.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,n,s){for(let f of this.reqs)f.abort();this.readyState=ws.closed;let u=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:n,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",u)):this.onclose(u)}ajax(i,n,s,u,f){let v,h=()=>{this.reqs.delete(v),u()};v=Ay.request(i,this.endpointURL(),n,s,this.timeout,h,g=>{this.reqs.delete(v),this.isActive()&&f(g)}),this.reqs.add(v)}},tL=class nv{constructor(n,s={}){let u=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=n,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(u.state,f=>{let{onJoin:v,onLeave:h,onSync:g}=this.caller;this.joinRef=this.channel.joinRef(),this.state=nv.syncState(this.state,f,v,h),this.pendingDiffs.forEach(b=>{this.state=nv.syncDiff(this.state,b,v,h)}),this.pendingDiffs=[],g()}),this.channel.on(u.diff,f=>{let{onJoin:v,onLeave:h,onSync:g}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(f):(this.state=nv.syncDiff(this.state,f,v,h),g())})}onJoin(n){this.caller.onJoin=n}onLeave(n){this.caller.onLeave=n}onSync(n){this.caller.onSync=n}list(n){return nv.list(this.state,n)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(n,s,u,f){let v=this.clone(n),h={},g={};return this.map(v,(b,_)=>{s[b]||(g[b]=_)}),this.map(s,(b,_)=>{let k=v[b];if(k){let R=_.metas.map(P=>P.phx_ref),N=k.metas.map(P=>P.phx_ref),A=_.metas.filter(P=>N.indexOf(P.phx_ref)<0),j=k.metas.filter(P=>R.indexOf(P.phx_ref)<0);A.length>0&&(h[b]=_,h[b].metas=A),j.length>0&&(g[b]=this.clone(k),g[b].metas=j)}else h[b]=_}),this.syncDiff(v,{joins:h,leaves:g},u,f)}static syncDiff(n,s,u,f){let{joins:v,leaves:h}=this.clone(s);return u||(u=function(){}),f||(f=function(){}),this.map(v,(g,b)=>{let _=n[g];if(n[g]=this.clone(b),_){let k=n[g].metas.map(N=>N.phx_ref),R=_.metas.filter(N=>k.indexOf(N.phx_ref)<0);n[g].metas.unshift(...R)}u(g,_,b)}),this.map(h,(g,b)=>{let _=n[g];if(!_)return;let k=b.metas.map(R=>R.phx_ref);_.metas=_.metas.filter(R=>k.indexOf(R.phx_ref)<0),f(g,_,b),_.metas.length===0&&delete n[g]}),n}static list(n,s){return s||(s=function(u,f){return f}),this.map(n,(u,f)=>s(u,f))}static map(n,s){return Object.getOwnPropertyNames(n).map(u=>s(u,n[u]))}static clone(n){return JSON.parse(JSON.stringify(n))}},py={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,n){if(i.payload.constructor===ArrayBuffer)return n(this.binaryEncode(i));{let s=[i.join_ref,i.ref,i.topic,i.event,i.payload];return n(JSON.stringify(s))}},decode(i,n){if(i.constructor===ArrayBuffer)return n(this.binaryDecode(i));{let[s,u,f,v,h]=JSON.parse(i);return n({join_ref:s,ref:u,topic:f,event:v,payload:h})}},binaryEncode(i){let{join_ref:n,ref:s,event:u,topic:f,payload:v}=i,h=this.META_LENGTH+n.length+s.length+f.length+u.length,g=new ArrayBuffer(this.HEADER_LENGTH+h),b=new DataView(g),_=0;b.setUint8(_++,this.KINDS.push),b.setUint8(_++,n.length),b.setUint8(_++,s.length),b.setUint8(_++,f.length),b.setUint8(_++,u.length),Array.from(n,R=>b.setUint8(_++,R.charCodeAt(0))),Array.from(s,R=>b.setUint8(_++,R.charCodeAt(0))),Array.from(f,R=>b.setUint8(_++,R.charCodeAt(0))),Array.from(u,R=>b.setUint8(_++,R.charCodeAt(0)));var k=new Uint8Array(g.byteLength+v.byteLength);return k.set(new Uint8Array(g),0),k.set(new Uint8Array(v),g.byteLength),k.buffer},binaryDecode(i){let n=new DataView(i),s=n.getUint8(0),u=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(i,n,u);case this.KINDS.reply:return this.decodeReply(i,n,u);case this.KINDS.broadcast:return this.decodeBroadcast(i,n,u)}},decodePush(i,n,s){let u=n.getUint8(1),f=n.getUint8(2),v=n.getUint8(3),h=this.HEADER_LENGTH+this.META_LENGTH-1,g=s.decode(i.slice(h,h+u));h=h+u;let b=s.decode(i.slice(h,h+f));h=h+f;let _=s.decode(i.slice(h,h+v));h=h+v;let k=i.slice(h,i.byteLength);return{join_ref:g,ref:null,topic:b,event:_,payload:k}},decodeReply(i,n,s){let u=n.getUint8(1),f=n.getUint8(2),v=n.getUint8(3),h=n.getUint8(4),g=this.HEADER_LENGTH+this.META_LENGTH,b=s.decode(i.slice(g,g+u));g=g+u;let _=s.decode(i.slice(g,g+f));g=g+f;let k=s.decode(i.slice(g,g+v));g=g+v;let R=s.decode(i.slice(g,g+h));g=g+h;let N=i.slice(g,i.byteLength),A={status:R,response:N};return{join_ref:b,ref:_,topic:k,event:gl.reply,payload:A}},decodeBroadcast(i,n,s){let u=n.getUint8(1),f=n.getUint8(2),v=this.HEADER_LENGTH+2,h=s.decode(i.slice(v,v+u));v=v+u;let g=s.decode(i.slice(v,v+f));v=v+f;let b=i.slice(v,i.byteLength);return{join_ref:null,ref:null,topic:h,event:g,payload:b}}},nL=class{constructor(i,n={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=n.timeout||Jj,this.transport=n.transport||gs.WebSocket||Af,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=n.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=gs&&gs.sessionStorage}catch{}this.sessionStore=n.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=py.encode.bind(py),this.defaultDecoder=py.decode.bind(py),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=n.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Af?(this.encode=n.encode||this.defaultEncoder,this.decode=n.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let u=null;Uf&&Uf.addEventListener&&(Uf.addEventListener("pagehide",f=>{this.conn&&(this.disconnect(),u=this.connectClock)}),Uf.addEventListener("pageshow",f=>{u===this.connectClock&&(u=null,this.connect())}),Uf.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=n.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=n.autoSendHeartbeat??!0,this.heartbeatCallback=n.heartbeatCallback??(()=>{}),this.rejoinAfterMs=f=>n.rejoinAfterMs?n.rejoinAfterMs(f):[1e3,2e3,5e3][f-1]||1e4,this.reconnectAfterMs=f=>n.reconnectAfterMs?n.reconnectAfterMs(f):[10,50,100,150,200,250,500,1e3,2e3][f-1]||5e3,this.logger=n.logger||null,!this.logger&&n.debug&&(this.logger=(f,v,h)=>{console.log(`${f}: ${v}`,h)}),this.longpollerTimeout=n.longpollerTimeout||2e4,this.params=iv(n.params||{}),this.endPoint=`${i}/${NS.websocket}`,this.vsn=n.vsn||Kj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new v1(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{n.beforeReconnect&&await n.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=n.authToken}getLongPollTransport(){return Af}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=Ay.appendParams(Ay.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,n,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,i&&i()},n,s)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=iv(i)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Af?this.connectWithFallback(Af,this.longPollFallbackMs):this.transportConnect())}log(i,n,s){this.logger&&this.logger(i,n,s)}hasLogger(){return this.logger!==null}onOpen(i){let n=this.makeRef();return this.stateChangeCallbacks.open.push([n,i]),n}onClose(i){let n=this.makeRef();return this.stateChangeCallbacks.close.push([n,i]),n}onError(i){let n=this.makeRef();return this.stateChangeCallbacks.error.push([n,i]),n}onMessage(i){let n=this.makeRef();return this.stateChangeCallbacks.message.push([n,i]),n}onHeartbeat(i){this.heartbeatCallback=i}ping(i){if(!this.isConnected())return!1;let n=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:n});let u=this.onMessage(f=>{f.ref===n&&(this.off([u]),i(Date.now()-s))});return!0}transportName(i){switch(i){case Af:return"LongPoll";default:return i.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let i;this.authToken&&(i=["phoenix",`${jS}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),i),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=n=>this.onConnError(n),this.conn.onmessage=n=>this.onConnMessage(n),this.conn.onclose=n=>this.onConnClose(n)}getSession(i){return this.sessionStore&&this.sessionStore.getItem(i)}storeSession(i,n){this.sessionStore&&this.sessionStore.setItem(i,n)}connectWithFallback(i,n=2500){clearTimeout(this.fallbackTimer);let s=!1,u=!0,f,v,h=this.transportName(i),g=b=>{this.log("transport",`falling back to ${h}...`,b),this.off([f,v]),u=!1,this.replaceTransport(i),this.transportConnect()};if(this.getSession(`phx:fallback:${h}`))return g("memorized");this.fallbackTimer=setTimeout(g,n),v=this.onError(b=>{this.log("transport","error",b),u&&!s&&(clearTimeout(this.fallbackTimer),g(b))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!u){let b=this.transportName(i);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${b}`,"true"),this.log("transport",`established ${b} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(g,n),this.ping(b=>{this.log("transport","connected to primary after",b),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(i){this.log("error","error in heartbeat callback",i)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Xj,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,n,s){if(!this.conn)return i&&i();const u=this.conn;this.waitForBufferDone(u,()=>{n?u.close(n,s||""):u.close(),this.waitForSocketClosed(u,()=>{this.conn===u&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,n,s=1){if(s===5||!i.bufferedAmount){n();return}setTimeout(()=>{this.waitForBufferDone(i,n,s+1)},150*s)}waitForSocketClosed(i,n,s=1){if(s===5||i.readyState===ws.closed){n();return}setTimeout(()=>{this.waitForSocketClosed(i,n,s+1)},150*s)}onConnClose(i){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(i),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",i)}onConnError(i){this.hasLogger()&&this.log("transport","error",i);let n=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",i,n,s),(n===this.transport||s>0)&&this.triggerChanError(i)}triggerChanError(i){this.channels.forEach(n=>{n.isErrored()||n.isLeaving()||n.isClosed()||n.trigger(gl.error,i)})}connectionState(){switch(this.conn&&this.conn.readyState){case ws.connecting:return"connecting";case ws.open:return"open";case ws.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(n=>n!==i)}off(i){for(let n in this.stateChangeCallbacks)this.stateChangeCallbacks[n]=this.stateChangeCallbacks[n].filter(([s])=>i.indexOf(s)===-1)}channel(i,n={}){let s=new Zj(i,n,this);return this.channels.push(s),s}push(i){if(this.hasLogger()){let{topic:n,event:s,payload:u,ref:f,join_ref:v}=i;this.log("push",`${n} ${s} (${v}, ${f})`,u)}this.isConnected()?this.encode(i,n=>this.conn.send(n)):this.sendBuffer.push(()=>this.encode(i,n=>this.conn.send(n)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(i){this.log("error","error in heartbeat callback",i)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(i){this.log("error","error in heartbeat callback",i)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,n=>{let{topic:s,event:u,payload:f,ref:v,join_ref:h}=n;if(v&&v===this.pendingHeartbeatRef){const g=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(f.status==="ok"?"ok":"error",g)}catch(b){this.log("error","error in heartbeat callback",b)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${f.status||""} ${s} ${u} ${v&&"("+v+")"||""}`.trim(),f);for(let g=0;g<this.channels.length;g++){const b=this.channels[g];b.isMember(s,u,f,h)&&b.trigger(u,f,v,h)}this.triggerStateCallbacks("message",n)})}triggerStateCallbacks(i,...n){try{this.stateChangeCallbacks[i].forEach(([s,u])=>{try{u(...n)}catch(f){this.log("error",`error in ${i} callback`,f)}})}catch(s){this.log("error",`error triggering ${i} callbacks`,s)}}leaveOpenTopic(i){let n=this.channels.find(s=>s.topic===i&&(s.isJoined()||s.isJoining()));n&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),n.leave())}};class av{constructor(n,s){const u=iL(s);this.presence=new tL(n.getChannel(),u),this.presence.onJoin((f,v,h)=>{const g=av.onJoinPayload(f,v,h);n.getChannel().trigger("presence",g)}),this.presence.onLeave((f,v,h)=>{const g=av.onLeavePayload(f,v,h);n.getChannel().trigger("presence",g)}),this.presence.onSync(()=>{n.getChannel().trigger("presence",{event:"sync"})})}get state(){return av.transformState(this.presence.state)}static transformState(n){return n=rL(n),Object.getOwnPropertyNames(n).reduce((s,u)=>{const f=n[u];return s[u]=Oy(f),s},{})}static onJoinPayload(n,s,u){const f=rC(s),v=Oy(u);return{event:"join",key:n,currentPresences:f,newPresences:v}}static onLeavePayload(n,s,u){const f=rC(s),v=Oy(u);return{event:"leave",key:n,currentPresences:f,leftPresences:v}}}function Oy(i){return i.metas.map(n=>(n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n))}function rL(i){return JSON.parse(JSON.stringify(i))}function iL(i){return(i==null?void 0:i.events)&&{events:i.events}}function rC(i){return i!=null&&i.metas?Oy(i):[]}var iC;(function(i){i.SYNC="sync",i.JOIN="join",i.LEAVE="leave"})(iC||(iC={}));class aL{get state(){return this.presenceAdapter.state}constructor(n,s){this.channel=n,this.presenceAdapter=new av(this.channel.channelAdapter,s)}}function oL(i){if(i instanceof Error)return i;if(typeof i=="string")return new Error(i);if(i&&typeof i=="object"){const n=i;if(typeof n.code=="number"){const s=typeof n.reason=="string"&&n.reason?` (${n.reason})`:"";return new Error(`socket closed: ${n.code}${s}`,{cause:i})}return new Error("channel error: transport failure",{cause:i})}return new Error("channel error: connection lost")}class sL{constructor(n,s,u){const f=lL(u);this.channel=n.getSocket().channel(s,f),this.socket=n}get state(){return this.channel.state}set state(n){this.channel.state=n}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(n,s){return this.channel.on(n,s)}off(n,s){this.channel.off(n,s)}subscribe(n){return this.channel.join(n)}unsubscribe(n){return this.channel.leave(n)}teardown(){this.channel.teardown()}onClose(n){this.channel.onClose(n)}onError(n){return this.channel.onError(n)}push(n,s,u){let f;try{f=this.channel.push(n,s,u)}catch{throw new Error(`tried to push '${n}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>zj){const v=this.channel.pushBuffer.shift();v.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${v.event}`,v.payload())}return f}updateJoinPayload(n){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),n)}canPush(){return this.socket.isConnected()&&this.state===yu.joined}isJoined(){return this.state===yu.joined}isJoining(){return this.state===yu.joining}isClosed(){return this.state===yu.closed}isLeaving(){return this.state===yu.leaving}updateFilterBindings(n){this.channel.filterBindings=n}updatePayloadTransform(n){this.channel.onMessage=n}getChannel(){return this.channel}}function lL(i){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},i.config)}}var aC;(function(i){i.ALL="*",i.INSERT="INSERT",i.UPDATE="UPDATE",i.DELETE="DELETE"})(aC||(aC={}));var If;(function(i){i.BROADCAST="broadcast",i.PRESENCE="presence",i.POSTGRES_CHANGES="postgres_changes",i.SYSTEM="system"})(If||(If={}));var yl;(function(i){i.SUBSCRIBED="SUBSCRIBED",i.TIMED_OUT="TIMED_OUT",i.CLOSED="CLOSED",i.CHANNEL_ERROR="CHANNEL_ERROR"})(yl||(yl={}));class ov{get state(){return this.channelAdapter.state}set state(n){this.channelAdapter.state=n}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(n,s={config:{}},u){var f,v;if(this.topic=n,this.params=s,this.socket=u,this.bindings={},this.subTopic=n.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new sL(this.socket.socketAdapter,n,this.params),this.presence=new aL(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=p1(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((v=(f=this.params.config)===null||f===void 0?void 0:f.broadcast)===null||v===void 0)&&v.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(n,s=this.timeout){var u,f,v;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:h,presence:g,private:b}}=this.params,_=(f=(u=this.bindings.postgres_changes)===null||u===void 0?void 0:u.map(A=>A.filter))!==null&&f!==void 0?f:[],k=!!this.bindings[If.PRESENCE]&&this.bindings[If.PRESENCE].length>0||((v=this.params.config.presence)===null||v===void 0?void 0:v.enabled)===!0,R={},N={broadcast:h,presence:Object.assign(Object.assign({},g),{enabled:k}),postgres_changes:_,private:b};this.socket.accessTokenValue&&(R.access_token=this.socket.accessTokenValue),this._onError(A=>{n==null||n(yl.CHANNEL_ERROR,oL(A))}),this._onClose(()=>n==null?void 0:n(yl.CLOSED)),this.updateJoinPayload(Object.assign({config:N},R)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:A})=>{if(this.socket._isManualToken()||this.socket.setAuth(),A===void 0){n==null||n(yl.SUBSCRIBED);return}this._updatePostgresBindings(A,n)}).receive("error",A=>{this.state=yu.errored;const j=Object.values(A).join(", ")||"error";n==null||n(yl.CHANNEL_ERROR,new Error(j,{cause:A}))}).receive("timeout",()=>{n==null||n(yl.TIMED_OUT)})}return this}_updatePostgresBindings(n,s){var u;const f=this.bindings.postgres_changes,v=(u=f==null?void 0:f.length)!==null&&u!==void 0?u:0,h=[];for(let g=0;g<v;g++){const b=f[g],{filter:{event:_,schema:k,table:R,filter:N}}=b,A=n&&n[g];if(A&&A.event===_&&ov.isFilterValueEqual(A.schema,k)&&ov.isFilterValueEqual(A.table,R)&&ov.isFilterValueEqual(A.filter,N))h.push(Object.assign(Object.assign({},b),{id:A.id}));else{this.unsubscribe(),this.state=yu.errored,s==null||s(yl.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=h,this.state!=yu.errored&&s&&s(yl.SUBSCRIBED)}presenceState(){return this.presence.state}async track(n,s={}){return await this.send({type:"presence",event:"track",payload:n},s.timeout||this.timeout)}async untrack(n={}){return await this.send({type:"presence",event:"untrack"},n)}on(n,s,u){const f=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),v=n===If.PRESENCE||n===If.POSTGRES_CHANGES;if(f&&v)throw this.socket.log("channel",`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(n,s,u)}async httpSend(n,s,u={}){var f;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const v={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(v.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:v,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:s,private:this.private}]})},g=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(f=u.timeout)!==null&&f!==void 0?f:this.timeout);if(g.status===202)return{success:!0};let b=g.statusText;try{const _=await g.json();b=_.error||_.message||b}catch{}return Promise.reject(new Error(b))}async send(n,s={}){var u,f;if(!this.channelAdapter.canPush()&&n.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:v,payload:h}=n,g={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(g.Authorization=`Bearer ${this.socket.accessTokenValue}`);const b={method:"POST",headers:g,body:JSON.stringify({messages:[{topic:this.subTopic,event:v,payload:h,private:this.private}]})};try{const _=await this._fetchWithTimeout(this.broadcastEndpointURL,b,(u=s.timeout)!==null&&u!==void 0?u:this.timeout);return await((f=_.body)===null||f===void 0?void 0:f.cancel()),_.ok?"ok":"error"}catch(_){return _ instanceof Error&&_.name==="AbortError"?"timed out":"error"}}else return new Promise(v=>{var h,g,b;const _=this.channelAdapter.push(n.type,n,s.timeout||this.timeout);n.type==="broadcast"&&!(!((b=(g=(h=this.params)===null||h===void 0?void 0:h.config)===null||g===void 0?void 0:g.broadcast)===null||b===void 0)&&b.ack)&&v("ok"),_.receive("ok",()=>v("ok")),_.receive("error",()=>v("error")),_.receive("timeout",()=>v("timed out"))})}updateJoinPayload(n){this.channelAdapter.updateJoinPayload(n)}async unsubscribe(n=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(n).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(n,s,u){const f=new AbortController,v=setTimeout(()=>f.abort(),u),h=await this.socket.fetch(n,Object.assign(Object.assign({},s),{signal:f.signal}));return clearTimeout(v),h}_on(n,s,u){const f=n.toLocaleLowerCase(),v=this.channelAdapter.on(n,u),h={type:f,filter:s,callback:u,ref:v};return this.bindings[f]?this.bindings[f].push(h):this.bindings[f]=[h],this._updateFilterMessage(),this}_onClose(n){this.channelAdapter.onClose(n)}_onError(n){this.channelAdapter.onError(n)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((n,s,u)=>{var f,v,h,g,b,_,k;const R=n.event.toLocaleLowerCase();if(this._notThisChannelEvent(R,u))return!1;const N=(f=this.bindings[R])===null||f===void 0?void 0:f.find(A=>A.ref===n.ref);if(!N)return!0;if(["broadcast","presence","postgres_changes"].includes(R))if("id"in N){const A=N.id,j=(v=N.filter)===null||v===void 0?void 0:v.event;return A&&((h=s.ids)===null||h===void 0?void 0:h.includes(A))&&(j==="*"||(j==null?void 0:j.toLocaleLowerCase())===((g=s.data)===null||g===void 0?void 0:g.type.toLocaleLowerCase()))}else{const A=(_=(b=N==null?void 0:N.filter)===null||b===void 0?void 0:b.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return A==="*"||A===((k=s==null?void 0:s.event)===null||k===void 0?void 0:k.toLocaleLowerCase())}else return N.type.toLocaleLowerCase()===R})}_notThisChannelEvent(n,s){const{close:u,error:f,leave:v,join:h}=f1;return s&&[u,f,v,h].includes(n)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((n,s,u)=>{if(typeof s=="object"&&"ids"in s){const f=s.data,{schema:v,table:h,commit_timestamp:g,type:b,errors:_}=f;return Object.assign(Object.assign({},{schema:v,table:h,commit_timestamp:g,eventType:b,new:{},old:{},errors:_}),this._getPayloadRecords(f))}return s})}copyBindings(n){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in n.bindings)for(const u of n.bindings[s])this._on(u.type,u.filter,u.callback)}static isFilterValueEqual(n,s){return(n??void 0)===(s??void 0)}_getPayloadRecords(n){const s={new:{},old:{}};return(n.type==="INSERT"||n.type==="UPDATE")&&(s.new=nC(n.columns,n.record)),(n.type==="UPDATE"||n.type==="DELETE")&&(s.old=nC(n.columns,n.old_record)),s}}class uL{constructor(n,s){this.socket=new nL(n,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(n){this.socket.heartbeatCallback=n}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(n,s,u,f=1e4){return new Promise(v=>{setTimeout(()=>v("timeout"),f),this.socket.disconnect(()=>{n(),v("ok")},s,u)})}push(n){this.socket.push(n)}log(n,s,u){this.socket.log(n,s,u)}makeRef(){return this.socket.makeRef()}onOpen(n){this.socket.onOpen(n)}onClose(n){this.socket.onClose(n)}onError(n){this.socket.onError(n)}onMessage(n){this.socket.onMessage(n)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==AS.connecting}isDisconnecting(){return this.socket.connectionState()==AS.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const oC={HEARTBEAT_INTERVAL:25e3},cL=[1e3,2e3,5e3,1e4],dL=1e4;function fL(){const i=new Map;return{get length(){return i.size},clear(){i.clear()},getItem(n){return i.has(n)?i.get(n):null},key(n){var s;return(s=Array.from(i.keys())[n])!==null&&s!==void 0?s:null},removeItem(n){i.delete(n)},setItem(n,s){i.set(n,String(s))}}}function hL(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return fL()}const pL=`
248
+ Suggested solution: ${n.workaround}`),new Error(s)}static isWebSocketSupported(){try{const n=this.detectEnvironment();return n.type==="native"||n.type==="ws"}catch{return!1}}}const Uj="2.106.1",Mj=`realtime-js/${Uj}`,$j="1.0.0",d1="2.0.0",Ij=d1,zj=1e4,Fj=100,yu={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},f1={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},AS={connecting:"connecting",closing:"closing",closed:"closed"};class Bj{constructor(n){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=n??[]}encode(n,s){if(n.event===this.BROADCAST_EVENT&&!(n.payload instanceof ArrayBuffer)&&typeof n.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(n));let u=[n.join_ref,n.ref,n.topic,n.event,n.payload];return s(JSON.stringify(u))}_binaryEncodeUserBroadcastPush(n){var s;return this._isArrayBuffer((s=n.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(n):this._encodeJsonUserBroadcastPush(n)}_encodeBinaryUserBroadcastPush(n){var s,u;const f=(u=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&u!==void 0?u:new ArrayBuffer(0);return this._encodeUserBroadcastPush(n,this.BINARY_ENCODING,f)}_encodeJsonUserBroadcastPush(n){var s,u;const f=(u=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&u!==void 0?u:{},h=new TextEncoder().encode(JSON.stringify(f)).buffer;return this._encodeUserBroadcastPush(n,this.JSON_ENCODING,h)}_encodeUserBroadcastPush(n,s,u){var f,v;const h=n.topic,g=(f=n.ref)!==null&&f!==void 0?f:"",b=(v=n.join_ref)!==null&&v!==void 0?v:"",_=n.payload.event,k=this.allowedMetadataKeys?this._pick(n.payload,this.allowedMetadataKeys):{},R=Object.keys(k).length===0?"":JSON.stringify(k);if(b.length>255)throw new Error(`joinRef length ${b.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`ref length ${g.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`topic length ${h.length} exceeds maximum of 255`);if(_.length>255)throw new Error(`userEvent length ${_.length} exceeds maximum of 255`);if(R.length>255)throw new Error(`metadata length ${R.length} exceeds maximum of 255`);const N=this.USER_BROADCAST_PUSH_META_LENGTH+b.length+g.length+h.length+_.length+R.length,A=new ArrayBuffer(this.HEADER_LENGTH+N);let j=new DataView(A),P=0;j.setUint8(P++,this.KINDS.userBroadcastPush),j.setUint8(P++,b.length),j.setUint8(P++,g.length),j.setUint8(P++,h.length),j.setUint8(P++,_.length),j.setUint8(P++,R.length),j.setUint8(P++,s),Array.from(b,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(g,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(h,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(_,Y=>j.setUint8(P++,Y.charCodeAt(0))),Array.from(R,Y=>j.setUint8(P++,Y.charCodeAt(0)));var F=new Uint8Array(A.byteLength+u.byteLength);return F.set(new Uint8Array(A),0),F.set(new Uint8Array(u),A.byteLength),F.buffer}decode(n,s){if(this._isArrayBuffer(n)){let u=this._binaryDecode(n);return s(u)}if(typeof n=="string"){const u=JSON.parse(n),[f,v,h,g,b]=u;return s({join_ref:f,ref:v,topic:h,event:g,payload:b})}return s({})}_binaryDecode(n){const s=new DataView(n),u=s.getUint8(0),f=new TextDecoder;switch(u){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(n,s,f)}}_decodeUserBroadcast(n,s,u){const f=s.getUint8(1),v=s.getUint8(2),h=s.getUint8(3),g=s.getUint8(4);let b=this.HEADER_LENGTH+4;const _=u.decode(n.slice(b,b+f));b=b+f;const k=u.decode(n.slice(b,b+v));b=b+v;const R=u.decode(n.slice(b,b+h));b=b+h;const N=n.slice(b,n.byteLength),A=g===this.JSON_ENCODING?JSON.parse(u.decode(N)):N,j={type:this.BROADCAST_EVENT,event:k,payload:A};return h>0&&(j.meta=JSON.parse(R)),{join_ref:null,ref:null,topic:_,event:this.BROADCAST_EVENT,payload:j}}_isArrayBuffer(n){var s;return n instanceof ArrayBuffer||((s=n==null?void 0:n.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(n,s){return!n||typeof n!="object"?{}:Object.fromEntries(Object.entries(n).filter(([u])=>s.includes(u)))}}var Mn;(function(i){i.abstime="abstime",i.bool="bool",i.date="date",i.daterange="daterange",i.float4="float4",i.float8="float8",i.int2="int2",i.int4="int4",i.int4range="int4range",i.int8="int8",i.int8range="int8range",i.json="json",i.jsonb="jsonb",i.money="money",i.numeric="numeric",i.oid="oid",i.reltime="reltime",i.text="text",i.time="time",i.timestamp="timestamp",i.timestamptz="timestamptz",i.timetz="timetz",i.tsrange="tsrange",i.tstzrange="tstzrange"})(Mn||(Mn={}));const nC=(i,n,s={})=>{var u;const f=(u=s.skipTypes)!==null&&u!==void 0?u:[];return n?Object.keys(n).reduce((v,h)=>(v[h]=Hj(h,i,n,f),v),{}):{}},Hj=(i,n,s,u)=>{const f=n.find(g=>g.name===i),v=f==null?void 0:f.type,h=s[i];return v&&!u.includes(v)?h1(v,h):DS(h)},h1=(i,n)=>{if(i.charAt(0)==="_"){const s=i.slice(1,i.length);return Yj(n,s)}switch(i){case Mn.bool:return Vj(n);case Mn.float4:case Mn.float8:case Mn.int2:case Mn.int4:case Mn.int8:case Mn.numeric:case Mn.oid:return Wj(n);case Mn.json:case Mn.jsonb:return qj(n);case Mn.timestamp:return Gj(n);case Mn.abstime:case Mn.date:case Mn.daterange:case Mn.int4range:case Mn.int8range:case Mn.money:case Mn.reltime:case Mn.text:case Mn.time:case Mn.timestamptz:case Mn.timetz:case Mn.tsrange:case Mn.tstzrange:return DS(n);default:return DS(n)}},DS=i=>i,Vj=i=>{switch(i){case"t":return!0;case"f":return!1;default:return i}},Wj=i=>{if(typeof i=="string"){const n=parseFloat(i);if(!Number.isNaN(n))return n}return i},qj=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch{return i}return i},Yj=(i,n)=>{if(typeof i!="string")return i;const s=i.length-1,u=i[s];if(i[0]==="{"&&u==="}"){let v;const h=i.slice(1,s);try{v=JSON.parse("["+h+"]")}catch{v=h?h.split(","):[]}return v.map(g=>h1(n,g))}return i},Gj=i=>typeof i=="string"?i.replace(" ","T"):i,p1=i=>{const n=new URL(i);return n.protocol=n.protocol.replace(/^ws/i,"http"),n.pathname=n.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),n.pathname===""||n.pathname==="/"?n.pathname="/api/broadcast":n.pathname=n.pathname+"/api/broadcast",n.href};var iv=i=>typeof i=="function"?i:function(){return i},Kj=typeof self<"u"?self:null,Uf=typeof window<"u"?window:null,gs=Kj||Uf||globalThis,Jj="2.0.0",Xj=1e4,Qj=1e3,ws={connecting:0,open:1,closing:2,closed:3},ia={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},gl={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},NS={longpoll:"longpoll",websocket:"websocket"},Zj={complete:4},jS="base64url.bearer.phx.",hy=class{constructor(i,n,s,u){this.channel=i,this.event=n,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=u,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,n){return this.hasReceived(i)&&n(this.receivedResp.response),this.recHooks.push({status:i,callback:n}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:i,response:n,_ref:s}){this.recHooks.filter(u=>u.status===i).forEach(u=>u.callback(n))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,n){this.channel.trigger(this.refEvent,{status:i,response:n})}},v1=class{constructor(i,n){this.callback=i,this.timerCalc=n,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},eL=class{constructor(i,n,s){this.state=ia.closed,this.topic=i,this.params=iv(n||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new hy(this,gl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new v1(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=ia.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(u=>u.send()),this.pushBuffer=[]}),this.joinPush.receive("error",u=>{this.state=ia.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,u),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=ia.closed,this.socket.remove(this)}),this.onError(u=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,u),this.isJoining()&&this.joinPush.reset(),this.state=ia.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new hy(this,gl.leave,iv({}),this.timeout).send(),this.state=ia.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(gl.reply,(u,f)=>{this.trigger(this.replyEventName(f),u)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(i=>i.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ia.closed,this.bindings=[]}onClose(i){this.on(gl.close,i)}onError(i){return this.on(gl.error,n=>i(n))}on(i,n){let s=this.bindingRef++;return this.bindings.push({event:i,ref:s,callback:n}),s}off(i,n){this.bindings=this.bindings.filter(s=>!(s.event===i&&(typeof n>"u"||n===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,n,s=this.timeout){if(n=n||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let u=new hy(this,i,function(){return n},s);return this.canPush()?u.send():(u.startTimeout(),this.pushBuffer.push(u)),u}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ia.leaving;let n=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(gl.close,"leave")},s=new hy(this,gl.leave,iv({}),i);return s.receive("ok",()=>n()).receive("timeout",()=>n()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(i,n,s){return n}filterBindings(i,n,s){return!0}isMember(i,n,s,u){return this.topic!==i?!1:u&&u!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:n,payload:s,joinRef:u}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ia.joining,this.joinPush.resend(i))}trigger(i,n,s,u){let f=this.onMessage(i,n,s,u);if(n&&!f)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let v=this.bindings.filter(h=>h.event===i&&this.filterBindings(h,n,s));for(let h=0;h<v.length;h++)v[h].callback(f,s,u||this.joinRef())}replyEventName(i){return`chan_reply_${i}`}isClosed(){return this.state===ia.closed}isErrored(){return this.state===ia.errored}isJoined(){return this.state===ia.joined}isJoining(){return this.state===ia.joining}isLeaving(){return this.state===ia.leaving}},Ay=class{static request(i,n,s,u,f,v,h){if(gs.XDomainRequest){let g=new gs.XDomainRequest;return this.xdomainRequest(g,i,n,u,f,v,h)}else if(gs.XMLHttpRequest){let g=new gs.XMLHttpRequest;return this.xhrRequest(g,i,n,s,u,f,v,h)}else{if(gs.fetch&&gs.AbortController)return this.fetchRequest(i,n,s,u,f,v,h);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(i,n,s,u,f,v,h){let g={method:i,headers:s,body:u},b=null;return f&&(b=new AbortController,setTimeout(()=>b.abort(),f),g.signal=b.signal),gs.fetch(n,g).then(_=>_.text()).then(_=>this.parseJSON(_)).then(_=>h&&h(_)).catch(_=>{_.name==="AbortError"&&v?v():h&&h(null)}),b}static xdomainRequest(i,n,s,u,f,v,h){return i.timeout=f,i.open(n,s),i.onload=()=>{let g=this.parseJSON(i.responseText);h&&h(g)},v&&(i.ontimeout=v),i.onprogress=()=>{},i.send(u),i}static xhrRequest(i,n,s,u,f,v,h,g){i.open(n,s,!0),i.timeout=v;for(let[b,_]of Object.entries(u))i.setRequestHeader(b,_);return i.onerror=()=>g&&g(null),i.onreadystatechange=()=>{if(i.readyState===Zj.complete&&g){let b=this.parseJSON(i.responseText);g(b)}},h&&(i.ontimeout=h),i.send(f),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch{return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,n){let s=[];for(var u in i){if(!Object.prototype.hasOwnProperty.call(i,u))continue;let f=n?`${n}[${u}]`:u,v=i[u];typeof v=="object"?s.push(this.serialize(v,f)):s.push(encodeURIComponent(f)+"="+encodeURIComponent(v))}return s.join("&")}static appendParams(i,n){if(Object.keys(n).length===0)return i;let s=i.match(/\?/)?"&":"?";return`${i}${s}${this.serialize(n)}`}},tL=i=>{let n="",s=new Uint8Array(i),u=s.byteLength;for(let f=0;f<u;f++)n+=String.fromCharCode(s[f]);return btoa(n)},Af=class{constructor(i,n){n&&n.length===2&&n[1].startsWith(jS)&&(this.authToken=atob(n[1].slice(jS.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=ws.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+NS.websocket),"$1/"+NS.longpoll)}endpointURL(){return Ay.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,n,s){this.close(i,n,s),this.readyState=ws.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ws.open||this.readyState===ws.connecting}poll(){const i={Accept:"application/json"};this.authToken&&(i["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",i,null,()=>this.ontimeout(),n=>{if(n){var{status:s,token:u,messages:f}=n;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=u}else s=0;switch(s){case 200:f.forEach(v=>{setTimeout(()=>this.onmessage({data:v}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ws.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(i){typeof i!="string"&&(i=tL(i)),this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},i.join(`
249
+ `),()=>this.onerror("timeout"),n=>{this.awaitingBatchAck=!1,!n||n.status!==200?(this.onerror(n&&n.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,n,s){for(let f of this.reqs)f.abort();this.readyState=ws.closed;let u=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:n,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",u)):this.onclose(u)}ajax(i,n,s,u,f){let v,h=()=>{this.reqs.delete(v),u()};v=Ay.request(i,this.endpointURL(),n,s,this.timeout,h,g=>{this.reqs.delete(v),this.isActive()&&f(g)}),this.reqs.add(v)}},nL=class nv{constructor(n,s={}){let u=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=n,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(u.state,f=>{let{onJoin:v,onLeave:h,onSync:g}=this.caller;this.joinRef=this.channel.joinRef(),this.state=nv.syncState(this.state,f,v,h),this.pendingDiffs.forEach(b=>{this.state=nv.syncDiff(this.state,b,v,h)}),this.pendingDiffs=[],g()}),this.channel.on(u.diff,f=>{let{onJoin:v,onLeave:h,onSync:g}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(f):(this.state=nv.syncDiff(this.state,f,v,h),g())})}onJoin(n){this.caller.onJoin=n}onLeave(n){this.caller.onLeave=n}onSync(n){this.caller.onSync=n}list(n){return nv.list(this.state,n)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(n,s,u,f){let v=this.clone(n),h={},g={};return this.map(v,(b,_)=>{s[b]||(g[b]=_)}),this.map(s,(b,_)=>{let k=v[b];if(k){let R=_.metas.map(P=>P.phx_ref),N=k.metas.map(P=>P.phx_ref),A=_.metas.filter(P=>N.indexOf(P.phx_ref)<0),j=k.metas.filter(P=>R.indexOf(P.phx_ref)<0);A.length>0&&(h[b]=_,h[b].metas=A),j.length>0&&(g[b]=this.clone(k),g[b].metas=j)}else h[b]=_}),this.syncDiff(v,{joins:h,leaves:g},u,f)}static syncDiff(n,s,u,f){let{joins:v,leaves:h}=this.clone(s);return u||(u=function(){}),f||(f=function(){}),this.map(v,(g,b)=>{let _=n[g];if(n[g]=this.clone(b),_){let k=n[g].metas.map(N=>N.phx_ref),R=_.metas.filter(N=>k.indexOf(N.phx_ref)<0);n[g].metas.unshift(...R)}u(g,_,b)}),this.map(h,(g,b)=>{let _=n[g];if(!_)return;let k=b.metas.map(R=>R.phx_ref);_.metas=_.metas.filter(R=>k.indexOf(R.phx_ref)<0),f(g,_,b),_.metas.length===0&&delete n[g]}),n}static list(n,s){return s||(s=function(u,f){return f}),this.map(n,(u,f)=>s(u,f))}static map(n,s){return Object.getOwnPropertyNames(n).map(u=>s(u,n[u]))}static clone(n){return JSON.parse(JSON.stringify(n))}},py={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,n){if(i.payload.constructor===ArrayBuffer)return n(this.binaryEncode(i));{let s=[i.join_ref,i.ref,i.topic,i.event,i.payload];return n(JSON.stringify(s))}},decode(i,n){if(i.constructor===ArrayBuffer)return n(this.binaryDecode(i));{let[s,u,f,v,h]=JSON.parse(i);return n({join_ref:s,ref:u,topic:f,event:v,payload:h})}},binaryEncode(i){let{join_ref:n,ref:s,event:u,topic:f,payload:v}=i,h=this.META_LENGTH+n.length+s.length+f.length+u.length,g=new ArrayBuffer(this.HEADER_LENGTH+h),b=new DataView(g),_=0;b.setUint8(_++,this.KINDS.push),b.setUint8(_++,n.length),b.setUint8(_++,s.length),b.setUint8(_++,f.length),b.setUint8(_++,u.length),Array.from(n,R=>b.setUint8(_++,R.charCodeAt(0))),Array.from(s,R=>b.setUint8(_++,R.charCodeAt(0))),Array.from(f,R=>b.setUint8(_++,R.charCodeAt(0))),Array.from(u,R=>b.setUint8(_++,R.charCodeAt(0)));var k=new Uint8Array(g.byteLength+v.byteLength);return k.set(new Uint8Array(g),0),k.set(new Uint8Array(v),g.byteLength),k.buffer},binaryDecode(i){let n=new DataView(i),s=n.getUint8(0),u=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(i,n,u);case this.KINDS.reply:return this.decodeReply(i,n,u);case this.KINDS.broadcast:return this.decodeBroadcast(i,n,u)}},decodePush(i,n,s){let u=n.getUint8(1),f=n.getUint8(2),v=n.getUint8(3),h=this.HEADER_LENGTH+this.META_LENGTH-1,g=s.decode(i.slice(h,h+u));h=h+u;let b=s.decode(i.slice(h,h+f));h=h+f;let _=s.decode(i.slice(h,h+v));h=h+v;let k=i.slice(h,i.byteLength);return{join_ref:g,ref:null,topic:b,event:_,payload:k}},decodeReply(i,n,s){let u=n.getUint8(1),f=n.getUint8(2),v=n.getUint8(3),h=n.getUint8(4),g=this.HEADER_LENGTH+this.META_LENGTH,b=s.decode(i.slice(g,g+u));g=g+u;let _=s.decode(i.slice(g,g+f));g=g+f;let k=s.decode(i.slice(g,g+v));g=g+v;let R=s.decode(i.slice(g,g+h));g=g+h;let N=i.slice(g,i.byteLength),A={status:R,response:N};return{join_ref:b,ref:_,topic:k,event:gl.reply,payload:A}},decodeBroadcast(i,n,s){let u=n.getUint8(1),f=n.getUint8(2),v=this.HEADER_LENGTH+2,h=s.decode(i.slice(v,v+u));v=v+u;let g=s.decode(i.slice(v,v+f));v=v+f;let b=i.slice(v,i.byteLength);return{join_ref:null,ref:null,topic:h,event:g,payload:b}}},rL=class{constructor(i,n={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=n.timeout||Xj,this.transport=n.transport||gs.WebSocket||Af,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=n.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=gs&&gs.sessionStorage}catch{}this.sessionStore=n.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=py.encode.bind(py),this.defaultDecoder=py.decode.bind(py),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=n.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Af?(this.encode=n.encode||this.defaultEncoder,this.decode=n.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let u=null;Uf&&Uf.addEventListener&&(Uf.addEventListener("pagehide",f=>{this.conn&&(this.disconnect(),u=this.connectClock)}),Uf.addEventListener("pageshow",f=>{u===this.connectClock&&(u=null,this.connect())}),Uf.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=n.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=n.autoSendHeartbeat??!0,this.heartbeatCallback=n.heartbeatCallback??(()=>{}),this.rejoinAfterMs=f=>n.rejoinAfterMs?n.rejoinAfterMs(f):[1e3,2e3,5e3][f-1]||1e4,this.reconnectAfterMs=f=>n.reconnectAfterMs?n.reconnectAfterMs(f):[10,50,100,150,200,250,500,1e3,2e3][f-1]||5e3,this.logger=n.logger||null,!this.logger&&n.debug&&(this.logger=(f,v,h)=>{console.log(`${f}: ${v}`,h)}),this.longpollerTimeout=n.longpollerTimeout||2e4,this.params=iv(n.params||{}),this.endPoint=`${i}/${NS.websocket}`,this.vsn=n.vsn||Jj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new v1(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{n.beforeReconnect&&await n.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=n.authToken}getLongPollTransport(){return Af}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=Ay.appendParams(Ay.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,n,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,i&&i()},n,s)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=iv(i)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Af?this.connectWithFallback(Af,this.longPollFallbackMs):this.transportConnect())}log(i,n,s){this.logger&&this.logger(i,n,s)}hasLogger(){return this.logger!==null}onOpen(i){let n=this.makeRef();return this.stateChangeCallbacks.open.push([n,i]),n}onClose(i){let n=this.makeRef();return this.stateChangeCallbacks.close.push([n,i]),n}onError(i){let n=this.makeRef();return this.stateChangeCallbacks.error.push([n,i]),n}onMessage(i){let n=this.makeRef();return this.stateChangeCallbacks.message.push([n,i]),n}onHeartbeat(i){this.heartbeatCallback=i}ping(i){if(!this.isConnected())return!1;let n=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:n});let u=this.onMessage(f=>{f.ref===n&&(this.off([u]),i(Date.now()-s))});return!0}transportName(i){switch(i){case Af:return"LongPoll";default:return i.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let i;this.authToken&&(i=["phoenix",`${jS}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),i),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=n=>this.onConnError(n),this.conn.onmessage=n=>this.onConnMessage(n),this.conn.onclose=n=>this.onConnClose(n)}getSession(i){return this.sessionStore&&this.sessionStore.getItem(i)}storeSession(i,n){this.sessionStore&&this.sessionStore.setItem(i,n)}connectWithFallback(i,n=2500){clearTimeout(this.fallbackTimer);let s=!1,u=!0,f,v,h=this.transportName(i),g=b=>{this.log("transport",`falling back to ${h}...`,b),this.off([f,v]),u=!1,this.replaceTransport(i),this.transportConnect()};if(this.getSession(`phx:fallback:${h}`))return g("memorized");this.fallbackTimer=setTimeout(g,n),v=this.onError(b=>{this.log("transport","error",b),u&&!s&&(clearTimeout(this.fallbackTimer),g(b))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!u){let b=this.transportName(i);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${b}`,"true"),this.log("transport",`established ${b} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(g,n),this.ping(b=>{this.log("transport","connected to primary after",b),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(i){this.log("error","error in heartbeat callback",i)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Qj,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,n,s){if(!this.conn)return i&&i();const u=this.conn;this.waitForBufferDone(u,()=>{n?u.close(n,s||""):u.close(),this.waitForSocketClosed(u,()=>{this.conn===u&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,n,s=1){if(s===5||!i.bufferedAmount){n();return}setTimeout(()=>{this.waitForBufferDone(i,n,s+1)},150*s)}waitForSocketClosed(i,n,s=1){if(s===5||i.readyState===ws.closed){n();return}setTimeout(()=>{this.waitForSocketClosed(i,n,s+1)},150*s)}onConnClose(i){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(i),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",i)}onConnError(i){this.hasLogger()&&this.log("transport","error",i);let n=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",i,n,s),(n===this.transport||s>0)&&this.triggerChanError(i)}triggerChanError(i){this.channels.forEach(n=>{n.isErrored()||n.isLeaving()||n.isClosed()||n.trigger(gl.error,i)})}connectionState(){switch(this.conn&&this.conn.readyState){case ws.connecting:return"connecting";case ws.open:return"open";case ws.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(n=>n!==i)}off(i){for(let n in this.stateChangeCallbacks)this.stateChangeCallbacks[n]=this.stateChangeCallbacks[n].filter(([s])=>i.indexOf(s)===-1)}channel(i,n={}){let s=new eL(i,n,this);return this.channels.push(s),s}push(i){if(this.hasLogger()){let{topic:n,event:s,payload:u,ref:f,join_ref:v}=i;this.log("push",`${n} ${s} (${v}, ${f})`,u)}this.isConnected()?this.encode(i,n=>this.conn.send(n)):this.sendBuffer.push(()=>this.encode(i,n=>this.conn.send(n)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(i){this.log("error","error in heartbeat callback",i)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(i){this.log("error","error in heartbeat callback",i)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,n=>{let{topic:s,event:u,payload:f,ref:v,join_ref:h}=n;if(v&&v===this.pendingHeartbeatRef){const g=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(f.status==="ok"?"ok":"error",g)}catch(b){this.log("error","error in heartbeat callback",b)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${f.status||""} ${s} ${u} ${v&&"("+v+")"||""}`.trim(),f);for(let g=0;g<this.channels.length;g++){const b=this.channels[g];b.isMember(s,u,f,h)&&b.trigger(u,f,v,h)}this.triggerStateCallbacks("message",n)})}triggerStateCallbacks(i,...n){try{this.stateChangeCallbacks[i].forEach(([s,u])=>{try{u(...n)}catch(f){this.log("error",`error in ${i} callback`,f)}})}catch(s){this.log("error",`error triggering ${i} callbacks`,s)}}leaveOpenTopic(i){let n=this.channels.find(s=>s.topic===i&&(s.isJoined()||s.isJoining()));n&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),n.leave())}};class av{constructor(n,s){const u=aL(s);this.presence=new nL(n.getChannel(),u),this.presence.onJoin((f,v,h)=>{const g=av.onJoinPayload(f,v,h);n.getChannel().trigger("presence",g)}),this.presence.onLeave((f,v,h)=>{const g=av.onLeavePayload(f,v,h);n.getChannel().trigger("presence",g)}),this.presence.onSync(()=>{n.getChannel().trigger("presence",{event:"sync"})})}get state(){return av.transformState(this.presence.state)}static transformState(n){return n=iL(n),Object.getOwnPropertyNames(n).reduce((s,u)=>{const f=n[u];return s[u]=Oy(f),s},{})}static onJoinPayload(n,s,u){const f=rC(s),v=Oy(u);return{event:"join",key:n,currentPresences:f,newPresences:v}}static onLeavePayload(n,s,u){const f=rC(s),v=Oy(u);return{event:"leave",key:n,currentPresences:f,leftPresences:v}}}function Oy(i){return i.metas.map(n=>(n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n))}function iL(i){return JSON.parse(JSON.stringify(i))}function aL(i){return(i==null?void 0:i.events)&&{events:i.events}}function rC(i){return i!=null&&i.metas?Oy(i):[]}var iC;(function(i){i.SYNC="sync",i.JOIN="join",i.LEAVE="leave"})(iC||(iC={}));class oL{get state(){return this.presenceAdapter.state}constructor(n,s){this.channel=n,this.presenceAdapter=new av(this.channel.channelAdapter,s)}}function sL(i){if(i instanceof Error)return i;if(typeof i=="string")return new Error(i);if(i&&typeof i=="object"){const n=i;if(typeof n.code=="number"){const s=typeof n.reason=="string"&&n.reason?` (${n.reason})`:"";return new Error(`socket closed: ${n.code}${s}`,{cause:i})}return new Error("channel error: transport failure",{cause:i})}return new Error("channel error: connection lost")}class lL{constructor(n,s,u){const f=uL(u);this.channel=n.getSocket().channel(s,f),this.socket=n}get state(){return this.channel.state}set state(n){this.channel.state=n}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(n,s){return this.channel.on(n,s)}off(n,s){this.channel.off(n,s)}subscribe(n){return this.channel.join(n)}unsubscribe(n){return this.channel.leave(n)}teardown(){this.channel.teardown()}onClose(n){this.channel.onClose(n)}onError(n){return this.channel.onError(n)}push(n,s,u){let f;try{f=this.channel.push(n,s,u)}catch{throw new Error(`tried to push '${n}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>Fj){const v=this.channel.pushBuffer.shift();v.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${v.event}`,v.payload())}return f}updateJoinPayload(n){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),n)}canPush(){return this.socket.isConnected()&&this.state===yu.joined}isJoined(){return this.state===yu.joined}isJoining(){return this.state===yu.joining}isClosed(){return this.state===yu.closed}isLeaving(){return this.state===yu.leaving}updateFilterBindings(n){this.channel.filterBindings=n}updatePayloadTransform(n){this.channel.onMessage=n}getChannel(){return this.channel}}function uL(i){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},i.config)}}var aC;(function(i){i.ALL="*",i.INSERT="INSERT",i.UPDATE="UPDATE",i.DELETE="DELETE"})(aC||(aC={}));var If;(function(i){i.BROADCAST="broadcast",i.PRESENCE="presence",i.POSTGRES_CHANGES="postgres_changes",i.SYSTEM="system"})(If||(If={}));var yl;(function(i){i.SUBSCRIBED="SUBSCRIBED",i.TIMED_OUT="TIMED_OUT",i.CLOSED="CLOSED",i.CHANNEL_ERROR="CHANNEL_ERROR"})(yl||(yl={}));class ov{get state(){return this.channelAdapter.state}set state(n){this.channelAdapter.state=n}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(n,s={config:{}},u){var f,v;if(this.topic=n,this.params=s,this.socket=u,this.bindings={},this.subTopic=n.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new lL(this.socket.socketAdapter,n,this.params),this.presence=new oL(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=p1(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((v=(f=this.params.config)===null||f===void 0?void 0:f.broadcast)===null||v===void 0)&&v.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(n,s=this.timeout){var u,f,v;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:h,presence:g,private:b}}=this.params,_=(f=(u=this.bindings.postgres_changes)===null||u===void 0?void 0:u.map(A=>A.filter))!==null&&f!==void 0?f:[],k=!!this.bindings[If.PRESENCE]&&this.bindings[If.PRESENCE].length>0||((v=this.params.config.presence)===null||v===void 0?void 0:v.enabled)===!0,R={},N={broadcast:h,presence:Object.assign(Object.assign({},g),{enabled:k}),postgres_changes:_,private:b};this.socket.accessTokenValue&&(R.access_token=this.socket.accessTokenValue),this._onError(A=>{n==null||n(yl.CHANNEL_ERROR,sL(A))}),this._onClose(()=>n==null?void 0:n(yl.CLOSED)),this.updateJoinPayload(Object.assign({config:N},R)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:A})=>{if(this.socket._isManualToken()||this.socket.setAuth(),A===void 0){n==null||n(yl.SUBSCRIBED);return}this._updatePostgresBindings(A,n)}).receive("error",A=>{this.state=yu.errored;const j=Object.values(A).join(", ")||"error";n==null||n(yl.CHANNEL_ERROR,new Error(j,{cause:A}))}).receive("timeout",()=>{n==null||n(yl.TIMED_OUT)})}return this}_updatePostgresBindings(n,s){var u;const f=this.bindings.postgres_changes,v=(u=f==null?void 0:f.length)!==null&&u!==void 0?u:0,h=[];for(let g=0;g<v;g++){const b=f[g],{filter:{event:_,schema:k,table:R,filter:N}}=b,A=n&&n[g];if(A&&A.event===_&&ov.isFilterValueEqual(A.schema,k)&&ov.isFilterValueEqual(A.table,R)&&ov.isFilterValueEqual(A.filter,N))h.push(Object.assign(Object.assign({},b),{id:A.id}));else{this.unsubscribe(),this.state=yu.errored,s==null||s(yl.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=h,this.state!=yu.errored&&s&&s(yl.SUBSCRIBED)}presenceState(){return this.presence.state}async track(n,s={}){return await this.send({type:"presence",event:"track",payload:n},s.timeout||this.timeout)}async untrack(n={}){return await this.send({type:"presence",event:"untrack"},n)}on(n,s,u){const f=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),v=n===If.PRESENCE||n===If.POSTGRES_CHANGES;if(f&&v)throw this.socket.log("channel",`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(n,s,u)}async httpSend(n,s,u={}){var f;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const v={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(v.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:v,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:s,private:this.private}]})},g=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(f=u.timeout)!==null&&f!==void 0?f:this.timeout);if(g.status===202)return{success:!0};let b=g.statusText;try{const _=await g.json();b=_.error||_.message||b}catch{}return Promise.reject(new Error(b))}async send(n,s={}){var u,f;if(!this.channelAdapter.canPush()&&n.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:v,payload:h}=n,g={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(g.Authorization=`Bearer ${this.socket.accessTokenValue}`);const b={method:"POST",headers:g,body:JSON.stringify({messages:[{topic:this.subTopic,event:v,payload:h,private:this.private}]})};try{const _=await this._fetchWithTimeout(this.broadcastEndpointURL,b,(u=s.timeout)!==null&&u!==void 0?u:this.timeout);return await((f=_.body)===null||f===void 0?void 0:f.cancel()),_.ok?"ok":"error"}catch(_){return _ instanceof Error&&_.name==="AbortError"?"timed out":"error"}}else return new Promise(v=>{var h,g,b;const _=this.channelAdapter.push(n.type,n,s.timeout||this.timeout);n.type==="broadcast"&&!(!((b=(g=(h=this.params)===null||h===void 0?void 0:h.config)===null||g===void 0?void 0:g.broadcast)===null||b===void 0)&&b.ack)&&v("ok"),_.receive("ok",()=>v("ok")),_.receive("error",()=>v("error")),_.receive("timeout",()=>v("timed out"))})}updateJoinPayload(n){this.channelAdapter.updateJoinPayload(n)}async unsubscribe(n=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(n).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(n,s,u){const f=new AbortController,v=setTimeout(()=>f.abort(),u),h=await this.socket.fetch(n,Object.assign(Object.assign({},s),{signal:f.signal}));return clearTimeout(v),h}_on(n,s,u){const f=n.toLocaleLowerCase(),v=this.channelAdapter.on(n,u),h={type:f,filter:s,callback:u,ref:v};return this.bindings[f]?this.bindings[f].push(h):this.bindings[f]=[h],this._updateFilterMessage(),this}_onClose(n){this.channelAdapter.onClose(n)}_onError(n){this.channelAdapter.onError(n)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((n,s,u)=>{var f,v,h,g,b,_,k;const R=n.event.toLocaleLowerCase();if(this._notThisChannelEvent(R,u))return!1;const N=(f=this.bindings[R])===null||f===void 0?void 0:f.find(A=>A.ref===n.ref);if(!N)return!0;if(["broadcast","presence","postgres_changes"].includes(R))if("id"in N){const A=N.id,j=(v=N.filter)===null||v===void 0?void 0:v.event;return A&&((h=s.ids)===null||h===void 0?void 0:h.includes(A))&&(j==="*"||(j==null?void 0:j.toLocaleLowerCase())===((g=s.data)===null||g===void 0?void 0:g.type.toLocaleLowerCase()))}else{const A=(_=(b=N==null?void 0:N.filter)===null||b===void 0?void 0:b.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return A==="*"||A===((k=s==null?void 0:s.event)===null||k===void 0?void 0:k.toLocaleLowerCase())}else return N.type.toLocaleLowerCase()===R})}_notThisChannelEvent(n,s){const{close:u,error:f,leave:v,join:h}=f1;return s&&[u,f,v,h].includes(n)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((n,s,u)=>{if(typeof s=="object"&&"ids"in s){const f=s.data,{schema:v,table:h,commit_timestamp:g,type:b,errors:_}=f;return Object.assign(Object.assign({},{schema:v,table:h,commit_timestamp:g,eventType:b,new:{},old:{},errors:_}),this._getPayloadRecords(f))}return s})}copyBindings(n){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in n.bindings)for(const u of n.bindings[s])this._on(u.type,u.filter,u.callback)}static isFilterValueEqual(n,s){return(n??void 0)===(s??void 0)}_getPayloadRecords(n){const s={new:{},old:{}};return(n.type==="INSERT"||n.type==="UPDATE")&&(s.new=nC(n.columns,n.record)),(n.type==="UPDATE"||n.type==="DELETE")&&(s.old=nC(n.columns,n.old_record)),s}}class cL{constructor(n,s){this.socket=new rL(n,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(n){this.socket.heartbeatCallback=n}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(n,s,u,f=1e4){return new Promise(v=>{setTimeout(()=>v("timeout"),f),this.socket.disconnect(()=>{n(),v("ok")},s,u)})}push(n){this.socket.push(n)}log(n,s,u){this.socket.log(n,s,u)}makeRef(){return this.socket.makeRef()}onOpen(n){this.socket.onOpen(n)}onClose(n){this.socket.onClose(n)}onError(n){this.socket.onError(n)}onMessage(n){this.socket.onMessage(n)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==AS.connecting}isDisconnecting(){return this.socket.connectionState()==AS.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const oC={HEARTBEAT_INTERVAL:25e3},dL=[1e3,2e3,5e3,1e4],fL=1e4;function hL(){const i=new Map;return{get length(){return i.size},clear(){i.clear()},getItem(n){return i.has(n)?i.get(n):null},key(n){var s;return(s=Array.from(i.keys())[n])!==null&&s!==void 0?s:null},removeItem(n){i.delete(n)},setItem(n,s){i.set(n,String(s))}}}function pL(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return hL()}const vL=`
250
250
  addEventListener("message", (e) => {
251
251
  if (e.data.event === "start") {
252
252
  setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
253
253
  }
254
- });`;class vL{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(n,s){var u;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new Fj,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=v=>v?(...h)=>v(...h):(...h)=>fetch(...h),!(!((u=s==null?void 0:s.params)===null||u===void 0)&&u.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const f=this._initializeOptions(s);this.socketAdapter=new uL(n,f),this.httpEndpoint=p1(n),this.fetch=this._resolveFetch(s==null?void 0:s.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(n){const s=n.message;throw s.includes("Node.js")?new Error(`${s}
254
+ });`;class mL{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(n,s){var u;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new Bj,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=v=>v?(...h)=>v(...h):(...h)=>fetch(...h),!(!((u=s==null?void 0:s.params)===null||u===void 0)&&u.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const f=this._initializeOptions(s);this.socketAdapter=new cL(n,f),this.httpEndpoint=p1(n),this.fetch=this._resolveFetch(s==null?void 0:s.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(n){const s=n.message;throw s.includes("Node.js")?new Error(`${s}
255
255
 
256
256
  To use Realtime in Node.js, you need to provide a WebSocket implementation:
257
257
 
@@ -264,8 +264,8 @@ Option 2: Install and provide the "ws" package:
264
264
  const client = new RealtimeClient(url, {
265
265
  ...options,
266
266
  transport: ws
267
- })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(n,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},n,s)}getChannels(){return this.channels}async removeChannel(n){const s=await n.unsubscribe();return s==="ok"&&n.teardown(),s}async removeAllChannels(){const n=this.channels.map(async u=>{const f=await u.unsubscribe();return u.teardown(),f}),s=await Promise.all(n);return await this.disconnect(),s}log(n,s,u){this.socketAdapter.log(n,s,u)}connectionState(){return this.socketAdapter.connectionState()||AS.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(n,s={config:{}}){const u=`realtime:${n}`,f=this.getChannels().find(v=>v.topic===u);if(f)return f;{const v=new ov(`realtime:${n}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(v),v}}push(n){this.socketAdapter.push(n)}async setAuth(n=null){this._authPromise=this._performAuth(n);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(n){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(n)}_makeRef(){return this.socketAdapter.makeRef()}_remove(n){this.channels=this.channels.filter(s=>s.topic!==n.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(n=null){let s,u=!1;if(n)s=n,u=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(f){this.log("error","Error fetching access token from callback",f),s=this.accessTokenValue}else s=this.accessTokenValue;u?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(f=>{const v={access_token:s,version:Uj};s&&f.updateJoinPayload(v),f.joinedOnce&&f.channelAdapter.isJoined()&&f.channelAdapter.push(f1.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(n="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${n}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(n=>{n.ref&&n.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(n){return(s,u)=>{s=="sent"&&this._setAuthSafely(),n&&n(s,u)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const n=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(n),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(n){let s;if(n)s=n;else{const u=new Blob([pL],{type:"application/javascript"});s=URL.createObjectURL(u)}return s}_initializeOptions(n){var s,u,f,v,h,g,b,_,k,R,N,A;this.worker=(s=n==null?void 0:n.worker)!==null&&s!==void 0?s:!1,this.accessToken=(u=n==null?void 0:n.accessToken)!==null&&u!==void 0?u:null;const j={};j.timeout=(f=n==null?void 0:n.timeout)!==null&&f!==void 0?f:Ij,j.heartbeatIntervalMs=(v=n==null?void 0:n.heartbeatIntervalMs)!==null&&v!==void 0?v:oC.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(h=n==null?void 0:n.disconnectOnEmptyChannelsAfterMs)!==null&&h!==void 0?h:2*((g=n==null?void 0:n.heartbeatIntervalMs)!==null&&g!==void 0?g:oC.HEARTBEAT_INTERVAL),j.transport=(b=n==null?void 0:n.transport)!==null&&b!==void 0?b:Lj.getWebSocketConstructor(),j.params=n==null?void 0:n.params,j.logger=n==null?void 0:n.logger,j.heartbeatCallback=this._wrapHeartbeatCallback(n==null?void 0:n.heartbeatCallback),j.sessionStorage=(_=n==null?void 0:n.sessionStorage)!==null&&_!==void 0?_:hL(),j.reconnectAfterMs=(k=n==null?void 0:n.reconnectAfterMs)!==null&&k!==void 0?k:q=>cL[q-1]||dL;let P,F;const Y=(R=n==null?void 0:n.vsn)!==null&&R!==void 0?R:$j;switch(Y){case Mj:P=(q,I)=>I(JSON.stringify(q)),F=(q,I)=>I(JSON.parse(q));break;case d1:P=this.serializer.encode.bind(this.serializer),F=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${j.vsn}`)}if(j.vsn=Y,j.encode=(N=n==null?void 0:n.encode)!==null&&N!==void 0?N:P,j.decode=(A=n==null?void 0:n.decode)!==null&&A!==void 0?A:F,j.beforeReconnect=this._reconnectAuth.bind(this),(n!=null&&n.logLevel||n!=null&&n.log_level)&&(this.logLevel=n.logLevel||n.log_level,j.params=Object.assign(Object.assign({},j.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=n==null?void 0:n.workerUrl,j.autoSendHeartbeat=!this.worker}return j}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var lv=class extends Error{constructor(i,n){var s;super(i),this.name="IcebergError",this.status=n.status,this.icebergType=n.icebergType,this.icebergCode=n.icebergCode,this.details=n.details,this.isCommitStateUnknown=n.icebergType==="CommitStateUnknownException"||[500,502,504].includes(n.status)&&((s=n.icebergType)==null?void 0:s.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function mL(i,n,s){const u=new URL(n,i);if(s)for(const[f,v]of Object.entries(s))v!==void 0&&u.searchParams.set(f,v);return u.toString()}async function gL(i){return!i||i.type==="none"?{}:i.type==="bearer"?{Authorization:`Bearer ${i.token}`}:i.type==="header"?{[i.name]:i.value}:i.type==="custom"?await i.getHeaders():{}}function yL(i){const n=i.fetchImpl??globalThis.fetch;return{async request({method:s,path:u,query:f,body:v,headers:h}){const g=mL(i.baseUrl,u,f),b=await gL(i.auth),_=await n(g,{method:s,headers:{...v?{"Content-Type":"application/json"}:{},...b,...h},body:v?JSON.stringify(v):void 0}),k=await _.text(),R=(_.headers.get("content-type")||"").includes("application/json"),N=R&&k?JSON.parse(k):k;if(!_.ok){const A=R?N:void 0,j=A==null?void 0:A.error;throw new lv((j==null?void 0:j.message)??`Request failed with status ${_.status}`,{status:_.status,icebergType:j==null?void 0:j.type,icebergCode:j==null?void 0:j.code,details:A})}return{status:_.status,headers:_.headers,data:N}}}}function vy(i){return i.join("")}var wL=class{constructor(i,n=""){this.client=i,this.prefix=n}async listNamespaces(i){const n=i?{parent:vy(i.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:n})).data.namespaces.map(u=>({namespace:u}))}async createNamespace(i,n){const s={namespace:i.namespace,properties:n==null?void 0:n.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(i){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${vy(i.namespace)}`})}async loadNamespaceMetadata(i){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vy(i.namespace)}`})).data.properties}}async namespaceExists(i){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${vy(i.namespace)}`}),!0}catch(n){if(n instanceof lv&&n.status===404)return!1;throw n}}async createNamespaceIfNotExists(i,n){try{return await this.createNamespace(i,n)}catch(s){if(s instanceof lv&&s.status===409)return;throw s}}};function Df(i){return i.join("")}var bL=class{constructor(i,n="",s){this.client=i,this.prefix=n,this.accessDelegation=s}async listTables(i){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables`})).data.identifiers}async createTable(i,n){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables`,body:n,headers:s})).data.metadata}async updateTable(i,n){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,body:n});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(i,n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,query:{purgeRequested:String((n==null?void 0:n.purge)??!1)}})}async loadTable(i){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,headers:n})).data.metadata}async tableExists(i){const n={};this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,headers:n}),!0}catch(s){if(s instanceof lv&&s.status===404)return!1;throw s}}async createTableIfNotExists(i,n){try{return await this.createTable(i,n)}catch(s){if(s instanceof lv&&s.status===409)return await this.loadTable({namespace:i.namespace,name:n.name});throw s}}},SL=class{constructor(i){var u;let n="v1";i.catalogName&&(n+=`/${i.catalogName}`);const s=i.baseUrl.endsWith("/")?i.baseUrl:`${i.baseUrl}/`;this.client=yL({baseUrl:s,auth:i.auth,fetchImpl:i.fetch}),this.accessDelegation=(u=i.accessDelegation)==null?void 0:u.join(","),this.namespaceOps=new wL(this.client,n),this.tableOps=new bL(this.client,n,this.accessDelegation)}async listNamespaces(i){return this.namespaceOps.listNamespaces(i)}async createNamespace(i,n){return this.namespaceOps.createNamespace(i,n)}async dropNamespace(i){await this.namespaceOps.dropNamespace(i)}async loadNamespaceMetadata(i){return this.namespaceOps.loadNamespaceMetadata(i)}async listTables(i){return this.tableOps.listTables(i)}async createTable(i,n){return this.tableOps.createTable(i,n)}async updateTable(i,n){return this.tableOps.updateTable(i,n)}async dropTable(i,n){await this.tableOps.dropTable(i,n)}async loadTable(i){return this.tableOps.loadTable(i)}async namespaceExists(i){return this.namespaceOps.namespaceExists(i)}async tableExists(i){return this.tableOps.tableExists(i)}async createNamespaceIfNotExists(i,n){return this.namespaceOps.createNamespaceIfNotExists(i,n)}async createTableIfNotExists(i,n){return this.tableOps.createTableIfNotExists(i,n)}};function uv(i){"@babel/helpers - typeof";return uv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uv(i)}function xL(i,n){if(uv(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var u=s.call(i,n);if(uv(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function _L(i){var n=xL(i,"string");return uv(n)=="symbol"?n:n+""}function EL(i,n,s){return(n=_L(n))in i?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,i}function sC(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);n&&(u=u.filter(function(f){return Object.getOwnPropertyDescriptor(i,f).enumerable})),s.push.apply(s,u)}return s}function Ct(i){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?sC(Object(s),!0).forEach(function(u){EL(i,u,s[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):sC(Object(s)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(s,u))})}return i}var Fy=class extends Error{constructor(i,n="storage",s,u){super(i),this.__isStorageError=!0,this.namespace=n,this.name=n==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=u}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function By(i){return typeof i=="object"&&i!==null&&"__isStorageError"in i}var LS=class extends Fy{constructor(i,n,s,u="storage"){super(i,u,n,s),this.name=u==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=n,this.statusCode=s}toJSON(){return Ct({},super.toJSON())}},m1=class extends Fy{constructor(i,n,s="storage"){super(i,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=n}};function Dy(i,n,s){const u=Ct({},i),f=n.toLowerCase();for(const v of Object.keys(u))v.toLowerCase()===f&&delete u[v];return u[f]=s,u}function kL(i){const n={};for(const[s,u]of Object.entries(i))n[s.toLowerCase()]=u;return n}const CL=i=>i?(...n)=>i(...n):(...n)=>fetch(...n),TL=i=>{if(typeof i!="object"||i===null)return!1;const n=Object.getPrototypeOf(i);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},PS=i=>{if(Array.isArray(i))return i.map(s=>PS(s));if(typeof i=="function"||i!==Object(i))return i;const n={};return Object.entries(i).forEach(([s,u])=>{const f=s.replace(/([-_][a-z])/gi,v=>v.toUpperCase().replace(/[-_]/g,""));n[f]=PS(u)}),n},RL=i=>!i||typeof i!="string"||i.length===0||i.length>100||i.trim()!==i||i.includes("/")||i.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(i),lC=i=>{if(typeof i=="object"&&i!==null){const n=i;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error;if(typeof n.error=="object"&&n.error!==null){const s=n.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(i)},OL=async(i,n,s,u)=>{if(i!==null&&typeof i=="object"&&"json"in i&&typeof i.json=="function"){const f=i;let v=parseInt(String(f.status),10);Number.isFinite(v)||(v=500),f.json().then(h=>{const g=(h==null?void 0:h.statusCode)||(h==null?void 0:h.code)||v+"";n(new LS(lC(h),v,g,u))}).catch(()=>{const h=v+"";n(new LS(f.statusText||`HTTP ${v} error`,v,h,u))})}else n(new m1(lC(i),i,u))},AL=(i,n,s,u)=>{const f={method:i,headers:(n==null?void 0:n.headers)||{}};if(i==="GET"||i==="HEAD"||!u)return Ct(Ct({},f),s);if(TL(u)){var v;const h=(n==null?void 0:n.headers)||{};let g;for(const[b,_]of Object.entries(h))b.toLowerCase()==="content-type"&&(g=_);f.headers=Dy(h,"Content-Type",(v=g)!==null&&v!==void 0?v:"application/json"),f.body=JSON.stringify(u)}else f.body=u;return n!=null&&n.duplex&&(f.duplex=n.duplex),Ct(Ct({},f),s)};async function Zp(i,n,s,u,f,v,h){return new Promise((g,b)=>{i(s,AL(n,u,f,v)).then(_=>{if(!_.ok)throw _;if(u!=null&&u.noResolveJson)return _;if(h==="vectors"){const k=_.headers.get("content-type");if(_.headers.get("content-length")==="0"||_.status===204)return{};if(!k||!k.includes("application/json"))return{}}return _.json()}).then(_=>g(_)).catch(_=>OL(_,b,u,h))})}function g1(i="storage"){return{get:async(n,s,u,f)=>Zp(n,"GET",s,u,f,void 0,i),post:async(n,s,u,f,v)=>Zp(n,"POST",s,f,v,u,i),put:async(n,s,u,f,v)=>Zp(n,"PUT",s,f,v,u,i),head:async(n,s,u,f)=>Zp(n,"HEAD",s,Ct(Ct({},u),{},{noResolveJson:!0}),f,void 0,i),remove:async(n,s,u,f,v)=>Zp(n,"DELETE",s,f,v,u,i)}}const DL=g1("storage"),{get:cv,post:Ro,put:US,head:NL,remove:ex}=DL,xa=g1("vectors");var Vf=class{constructor(i,n={},s,u="storage"){this.shouldThrowOnError=!1,this.url=i,this.headers=kL(n),this.fetch=CL(s),this.namespace=u}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(i,n){return this.headers=Dy(this.headers,i,n),this}async handleOperation(i){var n=this;try{return{data:await i(),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(By(s))return{data:null,error:s};throw s}}};let y1;y1=Symbol.toStringTag;var jL=class{constructor(i,n){this.downloadFn=i,this.shouldThrowOnError=n,this[y1]="StreamDownloadBuilder",this.promise=null}then(i,n){return this.getPromise().then(i,n)}catch(i){return this.getPromise().catch(i)}finally(i){return this.getPromise().finally(i)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var i=this;try{return{data:(await i.downloadFn()).body,error:null}}catch(n){if(i.shouldThrowOnError)throw n;if(By(n))return{data:null,error:n};throw n}}};let w1;w1=Symbol.toStringTag;var LL=class{constructor(i,n){this.downloadFn=i,this.shouldThrowOnError=n,this[w1]="BlobDownloadBuilder",this.promise=null}asStream(){return new jL(this.downloadFn,this.shouldThrowOnError)}then(i,n){return this.getPromise().then(i,n)}catch(i){return this.getPromise().catch(i)}finally(i){return this.getPromise().finally(i)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var i=this;try{return{data:await(await i.downloadFn()).blob(),error:null}}catch(n){if(i.shouldThrowOnError)throw n;if(By(n))return{data:null,error:n};throw n}}};const PL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},uC={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var UL=class extends Vf{constructor(i,n={},s,u){super(i,n,u,"storage"),this.bucketId=s}async uploadOrUpdate(i,n,s,u){var f=this;return f.handleOperation(async()=>{let v;const h=Ct(Ct({},uC),u);let g=Ct(Ct({},f.headers),i==="POST"&&{"x-upsert":String(h.upsert)});const b=h.metadata;if(typeof Blob<"u"&&s instanceof Blob?(v=new FormData,v.append("cacheControl",h.cacheControl),b&&v.append("metadata",f.encodeMetadata(b)),v.append("",s)):typeof FormData<"u"&&s instanceof FormData?(v=s,v.has("cacheControl")||v.append("cacheControl",h.cacheControl),b&&!v.has("metadata")&&v.append("metadata",f.encodeMetadata(b))):(v=s,g["cache-control"]=`max-age=${h.cacheControl}`,g["content-type"]=h.contentType,b&&(g["x-metadata"]=f.toBase64(f.encodeMetadata(b))),(typeof ReadableStream<"u"&&v instanceof ReadableStream||v&&typeof v=="object"&&"pipe"in v&&typeof v.pipe=="function")&&!h.duplex&&(h.duplex="half")),u!=null&&u.headers)for(const[N,A]of Object.entries(u.headers))g=Dy(g,N,A);const _=f._removeEmptyFolders(n),k=f._getFinalPath(_),R=await(i=="PUT"?US:Ro)(f.fetch,`${f.url}/object/${k}`,v,Ct({headers:g},h!=null&&h.duplex?{duplex:h.duplex}:{}));return{path:_,id:R.Id,fullPath:R.Key}})}async upload(i,n,s){return this.uploadOrUpdate("POST",i,n,s)}async uploadToSignedUrl(i,n,s,u){var f=this;const v=f._removeEmptyFolders(i),h=f._getFinalPath(v),g=new URL(f.url+`/object/upload/sign/${h}`);return g.searchParams.set("token",n),f.handleOperation(async()=>{let b;const _=Ct(Ct({},uC),u);let k=Ct(Ct({},f.headers),{"x-upsert":String(_.upsert)});const R=_.metadata;if(typeof Blob<"u"&&s instanceof Blob?(b=new FormData,b.append("cacheControl",_.cacheControl),R&&b.append("metadata",f.encodeMetadata(R)),b.append("",s)):typeof FormData<"u"&&s instanceof FormData?(b=s,b.has("cacheControl")||b.append("cacheControl",_.cacheControl),R&&!b.has("metadata")&&b.append("metadata",f.encodeMetadata(R))):(b=s,k["cache-control"]=`max-age=${_.cacheControl}`,k["content-type"]=_.contentType,R&&(k["x-metadata"]=f.toBase64(f.encodeMetadata(R))),(typeof ReadableStream<"u"&&b instanceof ReadableStream||b&&typeof b=="object"&&"pipe"in b&&typeof b.pipe=="function")&&!_.duplex&&(_.duplex="half")),u!=null&&u.headers)for(const[N,A]of Object.entries(u.headers))k=Dy(k,N,A);return{path:v,fullPath:(await US(f.fetch,g.toString(),b,Ct({headers:k},_!=null&&_.duplex?{duplex:_.duplex}:{}))).Key}})}async createSignedUploadUrl(i,n){var s=this;return s.handleOperation(async()=>{let u=s._getFinalPath(i);const f=Ct({},s.headers);n!=null&&n.upsert&&(f["x-upsert"]="true");const v=await Ro(s.fetch,`${s.url}/object/upload/sign/${u}`,{},{headers:f}),h=new URL(s.url+v.url),g=h.searchParams.get("token");if(!g)throw new Fy("No token returned by API");return{signedUrl:h.toString(),path:i,token:g}})}async update(i,n,s){return this.uploadOrUpdate("PUT",i,n,s)}async move(i,n,s){var u=this;return u.handleOperation(async()=>await Ro(u.fetch,`${u.url}/object/move`,{bucketId:u.bucketId,sourceKey:i,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:u.headers}))}async copy(i,n,s){var u=this;return u.handleOperation(async()=>({path:(await Ro(u.fetch,`${u.url}/object/copy`,{bucketId:u.bucketId,sourceKey:i,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:u.headers})).Key}))}async createSignedUrl(i,n,s){var u=this;return u.handleOperation(async()=>{let f=u._getFinalPath(i);const v=typeof(s==null?void 0:s.transform)=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let h=await Ro(u.fetch,`${u.url}/object/sign/${f}`,Ct({expiresIn:n},v?{transform:s.transform}:{}),{headers:u.headers});const g=new URLSearchParams;s!=null&&s.download&&g.set("download",s.download===!0?"":s.download),(s==null?void 0:s.cacheNonce)!=null&&g.set("cacheNonce",String(s.cacheNonce));const b=g.toString();return{signedUrl:encodeURI(`${u.url}${h.signedURL}${b?`&${b}`:""}`)}})}async createSignedUrls(i,n,s){var u=this;return u.handleOperation(async()=>{const f=await Ro(u.fetch,`${u.url}/object/sign/${u.bucketId}`,{expiresIn:n,paths:i},{headers:u.headers}),v=new URLSearchParams;s!=null&&s.download&&v.set("download",s.download===!0?"":s.download),(s==null?void 0:s.cacheNonce)!=null&&v.set("cacheNonce",String(s.cacheNonce));const h=v.toString();return f.map(g=>Ct(Ct({},g),{},{signedUrl:g.signedURL?encodeURI(`${u.url}${g.signedURL}${h?`&${h}`:""}`):null}))})}download(i,n,s){const u=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image/authenticated":"object",f=new URLSearchParams;n!=null&&n.transform&&this.applyTransformOptsToQuery(f,n.transform),(n==null?void 0:n.cacheNonce)!=null&&f.set("cacheNonce",String(n.cacheNonce));const v=f.toString(),h=this._getFinalPath(i),g=()=>cv(this.fetch,`${this.url}/${u}/${h}${v?`?${v}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new LL(g,this.shouldThrowOnError)}async info(i){var n=this;const s=n._getFinalPath(i);return n.handleOperation(async()=>PS(await cv(n.fetch,`${n.url}/object/info/${s}`,{headers:n.headers})))}async exists(i){var n=this;const s=n._getFinalPath(i);try{return await NL(n.fetch,`${n.url}/object/${s}`,{headers:n.headers}),{data:!0,error:null}}catch(f){if(n.shouldThrowOnError)throw f;if(By(f)){var u;const v=f instanceof LS?f.status:f instanceof m1?(u=f.originalError)===null||u===void 0?void 0:u.status:void 0;if(v!==void 0&&[400,404].includes(v))return{data:!1,error:f}}throw f}}getPublicUrl(i,n){const s=this._getFinalPath(i),u=new URLSearchParams;n!=null&&n.download&&u.set("download",n.download===!0?"":n.download),n!=null&&n.transform&&this.applyTransformOptsToQuery(u,n.transform),(n==null?void 0:n.cacheNonce)!=null&&u.set("cacheNonce",String(n.cacheNonce));const f=u.toString(),v=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${v}/public/${s}`)+(f?`?${f}`:"")}}}async remove(i){var n=this;return n.handleOperation(async()=>await ex(n.fetch,`${n.url}/object/${n.bucketId}`,{prefixes:i},{headers:n.headers}))}async list(i,n,s){var u=this;return u.handleOperation(async()=>{const f=Ct(Ct(Ct({},PL),n),{},{prefix:i||""});return await Ro(u.fetch,`${u.url}/object/list/${u.bucketId}`,f,{headers:u.headers},s)})}async listV2(i,n){var s=this;return s.handleOperation(async()=>{const u=Ct({},i);return await Ro(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,u,{headers:s.headers},n)})}encodeMetadata(i){return JSON.stringify(i)}toBase64(i){return typeof Buffer<"u"?Buffer.from(i).toString("base64"):btoa(i)}_getFinalPath(i){return`${this.bucketId}/${i.replace(/^\/+/,"")}`}_removeEmptyFolders(i){return i.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(i,n){return n.width&&i.set("width",n.width.toString()),n.height&&i.set("height",n.height.toString()),n.resize&&i.set("resize",n.resize),n.format&&i.set("format",n.format),n.quality&&i.set("quality",n.quality.toString()),i}};const ML="2.106.1",gv={"X-Client-Info":`storage-js/${ML}`};var $L=class extends Vf{constructor(i,n={},s,u){const f=new URL(i);u!=null&&u.useNewHostname&&/supabase\.(co|in|red)$/.test(f.hostname)&&!f.hostname.includes("storage.supabase.")&&(f.hostname=f.hostname.replace("supabase.","storage.supabase."));const v=f.href.replace(/\/$/,""),h=Ct(Ct({},gv),n);super(v,h,s,"storage")}async listBuckets(i){var n=this;return n.handleOperation(async()=>{const s=n.listBucketOptionsToQueryString(i);return await cv(n.fetch,`${n.url}/bucket${s}`,{headers:n.headers})})}async getBucket(i){var n=this;return n.handleOperation(async()=>await cv(n.fetch,`${n.url}/bucket/${i}`,{headers:n.headers}))}async createBucket(i,n={public:!1}){var s=this;return s.handleOperation(async()=>await Ro(s.fetch,`${s.url}/bucket`,{id:i,name:i,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async updateBucket(i,n){var s=this;return s.handleOperation(async()=>await US(s.fetch,`${s.url}/bucket/${i}`,{id:i,name:i,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(i){var n=this;return n.handleOperation(async()=>await Ro(n.fetch,`${n.url}/bucket/${i}/empty`,{},{headers:n.headers}))}async deleteBucket(i){var n=this;return n.handleOperation(async()=>await ex(n.fetch,`${n.url}/bucket/${i}`,{},{headers:n.headers}))}listBucketOptionsToQueryString(i){const n={};return i&&("limit"in i&&(n.limit=String(i.limit)),"offset"in i&&(n.offset=String(i.offset)),i.search&&(n.search=i.search),i.sortColumn&&(n.sortColumn=i.sortColumn),i.sortOrder&&(n.sortOrder=i.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}},IL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),n);super(u,f,s,"storage")}async createBucket(i){var n=this;return n.handleOperation(async()=>await Ro(n.fetch,`${n.url}/bucket`,{name:i},{headers:n.headers}))}async listBuckets(i){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;(i==null?void 0:i.limit)!==void 0&&s.set("limit",i.limit.toString()),(i==null?void 0:i.offset)!==void 0&&s.set("offset",i.offset.toString()),i!=null&&i.sortColumn&&s.set("sortColumn",i.sortColumn),i!=null&&i.sortOrder&&s.set("sortOrder",i.sortOrder),i!=null&&i.search&&s.set("search",i.search);const u=s.toString(),f=u?`${n.url}/bucket?${u}`:`${n.url}/bucket`;return await cv(n.fetch,f,{headers:n.headers})})}async deleteBucket(i){var n=this;return n.handleOperation(async()=>await ex(n.fetch,`${n.url}/bucket/${i}`,{},{headers:n.headers}))}from(i){var n=this;if(!RL(i))throw new Fy("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new SL({baseUrl:this.url,catalogName:i,auth:{type:"custom",getHeaders:async()=>n.headers},fetch:this.fetch}),u=this.shouldThrowOnError;return new Proxy(s,{get(f,v){const h=f[v];return typeof h!="function"?h:async(...g)=>{try{return{data:await h.apply(f,g),error:null}}catch(b){if(u)throw b;return{data:null,error:b}}}}})}},zL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),{},{"Content-Type":"application/json"},n);super(u,f,s,"vectors")}async createIndex(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/CreateIndex`,i,{headers:n.headers})||{})}async getIndex(i,n){var s=this;return s.handleOperation(async()=>await xa.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:i,indexName:n},{headers:s.headers}))}async listIndexes(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/ListIndexes`,i,{headers:n.headers}))}async deleteIndex(i,n){var s=this;return s.handleOperation(async()=>await xa.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:i,indexName:n},{headers:s.headers})||{})}},FL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),{},{"Content-Type":"application/json"},n);super(u,f,s,"vectors")}async putVectors(i){var n=this;if(i.vectors.length<1||i.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/PutVectors`,i,{headers:n.headers})||{})}async getVectors(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/GetVectors`,i,{headers:n.headers}))}async listVectors(i){var n=this;if(i.segmentCount!==void 0){if(i.segmentCount<1||i.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(i.segmentIndex!==void 0&&(i.segmentIndex<0||i.segmentIndex>=i.segmentCount))throw new Error(`segmentIndex must be between 0 and ${i.segmentCount-1}`)}return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/ListVectors`,i,{headers:n.headers}))}async queryVectors(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/QueryVectors`,i,{headers:n.headers}))}async deleteVectors(i){var n=this;if(i.keys.length<1||i.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/DeleteVectors`,i,{headers:n.headers})||{})}},BL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),{},{"Content-Type":"application/json"},n);super(u,f,s,"vectors")}async createBucket(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/CreateVectorBucket`,{vectorBucketName:i},{headers:n.headers})||{})}async getBucket(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/GetVectorBucket`,{vectorBucketName:i},{headers:n.headers}))}async listBuckets(i={}){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/ListVectorBuckets`,i,{headers:n.headers}))}async deleteBucket(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/DeleteVectorBucket`,{vectorBucketName:i},{headers:n.headers})||{})}},HL=class extends BL{constructor(i,n={}){super(i,n.headers||{},n.fetch)}from(i){return new VL(this.url,this.headers,i,this.fetch)}async createBucket(i){var n=()=>super.createBucket,s=this;return n().call(s,i)}async getBucket(i){var n=()=>super.getBucket,s=this;return n().call(s,i)}async listBuckets(i={}){var n=()=>super.listBuckets,s=this;return n().call(s,i)}async deleteBucket(i){var n=()=>super.deleteBucket,s=this;return n().call(s,i)}},VL=class extends zL{constructor(i,n,s,u){super(i,n,u),this.vectorBucketName=s}async createIndex(i){var n=()=>super.createIndex,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(i={}){var n=()=>super.listIndexes,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(i){var n=()=>super.getIndex,s=this;return n().call(s,s.vectorBucketName,i)}async deleteIndex(i){var n=()=>super.deleteIndex,s=this;return n().call(s,s.vectorBucketName,i)}index(i){return new WL(this.url,this.headers,this.vectorBucketName,i,this.fetch)}},WL=class extends FL{constructor(i,n,s,u,f){super(i,n,f),this.vectorBucketName=s,this.indexName=u}async putVectors(i){var n=()=>super.putVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(i){var n=()=>super.getVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(i={}){var n=()=>super.listVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(i){var n=()=>super.queryVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(i){var n=()=>super.deleteVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},qL=class extends $L{constructor(i,n={},s,u){super(i,n,s,u)}from(i){return new UL(this.url,this.headers,i,this.fetch)}get vectors(){return new HL(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new IL(this.url+"/iceberg",this.headers,this.fetch)}};const b1="2.106.1",Mf=30*1e3,MS=3,fS=MS*Mf,YL="http://localhost:9999",GL="supabase.auth.token",KL={"X-Client-Info":`gotrue-js/${b1}`},$S="X-Supabase-Api-Version",S1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},JL=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,XL=10*60*1e3;class Ff extends Error{constructor(n,s,u){super(n),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function He(i){return typeof i=="object"&&i!==null&&"__isAuthError"in i}class QL extends Ff{constructor(n,s,u){super(n,s,u),this.name="AuthApiError",this.status=s,this.code=u}}function ZL(i){return He(i)&&i.name==="AuthApiError"}class Oo extends Ff{constructor(n,s){super(n),this.name="AuthUnknownError",this.originalError=s}}class wl extends Ff{constructor(n,s,u,f){super(n,u,f),this.name=s,this.status=u}}class zr extends wl{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function my(i){return He(i)&&i.name==="AuthSessionMissingError"}class Nf extends wl{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class gy extends wl{constructor(n){super(n,"AuthInvalidCredentialsError",400,void 0)}}class yy extends wl{constructor(n,s=null){super(n,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function e2(i){return He(i)&&i.name==="AuthImplicitGrantRedirectError"}class cC extends wl{constructor(n,s=null){super(n,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class t2 extends wl{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class IS extends wl{constructor(n,s){super(n,"AuthRetryableFetchError",s,void 0)}}function hS(i){return He(i)&&i.name==="AuthRetryableFetchError"}class dC extends wl{constructor(n,s,u){super(n,"AuthWeakPasswordError",s,"weak_password"),this.reasons=u}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class zS extends wl{constructor(n){super(n,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ny="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),fC=`
268
- \r=`.split(""),n2=(()=>{const i=new Array(128);for(let n=0;n<i.length;n+=1)i[n]=-1;for(let n=0;n<fC.length;n+=1)i[fC[n].charCodeAt(0)]=-2;for(let n=0;n<Ny.length;n+=1)i[Ny[n].charCodeAt(0)]=n;return i})();function hC(i,n,s){if(i!==null)for(n.queue=n.queue<<8|i,n.queuedBits+=8;n.queuedBits>=6;){const u=n.queue>>n.queuedBits-6&63;s(Ny[u]),n.queuedBits-=6}else if(n.queuedBits>0)for(n.queue=n.queue<<6-n.queuedBits,n.queuedBits=6;n.queuedBits>=6;){const u=n.queue>>n.queuedBits-6&63;s(Ny[u]),n.queuedBits-=6}}function x1(i,n,s){const u=n2[i];if(u>-1)for(n.queue=n.queue<<6|u,n.queuedBits+=6;n.queuedBits>=8;)s(n.queue>>n.queuedBits-8&255),n.queuedBits-=8;else{if(u===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(i)}"`)}}function pC(i){const n=[],s=h=>{n.push(String.fromCodePoint(h))},u={utf8seq:0,codepoint:0},f={queue:0,queuedBits:0},v=h=>{a2(h,u,s)};for(let h=0;h<i.length;h+=1)x1(i.charCodeAt(h),f,v);return n.join("")}function r2(i,n){if(i<=127){n(i);return}else if(i<=2047){n(192|i>>6),n(128|i&63);return}else if(i<=65535){n(224|i>>12),n(128|i>>6&63),n(128|i&63);return}else if(i<=1114111){n(240|i>>18),n(128|i>>12&63),n(128|i>>6&63),n(128|i&63);return}throw new Error(`Unrecognized Unicode codepoint: ${i.toString(16)}`)}function i2(i,n){for(let s=0;s<i.length;s+=1){let u=i.charCodeAt(s);if(u>55295&&u<=56319){const f=(u-55296)*1024&65535;u=(i.charCodeAt(s+1)-56320&65535|f)+65536,s+=1}r2(u,n)}}function a2(i,n,s){if(n.utf8seq===0){if(i<=127){s(i);return}for(let u=1;u<6;u+=1)if(!(i>>7-u&1)){n.utf8seq=u;break}if(n.utf8seq===2)n.codepoint=i&31;else if(n.utf8seq===3)n.codepoint=i&15;else if(n.utf8seq===4)n.codepoint=i&7;else throw new Error("Invalid UTF-8 sequence");n.utf8seq-=1}else if(n.utf8seq>0){if(i<=127)throw new Error("Invalid UTF-8 sequence");n.codepoint=n.codepoint<<6|i&63,n.utf8seq-=1,n.utf8seq===0&&s(n.codepoint)}}function zf(i){const n=[],s={queue:0,queuedBits:0},u=f=>{n.push(f)};for(let f=0;f<i.length;f+=1)x1(i.charCodeAt(f),s,u);return new Uint8Array(n)}function o2(i){const n=[];return i2(i,s=>n.push(s)),new Uint8Array(n)}function Fc(i){const n=[],s={queue:0,queuedBits:0},u=f=>{n.push(f)};return i.forEach(f=>hC(f,s,u)),hC(null,s,u),n.join("")}function s2(i){return Math.round(Date.now()/1e3)+i}function l2(){return Symbol("auth-callback")}const oi=()=>typeof window<"u"&&typeof document<"u",Uc={tested:!1,writable:!1},_1=()=>{if(!oi())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Uc.tested)return Uc.writable;const i=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(i,i),globalThis.localStorage.removeItem(i),Uc.tested=!0,Uc.writable=!0}catch{Uc.tested=!0,Uc.writable=!1}return Uc.writable};function u2(i){const n={},s=new URL(i);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((f,v)=>{n[v]=f})}catch{}return s.searchParams.forEach((u,f)=>{n[f]=u}),n}const E1=i=>i?(...n)=>i(...n):(...n)=>fetch(...n),c2=i=>typeof i=="object"&&i!==null&&"status"in i&&"ok"in i&&"json"in i&&typeof i.json=="function",$f=async(i,n,s)=>{await i.setItem(n,JSON.stringify(s))},Mc=async(i,n)=>{const s=await i.getItem(n);if(!s)return null;try{return JSON.parse(s)}catch{return null}},ai=async(i,n)=>{await i.removeItem(n)};class Hy{constructor(){this.promise=new Hy.promiseConstructor((n,s)=>{this.resolve=n,this.reject=s})}}Hy.promiseConstructor=Promise;function wy(i){const n=i.split(".");if(n.length!==3)throw new zS("Invalid JWT structure");for(let u=0;u<n.length;u++)if(!JL.test(n[u]))throw new zS("JWT not in base64url format");return{header:JSON.parse(pC(n[0])),payload:JSON.parse(pC(n[1])),signature:zf(n[2]),raw:{header:n[0],payload:n[1]}}}async function d2(i){return await new Promise(n=>{setTimeout(()=>n(null),i)})}function f2(i,n){return new Promise((u,f)=>{(async()=>{for(let v=0;v<1/0;v++)try{const h=await i(v);if(!n(v,null,h)){u(h);return}}catch(h){if(!n(v,h)){f(h);return}}})()})}function h2(i){return("0"+i.toString(16)).substr(-2)}function p2(){const n=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",u=s.length;let f="";for(let v=0;v<56;v++)f+=s.charAt(Math.floor(Math.random()*u));return f}return crypto.getRandomValues(n),Array.from(n,h2).join("")}async function v2(i){const s=new TextEncoder().encode(i),u=await crypto.subtle.digest("SHA-256",s),f=new Uint8Array(u);return Array.from(f).map(v=>String.fromCharCode(v)).join("")}async function m2(i){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),i;const s=await v2(i);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function jf(i,n,s=!1){const u=p2();let f=u;s&&(f+="/recovery"),await $f(i,`${n}-code-verifier`,f);const v=await m2(u);return[v,u===v?"plain":"s256"]}const g2=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function y2(i){const n=i.headers.get($S);if(!n||!n.match(g2))return null;try{return new Date(`${n}T00:00:00.0Z`)}catch{return null}}function w2(i){if(!i)throw new Error("Missing exp claim");const n=Math.floor(Date.now()/1e3);if(i<=n)throw new Error("JWT has expired")}function b2(i){switch(i){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const S2=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ml(i){if(!S2.test(i))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function To(i){if(!i.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function pS(){const i={};return new Proxy(i,{get:(n,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const u=s.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function x2(i,n){return new Proxy(i,{get:(s,u,f)=>{if(u==="__isInsecureUserWarningProxy")return!0;if(typeof u=="symbol"){const v=u.toString();if(v==="Symbol(Symbol.toPrimitive)"||v==="Symbol(Symbol.toStringTag)"||v==="Symbol(util.inspect.custom)"||v==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,u,f)}return!n.value&&typeof u=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),n.value=!0),Reflect.get(s,u,f)}})}function vC(i){return JSON.parse(JSON.stringify(i))}const Ic=i=>{if(typeof i=="object"&&i!==null){const n=i;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error}return JSON.stringify(i)},_2=[502,503,504,520,521,522,523,524,530];async function mC(i){var n;if(!c2(i))throw new IS(Ic(i),0);if(_2.includes(i.status))throw new IS(Ic(i),i.status);let s;try{s=await i.json()}catch(v){throw new Oo(Ic(v),v)}let u;const f=y2(i);if(f&&f.getTime()>=S1["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?u=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(u=s.error_code),u){if(u==="weak_password")throw new dC(Ic(s),i.status,((n=s.weak_password)===null||n===void 0?void 0:n.reasons)||[]);if(u==="session_not_found")throw new zr}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((v,h)=>v&&typeof h=="string",!0))throw new dC(Ic(s),i.status,s.weak_password.reasons);throw new QL(Ic(s),i.status||500,u)}const E2=(i,n,s,u)=>{const f={method:i,headers:(n==null?void 0:n.headers)||{}};return i==="GET"?f:(f.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},n==null?void 0:n.headers),f.body=JSON.stringify(u),Object.assign(Object.assign({},f),s))};async function it(i,n,s,u){var f;const v=Object.assign({},u==null?void 0:u.headers);v[$S]||(v[$S]=S1["2024-01-01"].name),u!=null&&u.jwt&&(v.Authorization=`Bearer ${u.jwt}`);const h=(f=u==null?void 0:u.query)!==null&&f!==void 0?f:{};u!=null&&u.redirectTo&&(h.redirect_to=u.redirectTo);const g=Object.keys(h).length?"?"+new URLSearchParams(h).toString():"",b=await k2(i,n,s+g,{headers:v,noResolveJson:u==null?void 0:u.noResolveJson},{},u==null?void 0:u.body);return u!=null&&u.xform?u==null?void 0:u.xform(b):{data:Object.assign({},b),error:null}}async function k2(i,n,s,u,f,v){const h=E2(n,u,f,v);let g;try{g=await i(s,Object.assign({},h))}catch(b){throw console.error(b),new IS(Ic(b),0)}if(g.ok||await mC(g),u!=null&&u.noResolveJson)return g;try{return await g.json()}catch(b){await mC(b)}}function Xa(i){var n;let s=null;R2(i)&&(s=Object.assign({},i),i.expires_at||(s.expires_at=s2(i.expires_in)));const u=(n=i.user)!==null&&n!==void 0?n:null;return{data:{session:s,user:u},error:null}}function gC(i){const n=Xa(i);return!n.error&&i.weak_password&&typeof i.weak_password=="object"&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.message&&typeof i.weak_password.message=="string"&&i.weak_password.reasons.reduce((s,u)=>s&&typeof u=="string",!0)&&(n.data.weak_password=i.weak_password),n}function wu(i){var n;return{data:{user:(n=i.user)!==null&&n!==void 0?n:i},error:null}}function C2(i){return{data:i,error:null}}function T2(i){const{action_link:n,email_otp:s,hashed_token:u,redirect_to:f,verification_type:v}=i,h=zy(i,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),g={action_link:n,email_otp:s,hashed_token:u,redirect_to:f,verification_type:v},b=Object.assign({},h);return{data:{properties:g,user:b},error:null}}function yC(i){return i}function R2(i){return!!i.access_token&&!!i.refresh_token&&!!i.expires_in}const vS=["global","local","others"];class O2{_encodePathSegment(n){if(n==="."||n==="..")throw new Ff("Invalid path segment");return encodeURIComponent(n)}constructor({url:n="",headers:s={},fetch:u,experimental:f}){this.url=n,this.headers=s,this.fetch=E1(u),this.experimental=f??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(n,s=vS[0]){if(vS.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${vS.join(", ")}`);try{return await it(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:n,noResolveJson:!0}),{data:null,error:null}}catch(u){if(He(u))return{data:null,error:u};throw u}}async inviteUserByEmail(n,s={}){try{return await it(this.fetch,"POST",`${this.url}/invite`,{body:{email:n,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:wu})}catch(u){if(He(u))return{data:{user:null},error:u};throw u}}async generateLink(n){try{const{options:s}=n,u=zy(n,["options"]),f=Object.assign(Object.assign({},u),s);return"newEmail"in u&&(f.new_email=u==null?void 0:u.newEmail,delete f.newEmail),await it(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:f,headers:this.headers,xform:T2,redirectTo:s==null?void 0:s.redirectTo})}catch(s){if(He(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(n){try{return await it(this.fetch,"POST",`${this.url}/admin/users`,{body:n,headers:this.headers,xform:wu})}catch(s){if(He(s))return{data:{user:null},error:s};throw s}}async listUsers(n){var s,u,f,v,h,g,b;try{const _={nextPage:null,lastPage:0,total:0},k=await it(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(u=(s=n==null?void 0:n.page)===null||s===void 0?void 0:s.toString())!==null&&u!==void 0?u:"",per_page:(v=(f=n==null?void 0:n.perPage)===null||f===void 0?void 0:f.toString())!==null&&v!==void 0?v:""},xform:yC});if(k.error)throw k.error;const R=await k.json(),N=(h=k.headers.get("x-total-count"))!==null&&h!==void 0?h:0,A=(b=(g=k.headers.get("link"))===null||g===void 0?void 0:g.split(","))!==null&&b!==void 0?b:[];return A.length>0&&(A.forEach(j=>{const P=parseInt(j.split(";")[0].split("=")[1].substring(0,1)),F=JSON.parse(j.split(";")[1].split("=")[1]);_[`${F}Page`]=P}),_.total=parseInt(N)),{data:Object.assign(Object.assign({},R),_),error:null}}catch(_){if(He(_))return{data:{users:[]},error:_};throw _}}async getUserById(n){ml(n);try{return await it(this.fetch,"GET",`${this.url}/admin/users/${n}`,{headers:this.headers,xform:wu})}catch(s){if(He(s))return{data:{user:null},error:s};throw s}}async updateUserById(n,s){ml(n);try{return await it(this.fetch,"PUT",`${this.url}/admin/users/${n}`,{body:s,headers:this.headers,xform:wu})}catch(u){if(He(u))return{data:{user:null},error:u};throw u}}async deleteUser(n,s=!1){ml(n);try{return await it(this.fetch,"DELETE",`${this.url}/admin/users/${n}`,{headers:this.headers,body:{should_soft_delete:s},xform:wu})}catch(u){if(He(u))return{data:{user:null},error:u};throw u}}async _listFactors(n){ml(n.userId);try{const{data:s,error:u}=await it(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/factors`,{headers:this.headers,xform:f=>({data:{factors:f},error:null})});return{data:s,error:u}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _deleteFactor(n){ml(n.userId),ml(n.id);try{return{data:await it(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/factors/${n.id}`,{headers:this.headers}),error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _listOAuthClients(n){var s,u,f,v,h,g,b;try{const _={nextPage:null,lastPage:0,total:0},k=await it(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(u=(s=n==null?void 0:n.page)===null||s===void 0?void 0:s.toString())!==null&&u!==void 0?u:"",per_page:(v=(f=n==null?void 0:n.perPage)===null||f===void 0?void 0:f.toString())!==null&&v!==void 0?v:""},xform:yC});if(k.error)throw k.error;const R=await k.json(),N=(h=k.headers.get("x-total-count"))!==null&&h!==void 0?h:0,A=(b=(g=k.headers.get("link"))===null||g===void 0?void 0:g.split(","))!==null&&b!==void 0?b:[];return A.length>0&&(A.forEach(j=>{const P=parseInt(j.split(";")[0].split("=")[1].substring(0,1)),F=JSON.parse(j.split(";")[1].split("=")[1]);_[`${F}Page`]=P}),_.total=parseInt(N)),{data:Object.assign(Object.assign({},R),_),error:null}}catch(_){if(He(_))return{data:{clients:[]},error:_};throw _}}async _createOAuthClient(n){try{return await it(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _getOAuthClient(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"GET",`${this.url}/admin/oauth/clients/${s}`,{headers:this.headers,xform:u=>({data:u,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _updateOAuthClient(n,s){try{const u=this._encodePathSegment(n);return await it(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${u}`,{body:s,headers:this.headers,xform:f=>({data:f,error:null})})}catch(u){if(He(u))return{data:null,error:u};throw u}}async _deleteOAuthClient(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${s}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"POST",`${this.url}/admin/oauth/clients/${s}/regenerate_secret`,{headers:this.headers,xform:u=>({data:u,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _listCustomProviders(n){try{const s={};return n!=null&&n.type&&(s.type=n.type),await it(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:u=>{var f;return{data:{providers:(f=u==null?void 0:u.providers)!==null&&f!==void 0?f:[]},error:null}}})}catch(s){if(He(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(n){try{return await it(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _getCustomProvider(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"GET",`${this.url}/admin/custom-providers/${s}`,{headers:this.headers,xform:u=>({data:u,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _updateCustomProvider(n,s){try{const u=this._encodePathSegment(n);return await it(this.fetch,"PUT",`${this.url}/admin/custom-providers/${u}`,{body:s,headers:this.headers,xform:f=>({data:f,error:null})})}catch(u){if(He(u))return{data:null,error:u};throw u}}async _deleteCustomProvider(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${s}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _adminListPasskeys(n){To(this.experimental),ml(n.userId);try{return await it(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(n){To(this.experimental),ml(n.userId),ml(n.passkeyId);try{return await it(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/passkeys/${n.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}}function wC(i={}){return{getItem:n=>i[n]||null,setItem:(n,s)=>{i[n]=s},removeItem:n=>{delete i[n]}}}const ms={debug:!!(globalThis&&_1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class k1 extends Error{constructor(n){super(n),this.isAcquireTimeout=!0}}class bC extends k1{}async function A2(i,n,s){ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",i,n);const u=new globalThis.AbortController;let f;n>0&&(f=setTimeout(()=>{u.abort(),ms.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",i)},n)),await Promise.resolve();try{return await globalThis.navigator.locks.request(i,n===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:u.signal},async v=>{if(v){clearTimeout(f),ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",i,v.name);try{return await s()}finally{ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",i,v.name)}}else{if(n===0)throw ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",i),new bC(`Acquiring an exclusive Navigator LockManager lock "${i}" immediately failed`);if(ms.debug)try{const h=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(h,null," "))}catch(h){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",h)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(f),await s()}})}catch(v){if(n>0&&clearTimeout(f),v!==null&&typeof v=="object"&&"name"in v&&v.name==="AbortError"&&n>0){if(u.signal.aborted)return ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",i),console.warn(`@supabase/gotrue-js: Lock "${i}" was not released within ${n}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(i,{mode:"exclusive",steal:!0},async h=>{if(h){ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",i,h.name);try{return await s()}finally{ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",i,h.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await s()}));throw ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",i),new bC(`Lock "${i}" was released because another request stole it`)}throw v}}function D2(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function C1(i){if(!/^0x[a-fA-F0-9]{40}$/.test(i))throw new Error(`@supabase/auth-js: Address "${i}" is invalid.`);return i.toLowerCase()}function N2(i){return parseInt(i,16)}function j2(i){const n=new TextEncoder().encode(i);return"0x"+Array.from(n,u=>u.toString(16).padStart(2,"0")).join("")}function L2(i){var n;const{chainId:s,domain:u,expirationTime:f,issuedAt:v=new Date,nonce:h,notBefore:g,requestId:b,resources:_,scheme:k,uri:R,version:N}=i;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!u)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(h&&h.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${h}`);if(!R)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(N!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${N}`);if(!((n=i.statement)===null||n===void 0)&&n.includes(`
267
+ })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(n,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},n,s)}getChannels(){return this.channels}async removeChannel(n){const s=await n.unsubscribe();return s==="ok"&&n.teardown(),s}async removeAllChannels(){const n=this.channels.map(async u=>{const f=await u.unsubscribe();return u.teardown(),f}),s=await Promise.all(n);return await this.disconnect(),s}log(n,s,u){this.socketAdapter.log(n,s,u)}connectionState(){return this.socketAdapter.connectionState()||AS.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(n,s={config:{}}){const u=`realtime:${n}`,f=this.getChannels().find(v=>v.topic===u);if(f)return f;{const v=new ov(`realtime:${n}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(v),v}}push(n){this.socketAdapter.push(n)}async setAuth(n=null){this._authPromise=this._performAuth(n);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(n){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(n)}_makeRef(){return this.socketAdapter.makeRef()}_remove(n){this.channels=this.channels.filter(s=>s.topic!==n.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(n=null){let s,u=!1;if(n)s=n,u=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(f){this.log("error","Error fetching access token from callback",f),s=this.accessTokenValue}else s=this.accessTokenValue;u?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(f=>{const v={access_token:s,version:Mj};s&&f.updateJoinPayload(v),f.joinedOnce&&f.channelAdapter.isJoined()&&f.channelAdapter.push(f1.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(n="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${n}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(n=>{n.ref&&n.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(n){return(s,u)=>{s=="sent"&&this._setAuthSafely(),n&&n(s,u)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const n=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(n),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(n){let s;if(n)s=n;else{const u=new Blob([vL],{type:"application/javascript"});s=URL.createObjectURL(u)}return s}_initializeOptions(n){var s,u,f,v,h,g,b,_,k,R,N,A;this.worker=(s=n==null?void 0:n.worker)!==null&&s!==void 0?s:!1,this.accessToken=(u=n==null?void 0:n.accessToken)!==null&&u!==void 0?u:null;const j={};j.timeout=(f=n==null?void 0:n.timeout)!==null&&f!==void 0?f:zj,j.heartbeatIntervalMs=(v=n==null?void 0:n.heartbeatIntervalMs)!==null&&v!==void 0?v:oC.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(h=n==null?void 0:n.disconnectOnEmptyChannelsAfterMs)!==null&&h!==void 0?h:2*((g=n==null?void 0:n.heartbeatIntervalMs)!==null&&g!==void 0?g:oC.HEARTBEAT_INTERVAL),j.transport=(b=n==null?void 0:n.transport)!==null&&b!==void 0?b:Pj.getWebSocketConstructor(),j.params=n==null?void 0:n.params,j.logger=n==null?void 0:n.logger,j.heartbeatCallback=this._wrapHeartbeatCallback(n==null?void 0:n.heartbeatCallback),j.sessionStorage=(_=n==null?void 0:n.sessionStorage)!==null&&_!==void 0?_:pL(),j.reconnectAfterMs=(k=n==null?void 0:n.reconnectAfterMs)!==null&&k!==void 0?k:q=>dL[q-1]||fL;let P,F;const Y=(R=n==null?void 0:n.vsn)!==null&&R!==void 0?R:Ij;switch(Y){case $j:P=(q,I)=>I(JSON.stringify(q)),F=(q,I)=>I(JSON.parse(q));break;case d1:P=this.serializer.encode.bind(this.serializer),F=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${j.vsn}`)}if(j.vsn=Y,j.encode=(N=n==null?void 0:n.encode)!==null&&N!==void 0?N:P,j.decode=(A=n==null?void 0:n.decode)!==null&&A!==void 0?A:F,j.beforeReconnect=this._reconnectAuth.bind(this),(n!=null&&n.logLevel||n!=null&&n.log_level)&&(this.logLevel=n.logLevel||n.log_level,j.params=Object.assign(Object.assign({},j.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=n==null?void 0:n.workerUrl,j.autoSendHeartbeat=!this.worker}return j}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var lv=class extends Error{constructor(i,n){var s;super(i),this.name="IcebergError",this.status=n.status,this.icebergType=n.icebergType,this.icebergCode=n.icebergCode,this.details=n.details,this.isCommitStateUnknown=n.icebergType==="CommitStateUnknownException"||[500,502,504].includes(n.status)&&((s=n.icebergType)==null?void 0:s.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function gL(i,n,s){const u=new URL(n,i);if(s)for(const[f,v]of Object.entries(s))v!==void 0&&u.searchParams.set(f,v);return u.toString()}async function yL(i){return!i||i.type==="none"?{}:i.type==="bearer"?{Authorization:`Bearer ${i.token}`}:i.type==="header"?{[i.name]:i.value}:i.type==="custom"?await i.getHeaders():{}}function wL(i){const n=i.fetchImpl??globalThis.fetch;return{async request({method:s,path:u,query:f,body:v,headers:h}){const g=gL(i.baseUrl,u,f),b=await yL(i.auth),_=await n(g,{method:s,headers:{...v?{"Content-Type":"application/json"}:{},...b,...h},body:v?JSON.stringify(v):void 0}),k=await _.text(),R=(_.headers.get("content-type")||"").includes("application/json"),N=R&&k?JSON.parse(k):k;if(!_.ok){const A=R?N:void 0,j=A==null?void 0:A.error;throw new lv((j==null?void 0:j.message)??`Request failed with status ${_.status}`,{status:_.status,icebergType:j==null?void 0:j.type,icebergCode:j==null?void 0:j.code,details:A})}return{status:_.status,headers:_.headers,data:N}}}}function vy(i){return i.join("")}var bL=class{constructor(i,n=""){this.client=i,this.prefix=n}async listNamespaces(i){const n=i?{parent:vy(i.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:n})).data.namespaces.map(u=>({namespace:u}))}async createNamespace(i,n){const s={namespace:i.namespace,properties:n==null?void 0:n.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(i){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${vy(i.namespace)}`})}async loadNamespaceMetadata(i){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vy(i.namespace)}`})).data.properties}}async namespaceExists(i){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${vy(i.namespace)}`}),!0}catch(n){if(n instanceof lv&&n.status===404)return!1;throw n}}async createNamespaceIfNotExists(i,n){try{return await this.createNamespace(i,n)}catch(s){if(s instanceof lv&&s.status===409)return;throw s}}};function Df(i){return i.join("")}var SL=class{constructor(i,n="",s){this.client=i,this.prefix=n,this.accessDelegation=s}async listTables(i){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables`})).data.identifiers}async createTable(i,n){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables`,body:n,headers:s})).data.metadata}async updateTable(i,n){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,body:n});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(i,n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,query:{purgeRequested:String((n==null?void 0:n.purge)??!1)}})}async loadTable(i){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,headers:n})).data.metadata}async tableExists(i){const n={};this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Df(i.namespace)}/tables/${i.name}`,headers:n}),!0}catch(s){if(s instanceof lv&&s.status===404)return!1;throw s}}async createTableIfNotExists(i,n){try{return await this.createTable(i,n)}catch(s){if(s instanceof lv&&s.status===409)return await this.loadTable({namespace:i.namespace,name:n.name});throw s}}},xL=class{constructor(i){var u;let n="v1";i.catalogName&&(n+=`/${i.catalogName}`);const s=i.baseUrl.endsWith("/")?i.baseUrl:`${i.baseUrl}/`;this.client=wL({baseUrl:s,auth:i.auth,fetchImpl:i.fetch}),this.accessDelegation=(u=i.accessDelegation)==null?void 0:u.join(","),this.namespaceOps=new bL(this.client,n),this.tableOps=new SL(this.client,n,this.accessDelegation)}async listNamespaces(i){return this.namespaceOps.listNamespaces(i)}async createNamespace(i,n){return this.namespaceOps.createNamespace(i,n)}async dropNamespace(i){await this.namespaceOps.dropNamespace(i)}async loadNamespaceMetadata(i){return this.namespaceOps.loadNamespaceMetadata(i)}async listTables(i){return this.tableOps.listTables(i)}async createTable(i,n){return this.tableOps.createTable(i,n)}async updateTable(i,n){return this.tableOps.updateTable(i,n)}async dropTable(i,n){await this.tableOps.dropTable(i,n)}async loadTable(i){return this.tableOps.loadTable(i)}async namespaceExists(i){return this.namespaceOps.namespaceExists(i)}async tableExists(i){return this.tableOps.tableExists(i)}async createNamespaceIfNotExists(i,n){return this.namespaceOps.createNamespaceIfNotExists(i,n)}async createTableIfNotExists(i,n){return this.tableOps.createTableIfNotExists(i,n)}};function uv(i){"@babel/helpers - typeof";return uv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uv(i)}function _L(i,n){if(uv(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var u=s.call(i,n);if(uv(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function EL(i){var n=_L(i,"string");return uv(n)=="symbol"?n:n+""}function kL(i,n,s){return(n=EL(n))in i?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,i}function sC(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);n&&(u=u.filter(function(f){return Object.getOwnPropertyDescriptor(i,f).enumerable})),s.push.apply(s,u)}return s}function Ct(i){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?sC(Object(s),!0).forEach(function(u){kL(i,u,s[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):sC(Object(s)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(s,u))})}return i}var Fy=class extends Error{constructor(i,n="storage",s,u){super(i),this.__isStorageError=!0,this.namespace=n,this.name=n==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=u}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function By(i){return typeof i=="object"&&i!==null&&"__isStorageError"in i}var LS=class extends Fy{constructor(i,n,s,u="storage"){super(i,u,n,s),this.name=u==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=n,this.statusCode=s}toJSON(){return Ct({},super.toJSON())}},m1=class extends Fy{constructor(i,n,s="storage"){super(i,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=n}};function Dy(i,n,s){const u=Ct({},i),f=n.toLowerCase();for(const v of Object.keys(u))v.toLowerCase()===f&&delete u[v];return u[f]=s,u}function CL(i){const n={};for(const[s,u]of Object.entries(i))n[s.toLowerCase()]=u;return n}const TL=i=>i?(...n)=>i(...n):(...n)=>fetch(...n),RL=i=>{if(typeof i!="object"||i===null)return!1;const n=Object.getPrototypeOf(i);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},PS=i=>{if(Array.isArray(i))return i.map(s=>PS(s));if(typeof i=="function"||i!==Object(i))return i;const n={};return Object.entries(i).forEach(([s,u])=>{const f=s.replace(/([-_][a-z])/gi,v=>v.toUpperCase().replace(/[-_]/g,""));n[f]=PS(u)}),n},OL=i=>!i||typeof i!="string"||i.length===0||i.length>100||i.trim()!==i||i.includes("/")||i.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(i),lC=i=>{if(typeof i=="object"&&i!==null){const n=i;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error;if(typeof n.error=="object"&&n.error!==null){const s=n.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(i)},AL=async(i,n,s,u)=>{if(i!==null&&typeof i=="object"&&"json"in i&&typeof i.json=="function"){const f=i;let v=parseInt(String(f.status),10);Number.isFinite(v)||(v=500),f.json().then(h=>{const g=(h==null?void 0:h.statusCode)||(h==null?void 0:h.code)||v+"";n(new LS(lC(h),v,g,u))}).catch(()=>{const h=v+"";n(new LS(f.statusText||`HTTP ${v} error`,v,h,u))})}else n(new m1(lC(i),i,u))},DL=(i,n,s,u)=>{const f={method:i,headers:(n==null?void 0:n.headers)||{}};if(i==="GET"||i==="HEAD"||!u)return Ct(Ct({},f),s);if(RL(u)){var v;const h=(n==null?void 0:n.headers)||{};let g;for(const[b,_]of Object.entries(h))b.toLowerCase()==="content-type"&&(g=_);f.headers=Dy(h,"Content-Type",(v=g)!==null&&v!==void 0?v:"application/json"),f.body=JSON.stringify(u)}else f.body=u;return n!=null&&n.duplex&&(f.duplex=n.duplex),Ct(Ct({},f),s)};async function Zp(i,n,s,u,f,v,h){return new Promise((g,b)=>{i(s,DL(n,u,f,v)).then(_=>{if(!_.ok)throw _;if(u!=null&&u.noResolveJson)return _;if(h==="vectors"){const k=_.headers.get("content-type");if(_.headers.get("content-length")==="0"||_.status===204)return{};if(!k||!k.includes("application/json"))return{}}return _.json()}).then(_=>g(_)).catch(_=>AL(_,b,u,h))})}function g1(i="storage"){return{get:async(n,s,u,f)=>Zp(n,"GET",s,u,f,void 0,i),post:async(n,s,u,f,v)=>Zp(n,"POST",s,f,v,u,i),put:async(n,s,u,f,v)=>Zp(n,"PUT",s,f,v,u,i),head:async(n,s,u,f)=>Zp(n,"HEAD",s,Ct(Ct({},u),{},{noResolveJson:!0}),f,void 0,i),remove:async(n,s,u,f,v)=>Zp(n,"DELETE",s,f,v,u,i)}}const NL=g1("storage"),{get:cv,post:Ro,put:US,head:jL,remove:ex}=NL,xa=g1("vectors");var Vf=class{constructor(i,n={},s,u="storage"){this.shouldThrowOnError=!1,this.url=i,this.headers=CL(n),this.fetch=TL(s),this.namespace=u}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(i,n){return this.headers=Dy(this.headers,i,n),this}async handleOperation(i){var n=this;try{return{data:await i(),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(By(s))return{data:null,error:s};throw s}}};let y1;y1=Symbol.toStringTag;var LL=class{constructor(i,n){this.downloadFn=i,this.shouldThrowOnError=n,this[y1]="StreamDownloadBuilder",this.promise=null}then(i,n){return this.getPromise().then(i,n)}catch(i){return this.getPromise().catch(i)}finally(i){return this.getPromise().finally(i)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var i=this;try{return{data:(await i.downloadFn()).body,error:null}}catch(n){if(i.shouldThrowOnError)throw n;if(By(n))return{data:null,error:n};throw n}}};let w1;w1=Symbol.toStringTag;var PL=class{constructor(i,n){this.downloadFn=i,this.shouldThrowOnError=n,this[w1]="BlobDownloadBuilder",this.promise=null}asStream(){return new LL(this.downloadFn,this.shouldThrowOnError)}then(i,n){return this.getPromise().then(i,n)}catch(i){return this.getPromise().catch(i)}finally(i){return this.getPromise().finally(i)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var i=this;try{return{data:await(await i.downloadFn()).blob(),error:null}}catch(n){if(i.shouldThrowOnError)throw n;if(By(n))return{data:null,error:n};throw n}}};const UL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},uC={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var ML=class extends Vf{constructor(i,n={},s,u){super(i,n,u,"storage"),this.bucketId=s}async uploadOrUpdate(i,n,s,u){var f=this;return f.handleOperation(async()=>{let v;const h=Ct(Ct({},uC),u);let g=Ct(Ct({},f.headers),i==="POST"&&{"x-upsert":String(h.upsert)});const b=h.metadata;if(typeof Blob<"u"&&s instanceof Blob?(v=new FormData,v.append("cacheControl",h.cacheControl),b&&v.append("metadata",f.encodeMetadata(b)),v.append("",s)):typeof FormData<"u"&&s instanceof FormData?(v=s,v.has("cacheControl")||v.append("cacheControl",h.cacheControl),b&&!v.has("metadata")&&v.append("metadata",f.encodeMetadata(b))):(v=s,g["cache-control"]=`max-age=${h.cacheControl}`,g["content-type"]=h.contentType,b&&(g["x-metadata"]=f.toBase64(f.encodeMetadata(b))),(typeof ReadableStream<"u"&&v instanceof ReadableStream||v&&typeof v=="object"&&"pipe"in v&&typeof v.pipe=="function")&&!h.duplex&&(h.duplex="half")),u!=null&&u.headers)for(const[N,A]of Object.entries(u.headers))g=Dy(g,N,A);const _=f._removeEmptyFolders(n),k=f._getFinalPath(_),R=await(i=="PUT"?US:Ro)(f.fetch,`${f.url}/object/${k}`,v,Ct({headers:g},h!=null&&h.duplex?{duplex:h.duplex}:{}));return{path:_,id:R.Id,fullPath:R.Key}})}async upload(i,n,s){return this.uploadOrUpdate("POST",i,n,s)}async uploadToSignedUrl(i,n,s,u){var f=this;const v=f._removeEmptyFolders(i),h=f._getFinalPath(v),g=new URL(f.url+`/object/upload/sign/${h}`);return g.searchParams.set("token",n),f.handleOperation(async()=>{let b;const _=Ct(Ct({},uC),u);let k=Ct(Ct({},f.headers),{"x-upsert":String(_.upsert)});const R=_.metadata;if(typeof Blob<"u"&&s instanceof Blob?(b=new FormData,b.append("cacheControl",_.cacheControl),R&&b.append("metadata",f.encodeMetadata(R)),b.append("",s)):typeof FormData<"u"&&s instanceof FormData?(b=s,b.has("cacheControl")||b.append("cacheControl",_.cacheControl),R&&!b.has("metadata")&&b.append("metadata",f.encodeMetadata(R))):(b=s,k["cache-control"]=`max-age=${_.cacheControl}`,k["content-type"]=_.contentType,R&&(k["x-metadata"]=f.toBase64(f.encodeMetadata(R))),(typeof ReadableStream<"u"&&b instanceof ReadableStream||b&&typeof b=="object"&&"pipe"in b&&typeof b.pipe=="function")&&!_.duplex&&(_.duplex="half")),u!=null&&u.headers)for(const[N,A]of Object.entries(u.headers))k=Dy(k,N,A);return{path:v,fullPath:(await US(f.fetch,g.toString(),b,Ct({headers:k},_!=null&&_.duplex?{duplex:_.duplex}:{}))).Key}})}async createSignedUploadUrl(i,n){var s=this;return s.handleOperation(async()=>{let u=s._getFinalPath(i);const f=Ct({},s.headers);n!=null&&n.upsert&&(f["x-upsert"]="true");const v=await Ro(s.fetch,`${s.url}/object/upload/sign/${u}`,{},{headers:f}),h=new URL(s.url+v.url),g=h.searchParams.get("token");if(!g)throw new Fy("No token returned by API");return{signedUrl:h.toString(),path:i,token:g}})}async update(i,n,s){return this.uploadOrUpdate("PUT",i,n,s)}async move(i,n,s){var u=this;return u.handleOperation(async()=>await Ro(u.fetch,`${u.url}/object/move`,{bucketId:u.bucketId,sourceKey:i,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:u.headers}))}async copy(i,n,s){var u=this;return u.handleOperation(async()=>({path:(await Ro(u.fetch,`${u.url}/object/copy`,{bucketId:u.bucketId,sourceKey:i,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:u.headers})).Key}))}async createSignedUrl(i,n,s){var u=this;return u.handleOperation(async()=>{let f=u._getFinalPath(i);const v=typeof(s==null?void 0:s.transform)=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let h=await Ro(u.fetch,`${u.url}/object/sign/${f}`,Ct({expiresIn:n},v?{transform:s.transform}:{}),{headers:u.headers});const g=new URLSearchParams;s!=null&&s.download&&g.set("download",s.download===!0?"":s.download),(s==null?void 0:s.cacheNonce)!=null&&g.set("cacheNonce",String(s.cacheNonce));const b=g.toString();return{signedUrl:encodeURI(`${u.url}${h.signedURL}${b?`&${b}`:""}`)}})}async createSignedUrls(i,n,s){var u=this;return u.handleOperation(async()=>{const f=await Ro(u.fetch,`${u.url}/object/sign/${u.bucketId}`,{expiresIn:n,paths:i},{headers:u.headers}),v=new URLSearchParams;s!=null&&s.download&&v.set("download",s.download===!0?"":s.download),(s==null?void 0:s.cacheNonce)!=null&&v.set("cacheNonce",String(s.cacheNonce));const h=v.toString();return f.map(g=>Ct(Ct({},g),{},{signedUrl:g.signedURL?encodeURI(`${u.url}${g.signedURL}${h?`&${h}`:""}`):null}))})}download(i,n,s){const u=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image/authenticated":"object",f=new URLSearchParams;n!=null&&n.transform&&this.applyTransformOptsToQuery(f,n.transform),(n==null?void 0:n.cacheNonce)!=null&&f.set("cacheNonce",String(n.cacheNonce));const v=f.toString(),h=this._getFinalPath(i),g=()=>cv(this.fetch,`${this.url}/${u}/${h}${v?`?${v}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new PL(g,this.shouldThrowOnError)}async info(i){var n=this;const s=n._getFinalPath(i);return n.handleOperation(async()=>PS(await cv(n.fetch,`${n.url}/object/info/${s}`,{headers:n.headers})))}async exists(i){var n=this;const s=n._getFinalPath(i);try{return await jL(n.fetch,`${n.url}/object/${s}`,{headers:n.headers}),{data:!0,error:null}}catch(f){if(n.shouldThrowOnError)throw f;if(By(f)){var u;const v=f instanceof LS?f.status:f instanceof m1?(u=f.originalError)===null||u===void 0?void 0:u.status:void 0;if(v!==void 0&&[400,404].includes(v))return{data:!1,error:f}}throw f}}getPublicUrl(i,n){const s=this._getFinalPath(i),u=new URLSearchParams;n!=null&&n.download&&u.set("download",n.download===!0?"":n.download),n!=null&&n.transform&&this.applyTransformOptsToQuery(u,n.transform),(n==null?void 0:n.cacheNonce)!=null&&u.set("cacheNonce",String(n.cacheNonce));const f=u.toString(),v=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${v}/public/${s}`)+(f?`?${f}`:"")}}}async remove(i){var n=this;return n.handleOperation(async()=>await ex(n.fetch,`${n.url}/object/${n.bucketId}`,{prefixes:i},{headers:n.headers}))}async list(i,n,s){var u=this;return u.handleOperation(async()=>{const f=Ct(Ct(Ct({},UL),n),{},{prefix:i||""});return await Ro(u.fetch,`${u.url}/object/list/${u.bucketId}`,f,{headers:u.headers},s)})}async listV2(i,n){var s=this;return s.handleOperation(async()=>{const u=Ct({},i);return await Ro(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,u,{headers:s.headers},n)})}encodeMetadata(i){return JSON.stringify(i)}toBase64(i){return typeof Buffer<"u"?Buffer.from(i).toString("base64"):btoa(i)}_getFinalPath(i){return`${this.bucketId}/${i.replace(/^\/+/,"")}`}_removeEmptyFolders(i){return i.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(i,n){return n.width&&i.set("width",n.width.toString()),n.height&&i.set("height",n.height.toString()),n.resize&&i.set("resize",n.resize),n.format&&i.set("format",n.format),n.quality&&i.set("quality",n.quality.toString()),i}};const $L="2.106.1",gv={"X-Client-Info":`storage-js/${$L}`};var IL=class extends Vf{constructor(i,n={},s,u){const f=new URL(i);u!=null&&u.useNewHostname&&/supabase\.(co|in|red)$/.test(f.hostname)&&!f.hostname.includes("storage.supabase.")&&(f.hostname=f.hostname.replace("supabase.","storage.supabase."));const v=f.href.replace(/\/$/,""),h=Ct(Ct({},gv),n);super(v,h,s,"storage")}async listBuckets(i){var n=this;return n.handleOperation(async()=>{const s=n.listBucketOptionsToQueryString(i);return await cv(n.fetch,`${n.url}/bucket${s}`,{headers:n.headers})})}async getBucket(i){var n=this;return n.handleOperation(async()=>await cv(n.fetch,`${n.url}/bucket/${i}`,{headers:n.headers}))}async createBucket(i,n={public:!1}){var s=this;return s.handleOperation(async()=>await Ro(s.fetch,`${s.url}/bucket`,{id:i,name:i,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async updateBucket(i,n){var s=this;return s.handleOperation(async()=>await US(s.fetch,`${s.url}/bucket/${i}`,{id:i,name:i,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(i){var n=this;return n.handleOperation(async()=>await Ro(n.fetch,`${n.url}/bucket/${i}/empty`,{},{headers:n.headers}))}async deleteBucket(i){var n=this;return n.handleOperation(async()=>await ex(n.fetch,`${n.url}/bucket/${i}`,{},{headers:n.headers}))}listBucketOptionsToQueryString(i){const n={};return i&&("limit"in i&&(n.limit=String(i.limit)),"offset"in i&&(n.offset=String(i.offset)),i.search&&(n.search=i.search),i.sortColumn&&(n.sortColumn=i.sortColumn),i.sortOrder&&(n.sortOrder=i.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}},zL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),n);super(u,f,s,"storage")}async createBucket(i){var n=this;return n.handleOperation(async()=>await Ro(n.fetch,`${n.url}/bucket`,{name:i},{headers:n.headers}))}async listBuckets(i){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;(i==null?void 0:i.limit)!==void 0&&s.set("limit",i.limit.toString()),(i==null?void 0:i.offset)!==void 0&&s.set("offset",i.offset.toString()),i!=null&&i.sortColumn&&s.set("sortColumn",i.sortColumn),i!=null&&i.sortOrder&&s.set("sortOrder",i.sortOrder),i!=null&&i.search&&s.set("search",i.search);const u=s.toString(),f=u?`${n.url}/bucket?${u}`:`${n.url}/bucket`;return await cv(n.fetch,f,{headers:n.headers})})}async deleteBucket(i){var n=this;return n.handleOperation(async()=>await ex(n.fetch,`${n.url}/bucket/${i}`,{},{headers:n.headers}))}from(i){var n=this;if(!OL(i))throw new Fy("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new xL({baseUrl:this.url,catalogName:i,auth:{type:"custom",getHeaders:async()=>n.headers},fetch:this.fetch}),u=this.shouldThrowOnError;return new Proxy(s,{get(f,v){const h=f[v];return typeof h!="function"?h:async(...g)=>{try{return{data:await h.apply(f,g),error:null}}catch(b){if(u)throw b;return{data:null,error:b}}}}})}},FL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),{},{"Content-Type":"application/json"},n);super(u,f,s,"vectors")}async createIndex(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/CreateIndex`,i,{headers:n.headers})||{})}async getIndex(i,n){var s=this;return s.handleOperation(async()=>await xa.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:i,indexName:n},{headers:s.headers}))}async listIndexes(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/ListIndexes`,i,{headers:n.headers}))}async deleteIndex(i,n){var s=this;return s.handleOperation(async()=>await xa.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:i,indexName:n},{headers:s.headers})||{})}},BL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),{},{"Content-Type":"application/json"},n);super(u,f,s,"vectors")}async putVectors(i){var n=this;if(i.vectors.length<1||i.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/PutVectors`,i,{headers:n.headers})||{})}async getVectors(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/GetVectors`,i,{headers:n.headers}))}async listVectors(i){var n=this;if(i.segmentCount!==void 0){if(i.segmentCount<1||i.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(i.segmentIndex!==void 0&&(i.segmentIndex<0||i.segmentIndex>=i.segmentCount))throw new Error(`segmentIndex must be between 0 and ${i.segmentCount-1}`)}return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/ListVectors`,i,{headers:n.headers}))}async queryVectors(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/QueryVectors`,i,{headers:n.headers}))}async deleteVectors(i){var n=this;if(i.keys.length<1||i.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/DeleteVectors`,i,{headers:n.headers})||{})}},HL=class extends Vf{constructor(i,n={},s){const u=i.replace(/\/$/,""),f=Ct(Ct({},gv),{},{"Content-Type":"application/json"},n);super(u,f,s,"vectors")}async createBucket(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/CreateVectorBucket`,{vectorBucketName:i},{headers:n.headers})||{})}async getBucket(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/GetVectorBucket`,{vectorBucketName:i},{headers:n.headers}))}async listBuckets(i={}){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/ListVectorBuckets`,i,{headers:n.headers}))}async deleteBucket(i){var n=this;return n.handleOperation(async()=>await xa.post(n.fetch,`${n.url}/DeleteVectorBucket`,{vectorBucketName:i},{headers:n.headers})||{})}},VL=class extends HL{constructor(i,n={}){super(i,n.headers||{},n.fetch)}from(i){return new WL(this.url,this.headers,i,this.fetch)}async createBucket(i){var n=()=>super.createBucket,s=this;return n().call(s,i)}async getBucket(i){var n=()=>super.getBucket,s=this;return n().call(s,i)}async listBuckets(i={}){var n=()=>super.listBuckets,s=this;return n().call(s,i)}async deleteBucket(i){var n=()=>super.deleteBucket,s=this;return n().call(s,i)}},WL=class extends FL{constructor(i,n,s,u){super(i,n,u),this.vectorBucketName=s}async createIndex(i){var n=()=>super.createIndex,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(i={}){var n=()=>super.listIndexes,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(i){var n=()=>super.getIndex,s=this;return n().call(s,s.vectorBucketName,i)}async deleteIndex(i){var n=()=>super.deleteIndex,s=this;return n().call(s,s.vectorBucketName,i)}index(i){return new qL(this.url,this.headers,this.vectorBucketName,i,this.fetch)}},qL=class extends BL{constructor(i,n,s,u,f){super(i,n,f),this.vectorBucketName=s,this.indexName=u}async putVectors(i){var n=()=>super.putVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(i){var n=()=>super.getVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(i={}){var n=()=>super.listVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(i){var n=()=>super.queryVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(i){var n=()=>super.deleteVectors,s=this;return n().call(s,Ct(Ct({},i),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},YL=class extends IL{constructor(i,n={},s,u){super(i,n,s,u)}from(i){return new ML(this.url,this.headers,i,this.fetch)}get vectors(){return new VL(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zL(this.url+"/iceberg",this.headers,this.fetch)}};const b1="2.106.1",Mf=30*1e3,MS=3,fS=MS*Mf,GL="http://localhost:9999",KL="supabase.auth.token",JL={"X-Client-Info":`gotrue-js/${b1}`},$S="X-Supabase-Api-Version",S1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},XL=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,QL=10*60*1e3;class Ff extends Error{constructor(n,s,u){super(n),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function He(i){return typeof i=="object"&&i!==null&&"__isAuthError"in i}class ZL extends Ff{constructor(n,s,u){super(n,s,u),this.name="AuthApiError",this.status=s,this.code=u}}function e2(i){return He(i)&&i.name==="AuthApiError"}class Oo extends Ff{constructor(n,s){super(n),this.name="AuthUnknownError",this.originalError=s}}class wl extends Ff{constructor(n,s,u,f){super(n,u,f),this.name=s,this.status=u}}class zr extends wl{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function my(i){return He(i)&&i.name==="AuthSessionMissingError"}class Nf extends wl{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class gy extends wl{constructor(n){super(n,"AuthInvalidCredentialsError",400,void 0)}}class yy extends wl{constructor(n,s=null){super(n,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function t2(i){return He(i)&&i.name==="AuthImplicitGrantRedirectError"}class cC extends wl{constructor(n,s=null){super(n,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class n2 extends wl{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class IS extends wl{constructor(n,s){super(n,"AuthRetryableFetchError",s,void 0)}}function hS(i){return He(i)&&i.name==="AuthRetryableFetchError"}class dC extends wl{constructor(n,s,u){super(n,"AuthWeakPasswordError",s,"weak_password"),this.reasons=u}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class zS extends wl{constructor(n){super(n,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ny="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),fC=`
268
+ \r=`.split(""),r2=(()=>{const i=new Array(128);for(let n=0;n<i.length;n+=1)i[n]=-1;for(let n=0;n<fC.length;n+=1)i[fC[n].charCodeAt(0)]=-2;for(let n=0;n<Ny.length;n+=1)i[Ny[n].charCodeAt(0)]=n;return i})();function hC(i,n,s){if(i!==null)for(n.queue=n.queue<<8|i,n.queuedBits+=8;n.queuedBits>=6;){const u=n.queue>>n.queuedBits-6&63;s(Ny[u]),n.queuedBits-=6}else if(n.queuedBits>0)for(n.queue=n.queue<<6-n.queuedBits,n.queuedBits=6;n.queuedBits>=6;){const u=n.queue>>n.queuedBits-6&63;s(Ny[u]),n.queuedBits-=6}}function x1(i,n,s){const u=r2[i];if(u>-1)for(n.queue=n.queue<<6|u,n.queuedBits+=6;n.queuedBits>=8;)s(n.queue>>n.queuedBits-8&255),n.queuedBits-=8;else{if(u===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(i)}"`)}}function pC(i){const n=[],s=h=>{n.push(String.fromCodePoint(h))},u={utf8seq:0,codepoint:0},f={queue:0,queuedBits:0},v=h=>{o2(h,u,s)};for(let h=0;h<i.length;h+=1)x1(i.charCodeAt(h),f,v);return n.join("")}function i2(i,n){if(i<=127){n(i);return}else if(i<=2047){n(192|i>>6),n(128|i&63);return}else if(i<=65535){n(224|i>>12),n(128|i>>6&63),n(128|i&63);return}else if(i<=1114111){n(240|i>>18),n(128|i>>12&63),n(128|i>>6&63),n(128|i&63);return}throw new Error(`Unrecognized Unicode codepoint: ${i.toString(16)}`)}function a2(i,n){for(let s=0;s<i.length;s+=1){let u=i.charCodeAt(s);if(u>55295&&u<=56319){const f=(u-55296)*1024&65535;u=(i.charCodeAt(s+1)-56320&65535|f)+65536,s+=1}i2(u,n)}}function o2(i,n,s){if(n.utf8seq===0){if(i<=127){s(i);return}for(let u=1;u<6;u+=1)if(!(i>>7-u&1)){n.utf8seq=u;break}if(n.utf8seq===2)n.codepoint=i&31;else if(n.utf8seq===3)n.codepoint=i&15;else if(n.utf8seq===4)n.codepoint=i&7;else throw new Error("Invalid UTF-8 sequence");n.utf8seq-=1}else if(n.utf8seq>0){if(i<=127)throw new Error("Invalid UTF-8 sequence");n.codepoint=n.codepoint<<6|i&63,n.utf8seq-=1,n.utf8seq===0&&s(n.codepoint)}}function zf(i){const n=[],s={queue:0,queuedBits:0},u=f=>{n.push(f)};for(let f=0;f<i.length;f+=1)x1(i.charCodeAt(f),s,u);return new Uint8Array(n)}function s2(i){const n=[];return a2(i,s=>n.push(s)),new Uint8Array(n)}function Fc(i){const n=[],s={queue:0,queuedBits:0},u=f=>{n.push(f)};return i.forEach(f=>hC(f,s,u)),hC(null,s,u),n.join("")}function l2(i){return Math.round(Date.now()/1e3)+i}function u2(){return Symbol("auth-callback")}const oi=()=>typeof window<"u"&&typeof document<"u",Uc={tested:!1,writable:!1},_1=()=>{if(!oi())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Uc.tested)return Uc.writable;const i=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(i,i),globalThis.localStorage.removeItem(i),Uc.tested=!0,Uc.writable=!0}catch{Uc.tested=!0,Uc.writable=!1}return Uc.writable};function c2(i){const n={},s=new URL(i);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((f,v)=>{n[v]=f})}catch{}return s.searchParams.forEach((u,f)=>{n[f]=u}),n}const E1=i=>i?(...n)=>i(...n):(...n)=>fetch(...n),d2=i=>typeof i=="object"&&i!==null&&"status"in i&&"ok"in i&&"json"in i&&typeof i.json=="function",$f=async(i,n,s)=>{await i.setItem(n,JSON.stringify(s))},Mc=async(i,n)=>{const s=await i.getItem(n);if(!s)return null;try{return JSON.parse(s)}catch{return null}},ai=async(i,n)=>{await i.removeItem(n)};class Hy{constructor(){this.promise=new Hy.promiseConstructor((n,s)=>{this.resolve=n,this.reject=s})}}Hy.promiseConstructor=Promise;function wy(i){const n=i.split(".");if(n.length!==3)throw new zS("Invalid JWT structure");for(let u=0;u<n.length;u++)if(!XL.test(n[u]))throw new zS("JWT not in base64url format");return{header:JSON.parse(pC(n[0])),payload:JSON.parse(pC(n[1])),signature:zf(n[2]),raw:{header:n[0],payload:n[1]}}}async function f2(i){return await new Promise(n=>{setTimeout(()=>n(null),i)})}function h2(i,n){return new Promise((u,f)=>{(async()=>{for(let v=0;v<1/0;v++)try{const h=await i(v);if(!n(v,null,h)){u(h);return}}catch(h){if(!n(v,h)){f(h);return}}})()})}function p2(i){return("0"+i.toString(16)).substr(-2)}function v2(){const n=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",u=s.length;let f="";for(let v=0;v<56;v++)f+=s.charAt(Math.floor(Math.random()*u));return f}return crypto.getRandomValues(n),Array.from(n,p2).join("")}async function m2(i){const s=new TextEncoder().encode(i),u=await crypto.subtle.digest("SHA-256",s),f=new Uint8Array(u);return Array.from(f).map(v=>String.fromCharCode(v)).join("")}async function g2(i){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),i;const s=await m2(i);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function jf(i,n,s=!1){const u=v2();let f=u;s&&(f+="/recovery"),await $f(i,`${n}-code-verifier`,f);const v=await g2(u);return[v,u===v?"plain":"s256"]}const y2=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function w2(i){const n=i.headers.get($S);if(!n||!n.match(y2))return null;try{return new Date(`${n}T00:00:00.0Z`)}catch{return null}}function b2(i){if(!i)throw new Error("Missing exp claim");const n=Math.floor(Date.now()/1e3);if(i<=n)throw new Error("JWT has expired")}function S2(i){switch(i){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const x2=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ml(i){if(!x2.test(i))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function To(i){if(!i.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function pS(){const i={};return new Proxy(i,{get:(n,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const u=s.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function _2(i,n){return new Proxy(i,{get:(s,u,f)=>{if(u==="__isInsecureUserWarningProxy")return!0;if(typeof u=="symbol"){const v=u.toString();if(v==="Symbol(Symbol.toPrimitive)"||v==="Symbol(Symbol.toStringTag)"||v==="Symbol(util.inspect.custom)"||v==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,u,f)}return!n.value&&typeof u=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),n.value=!0),Reflect.get(s,u,f)}})}function vC(i){return JSON.parse(JSON.stringify(i))}const Ic=i=>{if(typeof i=="object"&&i!==null){const n=i;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error}return JSON.stringify(i)},E2=[502,503,504,520,521,522,523,524,530];async function mC(i){var n;if(!d2(i))throw new IS(Ic(i),0);if(E2.includes(i.status))throw new IS(Ic(i),i.status);let s;try{s=await i.json()}catch(v){throw new Oo(Ic(v),v)}let u;const f=w2(i);if(f&&f.getTime()>=S1["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?u=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(u=s.error_code),u){if(u==="weak_password")throw new dC(Ic(s),i.status,((n=s.weak_password)===null||n===void 0?void 0:n.reasons)||[]);if(u==="session_not_found")throw new zr}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((v,h)=>v&&typeof h=="string",!0))throw new dC(Ic(s),i.status,s.weak_password.reasons);throw new ZL(Ic(s),i.status||500,u)}const k2=(i,n,s,u)=>{const f={method:i,headers:(n==null?void 0:n.headers)||{}};return i==="GET"?f:(f.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},n==null?void 0:n.headers),f.body=JSON.stringify(u),Object.assign(Object.assign({},f),s))};async function it(i,n,s,u){var f;const v=Object.assign({},u==null?void 0:u.headers);v[$S]||(v[$S]=S1["2024-01-01"].name),u!=null&&u.jwt&&(v.Authorization=`Bearer ${u.jwt}`);const h=(f=u==null?void 0:u.query)!==null&&f!==void 0?f:{};u!=null&&u.redirectTo&&(h.redirect_to=u.redirectTo);const g=Object.keys(h).length?"?"+new URLSearchParams(h).toString():"",b=await C2(i,n,s+g,{headers:v,noResolveJson:u==null?void 0:u.noResolveJson},{},u==null?void 0:u.body);return u!=null&&u.xform?u==null?void 0:u.xform(b):{data:Object.assign({},b),error:null}}async function C2(i,n,s,u,f,v){const h=k2(n,u,f,v);let g;try{g=await i(s,Object.assign({},h))}catch(b){throw console.error(b),new IS(Ic(b),0)}if(g.ok||await mC(g),u!=null&&u.noResolveJson)return g;try{return await g.json()}catch(b){await mC(b)}}function Xa(i){var n;let s=null;O2(i)&&(s=Object.assign({},i),i.expires_at||(s.expires_at=l2(i.expires_in)));const u=(n=i.user)!==null&&n!==void 0?n:null;return{data:{session:s,user:u},error:null}}function gC(i){const n=Xa(i);return!n.error&&i.weak_password&&typeof i.weak_password=="object"&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.message&&typeof i.weak_password.message=="string"&&i.weak_password.reasons.reduce((s,u)=>s&&typeof u=="string",!0)&&(n.data.weak_password=i.weak_password),n}function wu(i){var n;return{data:{user:(n=i.user)!==null&&n!==void 0?n:i},error:null}}function T2(i){return{data:i,error:null}}function R2(i){const{action_link:n,email_otp:s,hashed_token:u,redirect_to:f,verification_type:v}=i,h=zy(i,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),g={action_link:n,email_otp:s,hashed_token:u,redirect_to:f,verification_type:v},b=Object.assign({},h);return{data:{properties:g,user:b},error:null}}function yC(i){return i}function O2(i){return!!i.access_token&&!!i.refresh_token&&!!i.expires_in}const vS=["global","local","others"];class A2{_encodePathSegment(n){if(n==="."||n==="..")throw new Ff("Invalid path segment");return encodeURIComponent(n)}constructor({url:n="",headers:s={},fetch:u,experimental:f}){this.url=n,this.headers=s,this.fetch=E1(u),this.experimental=f??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(n,s=vS[0]){if(vS.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${vS.join(", ")}`);try{return await it(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:n,noResolveJson:!0}),{data:null,error:null}}catch(u){if(He(u))return{data:null,error:u};throw u}}async inviteUserByEmail(n,s={}){try{return await it(this.fetch,"POST",`${this.url}/invite`,{body:{email:n,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:wu})}catch(u){if(He(u))return{data:{user:null},error:u};throw u}}async generateLink(n){try{const{options:s}=n,u=zy(n,["options"]),f=Object.assign(Object.assign({},u),s);return"newEmail"in u&&(f.new_email=u==null?void 0:u.newEmail,delete f.newEmail),await it(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:f,headers:this.headers,xform:R2,redirectTo:s==null?void 0:s.redirectTo})}catch(s){if(He(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(n){try{return await it(this.fetch,"POST",`${this.url}/admin/users`,{body:n,headers:this.headers,xform:wu})}catch(s){if(He(s))return{data:{user:null},error:s};throw s}}async listUsers(n){var s,u,f,v,h,g,b;try{const _={nextPage:null,lastPage:0,total:0},k=await it(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(u=(s=n==null?void 0:n.page)===null||s===void 0?void 0:s.toString())!==null&&u!==void 0?u:"",per_page:(v=(f=n==null?void 0:n.perPage)===null||f===void 0?void 0:f.toString())!==null&&v!==void 0?v:""},xform:yC});if(k.error)throw k.error;const R=await k.json(),N=(h=k.headers.get("x-total-count"))!==null&&h!==void 0?h:0,A=(b=(g=k.headers.get("link"))===null||g===void 0?void 0:g.split(","))!==null&&b!==void 0?b:[];return A.length>0&&(A.forEach(j=>{const P=parseInt(j.split(";")[0].split("=")[1].substring(0,1)),F=JSON.parse(j.split(";")[1].split("=")[1]);_[`${F}Page`]=P}),_.total=parseInt(N)),{data:Object.assign(Object.assign({},R),_),error:null}}catch(_){if(He(_))return{data:{users:[]},error:_};throw _}}async getUserById(n){ml(n);try{return await it(this.fetch,"GET",`${this.url}/admin/users/${n}`,{headers:this.headers,xform:wu})}catch(s){if(He(s))return{data:{user:null},error:s};throw s}}async updateUserById(n,s){ml(n);try{return await it(this.fetch,"PUT",`${this.url}/admin/users/${n}`,{body:s,headers:this.headers,xform:wu})}catch(u){if(He(u))return{data:{user:null},error:u};throw u}}async deleteUser(n,s=!1){ml(n);try{return await it(this.fetch,"DELETE",`${this.url}/admin/users/${n}`,{headers:this.headers,body:{should_soft_delete:s},xform:wu})}catch(u){if(He(u))return{data:{user:null},error:u};throw u}}async _listFactors(n){ml(n.userId);try{const{data:s,error:u}=await it(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/factors`,{headers:this.headers,xform:f=>({data:{factors:f},error:null})});return{data:s,error:u}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _deleteFactor(n){ml(n.userId),ml(n.id);try{return{data:await it(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/factors/${n.id}`,{headers:this.headers}),error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _listOAuthClients(n){var s,u,f,v,h,g,b;try{const _={nextPage:null,lastPage:0,total:0},k=await it(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(u=(s=n==null?void 0:n.page)===null||s===void 0?void 0:s.toString())!==null&&u!==void 0?u:"",per_page:(v=(f=n==null?void 0:n.perPage)===null||f===void 0?void 0:f.toString())!==null&&v!==void 0?v:""},xform:yC});if(k.error)throw k.error;const R=await k.json(),N=(h=k.headers.get("x-total-count"))!==null&&h!==void 0?h:0,A=(b=(g=k.headers.get("link"))===null||g===void 0?void 0:g.split(","))!==null&&b!==void 0?b:[];return A.length>0&&(A.forEach(j=>{const P=parseInt(j.split(";")[0].split("=")[1].substring(0,1)),F=JSON.parse(j.split(";")[1].split("=")[1]);_[`${F}Page`]=P}),_.total=parseInt(N)),{data:Object.assign(Object.assign({},R),_),error:null}}catch(_){if(He(_))return{data:{clients:[]},error:_};throw _}}async _createOAuthClient(n){try{return await it(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _getOAuthClient(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"GET",`${this.url}/admin/oauth/clients/${s}`,{headers:this.headers,xform:u=>({data:u,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _updateOAuthClient(n,s){try{const u=this._encodePathSegment(n);return await it(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${u}`,{body:s,headers:this.headers,xform:f=>({data:f,error:null})})}catch(u){if(He(u))return{data:null,error:u};throw u}}async _deleteOAuthClient(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${s}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"POST",`${this.url}/admin/oauth/clients/${s}/regenerate_secret`,{headers:this.headers,xform:u=>({data:u,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _listCustomProviders(n){try{const s={};return n!=null&&n.type&&(s.type=n.type),await it(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:u=>{var f;return{data:{providers:(f=u==null?void 0:u.providers)!==null&&f!==void 0?f:[]},error:null}}})}catch(s){if(He(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(n){try{return await it(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _getCustomProvider(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"GET",`${this.url}/admin/custom-providers/${s}`,{headers:this.headers,xform:u=>({data:u,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _updateCustomProvider(n,s){try{const u=this._encodePathSegment(n);return await it(this.fetch,"PUT",`${this.url}/admin/custom-providers/${u}`,{body:s,headers:this.headers,xform:f=>({data:f,error:null})})}catch(u){if(He(u))return{data:null,error:u};throw u}}async _deleteCustomProvider(n){try{const s=this._encodePathSegment(n);return await it(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${s}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}async _adminListPasskeys(n){To(this.experimental),ml(n.userId);try{return await it(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(He(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(n){To(this.experimental),ml(n.userId),ml(n.passkeyId);try{return await it(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/passkeys/${n.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(He(s))return{data:null,error:s};throw s}}}function wC(i={}){return{getItem:n=>i[n]||null,setItem:(n,s)=>{i[n]=s},removeItem:n=>{delete i[n]}}}const ms={debug:!!(globalThis&&_1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class k1 extends Error{constructor(n){super(n),this.isAcquireTimeout=!0}}class bC extends k1{}async function D2(i,n,s){ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",i,n);const u=new globalThis.AbortController;let f;n>0&&(f=setTimeout(()=>{u.abort(),ms.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",i)},n)),await Promise.resolve();try{return await globalThis.navigator.locks.request(i,n===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:u.signal},async v=>{if(v){clearTimeout(f),ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",i,v.name);try{return await s()}finally{ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",i,v.name)}}else{if(n===0)throw ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",i),new bC(`Acquiring an exclusive Navigator LockManager lock "${i}" immediately failed`);if(ms.debug)try{const h=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(h,null," "))}catch(h){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",h)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(f),await s()}})}catch(v){if(n>0&&clearTimeout(f),v!==null&&typeof v=="object"&&"name"in v&&v.name==="AbortError"&&n>0){if(u.signal.aborted)return ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",i),console.warn(`@supabase/gotrue-js: Lock "${i}" was not released within ${n}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(i,{mode:"exclusive",steal:!0},async h=>{if(h){ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",i,h.name);try{return await s()}finally{ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",i,h.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await s()}));throw ms.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",i),new bC(`Lock "${i}" was released because another request stole it`)}throw v}}function N2(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function C1(i){if(!/^0x[a-fA-F0-9]{40}$/.test(i))throw new Error(`@supabase/auth-js: Address "${i}" is invalid.`);return i.toLowerCase()}function j2(i){return parseInt(i,16)}function L2(i){const n=new TextEncoder().encode(i);return"0x"+Array.from(n,u=>u.toString(16).padStart(2,"0")).join("")}function P2(i){var n;const{chainId:s,domain:u,expirationTime:f,issuedAt:v=new Date,nonce:h,notBefore:g,requestId:b,resources:_,scheme:k,uri:R,version:N}=i;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!u)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(h&&h.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${h}`);if(!R)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(N!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${N}`);if(!((n=i.statement)===null||n===void 0)&&n.includes(`
269
269
  `))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${i.statement}`)}const A=C1(i.address),j=k?`${k}://${u}`:u,P=i.statement?`${i.statement}
270
270
  `:"",F=`${j} wants you to sign in with your Ethereum account:
271
271
  ${A}
@@ -280,8 +280,8 @@ Not Before: ${g.toISOString()}`),b&&(Y+=`
280
280
  Request ID: ${b}`),_){let q=`
281
281
  Resources:`;for(const I of _){if(!I||typeof I!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${I}`);q+=`
282
282
  - ${I}`}Y+=q}return`${F}
283
- ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var v;super(n,{cause:u}),this.__isWebAuthnError=!0,this.name=(v=f??(u instanceof Error?u.name:void 0))!==null&&v!==void 0?v:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class jy extends wr{constructor(n,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:n}),this.name="WebAuthnUnknownError",this.originalError=s}}function P2({error:i,options:n}){var s,u,f;const{publicKey:v}=n;if(!v)throw Error("options was missing required publicKey property");if(i.name==="AbortError"){if(n.signal instanceof AbortSignal)return new wr({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:i})}else if(i.name==="ConstraintError"){if(((s=v.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new wr({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:i});if(n.mediation==="conditional"&&((u=v.authenticatorSelection)===null||u===void 0?void 0:u.userVerification)==="required")return new wr({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:i});if(((f=v.authenticatorSelection)===null||f===void 0?void 0:f.userVerification)==="required")return new wr({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:i})}else{if(i.name==="InvalidStateError")return new wr({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:i});if(i.name==="NotAllowedError")return new wr({message:i.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i});if(i.name==="NotSupportedError")return v.pubKeyCredParams.filter(g=>g.type==="public-key").length===0?new wr({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:i}):new wr({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:i});if(i.name==="SecurityError"){const h=window.location.hostname;if(T1(h)){if(v.rp.id!==h)return new wr({message:`The RP ID "${v.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:i})}else return new wr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:i})}else if(i.name==="TypeError"){if(v.user.id.byteLength<1||v.user.id.byteLength>64)return new wr({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:i})}else if(i.name==="UnknownError")return new wr({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:i})}return new wr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i})}function U2({error:i,options:n}){const{publicKey:s}=n;if(!s)throw Error("options was missing required publicKey property");if(i.name==="AbortError"){if(n.signal instanceof AbortSignal)return new wr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:i})}else{if(i.name==="NotAllowedError")return new wr({message:i.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i});if(i.name==="SecurityError"){const u=window.location.hostname;if(T1(u)){if(s.rpId!==u)return new wr({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:i})}else return new wr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:i})}else if(i.name==="UnknownError")return new wr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:i})}return new wr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i})}class M2{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const n=new AbortController;return this.controller=n,n.signal}cancelCeremony(){if(this.controller){const n=new Error("Manually cancelling existing WebAuthn API call");n.name="AbortError",this.controller.abort(n),this.controller=void 0}}}const FS=new M2;function SC(i){if(!i)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(i);const{challenge:n,user:s,excludeCredentials:u}=i,f=zy(i,["challenge","user","excludeCredentials"]),v=zf(n).buffer,h=Object.assign(Object.assign({},s),{id:zf(s.id).buffer}),g=Object.assign(Object.assign({},f),{challenge:v,user:h});if(u&&u.length>0){g.excludeCredentials=new Array(u.length);for(let b=0;b<u.length;b++){const _=u[b];g.excludeCredentials[b]=Object.assign(Object.assign({},_),{id:zf(_.id).buffer,type:_.type||"public-key",transports:_.transports})}}return g}function xC(i){if(!i)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(i);const{challenge:n,allowCredentials:s}=i,u=zy(i,["challenge","allowCredentials"]),f=zf(n).buffer,v=Object.assign(Object.assign({},u),{challenge:f});if(s&&s.length>0){v.allowCredentials=new Array(s.length);for(let h=0;h<s.length;h++){const g=s[h];v.allowCredentials[h]=Object.assign(Object.assign({},g),{id:zf(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return v}function _C(i){var n;if("toJSON"in i&&typeof i.toJSON=="function")return i.toJSON();const s=i;return{id:i.id,rawId:i.id,response:{attestationObject:Fc(new Uint8Array(i.response.attestationObject)),clientDataJSON:Fc(new Uint8Array(i.response.clientDataJSON))},type:"public-key",clientExtensionResults:i.getClientExtensionResults(),authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function EC(i){var n;if("toJSON"in i&&typeof i.toJSON=="function")return i.toJSON();const s=i,u=i.getClientExtensionResults(),f=i.response;return{id:i.id,rawId:i.id,response:{authenticatorData:Fc(new Uint8Array(f.authenticatorData)),clientDataJSON:Fc(new Uint8Array(f.clientDataJSON)),signature:Fc(new Uint8Array(f.signature)),userHandle:f.userHandle?Fc(new Uint8Array(f.userHandle)):void 0},type:"public-key",clientExtensionResults:u,authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function T1(i){return i==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(i)}function Ly(){var i,n;return!!(oi()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((i=navigator==null?void 0:navigator.credentials)===null||i===void 0?void 0:i.create)=="function"&&typeof((n=navigator==null?void 0:navigator.credentials)===null||n===void 0?void 0:n.get)=="function")}async function R1(i){try{const n=await navigator.credentials.create(i);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new jy("Browser returned unexpected credential type",n)}:{data:null,error:new jy("Empty credential response",n)}}catch(n){return{data:null,error:P2({error:n,options:i})}}}async function O1(i){try{const n=await navigator.credentials.get(i);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new jy("Browser returned unexpected credential type",n)}:{data:null,error:new jy("Empty credential response",n)}}catch(n){return{data:null,error:U2({error:n,options:i})}}}const $2={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},I2={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Py(...i){const n=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),s=f=>f instanceof ArrayBuffer||ArrayBuffer.isView(f),u={};for(const f of i)if(f)for(const v in f){const h=f[v];if(h!==void 0)if(Array.isArray(h))u[v]=h;else if(s(h))u[v]=h;else if(n(h)){const g=u[v];n(g)?u[v]=Py(g,h):u[v]=Py(h)}else u[v]=h}return u}function z2(i,n){return Py($2,i,n||{})}function F2(i,n){return Py(I2,i,n||{})}class B2{constructor(n){this.client=n,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(n){return this.client.mfa.enroll(Object.assign(Object.assign({},n),{factorType:"webauthn"}))}async _challenge({factorId:n,webauthn:s,friendlyName:u,signal:f},v){var h;try{const{data:g,error:b}=await this.client.mfa.challenge({factorId:n,webauthn:s});if(!g)return{data:null,error:b};const _=f??FS.createNewAbortSignal();if(g.webauthn.type==="create"){const{user:k}=g.webauthn.credential_options.publicKey;if(!k.name){const R=u;if(R)k.name=`${k.id}:${R}`;else{const A=(await this.client.getUser()).data.user,j=((h=A==null?void 0:A.user_metadata)===null||h===void 0?void 0:h.name)||(A==null?void 0:A.email)||(A==null?void 0:A.id)||"User";k.name=`${k.id}:${j}`}}k.displayName||(k.displayName=k.name)}switch(g.webauthn.type){case"create":{const k=z2(g.webauthn.credential_options.publicKey,v==null?void 0:v.create),{data:R,error:N}=await R1({publicKey:k,signal:_});return R?{data:{factorId:n,challengeId:g.id,webauthn:{type:g.webauthn.type,credential_response:R}},error:null}:{data:null,error:N}}case"request":{const k=F2(g.webauthn.credential_options.publicKey,v==null?void 0:v.request),{data:R,error:N}=await O1(Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:k,signal:_}));return R?{data:{factorId:n,challengeId:g.id,webauthn:{type:g.webauthn.type,credential_response:R}},error:null}:{data:null,error:N}}}}catch(g){return He(g)?{data:null,error:g}:{data:null,error:new Oo("Unexpected error in challenge",g)}}}async _verify({challengeId:n,factorId:s,webauthn:u}){return this.client.mfa.verify({factorId:s,challengeId:n,webauthn:u})}async _authenticate({factorId:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:u=typeof window<"u"?[window.location.origin]:void 0,signal:f}={}},v){if(!s)return{data:null,error:new Ff("rpId is required for WebAuthn authentication")};try{if(!Ly())return{data:null,error:new Oo("Browser does not support WebAuthn",null)};const{data:h,error:g}=await this.challenge({factorId:n,webauthn:{rpId:s,rpOrigins:u},signal:f},{request:v});if(!h)return{data:null,error:g};const{webauthn:b}=h;return this._verify({factorId:n,challengeId:h.challengeId,webauthn:{type:b.type,rpId:s,rpOrigins:u,credential_response:b.credential_response}})}catch(h){return He(h)?{data:null,error:h}:{data:null,error:new Oo("Unexpected error in authenticate",h)}}}async _register({friendlyName:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:u=typeof window<"u"?[window.location.origin]:void 0,signal:f}={}},v){if(!s)return{data:null,error:new Ff("rpId is required for WebAuthn registration")};try{if(!Ly())return{data:null,error:new Oo("Browser does not support WebAuthn",null)};const{data:h,error:g}=await this._enroll({friendlyName:n});if(!h)return await this.client.mfa.listFactors().then(k=>{var R;return(R=k.data)===null||R===void 0?void 0:R.all.find(N=>N.factor_type==="webauthn"&&N.friendly_name===n&&N.status!=="unverified")}).then(k=>k?this.client.mfa.unenroll({factorId:k==null?void 0:k.id}):void 0),{data:null,error:g};const{data:b,error:_}=await this._challenge({factorId:h.id,friendlyName:h.friendly_name,webauthn:{rpId:s,rpOrigins:u},signal:f},{create:v});return b?this._verify({factorId:h.id,challengeId:b.challengeId,webauthn:{rpId:s,rpOrigins:u,type:b.webauthn.type,credential_response:b.webauthn.credential_response}}):{data:null,error:_}}catch(h){return He(h)?{data:null,error:h}:{data:null,error:new Oo("Unexpected error in register",h)}}}}D2();const H2={url:YL,storageKey:GL,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:KL,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function kC(i,n,s){return await s()}const Lf={};class dv{get jwks(){var n,s;return(s=(n=Lf[this.storageKey])===null||n===void 0?void 0:n.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(n){Lf[this.storageKey]=Object.assign(Object.assign({},Lf[this.storageKey]),{jwks:n})}get jwks_cached_at(){var n,s;return(s=(n=Lf[this.storageKey])===null||n===void 0?void 0:n.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(n){Lf[this.storageKey]=Object.assign(Object.assign({},Lf[this.storageKey]),{cachedAt:n})}constructor(n){var s,u,f,v;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const h=Object.assign(Object.assign({},H2),n);if(this.storageKey=h.storageKey,this.instanceID=(s=dv.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,dv.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!h.debug,typeof h.debug=="function"&&(this.logger=h.debug),this.instanceID>0&&oi()){const g=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(g),this.logDebugMessages&&console.trace(g)}if(this.persistSession=h.persistSession,this.autoRefreshToken=h.autoRefreshToken,this.experimental=(u=h.experimental)!==null&&u!==void 0?u:{},this.admin=new O2({url:h.url,headers:h.headers,fetch:h.fetch,experimental:this.experimental}),this.url=h.url,this.headers=h.headers,this.fetch=E1(h.fetch),this.lock=h.lock||kC,this.detectSessionInUrl=h.detectSessionInUrl,this.flowType=h.flowType,this.hasCustomAuthorizationHeader=h.hasCustomAuthorizationHeader,this.throwOnError=h.throwOnError,this.lockAcquireTimeout=h.lockAcquireTimeout,h.lock?this.lock=h.lock:this.persistSession&&oi()&&(!((f=globalThis==null?void 0:globalThis.navigator)===null||f===void 0)&&f.locks)?this.lock=A2:this.lock=kC,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new B2(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(h.storage?this.storage=h.storage:_1()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=wC(this.memoryStorage)),h.userStorage&&(this.userStorage=h.userStorage)):(this.memoryStorage={},this.storage=wC(this.memoryStorage)),oi()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(g){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",g)}(v=this.broadcastChannel)===null||v===void 0||v.addEventListener("message",async g=>{this._debug("received broadcast notification from other tab or client",g);try{await this._notifyAllSubscribers(g.data.event,g.data.session,!1)}catch(b){this._debug("#broadcastChannel","error",b)}})}h.skipAutoInitialize||this.initialize().catch(g=>{this._debug("#initialize()","error",g)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(n){if(this.throwOnError&&n&&n.error)throw n.error;return n}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${b1}) ${new Date().toISOString()}`}_debug(...n){return this.logDebugMessages&&this.logger(this._logPrefix(),...n),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var n;try{let s={},u="none";if(oi()&&(s=u2(window.location.href),this._isImplicitGrantCallback(s)?u="implicit":await this._isPKCECallback(s)&&(u="pkce")),oi()&&this.detectSessionInUrl&&u!=="none"){const{data:f,error:v}=await this._getSessionFromURL(s,u);if(v){if(this._debug("#_initialize()","error detecting session from URL",v),e2(v)){const b=(n=v.details)===null||n===void 0?void 0:n.code;if(b==="identity_already_exists"||b==="identity_not_found"||b==="single_identity_not_deletable")return{error:v}}return{error:v}}const{session:h,redirectType:g}=f;return this._debug("#_initialize()","detected session in URL",h,"redirect type",g),await this._saveSession(h),setTimeout(async()=>{g==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",h):await this._notifyAllSubscribers("SIGNED_IN",h)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return He(s)?this._returnResult({error:s}):this._returnResult({error:new Oo("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(n){var s,u,f;try{const v=await it(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(u=(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.data)!==null&&u!==void 0?u:{},gotrue_meta_security:{captcha_token:(f=n==null?void 0:n.options)===null||f===void 0?void 0:f.captchaToken}},xform:Xa}),{data:h,error:g}=v;if(g||!h)return this._returnResult({data:{user:null,session:null},error:g});const b=h.session,_=h.user;return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",b)),this._returnResult({data:{user:_,session:b},error:null})}catch(v){if(He(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signUp(n){var s,u,f;try{let v;if("email"in n){const{email:k,password:R,options:N}=n;let A=null,j=null;this.flowType==="pkce"&&([A,j]=await jf(this.storage,this.storageKey)),v=await it(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:N==null?void 0:N.emailRedirectTo,body:{email:k,password:R,data:(s=N==null?void 0:N.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:N==null?void 0:N.captchaToken},code_challenge:A,code_challenge_method:j},xform:Xa})}else if("phone"in n){const{phone:k,password:R,options:N}=n;v=await it(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:k,password:R,data:(u=N==null?void 0:N.data)!==null&&u!==void 0?u:{},channel:(f=N==null?void 0:N.channel)!==null&&f!==void 0?f:"sms",gotrue_meta_security:{captcha_token:N==null?void 0:N.captchaToken}},xform:Xa})}else throw new gy("You must provide either an email or phone number and a password");const{data:h,error:g}=v;if(g||!h)return await ai(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:g});const b=h.session,_=h.user;return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",b)),this._returnResult({data:{user:_,session:b},error:null})}catch(v){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithPassword(n){try{let s;if("email"in n){const{email:v,password:h,options:g}=n;s=await it(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:v,password:h,gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:gC})}else if("phone"in n){const{phone:v,password:h,options:g}=n;s=await it(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:v,password:h,gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:gC})}else throw new gy("You must provide either an email or phone number and a password");const{data:u,error:f}=s;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!u||!u.session||!u.user){const v=new Nf;return this._returnResult({data:{user:null,session:null},error:v})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),this._returnResult({data:Object.assign({user:u.user,session:u.session},u.weak_password?{weakPassword:u.weak_password}:null),error:f})}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(n){var s,u,f,v;return await this._handleProviderSignIn(n.provider,{redirectTo:(s=n.options)===null||s===void 0?void 0:s.redirectTo,scopes:(u=n.options)===null||u===void 0?void 0:u.scopes,queryParams:(f=n.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:(v=n.options)===null||v===void 0?void 0:v.skipBrowserRedirect})}async exchangeCodeForSession(n){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(n))}async signInWithWeb3(n){const{chain:s}=n;switch(s){case"ethereum":return await this.signInWithEthereum(n);case"solana":return await this.signInWithSolana(n);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(n){var s,u,f,v,h,g,b,_,k,R,N;let A,j;if("message"in n)A=n.message,j=n.signature;else{const{chain:P,wallet:F,statement:Y,options:q}=n;let I;if(oi())if(typeof F=="object")I=F;else{const oe=window;if("ethereum"in oe&&typeof oe.ethereum=="object"&&"request"in oe.ethereum&&typeof oe.ethereum.request=="function")I=oe.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof F!="object"||!(q!=null&&q.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");I=F}const ie=new URL((s=q==null?void 0:q.url)!==null&&s!==void 0?s:window.location.href),le=await I.request({method:"eth_requestAccounts"}).then(oe=>oe).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!le||le.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const fe=C1(le[0]);let ne=(u=q==null?void 0:q.signInWithEthereum)===null||u===void 0?void 0:u.chainId;if(!ne){const oe=await I.request({method:"eth_chainId"});ne=N2(oe)}const $e={domain:ie.host,address:fe,statement:Y,uri:ie.href,version:"1",chainId:ne,nonce:(f=q==null?void 0:q.signInWithEthereum)===null||f===void 0?void 0:f.nonce,issuedAt:(h=(v=q==null?void 0:q.signInWithEthereum)===null||v===void 0?void 0:v.issuedAt)!==null&&h!==void 0?h:new Date,expirationTime:(g=q==null?void 0:q.signInWithEthereum)===null||g===void 0?void 0:g.expirationTime,notBefore:(b=q==null?void 0:q.signInWithEthereum)===null||b===void 0?void 0:b.notBefore,requestId:(_=q==null?void 0:q.signInWithEthereum)===null||_===void 0?void 0:_.requestId,resources:(k=q==null?void 0:q.signInWithEthereum)===null||k===void 0?void 0:k.resources};A=L2($e),j=await I.request({method:"personal_sign",params:[j2(A),fe]})}try{const{data:P,error:F}=await it(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:A,signature:j},!((R=n.options)===null||R===void 0)&&R.captchaToken?{gotrue_meta_security:{captcha_token:(N=n.options)===null||N===void 0?void 0:N.captchaToken}}:null),xform:Xa});if(F)throw F;if(!P||!P.session||!P.user){const Y=new Nf;return this._returnResult({data:{user:null,session:null},error:Y})}return P.session&&(await this._saveSession(P.session),await this._notifyAllSubscribers("SIGNED_IN",P.session)),this._returnResult({data:Object.assign({},P),error:F})}catch(P){if(He(P))return this._returnResult({data:{user:null,session:null},error:P});throw P}}async signInWithSolana(n){var s,u,f,v,h,g,b,_,k,R,N,A;let j,P;if("message"in n)j=n.message,P=n.signature;else{const{chain:F,wallet:Y,statement:q,options:I}=n;let ie;if(oi())if(typeof Y=="object")ie=Y;else{const fe=window;if("solana"in fe&&typeof fe.solana=="object"&&("signIn"in fe.solana&&typeof fe.solana.signIn=="function"||"signMessage"in fe.solana&&typeof fe.solana.signMessage=="function"))ie=fe.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof Y!="object"||!(I!=null&&I.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");ie=Y}const le=new URL((s=I==null?void 0:I.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in ie&&ie.signIn){const fe=await ie.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},I==null?void 0:I.signInWithSolana),{version:"1",domain:le.host,uri:le.href}),q?{statement:q}:null));let ne;if(Array.isArray(fe)&&fe[0]&&typeof fe[0]=="object")ne=fe[0];else if(fe&&typeof fe=="object"&&"signedMessage"in fe&&"signature"in fe)ne=fe;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in ne&&"signature"in ne&&(typeof ne.signedMessage=="string"||ne.signedMessage instanceof Uint8Array)&&ne.signature instanceof Uint8Array)j=typeof ne.signedMessage=="string"?ne.signedMessage:new TextDecoder().decode(ne.signedMessage),P=ne.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in ie)||typeof ie.signMessage!="function"||!("publicKey"in ie)||typeof ie!="object"||!ie.publicKey||!("toBase58"in ie.publicKey)||typeof ie.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");j=[`${le.host} wants you to sign in with your Solana account:`,ie.publicKey.toBase58(),...q?["",q,""]:[""],"Version: 1",`URI: ${le.href}`,`Issued At: ${(f=(u=I==null?void 0:I.signInWithSolana)===null||u===void 0?void 0:u.issuedAt)!==null&&f!==void 0?f:new Date().toISOString()}`,...!((v=I==null?void 0:I.signInWithSolana)===null||v===void 0)&&v.notBefore?[`Not Before: ${I.signInWithSolana.notBefore}`]:[],...!((h=I==null?void 0:I.signInWithSolana)===null||h===void 0)&&h.expirationTime?[`Expiration Time: ${I.signInWithSolana.expirationTime}`]:[],...!((g=I==null?void 0:I.signInWithSolana)===null||g===void 0)&&g.chainId?[`Chain ID: ${I.signInWithSolana.chainId}`]:[],...!((b=I==null?void 0:I.signInWithSolana)===null||b===void 0)&&b.nonce?[`Nonce: ${I.signInWithSolana.nonce}`]:[],...!((_=I==null?void 0:I.signInWithSolana)===null||_===void 0)&&_.requestId?[`Request ID: ${I.signInWithSolana.requestId}`]:[],...!((R=(k=I==null?void 0:I.signInWithSolana)===null||k===void 0?void 0:k.resources)===null||R===void 0)&&R.length?["Resources",...I.signInWithSolana.resources.map(ne=>`- ${ne}`)]:[]].join(`
284
- `);const fe=await ie.signMessage(new TextEncoder().encode(j),"utf8");if(!fe||!(fe instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");P=fe}}try{const{data:F,error:Y}=await it(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:j,signature:Fc(P)},!((N=n.options)===null||N===void 0)&&N.captchaToken?{gotrue_meta_security:{captcha_token:(A=n.options)===null||A===void 0?void 0:A.captchaToken}}:null),xform:Xa});if(Y)throw Y;if(!F||!F.session||!F.user){const q=new Nf;return this._returnResult({data:{user:null,session:null},error:q})}return F.session&&(await this._saveSession(F.session),await this._notifyAllSubscribers("SIGNED_IN",F.session)),this._returnResult({data:Object.assign({},F),error:Y})}catch(F){if(He(F))return this._returnResult({data:{user:null,session:null},error:F});throw F}}async _exchangeCodeForSession(n){const s=await Mc(this.storage,`${this.storageKey}-code-verifier`),[u,f]=(s??"").split("/");try{if(!u&&this.flowType==="pkce")throw new t2;const{data:v,error:h}=await it(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:n,code_verifier:u},xform:Xa});if(await ai(this.storage,`${this.storageKey}-code-verifier`),h)throw h;if(!v||!v.session||!v.user){const g=new Nf;return this._returnResult({data:{user:null,session:null,redirectType:null},error:g})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers(f==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",v.session)),this._returnResult({data:Object.assign(Object.assign({},v),{redirectType:f??null}),error:h})}catch(v){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(v))return this._returnResult({data:{user:null,session:null,redirectType:null},error:v});throw v}}async signInWithIdToken(n){try{const{options:s,provider:u,token:f,access_token:v,nonce:h}=n,g=await it(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:u,id_token:f,access_token:v,nonce:h,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Xa}),{data:b,error:_}=g;if(_)return this._returnResult({data:{user:null,session:null},error:_});if(!b||!b.session||!b.user){const k=new Nf;return this._returnResult({data:{user:null,session:null},error:k})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:b,error:_})}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(n){var s,u,f,v,h;try{if("email"in n){const{email:g,options:b}=n;let _=null,k=null;this.flowType==="pkce"&&([_,k]=await jf(this.storage,this.storageKey));const{error:R}=await it(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:g,data:(s=b==null?void 0:b.data)!==null&&s!==void 0?s:{},create_user:(u=b==null?void 0:b.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:b==null?void 0:b.captchaToken},code_challenge:_,code_challenge_method:k},redirectTo:b==null?void 0:b.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:R})}if("phone"in n){const{phone:g,options:b}=n,{data:_,error:k}=await it(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:g,data:(f=b==null?void 0:b.data)!==null&&f!==void 0?f:{},create_user:(v=b==null?void 0:b.shouldCreateUser)!==null&&v!==void 0?v:!0,gotrue_meta_security:{captcha_token:b==null?void 0:b.captchaToken},channel:(h=b==null?void 0:b.channel)!==null&&h!==void 0?h:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:_==null?void 0:_.message_id},error:k})}throw new gy("You must provide either an email or phone number.")}catch(g){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async verifyOtp(n){var s,u;try{let f,v;"options"in n&&(f=(s=n.options)===null||s===void 0?void 0:s.redirectTo,v=(u=n.options)===null||u===void 0?void 0:u.captchaToken);const{data:h,error:g}=await it(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},n),{gotrue_meta_security:{captcha_token:v}}),redirectTo:f,xform:Xa});if(g)throw g;if(!h)throw new Error("An error occurred on token verification.");const b=h.session,_=h.user;return b!=null&&b.access_token&&(await this._saveSession(b),await this._notifyAllSubscribers(n.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",b)),this._returnResult({data:{user:_,session:b},error:null})}catch(f){if(He(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async signInWithSSO(n){var s,u,f,v,h;try{let g=null,b=null;this.flowType==="pkce"&&([g,b]=await jf(this.storage,this.storageKey));const _=await it(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in n?{provider_id:n.providerId}:null),"domain"in n?{domain:n.domain}:null),{redirect_to:(u=(s=n.options)===null||s===void 0?void 0:s.redirectTo)!==null&&u!==void 0?u:void 0}),!((f=n==null?void 0:n.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:n.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:g,code_challenge_method:b}),headers:this.headers,xform:C2});return!((v=_.data)===null||v===void 0)&&v.url&&oi()&&!(!((h=n.options)===null||h===void 0)&&h.skipBrowserRedirect)&&window.location.assign(_.data.url),this._returnResult(_)}catch(g){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(g))return this._returnResult({data:null,error:g});throw g}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;if(u)throw u;if(!s)throw new zr;const{error:f}=await it(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:f})})}catch(n){if(He(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async resend(n){try{const s=`${this.url}/resend`;if("email"in n){const{email:u,type:f,options:v}=n,{error:h}=await it(this.fetch,"POST",s,{headers:this.headers,body:{email:u,type:f,gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken}},redirectTo:v==null?void 0:v.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}else if("phone"in n){const{phone:u,type:f,options:v}=n,{data:h,error:g}=await it(this.fetch,"POST",s,{headers:this.headers,body:{phone:u,type:f,gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:h==null?void 0:h.message_id},error:g})}throw new gy("You must provide either an email or phone number and a type")}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async s=>s))}async _acquireLock(n,s){this._debug("#_acquireLock","begin",n);try{if(this.lockAcquired){const u=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),f=(async()=>(await u,await s()))();return this.pendingInLock.push((async()=>{try{await f}catch{}})()),f}return await this.lock(`lock:${this.storageKey}`,n,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const u=s();for(this.pendingInLock.push((async()=>{try{await u}catch{}})()),await u;this.pendingInLock.length;){const f=[...this.pendingInLock];await Promise.all(f),this.pendingInLock.splice(0,f.length)}return await u}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(n){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await n(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let n=null;const s=await Mc(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?n=s:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!n)return{data:{session:null},error:null};const u=n.expires_at?n.expires_at*1e3-Date.now()<fS:!1;if(this._debug("#__loadSession()",`session has${u?"":" not"} expired`,"expires_at",n.expires_at),!u){if(this.userStorage){const h=await Mc(this.userStorage,this.storageKey+"-user");h!=null&&h.user?n.user=h.user:n.user=pS()}if(this.storage.isServer&&n.user&&!n.user.__isUserNotAvailableProxy){const h={value:this.suppressGetSessionWarning};n.user=x2(n.user,h),h.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:n},error:null}}const{data:f,error:v}=await this._callRefreshToken(n.refresh_token);return v?this._returnResult({data:{session:null},error:v}):this._returnResult({data:{session:f},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(n){if(n)return await this._getUser(n);await this.initializePromise;const s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(n){try{return n?await it(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:n,xform:wu}):await this._useSession(async s=>{var u,f,v;const{data:h,error:g}=s;if(g)throw g;return!(!((u=h.session)===null||u===void 0)&&u.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new zr}:await it(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(v=(f=h.session)===null||f===void 0?void 0:f.access_token)!==null&&v!==void 0?v:void 0,xform:wu})})}catch(s){if(He(s))return my(s)&&(await this._removeSession(),await ai(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(n,s={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(n,s))}async _updateUser(n,s={}){try{return await this._useSession(async u=>{const{data:f,error:v}=u;if(v)throw v;if(!f.session)throw new zr;const h=f.session;let g=null,b=null;this.flowType==="pkce"&&n.email!=null&&([g,b]=await jf(this.storage,this.storageKey));const{data:_,error:k}=await it(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s==null?void 0:s.emailRedirectTo,body:Object.assign(Object.assign({},n),{code_challenge:g,code_challenge_method:b}),jwt:h.access_token,xform:wu});if(k)throw k;return h.user=_.user,await this._saveSession(h),await this._notifyAllSubscribers("USER_UPDATED",h),this._returnResult({data:{user:h.user},error:null})})}catch(u){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(u))return this._returnResult({data:{user:null},error:u});throw u}}async setSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(n))}async _setSession(n){try{if(!n.access_token||!n.refresh_token)throw new zr;const s=Date.now()/1e3;let u=s,f=!0,v=null;const{payload:h}=wy(n.access_token);if(h.exp&&(u=h.exp,f=u<=s),f){const{data:g,error:b}=await this._callRefreshToken(n.refresh_token);if(b)return this._returnResult({data:{user:null,session:null},error:b});if(!g)return{data:{user:null,session:null},error:null};v=g}else{const{data:g,error:b}=await this._getUser(n.access_token);if(b)return this._returnResult({data:{user:null,session:null},error:b});v={access_token:n.access_token,refresh_token:n.refresh_token,user:g.user,token_type:"bearer",expires_in:u-s,expires_at:u},await this._saveSession(v),await this._notifyAllSubscribers("SIGNED_IN",v)}return this._returnResult({data:{user:v.user,session:v},error:null})}catch(s){if(He(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(n))}async _refreshSession(n){try{return await this._useSession(async s=>{var u;if(!n){const{data:h,error:g}=s;if(g)throw g;n=(u=h.session)!==null&&u!==void 0?u:void 0}if(!(n!=null&&n.refresh_token))throw new zr;const{data:f,error:v}=await this._callRefreshToken(n.refresh_token);return v?this._returnResult({data:{user:null,session:null},error:v}):f?this._returnResult({data:{user:f.user,session:f},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(n,s){var u;try{if(!oi())throw new yy("No browser detected.");if(n.error||n.error_description||n.error_code)throw new yy(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new cC("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new yy("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!n.code)throw new cC("No code detected.");const{data:I,error:ie}=await this._exchangeCodeForSession(n.code);if(ie)throw ie;const le=new URL(window.location.href);return le.searchParams.delete("code"),window.history.replaceState(window.history.state,"",le.toString()),{data:{session:I.session,redirectType:(u=I.redirectType)!==null&&u!==void 0?u:null},error:null}}const{provider_token:f,provider_refresh_token:v,access_token:h,refresh_token:g,expires_in:b,expires_at:_,token_type:k}=n;if(!h||!b||!g||!k)throw new yy("No session defined in URL");const R=Math.round(Date.now()/1e3),N=parseInt(b);let A=R+N;_&&(A=parseInt(_));const j=A-R;j*1e3<=Mf&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${j}s, should have been closer to ${N}s`);const P=A-N;R-P>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",P,A,R):R-P<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",P,A,R);const{data:F,error:Y}=await this._getUser(h);if(Y)throw Y;const q={provider_token:f,provider_refresh_token:v,access_token:h,expires_in:N,expires_at:A,refresh_token:g,token_type:k,user:F.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:q,redirectType:n.type},error:null})}catch(f){if(He(f))return this._returnResult({data:{session:null,redirectType:null},error:f});throw f}}_isImplicitGrantCallback(n){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),n):!!(n.access_token||n.error_description)}async _isPKCECallback(n){const s=await Mc(this.storage,`${this.storageKey}-code-verifier`);return!!(n.code&&s)}async signOut(n={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(n))}async _signOut({scope:n}={scope:"global"}){return await this._useSession(async s=>{var u;const{data:f,error:v}=s;if(v&&!my(v))return this._returnResult({error:v});const h=(u=f.session)===null||u===void 0?void 0:u.access_token;if(h){const{error:g}=await this.admin.signOut(h,n);if(g&&!(ZL(g)&&(g.status===404||g.status===401||g.status===403)||my(g)))return this._returnResult({error:g})}return n!=="others"&&(await this._removeSession(),await ai(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(n){const s=l2(),u={id:s,callback:n,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,u),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)})))(),{data:{subscription:u}}}async _emitInitialSession(n){return await this._useSession(async s=>{var u,f;try{const{data:{session:v},error:h}=s;if(h)throw h;await((u=this.stateChangeEmitters.get(n))===null||u===void 0?void 0:u.callback("INITIAL_SESSION",v)),this._debug("INITIAL_SESSION","callback id",n,"session",v)}catch(v){await((f=this.stateChangeEmitters.get(n))===null||f===void 0?void 0:f.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",n,"error",v),my(v)?console.warn(v):console.error(v)}})}async resetPasswordForEmail(n,s={}){let u=null,f=null;this.flowType==="pkce"&&([u,f]=await jf(this.storage,this.storageKey,!0));try{return await it(this.fetch,"POST",`${this.url}/recover`,{body:{email:n,code_challenge:u,code_challenge_method:f,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(v){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(v))return this._returnResult({data:null,error:v});throw v}}async getUserIdentities(){var n;try{const{data:s,error:u}=await this.getUser();if(u)throw u;return this._returnResult({data:{identities:(n=s.user.identities)!==null&&n!==void 0?n:[]},error:null})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(n){return"token"in n?this.linkIdentityIdToken(n):this.linkIdentityOAuth(n)}async linkIdentityOAuth(n){var s;try{const{data:u,error:f}=await this._useSession(async v=>{var h,g,b,_,k;const{data:R,error:N}=v;if(N)throw N;const A=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,n.provider,{redirectTo:(h=n.options)===null||h===void 0?void 0:h.redirectTo,scopes:(g=n.options)===null||g===void 0?void 0:g.scopes,queryParams:(b=n.options)===null||b===void 0?void 0:b.queryParams,skipBrowserRedirect:!0});return await it(this.fetch,"GET",A,{headers:this.headers,jwt:(k=(_=R.session)===null||_===void 0?void 0:_.access_token)!==null&&k!==void 0?k:void 0})});if(f)throw f;return oi()&&!(!((s=n.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(u==null?void 0:u.url),this._returnResult({data:{provider:n.provider,url:u==null?void 0:u.url},error:null})}catch(u){if(He(u))return this._returnResult({data:{provider:n.provider,url:null},error:u});throw u}}async linkIdentityIdToken(n){return await this._useSession(async s=>{var u;try{const{error:f,data:{session:v}}=s;if(f)throw f;const{options:h,provider:g,token:b,access_token:_,nonce:k}=n,R=await it(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(u=v==null?void 0:v.access_token)!==null&&u!==void 0?u:void 0,body:{provider:g,id_token:b,access_token:_,nonce:k,link_identity:!0,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Xa}),{data:N,error:A}=R;return A?this._returnResult({data:{user:null,session:null},error:A}):!N||!N.session||!N.user?this._returnResult({data:{user:null,session:null},error:new Nf}):(N.session&&(await this._saveSession(N.session),await this._notifyAllSubscribers("USER_UPDATED",N.session)),this._returnResult({data:N,error:A}))}catch(f){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}})}async unlinkIdentity(n){try{return await this._useSession(async s=>{var u,f;const{data:v,error:h}=s;if(h)throw h;return await it(this.fetch,"DELETE",`${this.url}/user/identities/${n.identity_id}`,{headers:this.headers,jwt:(f=(u=v.session)===null||u===void 0?void 0:u.access_token)!==null&&f!==void 0?f:void 0})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(n){const s=`#_refreshAccessToken(${n.substring(0,5)}...)`;this._debug(s,"begin");try{const u=Date.now();return await f2(async f=>(f>0&&await d2(200*Math.pow(2,f-1)),this._debug(s,"refreshing attempt",f),await it(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:n},headers:this.headers,xform:Xa})),(f,v)=>{const h=200*Math.pow(2,f);return v&&hS(v)&&Date.now()+h-u<Mf})}catch(u){if(this._debug(s,"error",u),He(u))return this._returnResult({data:{session:null,user:null},error:u});throw u}finally{this._debug(s,"end")}}_isValidSession(n){return typeof n=="object"&&n!==null&&"access_token"in n&&"refresh_token"in n&&"expires_at"in n}async _handleProviderSignIn(n,s){const u=await this._getUrlForProvider(`${this.url}/authorize`,n,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",n,"options",s,"url",u),oi()&&!s.skipBrowserRedirect&&window.location.assign(u),{data:{provider:n,url:u},error:null}}async _recoverAndRefresh(){var n,s;const u="#_recoverAndRefresh()";this._debug(u,"begin");try{const f=await Mc(this.storage,this.storageKey);if(f&&this.userStorage){let h=await Mc(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!h&&(h={user:f.user},await $f(this.userStorage,this.storageKey+"-user",h)),f.user=(n=h==null?void 0:h.user)!==null&&n!==void 0?n:pS()}else if(f&&!f.user&&!f.user){const h=await Mc(this.storage,this.storageKey+"-user");h&&(h!=null&&h.user)?(f.user=h.user,await ai(this.storage,this.storageKey+"-user"),await $f(this.storage,this.storageKey,f)):f.user=pS()}if(this._debug(u,"session from storage",f),!this._isValidSession(f)){this._debug(u,"session is not valid"),f!==null&&await this._removeSession();return}const v=((s=f.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<fS;if(this._debug(u,`session has${v?"":" not"} expired with margin of ${fS}s`),v){if(this.autoRefreshToken&&f.refresh_token){const{error:h}=await this._callRefreshToken(f.refresh_token);h&&(console.error(h),hS(h)||(this._debug(u,"refresh failed with a non-retryable error, removing the session",h),await this._removeSession()))}}else if(f.user&&f.user.__isUserNotAvailableProxy===!0)try{const{data:h,error:g}=await this._getUser(f.access_token);!g&&(h!=null&&h.user)?(f.user=h.user,await this._saveSession(f),await this._notifyAllSubscribers("SIGNED_IN",f)):this._debug(u,"could not get user data, skipping SIGNED_IN notification")}catch(h){console.error("Error getting user data:",h),this._debug(u,"error getting user data, skipping SIGNED_IN notification",h)}else await this._notifyAllSubscribers("SIGNED_IN",f)}catch(f){this._debug(u,"error",f),console.error(f);return}finally{this._debug(u,"end")}}async _callRefreshToken(n){var s,u;if(!n)throw new zr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const f=`#_callRefreshToken(${n.substring(0,5)}...)`;this._debug(f,"begin");try{this.refreshingDeferred=new Hy;const{data:v,error:h}=await this._refreshAccessToken(n);if(h)throw h;if(!v.session)throw new zr;await this._saveSession(v.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",v.session);const g={data:v.session,error:null};return this.refreshingDeferred.resolve(g),g}catch(v){if(this._debug(f,"error",v),He(v)){const h={data:null,error:v};return hS(v)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(h),h}throw(u=this.refreshingDeferred)===null||u===void 0||u.reject(v),v}finally{this.refreshingDeferred=null,this._debug(f,"end")}}async _notifyAllSubscribers(n,s,u=!0){const f=`#_notifyAllSubscribers(${n})`;this._debug(f,"begin",s,`broadcast = ${u}`);try{this.broadcastChannel&&u&&this.broadcastChannel.postMessage({event:n,session:s});const v=[],h=Array.from(this.stateChangeEmitters.values()).map(async g=>{try{await g.callback(n,s)}catch(b){v.push(b)}});if(await Promise.all(h),v.length>0){for(let g=0;g<v.length;g+=1)console.error(v[g]);throw v[0]}}finally{this._debug(f,"end")}}async _saveSession(n){this._debug("#_saveSession()",n),this.suppressGetSessionWarning=!0,await ai(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},n),u=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!u&&s.user&&await $f(this.userStorage,this.storageKey+"-user",{user:s.user});const f=Object.assign({},s);delete f.user;const v=vC(f);await $f(this.storage,this.storageKey,v)}else{const f=vC(s);await $f(this.storage,this.storageKey,f)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ai(this.storage,this.storageKey),await ai(this.storage,this.storageKey+"-code-verifier"),await ai(this.storage,this.storageKey+"-user"),this.userStorage&&await ai(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const n=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{n&&oi()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",n)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const n=setInterval(()=>this._autoRefreshTokenTick(),Mf);this.autoRefreshTicker=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const n=this.autoRefreshTicker;this.autoRefreshTicker=null,n&&clearInterval(n);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const n=Date.now();try{return await this._useSession(async s=>{const{data:{session:u}}=s;if(!u||!u.refresh_token||!u.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const f=Math.floor((u.expires_at*1e3-n)/Mf);this._debug("#_autoRefreshTokenTick()",`access token expires in ${f} ticks, a tick lasts ${Mf}ms, refresh threshold is ${MS} ticks`),f<=MS&&await this._callRefreshToken(u.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(n){if(n instanceof k1)this._debug("auto refresh token tick lock not available");else throw n}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!oi()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(n){this._debug("#visibilityChangedCallback","error",n)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(n){console.error("_handleVisibilityChange",n)}}async _onVisibilityChanged(n){const s=`#_onVisibilityChanged(${n})`;this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),n||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(n,s,u){const f=[`provider=${encodeURIComponent(s)}`];if(u!=null&&u.redirectTo&&f.push(`redirect_to=${encodeURIComponent(u.redirectTo)}`),u!=null&&u.scopes&&f.push(`scopes=${encodeURIComponent(u.scopes)}`),this.flowType==="pkce"){const[v,h]=await jf(this.storage,this.storageKey),g=new URLSearchParams({code_challenge:`${encodeURIComponent(v)}`,code_challenge_method:`${encodeURIComponent(h)}`});f.push(g.toString())}if(u!=null&&u.queryParams){const v=new URLSearchParams(u.queryParams);f.push(v.toString())}return u!=null&&u.skipBrowserRedirect&&f.push(`skip_http_redirect=${u.skipBrowserRedirect}`),`${n}?${f.join("&")}`}async _unenroll(n){try{return await this._useSession(async s=>{var u;const{data:f,error:v}=s;return v?this._returnResult({data:null,error:v}):await it(this.fetch,"DELETE",`${this.url}/factors/${n.factorId}`,{headers:this.headers,jwt:(u=f==null?void 0:f.session)===null||u===void 0?void 0:u.access_token})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(n){try{return await this._useSession(async s=>{var u,f;const{data:v,error:h}=s;if(h)return this._returnResult({data:null,error:h});const g=Object.assign({friendly_name:n.friendlyName,factor_type:n.factorType},n.factorType==="phone"?{phone:n.phone}:n.factorType==="totp"?{issuer:n.issuer}:{}),{data:b,error:_}=await it(this.fetch,"POST",`${this.url}/factors`,{body:g,headers:this.headers,jwt:(u=v==null?void 0:v.session)===null||u===void 0?void 0:u.access_token});return _?this._returnResult({data:null,error:_}):(n.factorType==="totp"&&b.type==="totp"&&(!((f=b==null?void 0:b.totp)===null||f===void 0)&&f.qr_code)&&(b.totp.qr_code=`data:image/svg+xml;utf-8,${b.totp.qr_code}`),this._returnResult({data:b,error:null}))})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _verify(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var u;const{data:f,error:v}=s;if(v)return this._returnResult({data:null,error:v});const h=Object.assign({challenge_id:n.challengeId},"webauthn"in n?{webauthn:Object.assign(Object.assign({},n.webauthn),{credential_response:n.webauthn.type==="create"?_C(n.webauthn.credential_response):EC(n.webauthn.credential_response)})}:{code:n.code}),{data:g,error:b}=await it(this.fetch,"POST",`${this.url}/factors/${n.factorId}/verify`,{body:h,headers:this.headers,jwt:(u=f==null?void 0:f.session)===null||u===void 0?void 0:u.access_token});return b?this._returnResult({data:null,error:b}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+g.expires_in},g)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",g),this._returnResult({data:g,error:b}))})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}})}async _challenge(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var u;const{data:f,error:v}=s;if(v)return this._returnResult({data:null,error:v});const h=await it(this.fetch,"POST",`${this.url}/factors/${n.factorId}/challenge`,{body:n,headers:this.headers,jwt:(u=f==null?void 0:f.session)===null||u===void 0?void 0:u.access_token});if(h.error)return h;const{data:g}=h;if(g.type!=="webauthn")return{data:g,error:null};switch(g.webauthn.type){case"create":return{data:Object.assign(Object.assign({},g),{webauthn:Object.assign(Object.assign({},g.webauthn),{credential_options:Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:SC(g.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},g),{webauthn:Object.assign(Object.assign({},g.webauthn),{credential_options:Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:xC(g.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}})}async _challengeAndVerify(n){const{data:s,error:u}=await this._challenge({factorId:n.factorId});return u?this._returnResult({data:null,error:u}):await this._verify({factorId:n.factorId,challengeId:s.id,code:n.code})}async _listFactors(){var n;const{data:{user:s},error:u}=await this.getUser();if(u)return{data:null,error:u};const f={all:[],phone:[],totp:[],webauthn:[]};for(const v of(n=s==null?void 0:s.factors)!==null&&n!==void 0?n:[])f.all.push(v),v.status==="verified"&&f[v.factor_type].push(v);return{data:f,error:null}}async _getAuthenticatorAssuranceLevel(n){var s,u,f,v;if(n)try{const{payload:A}=wy(n);let j=null;A.aal&&(j=A.aal);let P=j;const{data:{user:F},error:Y}=await this.getUser(n);if(Y)return this._returnResult({data:null,error:Y});((u=(s=F==null?void 0:F.factors)===null||s===void 0?void 0:s.filter(ie=>ie.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(P="aal2");const I=A.amr||[];return{data:{currentLevel:j,nextLevel:P,currentAuthenticationMethods:I},error:null}}catch(A){if(He(A))return this._returnResult({data:null,error:A});throw A}const{data:{session:h},error:g}=await this.getSession();if(g)return this._returnResult({data:null,error:g});if(!h)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:b}=wy(h.access_token);let _=null;b.aal&&(_=b.aal);let k=_;((v=(f=h.user.factors)===null||f===void 0?void 0:f.filter(A=>A.status==="verified"))!==null&&v!==void 0?v:[]).length>0&&(k="aal2");const N=b.amr||[];return{data:{currentLevel:_,nextLevel:k,currentAuthenticationMethods:N},error:null}}async _getAuthorizationDetails(n){try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;return f?this._returnResult({data:null,error:f}):u?await it(this.fetch,"GET",`${this.url}/oauth/authorizations/${n}`,{headers:this.headers,jwt:u.access_token,xform:v=>({data:v,error:null})}):this._returnResult({data:null,error:new zr})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(n,s){try{return await this._useSession(async u=>{const{data:{session:f},error:v}=u;if(v)return this._returnResult({data:null,error:v});if(!f)return this._returnResult({data:null,error:new zr});const h=await it(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:f.access_token,body:{action:"approve"},xform:g=>({data:g,error:null})});return h.data&&h.data.redirect_url&&oi()&&!(s!=null&&s.skipBrowserRedirect)&&window.location.assign(h.data.redirect_url),h})}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async _denyAuthorization(n,s){try{return await this._useSession(async u=>{const{data:{session:f},error:v}=u;if(v)return this._returnResult({data:null,error:v});if(!f)return this._returnResult({data:null,error:new zr});const h=await it(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:f.access_token,body:{action:"deny"},xform:g=>({data:g,error:null})});return h.data&&h.data.redirect_url&&oi()&&!(s!=null&&s.skipBrowserRedirect)&&window.location.assign(h.data.redirect_url),h})}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async _listOAuthGrants(){try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;return u?this._returnResult({data:null,error:u}):s?await it(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:f=>({data:f,error:null})}):this._returnResult({data:null,error:new zr})})}catch(n){if(He(n))return this._returnResult({data:null,error:n});throw n}}async _revokeOAuthGrant(n){try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;return f?this._returnResult({data:null,error:f}):u?(await it(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:u.access_token,query:{client_id:n.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new zr})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(n,s={keys:[]}){let u=s.keys.find(g=>g.kid===n);if(u)return u;const f=Date.now();if(u=this.jwks.keys.find(g=>g.kid===n),u&&this.jwks_cached_at+XL>f)return u;const{data:v,error:h}=await it(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(h)throw h;return!v.keys||v.keys.length===0||(this.jwks=v,this.jwks_cached_at=f,u=v.keys.find(g=>g.kid===n),!u)?null:u}async getClaims(n,s={}){try{let u=n;if(!u){const{data:A,error:j}=await this.getSession();if(j||!A.session)return this._returnResult({data:null,error:j});u=A.session.access_token}const{header:f,payload:v,signature:h,raw:{header:g,payload:b}}=wy(u);s!=null&&s.allowExpired||w2(v.exp);const _=!f.alg||f.alg.startsWith("HS")||!f.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(f.kid,s!=null&&s.keys?{keys:s.keys}:s==null?void 0:s.jwks);if(!_){const{error:A}=await this.getUser(u);if(A)throw A;return{data:{claims:v,header:f,signature:h},error:null}}const k=b2(f.alg),R=await crypto.subtle.importKey("jwk",_,k,!0,["verify"]);if(!await crypto.subtle.verify(k,R,h,o2(`${g}.${b}`)))throw new zS("Invalid JWT signature");return{data:{claims:v,header:f,signature:h},error:null}}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async signInWithPasskey(n){var s,u,f;To(this.experimental);try{if(!Ly())return this._returnResult({data:null,error:new Oo("Browser does not support WebAuthn",null)});const{data:v,error:h}=await this._startPasskeyAuthentication({options:{captchaToken:(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.captchaToken}});if(h||!v)return this._returnResult({data:null,error:h});const g=xC(v.options),b=(f=(u=n==null?void 0:n.options)===null||u===void 0?void 0:u.signal)!==null&&f!==void 0?f:FS.createNewAbortSignal(),{data:_,error:k}=await O1({publicKey:g,signal:b});if(k||!_)return this._returnResult({data:null,error:k??new Oo("WebAuthn ceremony failed",null)});const R=EC(_);return this._verifyPasskeyAuthentication({challengeId:v.challenge_id,credential:R})}catch(v){if(He(v))return this._returnResult({data:null,error:v});throw v}}async registerPasskey(n){var s,u;To(this.experimental);try{if(!Ly())return this._returnResult({data:null,error:new Oo("Browser does not support WebAuthn",null)});const{data:f,error:v}=await this._startPasskeyRegistration();if(v||!f)return this._returnResult({data:null,error:v});const h=SC(f.options),g=(u=(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.signal)!==null&&u!==void 0?u:FS.createNewAbortSignal(),{data:b,error:_}=await R1({publicKey:h,signal:g});if(_||!b)return this._returnResult({data:null,error:_??new Oo("WebAuthn ceremony failed",null)});const k=_C(b);return this._verifyPasskeyRegistration({challengeId:f.challenge_id,credential:k})}catch(f){if(He(f))return this._returnResult({data:null,error:f});throw f}}async _startPasskeyRegistration(){To(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;if(u)return this._returnResult({data:null,error:u});if(!s)return this._returnResult({data:null,error:new zr});const{data:f,error:v}=await it(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return v?this._returnResult({data:null,error:v}):this._returnResult({data:f,error:null})})}catch(n){if(He(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyRegistration(n){To(this.experimental);try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;if(f)return this._returnResult({data:null,error:f});if(!u)return this._returnResult({data:null,error:new zr});const{data:v,error:h}=await it(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:u.access_token,body:{challenge_id:n.challengeId,credential:n.credential}});return h?this._returnResult({data:null,error:h}):this._returnResult({data:v,error:null})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(n){var s;To(this.experimental);try{const{data:u,error:f}=await it(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.captchaToken}}});return f?this._returnResult({data:null,error:f}):this._returnResult({data:u,error:null})}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async _verifyPasskeyAuthentication(n){To(this.experimental);try{const{data:s,error:u}=await it(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:n.challengeId,credential:n.credential},xform:Xa});return u?this._returnResult({data:null,error:u}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){To(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;if(u)return this._returnResult({data:null,error:u});if(!s)return this._returnResult({data:null,error:new zr});const{data:f,error:v}=await it(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:h=>({data:h,error:null})});return v?this._returnResult({data:null,error:v}):this._returnResult({data:f,error:null})})}catch(n){if(He(n))return this._returnResult({data:null,error:n});throw n}}async _updatePasskey(n){To(this.experimental);try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;if(f)return this._returnResult({data:null,error:f});if(!u)return this._returnResult({data:null,error:new zr});const{data:v,error:h}=await it(this.fetch,"PATCH",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:u.access_token,body:{friendly_name:n.friendlyName}});return h?this._returnResult({data:null,error:h}):this._returnResult({data:v,error:null})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(n){To(this.experimental);try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;if(f)return this._returnResult({data:null,error:f});if(!u)return this._returnResult({data:null,error:new zr});const{error:v}=await it(this.fetch,"DELETE",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:u.access_token,noResolveJson:!0});return v?this._returnResult({data:null,error:v}):this._returnResult({data:null,error:null})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}}dv.nextInstanceID={};const V2=dv,W2="2.106.1";let rv="";typeof Deno<"u"?rv="deno":typeof document<"u"?rv="web":typeof navigator<"u"&&navigator.product==="ReactNative"?rv="react-native":rv="node";const q2={"X-Client-Info":`supabase-js-${rv}/${W2}`},Y2={headers:q2},G2={schema:"public"},K2={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},J2={},X2={enabled:!1,respectSamplingDecision:!0};function Q2(i,n,s,u){function f(v){return v instanceof s?v:new s(function(h){h(v)})}return new(s||(s=Promise))(function(v,h){function g(k){try{_(u.next(k))}catch(R){h(R)}}function b(k){try{_(u.throw(k))}catch(R){h(R)}}function _(k){k.done?v(k.value):f(k.value).then(g,b)}_((u=u.apply(i,[])).next())})}let mS=null;const Z2="@opentelemetry/api";function eP(){return mS===null&&(mS=import(Z2).catch(()=>null)),mS}function tP(){return Q2(this,void 0,void 0,function*(){try{const i=yield eP();if(!i||!i.propagation||!i.context)return null;const n={};i.propagation.inject(i.context.active(),n);const s=n.traceparent;return s?{traceparent:s,tracestate:n.tracestate,baggage:n.baggage}:null}catch{return null}})}function nP(i){if(!i||typeof i!="string")return null;const n=i.split("-");if(n.length!==4)return null;const[s,u,f,v]=n;if(s.length!==2||u.length!==32||f.length!==16||v.length!==2)return null;const h=/^[0-9a-f]+$/i;return!h.test(s)||!h.test(u)||!h.test(f)||!h.test(v)||u==="00000000000000000000000000000000"||f==="0000000000000000"?null:{version:s,traceId:u,parentId:f,traceFlags:v,isSampled:(parseInt(v,16)&1)===1}}function rP(i,n){if(!i||!n||n.length===0)return!1;let s;if(i instanceof URL)s=i;else try{s=new URL(i)}catch{return!1}for(const u of n)try{if(typeof u=="string"){if(iP(s.hostname,u))return!0}else if(u instanceof RegExp){if(u.test(s.hostname))return!0}else if(typeof u=="function"&&u(s))return!0}catch{continue}return!1}function iP(i,n){if(n===i)return!0;if(n.startsWith("*.")){const s=n.slice(2);if(i.endsWith(s)&&(i===s||i.endsWith("."+s)))return!0}return!1}function aP(i){const n=[];try{const s=new URL(i);n.push(s.hostname)}catch{}return n.push("*.supabase.co","*.supabase.in"),n.push("localhost","127.0.0.1","[::1]"),n}function fv(i){"@babel/helpers - typeof";return fv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fv(i)}function oP(i,n){if(fv(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var u=s.call(i,n);if(fv(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function sP(i){var n=oP(i,"string");return fv(n)=="symbol"?n:n+""}function lP(i,n,s){return(n=sP(n))in i?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,i}function CC(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);n&&(u=u.filter(function(f){return Object.getOwnPropertyDescriptor(i,f).enumerable})),s.push.apply(s,u)}return s}function lr(i){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?CC(Object(s),!0).forEach(function(u){lP(i,u,s[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):CC(Object(s)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(s,u))})}return i}const uP=i=>i?(...n)=>i(...n):(...n)=>fetch(...n),cP=()=>Headers,dP=(i,n,s,u,f)=>{const v=uP(u),h=cP(),g=(f==null?void 0:f.enabled)===!0,b=(f==null?void 0:f.respectSamplingDecision)!==!1,_=g?aP(n):null;return async(k,R)=>{var N;const A=(N=await s())!==null&&N!==void 0?N:i;let j=new h(R==null?void 0:R.headers);if(j.has("apikey")||j.set("apikey",i),j.has("Authorization")||j.set("Authorization",`Bearer ${A}`),_){const P=await fP(k,_,b);P&&(P.traceparent&&!j.has("traceparent")&&j.set("traceparent",P.traceparent),P.tracestate&&!j.has("tracestate")&&j.set("tracestate",P.tracestate),P.baggage&&!j.has("baggage")&&j.set("baggage",P.baggage))}return v(k,lr(lr({},R),{},{headers:j}))}};async function fP(i,n,s){if(!rP(typeof i=="string"||i instanceof URL?i:i.url,n))return null;const u=await tP();if(!u||!u.traceparent)return null;if(s){const f=nP(u.traceparent);if(f&&!f.isSampled)return null}return u}function TC(i){return typeof i=="boolean"?{enabled:i}:i}function hP(i){return i.endsWith("/")?i:i+"/"}function pP(i,n){var s,u,f,v,h,g;const{db:b,auth:_,realtime:k,global:R}=i,{db:N,auth:A,realtime:j,global:P}=n,F=TC(i.tracePropagation),Y=TC(n.tracePropagation),q={db:lr(lr({},N),b),auth:lr(lr({},A),_),realtime:lr(lr({},j),k),storage:{},global:lr(lr(lr({},P),R),{},{headers:lr(lr({},(s=P==null?void 0:P.headers)!==null&&s!==void 0?s:{}),(u=R==null?void 0:R.headers)!==null&&u!==void 0?u:{})}),tracePropagation:{enabled:(f=(v=F==null?void 0:F.enabled)!==null&&v!==void 0?v:Y==null?void 0:Y.enabled)!==null&&f!==void 0?f:!1,respectSamplingDecision:(h=(g=F==null?void 0:F.respectSamplingDecision)!==null&&g!==void 0?g:Y==null?void 0:Y.respectSamplingDecision)!==null&&h!==void 0?h:!0},accessToken:async()=>""};return i.accessToken?q.accessToken=i.accessToken:delete q.accessToken,q}function vP(i){const n=i==null?void 0:i.trim();if(!n)throw new Error("supabaseUrl is required.");if(!n.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(hP(n))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var mP=class extends V2{constructor(i){super(i)}},gP=class{constructor(i,n,s){var u,f;this.supabaseUrl=i,this.supabaseKey=n;const v=vP(i);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",v),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",v),this.storageUrl=new URL("storage/v1",v),this.functionsUrl=new URL("functions/v1",v);const h=`sb-${v.hostname.split(".")[0]}-auth-token`,g={db:G2,realtime:J2,auth:lr(lr({},K2),{},{storageKey:h}),global:Y2,tracePropagation:X2},b=pP(s??{},g);if(this.settings=b,this.storageKey=(u=b.auth.storageKey)!==null&&u!==void 0?u:"",this.headers=(f=b.global.headers)!==null&&f!==void 0?f:{},b.accessToken)this.accessToken=b.accessToken,this.auth=new Proxy({},{get:(k,R)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(R)} is not possible`)}});else{var _;this.auth=this._initSupabaseAuthClient((_=b.auth)!==null&&_!==void 0?_:{},this.headers,b.global.fetch)}this.fetch=dP(n,i,this._getAccessToken.bind(this),b.global.fetch,b.tracePropagation),this.realtime=this._initRealtimeClient(lr({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},b.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(k=>this.realtime.setAuth(k)).catch(k=>console.warn("Failed to set initial Realtime auth token:",k)),this.rest=new jj(new URL("rest/v1",v).href,{headers:this.headers,schema:b.db.schema,fetch:this.fetch,timeout:b.db.timeout,urlLengthLimit:b.db.urlLengthLimit}),this.storage=new qL(this.storageUrl.href,this.headers,this.fetch,s==null?void 0:s.storage),b.accessToken||this._listenForAuthEvents()}get functions(){return new _j(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(i){return this.rest.from(i)}schema(i){return this.rest.schema(i)}rpc(i,n={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(i,n,s)}channel(i,n={config:{}}){return this.realtime.channel(i,n)}getChannels(){return this.realtime.getChannels()}removeChannel(i){return this.realtime.removeChannel(i)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var i=this,n,s;if(i.accessToken)return await i.accessToken();const{data:u}=await i.auth.getSession();return(n=(s=u.session)===null||s===void 0?void 0:s.access_token)!==null&&n!==void 0?n:i.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:i,persistSession:n,detectSessionInUrl:s,storage:u,userStorage:f,storageKey:v,flowType:h,lock:g,debug:b,throwOnError:_,experimental:k,lockAcquireTimeout:R,skipAutoInitialize:N},A,j){const P={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new mP({url:this.authUrl.href,headers:lr(lr({},P),A),storageKey:v,autoRefreshToken:i,persistSession:n,detectSessionInUrl:s,storage:u,userStorage:f,flowType:h,lock:g,debug:b,throwOnError:_,experimental:k,fetch:j,lockAcquireTimeout:R,skipAutoInitialize:N,hasCustomAuthorizationHeader:Object.keys(this.headers).some(F=>F.toLowerCase()==="authorization")})}_initRealtimeClient(i){return new vL(this.realtimeUrl.href,lr(lr({},i),{},{params:lr(lr({},{apikey:this.supabaseKey}),i==null?void 0:i.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((i,n)=>{this._handleTokenChanged(i,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(i,n,s){(i==="TOKEN_REFRESHED"||i==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):i==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const yP=(i,n,s)=>new gP(i,n,s);function wP(){if(typeof window<"u")return!1;const i=globalThis.process;if(!i)return!1;const n=i.version;if(n==null)return!1;const s=n.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}wP()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const RC="feedly_device_id",bP="feedly.auth.token";let by=null,$c=null;function A1(){if($c)return $c;try{const i=window.localStorage.getItem(RC);if(i)return $c=i,i;const n=crypto.randomUUID();return window.localStorage.setItem(RC,n),$c=n,n}catch{return $c||($c=crypto.randomUUID()),$c}}function SP(i,n){return by||(by=yP(i,n,{auth:{persistSession:!0,autoRefreshToken:!0,storageKey:bP,detectSessionInUrl:!0},global:{headers:{"x-feedly-device-id":A1()}}}),by)}async function xP(i,n){const s=n.trim();if(!s)return{ok:!1,error:"empty_email"};const{error:u}=await i.auth.signInWithOtp({email:s,options:{emailRedirectTo:typeof window<"u"?window.location.href:void 0}});return u?{ok:!1,error:u.message}:{ok:!0}}function _P(i,n){const[s,u]=G.useState({loading:!0,project:null});return G.useEffect(()=>{let f=!1;async function v(){const{data:g,error:b}=await i.from("projects").select("id, name, session_active").eq("id",n).maybeSingle();if(!f){if(b){console.warn("[feedly-widget] Failed to load project",b.message),u({loading:!1,project:null});return}u({loading:!1,project:g})}}v();const h=i.channel(`feedly:project:${n}`).on("postgres_changes",{event:"UPDATE",schema:"public",table:"projects",filter:`id=eq.${n}`},g=>{const b=g.new;u({loading:!1,project:b})}).subscribe();return()=>{f=!0,i.removeChannel(h)}},[i,n]),s}const tx="feedly_user";function EP(i){try{const n=window.localStorage.getItem(tx);if(!n)return null;const s=JSON.parse(n);return s.projectId!==i?null:s}catch{return null}}function Sy(i){try{window.localStorage.setItem(tx,JSON.stringify(i))}catch{}}function OC(){try{window.localStorage.removeItem(tx)}catch{}}const BS="feedly_pin_intent",kP=3e4;function CP(i,n){try{const s={projectId:i,annotationId:n,ts:Date.now()};window.localStorage.setItem(BS,JSON.stringify(s))}catch{}}function TP(i){try{const n=window.localStorage.getItem(BS);if(!n)return null;const s=JSON.parse(n);return window.localStorage.removeItem(BS),s.projectId!==i||Date.now()-s.ts>kP?null:s.annotationId}catch{return null}}const AC=["#E8593C","#1D9E75","#7F77DD","#D4537E","#378ADD","#BA7517","#639922","#888780"];function RP(i){return AC[i%AC.length]}function OP(i){return`feedly:bcast:${i}`}function AP(i){return`feedly:bcast-testers:${i}`}const HS="feedly";function DP(i,n){var b;const[s,u]=G.useState({identity:null,isAdmin:!1,initializing:!0});G.useEffect(()=>{let _=!1;async function k(){const R=EP(n);if(R){u({identity:R,isAdmin:!1,initializing:!1});const{data:Y,error:q}=await i.from("testers").select("id, is_admin").eq("id",R.id).maybeSingle();if(_||q)return;if(!Y)OC(),u({identity:null,isAdmin:!1,initializing:!1});else{u(I=>({...I,isAdmin:!!Y.is_admin}));return}}const{data:N}=await i.auth.getSession();if(_)return;if(!N.session){u({identity:null,isAdmin:!1,initializing:!1});return}const{data:A,error:j}=await i.rpc("feedly_link_tester_by_email",{p_project_id:n});if(_)return;const P=A;if(j||!P||P.error||!P.tester_id||!P.name||!P.color){u({identity:null,isAdmin:!1,initializing:!1});return}const F={id:P.tester_id,name:P.name,color:P.color,projectId:n};Sy(F),typeof window<"u"&&(window.location.hash&&/access_token|refresh_token|provider_token|type=/.test(window.location.hash)&&window.history.replaceState(null,"",window.location.pathname+window.location.search),window.dispatchEvent(new CustomEvent("feedly:navigate"))),u({identity:F,isAdmin:!!P.is_admin,initializing:!1})}return k(),()=>{_=!0}},[i,n]),G.useEffect(()=>{var N;const _=(N=s.identity)==null?void 0:N.id;if(!_)return;const k=i.channel(`feedly:tester:${_}`).on("postgres_changes",{event:"UPDATE",schema:"public",table:"testers",filter:`id=eq.${_}`},A=>{const j=A.new;u(P=>({...P,isAdmin:!!j.is_admin}))}).subscribe(),R=i.channel(AP(n),{config:{broadcast:{self:!1}}}).on("broadcast",{event:HS},({payload:A})=>{!A||A.t!=="tester"||A.id!==_||i.from("testers").select("id, is_admin").eq("id",_).maybeSingle().then(({data:j})=>{j&&u(P=>({...P,isAdmin:!!j.is_admin}))})}).subscribe();return()=>{i.removeChannel(k),i.removeChannel(R)}},[i,n,(b=s.identity)==null?void 0:b.id]);const f=G.useCallback(async(_,k)=>{var I,ie;const R=_.trim();if(!R)return null;const N=(k==null?void 0:k.trim())||null,A=A1(),j=await i.from("testers").select("id, name, color, is_admin").eq("project_id",n).eq("device_id",A).maybeSingle();if(j.error)return console.warn("[feedly-widget] tester lookup failed",j.error.message),null;if(j.data){N&&await i.from("testers").update({email:N}).eq("id",j.data.id).is("email",null);const le={id:j.data.id,name:j.data.name,color:j.data.color,projectId:n};return Sy(le),u({identity:le,isAdmin:!!j.data.is_admin,initializing:!1}),le}const{data:P}=await i.rpc("feedly_next_color",{p_project_id:n}),F=P??RP(0),Y=await i.from("testers").insert({project_id:n,name:R,device_id:A,color:F,email:N}).select("id, name, color, is_admin").single();if(Y.error||!Y.data){if(((I=Y.error)==null?void 0:I.code)==="23505"){const le=await i.from("testers").select("id, name, color, is_admin").eq("project_id",n).eq("device_id",A).maybeSingle();if(le.data){const fe={id:le.data.id,name:le.data.name,color:le.data.color,projectId:n};return Sy(fe),u({identity:fe,isAdmin:!!le.data.is_admin,initializing:!1}),fe}}return console.warn("[feedly-widget] Failed to register tester",(ie=Y.error)==null?void 0:ie.message),null}const q={id:Y.data.id,name:Y.data.name,color:Y.data.color,projectId:n};return Sy(q),u({identity:q,isAdmin:!!Y.data.is_admin,initializing:!1}),q},[i,n]),v=G.useCallback(async()=>{const{data:_}=await i.rpc("feedly_claim_admin",{p_project_id:n});_&&_.is_admin&&u(k=>k.isAdmin?k:{...k,isAdmin:!0})},[i,n]),h=G.useCallback(_=>xP(i,_),[i]),g=G.useCallback(()=>{OC(),u({identity:null,isAdmin:!1,initializing:!1})},[]);return{...s,register:f,sendCrossDeviceLink:h,claimAdmin:v,signOut:g}}const Uy="feedly:navigate";let VS=!1,WS=[],My=null,DC=!1;function NP(){if(DC||typeof window>"u")return;DC=!0;const i=()=>{try{window.dispatchEvent(new CustomEvent(Uy))}catch{}},n=window.history.pushState;window.history.pushState=function(...u){const f=n.apply(this,u);return i(),f};const s=window.history.replaceState;window.history.replaceState=function(...u){const f=s.apply(this,u);return i(),f}}function jP({hostId:i}){if(VS)return()=>{};VS=!0,My=n;async function n(f,v={push:!0}){var h;try{const g=await fetch(f,{credentials:"same-origin"});if(!g.ok){window.location.href=f;return}const b=await g.text(),_=new DOMParser().parseFromString(b,"text/html"),k=document.getElementById(i),R=document.getElementById("feedly-widget-pins");k==null||k.remove(),R==null||R.remove(),document.body.replaceChildren(...Array.from(_.body.childNodes).map(A=>A.cloneNode(!0))),document.body.querySelectorAll("script").forEach(A=>{const j=document.createElement("script");for(const P of Array.from(A.attributes))j.setAttribute(P.name,P.value);j.textContent=A.textContent,A.replaceWith(j)}),R&&document.body.appendChild(R),k&&document.body.appendChild(k);const N=(h=_.querySelector("title"))==null?void 0:h.textContent;N&&(document.title=N),v.push&&history.pushState({feedlySoftNav:!0},"",f),window.scrollTo(0,0),window.dispatchEvent(new CustomEvent(Uy))}catch{window.location.href=f}}function s(f){var b,_;if(f.defaultPrevented||f.button!==0||f.metaKey||f.ctrlKey||f.shiftKey||f.altKey)return;const v=(_=(b=f.target)==null?void 0:b.closest)==null?void 0:_.call(b,"a");if(!v||v.hasAttribute("data-no-feedly-nav")||v.hasAttribute("download")||v.target&&v.target!=="_self")return;const h=v.getAttribute("href");if(!h||h.startsWith("#")||h.startsWith("mailto:")||h.startsWith("tel:"))return;const g=new URL(v.href,location.href);g.origin===location.origin&&(g.pathname===location.pathname&&g.search===location.search&&g.hash||(f.preventDefault(),n(g.toString(),{push:!0})))}function u(){n(location.href,{push:!1})}return document.addEventListener("click",s,!0),window.addEventListener("popstate",u),WS.push(()=>document.removeEventListener("click",s,!0),()=>window.removeEventListener("popstate",u)),D1}function D1(){WS.forEach(i=>i()),WS=[],VS=!1,My=null}function LP(i){return window.addEventListener(Uy,i),()=>window.removeEventListener(Uy,i)}async function NC(i){if(My){await My(i,{push:!0});return}window.location.href=i}function jC(i,n){try{const s=new URL(i,window.location.href),u=new URL(n,window.location.href);return s.origin===u.origin&&s.pathname===u.pathname&&s.search===u.search}catch{return i===n}}function LC(){return typeof window>"u"?{href:"",pathname:""}:{href:window.location.href,pathname:window.location.pathname}}function N1(){const[i,n]=G.useState(LC);return G.useEffect(()=>{const s=()=>n(LC()),u=LP(s);return window.addEventListener("popstate",s),window.addEventListener("hashchange",s),()=>{u(),window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s)}},[]),i}function PP(i){const n=[[/Edg\/(\d+(?:\.\d+)?)/,"Edge"],[/OPR\/(\d+(?:\.\d+)?)/,"Opera"],[/Firefox\/(\d+(?:\.\d+)?)/,"Firefox"],[/Chrome\/(\d+(?:\.\d+)?)/,"Chrome"],[/Version\/(\d+(?:\.\d+)?).*Safari/,"Safari"]];for(const[s,u]of n){const f=i.match(s);if(f)return{name:u,version:f[1]??""}}}function UP(i){if(/Windows NT (\d+\.\d+)/.test(i)){const n=i.match(/Windows NT (\d+\.\d+)/);return{name:"Windows",version:(n==null?void 0:n[1])??""}}if(/Mac OS X (\d+[_\.]\d+(?:[_\.]\d+)?)/.test(i)){const n=i.match(/Mac OS X (\d+[_\.]\d+(?:[_\.]\d+)?)/);return{name:"macOS",version:((n==null?void 0:n[1])??"").replace(/_/g,".")}}if(/iPhone OS (\d+[_\.]\d+(?:[_\.]\d+)?)/.test(i)){const n=i.match(/iPhone OS (\d+[_\.]\d+(?:[_\.]\d+)?)/);return{name:"iOS",version:((n==null?void 0:n[1])??"").replace(/_/g,".")}}if(/Android (\d+(?:\.\d+)?)/.test(i)){const n=i.match(/Android (\d+(?:\.\d+)?)/);return{name:"Android",version:(n==null?void 0:n[1])??""}}if(/Linux/.test(i))return{name:"Linux",version:""}}function MP(){const i=navigator.userAgent;return{user_agent:i,platform:navigator.platform??"",language:navigator.language??"",page_title:document.title,viewport:{width:window.innerWidth,height:window.innerHeight},screen:{width:window.screen.width,height:window.screen.height},device_pixel_ratio:window.devicePixelRatio??1,browser:PP(i),os:UP(i)}}function $P(){return`FB-${Math.floor(1e3+Math.random()*9e3)}`}function j1(i){if(i.length===0)return"";if(i.length===1){const s=i[0];return`M${s.x},${s.y}`}if(i.length===2){const[s,u]=i;return`M${s.x},${s.y} L${u.x},${u.y}`}let n=`M${i[0].x},${i[0].y}`;for(let s=0;s<i.length-1;s++){const u=i[s-1]??i[s],f=i[s],v=i[s+1],h=i[s+2]??v,g=f.x+(v.x-u.x)/6,b=f.y+(v.y-u.y)/6,_=v.x-(h.x-f.x)/6,k=v.y-(h.y-f.y)/6;n+=` C${g},${b} ${_},${k} ${v.x},${v.y}`}return n}function L1(i){let n=1/0,s=1/0,u=-1/0,f=-1/0;for(const v of i)v.x<n&&(n=v.x),v.y<s&&(s=v.y),v.x>u&&(u=v.x),v.y>f&&(f=v.y);return Number.isFinite(n)?{x:n,y:s,width:u-n,height:f-s}:{x:0,y:0,width:0,height:0}}function IP(i){switch(i.kind){case"circle":return{...i.bbox};case"arrow":{const n=Math.min(i.from.x,i.to.x),s=Math.min(i.from.y,i.to.y);return{x:n,y:s,width:Math.abs(i.to.x-i.from.x),height:Math.abs(i.to.y-i.from.y)}}case"rectangle":return{x:i.x,y:i.y,width:i.width,height:i.height}}}function xy(i){switch(i.kind){case"circle":{const{x:n,y:s,width:u}=i.bbox;return{x:n+u,y:s}}case"arrow":return i.to;case"rectangle":return{x:i.x+i.width,y:i.y}}}function qS(i,n,s){switch(i.kind){case"circle":return{kind:"circle",path:zP(i.path,n,s),bbox:{x:i.bbox.x+n,y:i.bbox.y+s,width:i.bbox.width,height:i.bbox.height}};case"arrow":return{kind:"arrow",from:{x:i.from.x+n,y:i.from.y+s},to:{x:i.to.x+n,y:i.to.y+s}};case"rectangle":return{kind:"rectangle",x:i.x+n,y:i.y+s,width:i.width,height:i.height}}}function zP(i,n,s){return i.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(u,f,v)=>{const h=parseFloat(f)+n,g=parseFloat(v)+s;return`${h},${g}`})}let ys=null,PC=!1,Bc=null;const FP=6e4;function UC(){Bc&&clearTimeout(Bc),Bc=setTimeout(()=>{Bc=null,P1()},FP)}function P1(){Bc&&(clearTimeout(Bc),Bc=null),ys&&(ys.getTracks().forEach(i=>{try{i.stop()}catch{}}),ys=null)}function U1(){var i;return!(typeof navigator>"u"||!((i=navigator.mediaDevices)!=null&&i.getDisplayMedia))}function BP(i){if(typeof document>"u")return!1;const n=document.getElementsByTagName("iframe");if(n.length===0)return!1;const s=i.x+i.width,u=i.y+i.height;for(const f of Array.from(n)){if(f.closest("#feedly-widget-root, #feedly-widget-pins"))continue;const v=f.getBoundingClientRect();if(v.width===0||v.height===0)continue;const h=v.left+window.scrollX,g=v.top+window.scrollY,b=h+v.width,_=g+v.height;if(h<s&&b>i.x&&g<u&&_>i.y)return!0}return!1}async function HP(){if(PC)return null;if(ys){const i=ys.getVideoTracks();if(i.length>0&&i.every(n=>n.readyState==="live"))return UC(),ys;ys=null}try{const i=await navigator.mediaDevices.getDisplayMedia({preferCurrentTab:!0,video:{displaySurface:"browser"},audio:!1,selfBrowserSurface:"include",surfaceSwitching:"exclude",systemAudio:"exclude"});return ys=i,i.getVideoTracks().forEach(n=>{n.addEventListener("ended",()=>{ys===i&&(ys=null)})}),UC(),i}catch(i){return typeof i=="object"&&i!==null&&"name"in i&&i.name==="NotAllowedError"&&(PC=!0),null}}async function VP(i){var s;const n=window;if(typeof n.ImageCapture=="function")try{const f=await new n.ImageCapture(i).grabFrame(),v=document.createElement("canvas");v.width=f.width,v.height=f.height;const h=v.getContext("2d");return h?(h.drawImage(f,0,0),(s=f.close)==null||s.call(f),v):null}catch{}return new Promise(u=>{const f=document.createElement("video");f.muted=!0,f.playsInline=!0,f.srcObject=new MediaStream([i]);const v=h=>{try{f.pause(),f.srcObject=null,f.remove()}catch{}h||u(null)};f.play().then(()=>{requestAnimationFrame(()=>{const h=document.createElement("canvas");h.width=f.videoWidth,h.height=f.videoHeight;const g=h.getContext("2d");if(!g){v(!0),u(null);return}g.drawImage(f,0,0),v(!0),u(h)})}).catch(()=>{v(!1)})})}async function WP(i,n={}){if(!U1())return null;const s=await HP();if(!s)return null;const u=s.getVideoTracks()[0];if(!u||u.readyState!=="live")return null;const f={x:window.scrollX,y:window.scrollY},v=window.innerWidth,h=window.innerHeight,g=Math.max(0,Math.min(i.x+i.width/2-v/2,document.documentElement.scrollWidth-v)),b=Math.max(0,Math.min(i.y+i.height/2-h/2,document.documentElement.scrollHeight-h)),_=Math.abs(f.x-g)>1||Math.abs(f.y-b)>1;if(_&&n.allowScroll===!1)return null;_&&(window.scrollTo({left:g,top:b,behavior:"instant"}),await new Promise(ne=>requestAnimationFrame(()=>requestAnimationFrame(()=>ne()))));let k=null;try{k=await VP(u)}catch{k=null}if(_&&window.scrollTo({left:f.x,top:f.y,behavior:"instant"}),!k)return null;const R=i.x-(_?g:f.x),N=i.y-(_?b:f.y),A=k.width/v,j=k.height/h,P=Math.max(0,Math.round(R*A)),F=Math.max(0,Math.round(N*j)),Y=Math.max(1,Math.round(i.width*A)),q=Math.max(1,Math.round(i.height*j)),I=Math.min(Y,k.width-P),ie=Math.min(q,k.height-F);if(I<4||ie<4)return null;const le=document.createElement("canvas");le.width=I,le.height=ie;const fe=le.getContext("2d");return fe?(fe.drawImage(k,P,F,I,ie,0,0,I,ie),{dataUrl:le.toDataURL("image/jpeg",.85)}):null}const hv="feedback-snapshots",M1=["feedly-widget-root","feedly-widget-pins"];function qP(i){const n=[],s=[];for(const u of M1){const f=document.getElementById(u);f&&(n.push(f),s.push(f.style.visibility),f.style.visibility="hidden")}return i().finally(()=>{n.forEach((u,f)=>{u.style.visibility=s[f]??""})})}function MC(i){const n=[],s=[],u=[],f=[];try{document.querySelectorAll("select").forEach(v=>{v.querySelectorAll("option").forEach(h=>{const g=h,b=g.hasAttribute("selected"),_=g.getAttribute("selected");g.value===v.value?(b||g.setAttribute("selected","selected"),n.push({el:g,hadAttr:b,prev:_})):b&&(g.removeAttribute("selected"),n.push({el:g,hadAttr:!0,prev:_}))})}),document.querySelectorAll("input").forEach(v=>{const h=v;if(h.type==="checkbox"||h.type==="radio"){const g=h.hasAttribute("checked");h.checked&&!g?(h.setAttribute("checked","checked"),u.push({el:h,hadAttr:!1})):!h.checked&&g&&(h.removeAttribute("checked"),u.push({el:h,hadAttr:!0}))}else if(h.type!=="file"){const g=h.getAttribute("value");h.setAttribute("value",h.value),s.push({el:h,prev:g})}}),document.querySelectorAll("textarea").forEach(v=>{const h=v,g=h.textContent??"";h.textContent=h.value,f.push({el:h,prev:g})})}catch(v){console.warn("[feedly-widget] form state mirror partial failure",v)}return i().finally(()=>{for(const{el:v,hadAttr:h,prev:g}of n)h?v.setAttribute("selected",g??"selected"):v.removeAttribute("selected");for(const{el:v,prev:h}of s)h===null?v.removeAttribute("value"):v.setAttribute("value",h);for(const{el:v,hadAttr:h}of u)h?v.setAttribute("checked","checked"):v.removeAttribute("checked");for(const{el:v,prev:h}of f)v.textContent=h})}const _y=6;let $C=Promise.resolve();function YP(i){const n=()=>GP(i),s=$C.then(n,n);return $C=s.catch(()=>null),s}async function GP({supabase:i,projectId:n,bbox:s,shouldProceed:u}){if(u&&!u()||s.width<4||s.height<4)return null;const f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),v=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),h=Math.max(0,s.x-_y),g=Math.max(0,s.y-_y),b=Math.min(f-h,s.width+_y*2),_=Math.min(v-g,s.height+_y*2);if(b<4||_<4)return null;const k={x:h,y:g,width:b,height:_},R={...k,pads:{l:s.x-h,t:s.y-g,r:h+b-(s.x+s.width),b:g+_-(s.y+s.height)}},N=window.devicePixelRatio||1,A={vw:window.innerWidth,vh:window.innerHeight,dpr:N};if(U1()&&BP(k)){const ie=await qP(()=>MC(()=>WP(k,{allowScroll:!1})));if(ie){const le=IC(ie.dataUrl);if(le){const fe=zC(),ne=`${n}/${fe}.jpg`,{error:$e}=await i.storage.from(hv).upload(ne,le,{contentType:"image/jpeg",cacheControl:"31536000",upsert:!1});if(!$e)return{path:ne,viewport:A,capturedAt:new Date().toISOString(),bbox:R};console.warn("[feedly-widget] high-fidelity upload failed",$e.message)}}}let j;try{({domToJpeg:j}=await Promise.resolve().then(()=>t$))}catch(ie){return console.warn("[feedly-widget] snapshot lib failed to load",ie),null}let P=null;try{P=await MC(()=>j(document.body,{width:b,height:_,style:{transform:`translate(${-h}px, ${-g}px)`,transformOrigin:"top left"},quality:.85,scale:Math.min(N,1.5),backgroundColor:"#ffffff",filter:ie=>!(ie instanceof Element&&M1.includes(ie.id))}))}catch(ie){return console.warn("[feedly-widget] snapshot capture failed",ie),null}if(!P||!P.startsWith("data:image/"))return null;const F=IC(P);if(!F)return null;const Y=zC(),q=`${n}/${Y}.jpg`,{error:I}=await i.storage.from(hv).upload(q,F,{contentType:"image/jpeg",cacheControl:"31536000",upsert:!1});return I?(console.warn("[feedly-widget] snapshot upload failed",I.message),null):{path:q,viewport:A,capturedAt:new Date().toISOString(),bbox:R}}function KP(i,n){const{data:s}=i.storage.from(hv).getPublicUrl(n);return s.publicUrl}function IC(i){try{const[n,s]=i.split(",");if(!n||!s)return null;const u=/data:([^;]+);base64/.exec(n),f=(u==null?void 0:u[1])??"image/jpeg",v=atob(s),h=v.length,g=new Uint8Array(h);for(let b=0;b<h;b++)g[b]=v.charCodeAt(b);return new Blob([g],{type:f})}catch{return null}}function zC(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)+Date.now().toString(36)}function YS(i){const n=i.replace(/\/index\.html?$/,"").replace(/\/$/,""),s=n===""?"/":n,u=new Set([i,s]);return s==="/"?(u.add("/index.html"),u.add("/index.htm")):(u.add(s+"/"),u.add(s+"/index.html"),u.add(s+"/index.htm")),[...u]}function ev(i,n){return YS(n).includes(i)}function JP({supabase:i,projectId:n,testerId:s,isAdmin:u}){const[f,v]=G.useState([]),[h,g]=G.useState([]),[b,_]=G.useState(!0),{href:k,pathname:R}=N1(),N=G.useRef(R);N.current=R;const A=G.useRef(f);A.current=f;const j=G.useRef(h);j.current=h;const P=G.useRef(u);P.current=u;const F=G.useCallback(oe=>{const _e=u?j.current.find(ke=>ke.id===oe.tester_id):void 0;v(ke=>{const me=ke.findIndex(ze=>ze.id===oe.id);if(me===-1)return[...ke,{...oe,tester:_e}];const ue={...ke[me],...oe,tester:ke[me].tester??_e},Oe=ke.slice();return Oe[me]=ue,Oe}),!(!u||_e)&&i.from("testers").select("id, name, color").eq("id",oe.tester_id).maybeSingle().then(({data:ke})=>{if(!ke)return;const me=ke;g(ue=>ue.find(Oe=>Oe.id===me.id)?ue:[...ue,me]),v(ue=>ue.map(Oe=>Oe.tester_id===me.id?{...Oe,tester:Oe.tester??me}:Oe))})},[i,u]);G.useEffect(()=>{if(!s){v([]),g([]),_(!1);return}let oe=!1;async function _e(){_(!0);const ke=YS(R);if(u){const[me,ue]=await Promise.all([i.from("annotations").select("*").eq("project_id",n).in("page_path",ke).order("created_at",{ascending:!0}),i.from("testers").select("id, name, color").eq("project_id",n)]);if(oe)return;const Oe=ue.data??[],ze=new Map(Oe.map(De=>[De.id,De]));g(Oe),v((me.data??[]).map(De=>({...De,tester:ze.get(De.tester_id)})))}else{const{data:me}=await i.from("annotations").select("*").eq("tester_id",s).in("page_path",ke).order("created_at",{ascending:!0});if(oe)return;g([]),v(me??[])}_(!1)}return _e(),()=>{oe=!0}},[i,n,s,R,u]);const Y=G.useRef(null),q=G.useRef(()=>{});q.current=oe=>{if(!(!oe||oe.t!=="ann")){if(oe.op==="clear"){const _e=YS(N.current);let ke=i.from("annotations").select("*").eq("project_id",n).in("page_path",_e).order("created_at",{ascending:!0});P.current||(ke=ke.eq("tester_id",s)),ke.then(({data:me,error:ue})=>{if(ue||!me)return;const Oe=me;v(ze=>{const De=new Map(ze.map(be=>[be.id,be.tester]));return Oe.map(be=>({...be,tester:be.tester??De.get(be.id)}))})});return}if(oe.op==="delete"){i.from("annotations").select("id").eq("id",oe.id).maybeSingle().then(({data:_e,error:ke})=>{ke||_e||v(me=>me.filter(ue=>ue.id!==oe.id))});return}ev(oe.page_path,N.current)&&i.from("annotations").select("*").eq("id",oe.id).maybeSingle().then(({data:_e})=>{_e&&ev(_e.page_path,N.current)&&F(_e)})}},G.useEffect(()=>{if(!s)return;const oe=i.channel(OP(n),{config:{broadcast:{self:!1}}});return oe.on("broadcast",{event:HS},({payload:_e})=>q.current(_e)),oe.subscribe(_e=>{(_e==="CHANNEL_ERROR"||_e==="TIMED_OUT")&&console.warn("[feedly-widget] live-update channel join failed:",_e)}),Y.current=oe,()=>{Y.current=null,i.removeChannel(oe)}},[i,n,s]);const I=G.useCallback(oe=>{const _e=()=>{const me=Y.current;me&&me.send({type:"broadcast",event:HS,payload:oe}).catch(()=>{})},ke=Y.current;if(ke&&ke.state!=="joined"){setTimeout(_e,800);return}_e()},[]);G.useEffect(()=>{if(!s)return;const oe=i.channel(`feedly:annotations:${n}:${u?"admin":"self"}`).on("postgres_changes",{event:"UPDATE",schema:"public",table:"annotations",filter:`project_id=eq.${n}`},_e=>{const ke=_e.new;ev(ke.page_path,R)&&v(me=>{const ue=me.findIndex(De=>De.id===ke.id);if(ue===-1)return me;const Oe={...me[ue],...ke,tester:me[ue].tester},ze=me.slice();return ze[ue]=Oe,ze})});return u&&oe.on("postgres_changes",{event:"INSERT",schema:"public",table:"annotations",filter:`project_id=eq.${n}`},_e=>{const ke=_e.new;ev(ke.page_path,R)&&F(ke)}).on("postgres_changes",{event:"DELETE",schema:"public",table:"annotations",filter:`project_id=eq.${n}`},_e=>{const ke=_e.old.id;ke&&v(me=>me.filter(ue=>ue.id!==ke))}).on("postgres_changes",{event:"INSERT",schema:"public",table:"testers",filter:`project_id=eq.${n}`},_e=>{const ke=_e.new;g(me=>me.find(ue=>ue.id===ke.id)?me:[...me,{id:ke.id,name:ke.name,color:ke.color}])}),oe.subscribe(),()=>{i.removeChannel(oe)}},[i,n,s,u,R,F]);const ie=G.useCallback(async(oe,_e,ke,me,ue)=>{if(!s)return null;const{data:Oe,error:ze}=await i.from("annotations").insert({project_id:n,tester_id:s,page_url:k,page_path:R,type:oe,shape_data:_e,comment:ke.trim()||null,anchor:me,note_offset:ue,tech_details:MP(),jira_ticket:$P()}).select("*").single();if(ze||!Oe)return console.warn("[feedly-widget] Failed to save annotation",ze==null?void 0:ze.message),null;const De=Oe;return v(be=>[...be,De]),I({t:"ann",op:"insert",id:De.id,page_path:De.page_path}),_e.kind==="arrow"||(async()=>{try{const be=()=>ev(De.page_path,N.current),pe=await YP({supabase:i,projectId:n,bbox:IP(_e),shouldProceed:be});if(!pe)return;if(!be()){i.storage.from(hv).remove([pe.path]);return}const je={snapshot_path:pe.path,snapshot_bbox:pe.bbox,snapshot_viewport:pe.viewport,snapshot_captured_at:pe.capturedAt},{data:Re,error:B}=await i.from("annotations").update(je).eq("id",De.id).select("id");if(B){console.warn("[feedly-widget] Failed to attach snapshot",B.message);return}if(!Re||Re.length===0){i.storage.from(hv).remove([pe.path]);return}v(Q=>Q.map(Le=>Le.id===De.id?{...Le,...je}:Le)),I({t:"ann",op:"update",id:De.id,page_path:De.page_path})}catch(be){console.warn("[feedly-widget] snapshot capture failed",be)}})(),De},[i,n,s,k,R,I]),le=G.useCallback(async oe=>{const ke=A.current.find(ue=>ue.id===oe);v(ue=>ue.filter(Oe=>Oe.id!==oe));const{error:me}=await i.from("annotations").delete().eq("id",oe);return me?(console.warn("[feedly-widget] Failed to delete annotation",me.message),ke&&v(ue=>ue.find(Oe=>Oe.id===oe)?ue:[...ue,ke].sort((Oe,ze)=>Oe.created_at<ze.created_at?-1:Oe.created_at>ze.created_at?1:0)),!1):(I({t:"ann",op:"delete",id:oe}),!0)},[i,I]),fe=G.useCallback(async(oe,_e,ke)=>{const me=_e.trim()||null,ue={comment:me,note_offset:ke},{data:Oe,error:ze}=await i.from("annotations").update(ue).eq("id",oe).select("*").single();return ze||!Oe?(console.warn("[feedly-widget] Failed to update comment",ze==null?void 0:ze.message),!1):(v(De=>De.map(be=>be.id===oe?{...be,comment:me,note_offset:ke,tester:be.tester}:be)),I({t:"ann",op:"update",id:oe,page_path:Oe.page_path}),!0)},[i,I]),ne=G.useCallback(async(oe,_e)=>{const{data:ke,error:me}=await i.from("annotations").update({shape_data:_e}).eq("id",oe).select("*").single();return me||!ke?(console.warn("[feedly-widget] Failed to update annotation",me==null?void 0:me.message),!1):(v(ue=>ue.map(Oe=>Oe.id===oe?{...Oe,shape_data:_e}:Oe)),I({t:"ann",op:"update",id:oe,page_path:ke.page_path}),!0)},[i,I]),$e=G.useCallback(async(oe,_e,ke)=>{const{data:me,error:ue}=await i.rpc("feedly_set_annotation_status",{p_annotation_id:oe,p_new_status:_e,p_comment:ke??null});if(ue)return{ok:!1,error:ue.message};const Oe=me;if(!Oe||Oe.error)return{ok:!1,error:(Oe==null?void 0:Oe.error)??"unknown_error"};v(De=>De.map(be=>be.id===oe?{...be,status:_e}:be));const ze=A.current.find(De=>De.id===oe);return ze&&I({t:"ann",op:"update",id:oe,page_path:ze.page_path}),i.from("annotations").select("*").eq("id",oe).maybeSingle().then(({data:De})=>{De&&F(De)}),{ok:!0}},[i,I,F]);return{annotations:f,testers:h,loading:b,save:ie,remove:le,updateShape:ne,updateComment:fe,setStatus:$e}}function XP({supabase:i,projectId:n,testerId:s,isAdmin:u,enabled:f}){const[v,h]=G.useState([]),[g,b]=G.useState(!1),_=G.useCallback(async()=>{if(!s){h([]);return}b(!0);let R=i.from("annotations").select("*").eq("project_id",n).order("created_at",{ascending:!1});u||(R=R.eq("tester_id",s));const{data:N}=await R;let A=new Map;if(u){const{data:P}=await i.from("testers").select("id, name, color").eq("project_id",n);P&&(A=new Map(P.map(F=>[F.id,F])))}h((N??[]).map(P=>({...P,tester:u?A.get(P.tester_id):void 0}))),b(!1)},[i,n,s,u]);G.useEffect(()=>{f&&_()},[f,_]);const k=(()=>{const R=new Map;for(const N of v){const A=R.get(N.page_path)??{pagePath:N.page_path,pageUrl:N.page_url,items:[]};A.items.push(N),R.set(N.page_path,A)}return[...R.values()]})();return{annotations:v,grouped:k,loading:g,refresh:_}}const GS="feedly_invite";function QP(){if(!(typeof window>"u"))try{const i=new URL(window.location.href);if(!i.searchParams.has(GS))return;i.searchParams.delete(GS);const n=i.pathname+(i.search?i.search:"")+i.hash;window.history.replaceState(null,"",n)}catch{}}function ZP({supabase:i,projectId:n,enabled:s,recheckKey:u}){const[f,v]=G.useState(()=>s?"checking":"allowed");return G.useEffect(()=>{let h=!1;async function g(){let _=null;try{_=new URL(window.location.href).searchParams.get(GS)}catch{_=null}let k=!1;if(_){const{data:A,error:j}=await i.rpc("feedly_redeem_invite",{p_token:_});if(h)return;const P=A;!j&&P&&!P.error&&P.project_id===n&&(k=!0),QP()}if(!s){v("allowed");return}if(k){v("allowed");return}const{data:R,error:N}=await i.from("tester_invite_redemptions").select("id").eq("project_id",n).limit(1).maybeSingle();if(!h){if(N){v("checking"),b=window.setTimeout(()=>{h||g()},2500);return}v(R?"allowed":"blocked")}}let b=0;return g(),()=>{h=!0,b&&window.clearTimeout(b)}},[i,n,s,u]),f}const $1="feedly_replay_state",$y="feedly_recording_state",eU=60*60*1e3;function tU(i){try{window.localStorage.setItem($1,JSON.stringify(i))}catch{}}function nU(){try{window.localStorage.removeItem($1)}catch{}}function gS(i){try{const n=window.localStorage.getItem($y);if(!n)return null;const s=JSON.parse(n);return s.projectId!==i?null:Date.now()-s.startedAt>eU?(window.localStorage.removeItem($y),null):s}catch{return null}}function rU(i){try{window.localStorage.setItem($y,JSON.stringify(i))}catch{}}function FC(){try{window.localStorage.removeItem($y)}catch{}}function iU({supabase:i,projectId:n,testerId:s,isAdmin:u,enabled:f}){const[v,h]=G.useState([]),[g,b]=G.useState(!1),_=G.useCallback(async()=>{if(!s){h([]);return}b(!0);const{data:A}=await i.from("flows").select("*").eq("project_id",n).order("created_at",{ascending:!1});let j=A??[];if(u&&j.length>0){const P=Array.from(new Set(j.map(q=>q.tester_id))),{data:F}=await i.from("testers").select("id, name, color").in("id",P),Y=new Map((F??[]).map(q=>[q.id,q]));j=j.map(q=>({...q,tester:Y.get(q.tester_id)}))}h(j),b(!1)},[i,n,s,u]);G.useEffect(()=>{f&&_()},[f,_]);const k=G.useCallback(async(A,j="Untitled Flow")=>{if(!s)return null;const{data:P,error:F}=await i.from("flows").insert({project_id:n,tester_id:s,name:j,steps:A}).select("*").single();return F||!P?(console.warn("[feedly-widget] Failed to save flow",F==null?void 0:F.message),null):(h(Y=>[P,...Y]),P)},[i,n,s]),R=G.useCallback(async A=>{h(P=>P.filter(F=>F.id!==A));const{error:j}=await i.from("flows").delete().eq("id",A);return j?(console.warn("[feedly-widget] Failed to delete flow",j.message),!1):!0},[i]),N=G.useCallback(async A=>{const{data:j,error:P}=await i.from("flows").select("*").eq("id",A).maybeSingle();return P||!j?null:j},[i]);return{flows:v,loading:g,save:k,remove:R,fetchOne:N,refresh:_}}const I1="feedly_button_y",pv=44,aU=20,BC=12,oU=5;function HC(){return typeof window>"u"?0:window.innerWidth-pv-aU}function sU(){return typeof window>"u"?0:window.innerHeight-pv-20}function KS(i){return typeof window>"u"?i:Math.min(Math.max(i,BC),window.innerHeight-pv-BC)}function lU(){try{const i=window.localStorage.getItem(I1);if(i!==null)return KS(parseFloat(i))}catch{}return sU()}function uU(i){try{window.localStorage.setItem(I1,String(i))}catch{}}function cU({open:i,hasUnseen:n,onClick:s}){var A;const[u,f]=G.useState(()=>typeof window>"u"?0:lU()),[v,h]=G.useState(()=>typeof window>"u"?0:HC()),g=G.useRef(null),b=G.useRef(0);G.useEffect(()=>{const j=()=>{h(HC()),f(P=>KS(P))};return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const _=G.useCallback(j=>{j.currentTarget.setPointerCapture(j.pointerId),g.current={pointerId:j.pointerId,startY:j.clientY,btnY:u,moved:!1}},[u]),k=G.useCallback(j=>{const P=g.current;if(!P||P.pointerId!==j.pointerId)return;const F=j.clientY-P.startY;!P.moved&&Math.abs(F)<oU||(P.moved=!0,f(KS(P.btnY+F)))},[]),R=G.useCallback(j=>{const P=g.current;!P||P.pointerId!==j.pointerId||(g.current=null,b.current=Date.now(),P.moved?f(F=>(uU(F),F)):s())},[s]),N=G.useCallback(j=>{j.detail===0&&(Date.now()-b.current<500||s())},[s]);return O.jsxs("button",{type:"button",onPointerDown:_,onPointerMove:k,onPointerUp:R,onClick:N,onPointerCancel:()=>{g.current=null},"aria-label":i?"Close Feedly":"Open Feedly",style:{pointerEvents:"auto",position:"fixed",top:u,left:v,width:pv,height:pv,touchAction:"none",cursor:(A=g.current)!=null&&A.moved?"ns-resize":"grab"},className:`
283
+ ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var v;super(n,{cause:u}),this.__isWebAuthnError=!0,this.name=(v=f??(u instanceof Error?u.name:void 0))!==null&&v!==void 0?v:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class jy extends wr{constructor(n,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:n}),this.name="WebAuthnUnknownError",this.originalError=s}}function U2({error:i,options:n}){var s,u,f;const{publicKey:v}=n;if(!v)throw Error("options was missing required publicKey property");if(i.name==="AbortError"){if(n.signal instanceof AbortSignal)return new wr({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:i})}else if(i.name==="ConstraintError"){if(((s=v.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new wr({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:i});if(n.mediation==="conditional"&&((u=v.authenticatorSelection)===null||u===void 0?void 0:u.userVerification)==="required")return new wr({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:i});if(((f=v.authenticatorSelection)===null||f===void 0?void 0:f.userVerification)==="required")return new wr({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:i})}else{if(i.name==="InvalidStateError")return new wr({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:i});if(i.name==="NotAllowedError")return new wr({message:i.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i});if(i.name==="NotSupportedError")return v.pubKeyCredParams.filter(g=>g.type==="public-key").length===0?new wr({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:i}):new wr({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:i});if(i.name==="SecurityError"){const h=window.location.hostname;if(T1(h)){if(v.rp.id!==h)return new wr({message:`The RP ID "${v.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:i})}else return new wr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:i})}else if(i.name==="TypeError"){if(v.user.id.byteLength<1||v.user.id.byteLength>64)return new wr({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:i})}else if(i.name==="UnknownError")return new wr({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:i})}return new wr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i})}function M2({error:i,options:n}){const{publicKey:s}=n;if(!s)throw Error("options was missing required publicKey property");if(i.name==="AbortError"){if(n.signal instanceof AbortSignal)return new wr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:i})}else{if(i.name==="NotAllowedError")return new wr({message:i.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i});if(i.name==="SecurityError"){const u=window.location.hostname;if(T1(u)){if(s.rpId!==u)return new wr({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:i})}else return new wr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:i})}else if(i.name==="UnknownError")return new wr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:i})}return new wr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i})}class $2{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const n=new AbortController;return this.controller=n,n.signal}cancelCeremony(){if(this.controller){const n=new Error("Manually cancelling existing WebAuthn API call");n.name="AbortError",this.controller.abort(n),this.controller=void 0}}}const FS=new $2;function SC(i){if(!i)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(i);const{challenge:n,user:s,excludeCredentials:u}=i,f=zy(i,["challenge","user","excludeCredentials"]),v=zf(n).buffer,h=Object.assign(Object.assign({},s),{id:zf(s.id).buffer}),g=Object.assign(Object.assign({},f),{challenge:v,user:h});if(u&&u.length>0){g.excludeCredentials=new Array(u.length);for(let b=0;b<u.length;b++){const _=u[b];g.excludeCredentials[b]=Object.assign(Object.assign({},_),{id:zf(_.id).buffer,type:_.type||"public-key",transports:_.transports})}}return g}function xC(i){if(!i)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(i);const{challenge:n,allowCredentials:s}=i,u=zy(i,["challenge","allowCredentials"]),f=zf(n).buffer,v=Object.assign(Object.assign({},u),{challenge:f});if(s&&s.length>0){v.allowCredentials=new Array(s.length);for(let h=0;h<s.length;h++){const g=s[h];v.allowCredentials[h]=Object.assign(Object.assign({},g),{id:zf(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return v}function _C(i){var n;if("toJSON"in i&&typeof i.toJSON=="function")return i.toJSON();const s=i;return{id:i.id,rawId:i.id,response:{attestationObject:Fc(new Uint8Array(i.response.attestationObject)),clientDataJSON:Fc(new Uint8Array(i.response.clientDataJSON))},type:"public-key",clientExtensionResults:i.getClientExtensionResults(),authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function EC(i){var n;if("toJSON"in i&&typeof i.toJSON=="function")return i.toJSON();const s=i,u=i.getClientExtensionResults(),f=i.response;return{id:i.id,rawId:i.id,response:{authenticatorData:Fc(new Uint8Array(f.authenticatorData)),clientDataJSON:Fc(new Uint8Array(f.clientDataJSON)),signature:Fc(new Uint8Array(f.signature)),userHandle:f.userHandle?Fc(new Uint8Array(f.userHandle)):void 0},type:"public-key",clientExtensionResults:u,authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function T1(i){return i==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(i)}function Ly(){var i,n;return!!(oi()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((i=navigator==null?void 0:navigator.credentials)===null||i===void 0?void 0:i.create)=="function"&&typeof((n=navigator==null?void 0:navigator.credentials)===null||n===void 0?void 0:n.get)=="function")}async function R1(i){try{const n=await navigator.credentials.create(i);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new jy("Browser returned unexpected credential type",n)}:{data:null,error:new jy("Empty credential response",n)}}catch(n){return{data:null,error:U2({error:n,options:i})}}}async function O1(i){try{const n=await navigator.credentials.get(i);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new jy("Browser returned unexpected credential type",n)}:{data:null,error:new jy("Empty credential response",n)}}catch(n){return{data:null,error:M2({error:n,options:i})}}}const I2={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},z2={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Py(...i){const n=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),s=f=>f instanceof ArrayBuffer||ArrayBuffer.isView(f),u={};for(const f of i)if(f)for(const v in f){const h=f[v];if(h!==void 0)if(Array.isArray(h))u[v]=h;else if(s(h))u[v]=h;else if(n(h)){const g=u[v];n(g)?u[v]=Py(g,h):u[v]=Py(h)}else u[v]=h}return u}function F2(i,n){return Py(I2,i,n||{})}function B2(i,n){return Py(z2,i,n||{})}class H2{constructor(n){this.client=n,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(n){return this.client.mfa.enroll(Object.assign(Object.assign({},n),{factorType:"webauthn"}))}async _challenge({factorId:n,webauthn:s,friendlyName:u,signal:f},v){var h;try{const{data:g,error:b}=await this.client.mfa.challenge({factorId:n,webauthn:s});if(!g)return{data:null,error:b};const _=f??FS.createNewAbortSignal();if(g.webauthn.type==="create"){const{user:k}=g.webauthn.credential_options.publicKey;if(!k.name){const R=u;if(R)k.name=`${k.id}:${R}`;else{const A=(await this.client.getUser()).data.user,j=((h=A==null?void 0:A.user_metadata)===null||h===void 0?void 0:h.name)||(A==null?void 0:A.email)||(A==null?void 0:A.id)||"User";k.name=`${k.id}:${j}`}}k.displayName||(k.displayName=k.name)}switch(g.webauthn.type){case"create":{const k=F2(g.webauthn.credential_options.publicKey,v==null?void 0:v.create),{data:R,error:N}=await R1({publicKey:k,signal:_});return R?{data:{factorId:n,challengeId:g.id,webauthn:{type:g.webauthn.type,credential_response:R}},error:null}:{data:null,error:N}}case"request":{const k=B2(g.webauthn.credential_options.publicKey,v==null?void 0:v.request),{data:R,error:N}=await O1(Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:k,signal:_}));return R?{data:{factorId:n,challengeId:g.id,webauthn:{type:g.webauthn.type,credential_response:R}},error:null}:{data:null,error:N}}}}catch(g){return He(g)?{data:null,error:g}:{data:null,error:new Oo("Unexpected error in challenge",g)}}}async _verify({challengeId:n,factorId:s,webauthn:u}){return this.client.mfa.verify({factorId:s,challengeId:n,webauthn:u})}async _authenticate({factorId:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:u=typeof window<"u"?[window.location.origin]:void 0,signal:f}={}},v){if(!s)return{data:null,error:new Ff("rpId is required for WebAuthn authentication")};try{if(!Ly())return{data:null,error:new Oo("Browser does not support WebAuthn",null)};const{data:h,error:g}=await this.challenge({factorId:n,webauthn:{rpId:s,rpOrigins:u},signal:f},{request:v});if(!h)return{data:null,error:g};const{webauthn:b}=h;return this._verify({factorId:n,challengeId:h.challengeId,webauthn:{type:b.type,rpId:s,rpOrigins:u,credential_response:b.credential_response}})}catch(h){return He(h)?{data:null,error:h}:{data:null,error:new Oo("Unexpected error in authenticate",h)}}}async _register({friendlyName:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:u=typeof window<"u"?[window.location.origin]:void 0,signal:f}={}},v){if(!s)return{data:null,error:new Ff("rpId is required for WebAuthn registration")};try{if(!Ly())return{data:null,error:new Oo("Browser does not support WebAuthn",null)};const{data:h,error:g}=await this._enroll({friendlyName:n});if(!h)return await this.client.mfa.listFactors().then(k=>{var R;return(R=k.data)===null||R===void 0?void 0:R.all.find(N=>N.factor_type==="webauthn"&&N.friendly_name===n&&N.status!=="unverified")}).then(k=>k?this.client.mfa.unenroll({factorId:k==null?void 0:k.id}):void 0),{data:null,error:g};const{data:b,error:_}=await this._challenge({factorId:h.id,friendlyName:h.friendly_name,webauthn:{rpId:s,rpOrigins:u},signal:f},{create:v});return b?this._verify({factorId:h.id,challengeId:b.challengeId,webauthn:{rpId:s,rpOrigins:u,type:b.webauthn.type,credential_response:b.webauthn.credential_response}}):{data:null,error:_}}catch(h){return He(h)?{data:null,error:h}:{data:null,error:new Oo("Unexpected error in register",h)}}}}N2();const V2={url:GL,storageKey:KL,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:JL,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function kC(i,n,s){return await s()}const Lf={};class dv{get jwks(){var n,s;return(s=(n=Lf[this.storageKey])===null||n===void 0?void 0:n.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(n){Lf[this.storageKey]=Object.assign(Object.assign({},Lf[this.storageKey]),{jwks:n})}get jwks_cached_at(){var n,s;return(s=(n=Lf[this.storageKey])===null||n===void 0?void 0:n.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(n){Lf[this.storageKey]=Object.assign(Object.assign({},Lf[this.storageKey]),{cachedAt:n})}constructor(n){var s,u,f,v;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const h=Object.assign(Object.assign({},V2),n);if(this.storageKey=h.storageKey,this.instanceID=(s=dv.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,dv.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!h.debug,typeof h.debug=="function"&&(this.logger=h.debug),this.instanceID>0&&oi()){const g=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(g),this.logDebugMessages&&console.trace(g)}if(this.persistSession=h.persistSession,this.autoRefreshToken=h.autoRefreshToken,this.experimental=(u=h.experimental)!==null&&u!==void 0?u:{},this.admin=new A2({url:h.url,headers:h.headers,fetch:h.fetch,experimental:this.experimental}),this.url=h.url,this.headers=h.headers,this.fetch=E1(h.fetch),this.lock=h.lock||kC,this.detectSessionInUrl=h.detectSessionInUrl,this.flowType=h.flowType,this.hasCustomAuthorizationHeader=h.hasCustomAuthorizationHeader,this.throwOnError=h.throwOnError,this.lockAcquireTimeout=h.lockAcquireTimeout,h.lock?this.lock=h.lock:this.persistSession&&oi()&&(!((f=globalThis==null?void 0:globalThis.navigator)===null||f===void 0)&&f.locks)?this.lock=D2:this.lock=kC,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new H2(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(h.storage?this.storage=h.storage:_1()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=wC(this.memoryStorage)),h.userStorage&&(this.userStorage=h.userStorage)):(this.memoryStorage={},this.storage=wC(this.memoryStorage)),oi()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(g){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",g)}(v=this.broadcastChannel)===null||v===void 0||v.addEventListener("message",async g=>{this._debug("received broadcast notification from other tab or client",g);try{await this._notifyAllSubscribers(g.data.event,g.data.session,!1)}catch(b){this._debug("#broadcastChannel","error",b)}})}h.skipAutoInitialize||this.initialize().catch(g=>{this._debug("#initialize()","error",g)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(n){if(this.throwOnError&&n&&n.error)throw n.error;return n}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${b1}) ${new Date().toISOString()}`}_debug(...n){return this.logDebugMessages&&this.logger(this._logPrefix(),...n),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var n;try{let s={},u="none";if(oi()&&(s=c2(window.location.href),this._isImplicitGrantCallback(s)?u="implicit":await this._isPKCECallback(s)&&(u="pkce")),oi()&&this.detectSessionInUrl&&u!=="none"){const{data:f,error:v}=await this._getSessionFromURL(s,u);if(v){if(this._debug("#_initialize()","error detecting session from URL",v),t2(v)){const b=(n=v.details)===null||n===void 0?void 0:n.code;if(b==="identity_already_exists"||b==="identity_not_found"||b==="single_identity_not_deletable")return{error:v}}return{error:v}}const{session:h,redirectType:g}=f;return this._debug("#_initialize()","detected session in URL",h,"redirect type",g),await this._saveSession(h),setTimeout(async()=>{g==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",h):await this._notifyAllSubscribers("SIGNED_IN",h)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return He(s)?this._returnResult({error:s}):this._returnResult({error:new Oo("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(n){var s,u,f;try{const v=await it(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(u=(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.data)!==null&&u!==void 0?u:{},gotrue_meta_security:{captcha_token:(f=n==null?void 0:n.options)===null||f===void 0?void 0:f.captchaToken}},xform:Xa}),{data:h,error:g}=v;if(g||!h)return this._returnResult({data:{user:null,session:null},error:g});const b=h.session,_=h.user;return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",b)),this._returnResult({data:{user:_,session:b},error:null})}catch(v){if(He(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signUp(n){var s,u,f;try{let v;if("email"in n){const{email:k,password:R,options:N}=n;let A=null,j=null;this.flowType==="pkce"&&([A,j]=await jf(this.storage,this.storageKey)),v=await it(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:N==null?void 0:N.emailRedirectTo,body:{email:k,password:R,data:(s=N==null?void 0:N.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:N==null?void 0:N.captchaToken},code_challenge:A,code_challenge_method:j},xform:Xa})}else if("phone"in n){const{phone:k,password:R,options:N}=n;v=await it(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:k,password:R,data:(u=N==null?void 0:N.data)!==null&&u!==void 0?u:{},channel:(f=N==null?void 0:N.channel)!==null&&f!==void 0?f:"sms",gotrue_meta_security:{captcha_token:N==null?void 0:N.captchaToken}},xform:Xa})}else throw new gy("You must provide either an email or phone number and a password");const{data:h,error:g}=v;if(g||!h)return await ai(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:g});const b=h.session,_=h.user;return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",b)),this._returnResult({data:{user:_,session:b},error:null})}catch(v){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithPassword(n){try{let s;if("email"in n){const{email:v,password:h,options:g}=n;s=await it(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:v,password:h,gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:gC})}else if("phone"in n){const{phone:v,password:h,options:g}=n;s=await it(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:v,password:h,gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:gC})}else throw new gy("You must provide either an email or phone number and a password");const{data:u,error:f}=s;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!u||!u.session||!u.user){const v=new Nf;return this._returnResult({data:{user:null,session:null},error:v})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),this._returnResult({data:Object.assign({user:u.user,session:u.session},u.weak_password?{weakPassword:u.weak_password}:null),error:f})}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(n){var s,u,f,v;return await this._handleProviderSignIn(n.provider,{redirectTo:(s=n.options)===null||s===void 0?void 0:s.redirectTo,scopes:(u=n.options)===null||u===void 0?void 0:u.scopes,queryParams:(f=n.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:(v=n.options)===null||v===void 0?void 0:v.skipBrowserRedirect})}async exchangeCodeForSession(n){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(n))}async signInWithWeb3(n){const{chain:s}=n;switch(s){case"ethereum":return await this.signInWithEthereum(n);case"solana":return await this.signInWithSolana(n);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(n){var s,u,f,v,h,g,b,_,k,R,N;let A,j;if("message"in n)A=n.message,j=n.signature;else{const{chain:P,wallet:F,statement:Y,options:q}=n;let I;if(oi())if(typeof F=="object")I=F;else{const oe=window;if("ethereum"in oe&&typeof oe.ethereum=="object"&&"request"in oe.ethereum&&typeof oe.ethereum.request=="function")I=oe.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof F!="object"||!(q!=null&&q.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");I=F}const ie=new URL((s=q==null?void 0:q.url)!==null&&s!==void 0?s:window.location.href),le=await I.request({method:"eth_requestAccounts"}).then(oe=>oe).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!le||le.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const fe=C1(le[0]);let ne=(u=q==null?void 0:q.signInWithEthereum)===null||u===void 0?void 0:u.chainId;if(!ne){const oe=await I.request({method:"eth_chainId"});ne=j2(oe)}const $e={domain:ie.host,address:fe,statement:Y,uri:ie.href,version:"1",chainId:ne,nonce:(f=q==null?void 0:q.signInWithEthereum)===null||f===void 0?void 0:f.nonce,issuedAt:(h=(v=q==null?void 0:q.signInWithEthereum)===null||v===void 0?void 0:v.issuedAt)!==null&&h!==void 0?h:new Date,expirationTime:(g=q==null?void 0:q.signInWithEthereum)===null||g===void 0?void 0:g.expirationTime,notBefore:(b=q==null?void 0:q.signInWithEthereum)===null||b===void 0?void 0:b.notBefore,requestId:(_=q==null?void 0:q.signInWithEthereum)===null||_===void 0?void 0:_.requestId,resources:(k=q==null?void 0:q.signInWithEthereum)===null||k===void 0?void 0:k.resources};A=P2($e),j=await I.request({method:"personal_sign",params:[L2(A),fe]})}try{const{data:P,error:F}=await it(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:A,signature:j},!((R=n.options)===null||R===void 0)&&R.captchaToken?{gotrue_meta_security:{captcha_token:(N=n.options)===null||N===void 0?void 0:N.captchaToken}}:null),xform:Xa});if(F)throw F;if(!P||!P.session||!P.user){const Y=new Nf;return this._returnResult({data:{user:null,session:null},error:Y})}return P.session&&(await this._saveSession(P.session),await this._notifyAllSubscribers("SIGNED_IN",P.session)),this._returnResult({data:Object.assign({},P),error:F})}catch(P){if(He(P))return this._returnResult({data:{user:null,session:null},error:P});throw P}}async signInWithSolana(n){var s,u,f,v,h,g,b,_,k,R,N,A;let j,P;if("message"in n)j=n.message,P=n.signature;else{const{chain:F,wallet:Y,statement:q,options:I}=n;let ie;if(oi())if(typeof Y=="object")ie=Y;else{const fe=window;if("solana"in fe&&typeof fe.solana=="object"&&("signIn"in fe.solana&&typeof fe.solana.signIn=="function"||"signMessage"in fe.solana&&typeof fe.solana.signMessage=="function"))ie=fe.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof Y!="object"||!(I!=null&&I.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");ie=Y}const le=new URL((s=I==null?void 0:I.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in ie&&ie.signIn){const fe=await ie.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},I==null?void 0:I.signInWithSolana),{version:"1",domain:le.host,uri:le.href}),q?{statement:q}:null));let ne;if(Array.isArray(fe)&&fe[0]&&typeof fe[0]=="object")ne=fe[0];else if(fe&&typeof fe=="object"&&"signedMessage"in fe&&"signature"in fe)ne=fe;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in ne&&"signature"in ne&&(typeof ne.signedMessage=="string"||ne.signedMessage instanceof Uint8Array)&&ne.signature instanceof Uint8Array)j=typeof ne.signedMessage=="string"?ne.signedMessage:new TextDecoder().decode(ne.signedMessage),P=ne.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in ie)||typeof ie.signMessage!="function"||!("publicKey"in ie)||typeof ie!="object"||!ie.publicKey||!("toBase58"in ie.publicKey)||typeof ie.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");j=[`${le.host} wants you to sign in with your Solana account:`,ie.publicKey.toBase58(),...q?["",q,""]:[""],"Version: 1",`URI: ${le.href}`,`Issued At: ${(f=(u=I==null?void 0:I.signInWithSolana)===null||u===void 0?void 0:u.issuedAt)!==null&&f!==void 0?f:new Date().toISOString()}`,...!((v=I==null?void 0:I.signInWithSolana)===null||v===void 0)&&v.notBefore?[`Not Before: ${I.signInWithSolana.notBefore}`]:[],...!((h=I==null?void 0:I.signInWithSolana)===null||h===void 0)&&h.expirationTime?[`Expiration Time: ${I.signInWithSolana.expirationTime}`]:[],...!((g=I==null?void 0:I.signInWithSolana)===null||g===void 0)&&g.chainId?[`Chain ID: ${I.signInWithSolana.chainId}`]:[],...!((b=I==null?void 0:I.signInWithSolana)===null||b===void 0)&&b.nonce?[`Nonce: ${I.signInWithSolana.nonce}`]:[],...!((_=I==null?void 0:I.signInWithSolana)===null||_===void 0)&&_.requestId?[`Request ID: ${I.signInWithSolana.requestId}`]:[],...!((R=(k=I==null?void 0:I.signInWithSolana)===null||k===void 0?void 0:k.resources)===null||R===void 0)&&R.length?["Resources",...I.signInWithSolana.resources.map(ne=>`- ${ne}`)]:[]].join(`
284
+ `);const fe=await ie.signMessage(new TextEncoder().encode(j),"utf8");if(!fe||!(fe instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");P=fe}}try{const{data:F,error:Y}=await it(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:j,signature:Fc(P)},!((N=n.options)===null||N===void 0)&&N.captchaToken?{gotrue_meta_security:{captcha_token:(A=n.options)===null||A===void 0?void 0:A.captchaToken}}:null),xform:Xa});if(Y)throw Y;if(!F||!F.session||!F.user){const q=new Nf;return this._returnResult({data:{user:null,session:null},error:q})}return F.session&&(await this._saveSession(F.session),await this._notifyAllSubscribers("SIGNED_IN",F.session)),this._returnResult({data:Object.assign({},F),error:Y})}catch(F){if(He(F))return this._returnResult({data:{user:null,session:null},error:F});throw F}}async _exchangeCodeForSession(n){const s=await Mc(this.storage,`${this.storageKey}-code-verifier`),[u,f]=(s??"").split("/");try{if(!u&&this.flowType==="pkce")throw new n2;const{data:v,error:h}=await it(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:n,code_verifier:u},xform:Xa});if(await ai(this.storage,`${this.storageKey}-code-verifier`),h)throw h;if(!v||!v.session||!v.user){const g=new Nf;return this._returnResult({data:{user:null,session:null,redirectType:null},error:g})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers(f==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",v.session)),this._returnResult({data:Object.assign(Object.assign({},v),{redirectType:f??null}),error:h})}catch(v){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(v))return this._returnResult({data:{user:null,session:null,redirectType:null},error:v});throw v}}async signInWithIdToken(n){try{const{options:s,provider:u,token:f,access_token:v,nonce:h}=n,g=await it(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:u,id_token:f,access_token:v,nonce:h,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Xa}),{data:b,error:_}=g;if(_)return this._returnResult({data:{user:null,session:null},error:_});if(!b||!b.session||!b.user){const k=new Nf;return this._returnResult({data:{user:null,session:null},error:k})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:b,error:_})}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(n){var s,u,f,v,h;try{if("email"in n){const{email:g,options:b}=n;let _=null,k=null;this.flowType==="pkce"&&([_,k]=await jf(this.storage,this.storageKey));const{error:R}=await it(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:g,data:(s=b==null?void 0:b.data)!==null&&s!==void 0?s:{},create_user:(u=b==null?void 0:b.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:b==null?void 0:b.captchaToken},code_challenge:_,code_challenge_method:k},redirectTo:b==null?void 0:b.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:R})}if("phone"in n){const{phone:g,options:b}=n,{data:_,error:k}=await it(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:g,data:(f=b==null?void 0:b.data)!==null&&f!==void 0?f:{},create_user:(v=b==null?void 0:b.shouldCreateUser)!==null&&v!==void 0?v:!0,gotrue_meta_security:{captcha_token:b==null?void 0:b.captchaToken},channel:(h=b==null?void 0:b.channel)!==null&&h!==void 0?h:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:_==null?void 0:_.message_id},error:k})}throw new gy("You must provide either an email or phone number.")}catch(g){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async verifyOtp(n){var s,u;try{let f,v;"options"in n&&(f=(s=n.options)===null||s===void 0?void 0:s.redirectTo,v=(u=n.options)===null||u===void 0?void 0:u.captchaToken);const{data:h,error:g}=await it(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},n),{gotrue_meta_security:{captcha_token:v}}),redirectTo:f,xform:Xa});if(g)throw g;if(!h)throw new Error("An error occurred on token verification.");const b=h.session,_=h.user;return b!=null&&b.access_token&&(await this._saveSession(b),await this._notifyAllSubscribers(n.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",b)),this._returnResult({data:{user:_,session:b},error:null})}catch(f){if(He(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async signInWithSSO(n){var s,u,f,v,h;try{let g=null,b=null;this.flowType==="pkce"&&([g,b]=await jf(this.storage,this.storageKey));const _=await it(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in n?{provider_id:n.providerId}:null),"domain"in n?{domain:n.domain}:null),{redirect_to:(u=(s=n.options)===null||s===void 0?void 0:s.redirectTo)!==null&&u!==void 0?u:void 0}),!((f=n==null?void 0:n.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:n.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:g,code_challenge_method:b}),headers:this.headers,xform:T2});return!((v=_.data)===null||v===void 0)&&v.url&&oi()&&!(!((h=n.options)===null||h===void 0)&&h.skipBrowserRedirect)&&window.location.assign(_.data.url),this._returnResult(_)}catch(g){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(g))return this._returnResult({data:null,error:g});throw g}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;if(u)throw u;if(!s)throw new zr;const{error:f}=await it(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:f})})}catch(n){if(He(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async resend(n){try{const s=`${this.url}/resend`;if("email"in n){const{email:u,type:f,options:v}=n,{error:h}=await it(this.fetch,"POST",s,{headers:this.headers,body:{email:u,type:f,gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken}},redirectTo:v==null?void 0:v.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}else if("phone"in n){const{phone:u,type:f,options:v}=n,{data:h,error:g}=await it(this.fetch,"POST",s,{headers:this.headers,body:{phone:u,type:f,gotrue_meta_security:{captcha_token:v==null?void 0:v.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:h==null?void 0:h.message_id},error:g})}throw new gy("You must provide either an email or phone number and a type")}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async s=>s))}async _acquireLock(n,s){this._debug("#_acquireLock","begin",n);try{if(this.lockAcquired){const u=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),f=(async()=>(await u,await s()))();return this.pendingInLock.push((async()=>{try{await f}catch{}})()),f}return await this.lock(`lock:${this.storageKey}`,n,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const u=s();for(this.pendingInLock.push((async()=>{try{await u}catch{}})()),await u;this.pendingInLock.length;){const f=[...this.pendingInLock];await Promise.all(f),this.pendingInLock.splice(0,f.length)}return await u}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(n){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await n(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let n=null;const s=await Mc(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?n=s:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!n)return{data:{session:null},error:null};const u=n.expires_at?n.expires_at*1e3-Date.now()<fS:!1;if(this._debug("#__loadSession()",`session has${u?"":" not"} expired`,"expires_at",n.expires_at),!u){if(this.userStorage){const h=await Mc(this.userStorage,this.storageKey+"-user");h!=null&&h.user?n.user=h.user:n.user=pS()}if(this.storage.isServer&&n.user&&!n.user.__isUserNotAvailableProxy){const h={value:this.suppressGetSessionWarning};n.user=_2(n.user,h),h.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:n},error:null}}const{data:f,error:v}=await this._callRefreshToken(n.refresh_token);return v?this._returnResult({data:{session:null},error:v}):this._returnResult({data:{session:f},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(n){if(n)return await this._getUser(n);await this.initializePromise;const s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(n){try{return n?await it(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:n,xform:wu}):await this._useSession(async s=>{var u,f,v;const{data:h,error:g}=s;if(g)throw g;return!(!((u=h.session)===null||u===void 0)&&u.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new zr}:await it(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(v=(f=h.session)===null||f===void 0?void 0:f.access_token)!==null&&v!==void 0?v:void 0,xform:wu})})}catch(s){if(He(s))return my(s)&&(await this._removeSession(),await ai(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(n,s={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(n,s))}async _updateUser(n,s={}){try{return await this._useSession(async u=>{const{data:f,error:v}=u;if(v)throw v;if(!f.session)throw new zr;const h=f.session;let g=null,b=null;this.flowType==="pkce"&&n.email!=null&&([g,b]=await jf(this.storage,this.storageKey));const{data:_,error:k}=await it(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s==null?void 0:s.emailRedirectTo,body:Object.assign(Object.assign({},n),{code_challenge:g,code_challenge_method:b}),jwt:h.access_token,xform:wu});if(k)throw k;return h.user=_.user,await this._saveSession(h),await this._notifyAllSubscribers("USER_UPDATED",h),this._returnResult({data:{user:h.user},error:null})})}catch(u){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(u))return this._returnResult({data:{user:null},error:u});throw u}}async setSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(n))}async _setSession(n){try{if(!n.access_token||!n.refresh_token)throw new zr;const s=Date.now()/1e3;let u=s,f=!0,v=null;const{payload:h}=wy(n.access_token);if(h.exp&&(u=h.exp,f=u<=s),f){const{data:g,error:b}=await this._callRefreshToken(n.refresh_token);if(b)return this._returnResult({data:{user:null,session:null},error:b});if(!g)return{data:{user:null,session:null},error:null};v=g}else{const{data:g,error:b}=await this._getUser(n.access_token);if(b)return this._returnResult({data:{user:null,session:null},error:b});v={access_token:n.access_token,refresh_token:n.refresh_token,user:g.user,token_type:"bearer",expires_in:u-s,expires_at:u},await this._saveSession(v),await this._notifyAllSubscribers("SIGNED_IN",v)}return this._returnResult({data:{user:v.user,session:v},error:null})}catch(s){if(He(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(n))}async _refreshSession(n){try{return await this._useSession(async s=>{var u;if(!n){const{data:h,error:g}=s;if(g)throw g;n=(u=h.session)!==null&&u!==void 0?u:void 0}if(!(n!=null&&n.refresh_token))throw new zr;const{data:f,error:v}=await this._callRefreshToken(n.refresh_token);return v?this._returnResult({data:{user:null,session:null},error:v}):f?this._returnResult({data:{user:f.user,session:f},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(He(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(n,s){var u;try{if(!oi())throw new yy("No browser detected.");if(n.error||n.error_description||n.error_code)throw new yy(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new cC("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new yy("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!n.code)throw new cC("No code detected.");const{data:I,error:ie}=await this._exchangeCodeForSession(n.code);if(ie)throw ie;const le=new URL(window.location.href);return le.searchParams.delete("code"),window.history.replaceState(window.history.state,"",le.toString()),{data:{session:I.session,redirectType:(u=I.redirectType)!==null&&u!==void 0?u:null},error:null}}const{provider_token:f,provider_refresh_token:v,access_token:h,refresh_token:g,expires_in:b,expires_at:_,token_type:k}=n;if(!h||!b||!g||!k)throw new yy("No session defined in URL");const R=Math.round(Date.now()/1e3),N=parseInt(b);let A=R+N;_&&(A=parseInt(_));const j=A-R;j*1e3<=Mf&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${j}s, should have been closer to ${N}s`);const P=A-N;R-P>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",P,A,R):R-P<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",P,A,R);const{data:F,error:Y}=await this._getUser(h);if(Y)throw Y;const q={provider_token:f,provider_refresh_token:v,access_token:h,expires_in:N,expires_at:A,refresh_token:g,token_type:k,user:F.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:q,redirectType:n.type},error:null})}catch(f){if(He(f))return this._returnResult({data:{session:null,redirectType:null},error:f});throw f}}_isImplicitGrantCallback(n){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),n):!!(n.access_token||n.error_description)}async _isPKCECallback(n){const s=await Mc(this.storage,`${this.storageKey}-code-verifier`);return!!(n.code&&s)}async signOut(n={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(n))}async _signOut({scope:n}={scope:"global"}){return await this._useSession(async s=>{var u;const{data:f,error:v}=s;if(v&&!my(v))return this._returnResult({error:v});const h=(u=f.session)===null||u===void 0?void 0:u.access_token;if(h){const{error:g}=await this.admin.signOut(h,n);if(g&&!(e2(g)&&(g.status===404||g.status===401||g.status===403)||my(g)))return this._returnResult({error:g})}return n!=="others"&&(await this._removeSession(),await ai(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(n){const s=u2(),u={id:s,callback:n,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,u),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)})))(),{data:{subscription:u}}}async _emitInitialSession(n){return await this._useSession(async s=>{var u,f;try{const{data:{session:v},error:h}=s;if(h)throw h;await((u=this.stateChangeEmitters.get(n))===null||u===void 0?void 0:u.callback("INITIAL_SESSION",v)),this._debug("INITIAL_SESSION","callback id",n,"session",v)}catch(v){await((f=this.stateChangeEmitters.get(n))===null||f===void 0?void 0:f.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",n,"error",v),my(v)?console.warn(v):console.error(v)}})}async resetPasswordForEmail(n,s={}){let u=null,f=null;this.flowType==="pkce"&&([u,f]=await jf(this.storage,this.storageKey,!0));try{return await it(this.fetch,"POST",`${this.url}/recover`,{body:{email:n,code_challenge:u,code_challenge_method:f,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(v){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(v))return this._returnResult({data:null,error:v});throw v}}async getUserIdentities(){var n;try{const{data:s,error:u}=await this.getUser();if(u)throw u;return this._returnResult({data:{identities:(n=s.user.identities)!==null&&n!==void 0?n:[]},error:null})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(n){return"token"in n?this.linkIdentityIdToken(n):this.linkIdentityOAuth(n)}async linkIdentityOAuth(n){var s;try{const{data:u,error:f}=await this._useSession(async v=>{var h,g,b,_,k;const{data:R,error:N}=v;if(N)throw N;const A=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,n.provider,{redirectTo:(h=n.options)===null||h===void 0?void 0:h.redirectTo,scopes:(g=n.options)===null||g===void 0?void 0:g.scopes,queryParams:(b=n.options)===null||b===void 0?void 0:b.queryParams,skipBrowserRedirect:!0});return await it(this.fetch,"GET",A,{headers:this.headers,jwt:(k=(_=R.session)===null||_===void 0?void 0:_.access_token)!==null&&k!==void 0?k:void 0})});if(f)throw f;return oi()&&!(!((s=n.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(u==null?void 0:u.url),this._returnResult({data:{provider:n.provider,url:u==null?void 0:u.url},error:null})}catch(u){if(He(u))return this._returnResult({data:{provider:n.provider,url:null},error:u});throw u}}async linkIdentityIdToken(n){return await this._useSession(async s=>{var u;try{const{error:f,data:{session:v}}=s;if(f)throw f;const{options:h,provider:g,token:b,access_token:_,nonce:k}=n,R=await it(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(u=v==null?void 0:v.access_token)!==null&&u!==void 0?u:void 0,body:{provider:g,id_token:b,access_token:_,nonce:k,link_identity:!0,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Xa}),{data:N,error:A}=R;return A?this._returnResult({data:{user:null,session:null},error:A}):!N||!N.session||!N.user?this._returnResult({data:{user:null,session:null},error:new Nf}):(N.session&&(await this._saveSession(N.session),await this._notifyAllSubscribers("USER_UPDATED",N.session)),this._returnResult({data:N,error:A}))}catch(f){if(await ai(this.storage,`${this.storageKey}-code-verifier`),He(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}})}async unlinkIdentity(n){try{return await this._useSession(async s=>{var u,f;const{data:v,error:h}=s;if(h)throw h;return await it(this.fetch,"DELETE",`${this.url}/user/identities/${n.identity_id}`,{headers:this.headers,jwt:(f=(u=v.session)===null||u===void 0?void 0:u.access_token)!==null&&f!==void 0?f:void 0})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(n){const s=`#_refreshAccessToken(${n.substring(0,5)}...)`;this._debug(s,"begin");try{const u=Date.now();return await h2(async f=>(f>0&&await f2(200*Math.pow(2,f-1)),this._debug(s,"refreshing attempt",f),await it(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:n},headers:this.headers,xform:Xa})),(f,v)=>{const h=200*Math.pow(2,f);return v&&hS(v)&&Date.now()+h-u<Mf})}catch(u){if(this._debug(s,"error",u),He(u))return this._returnResult({data:{session:null,user:null},error:u});throw u}finally{this._debug(s,"end")}}_isValidSession(n){return typeof n=="object"&&n!==null&&"access_token"in n&&"refresh_token"in n&&"expires_at"in n}async _handleProviderSignIn(n,s){const u=await this._getUrlForProvider(`${this.url}/authorize`,n,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",n,"options",s,"url",u),oi()&&!s.skipBrowserRedirect&&window.location.assign(u),{data:{provider:n,url:u},error:null}}async _recoverAndRefresh(){var n,s;const u="#_recoverAndRefresh()";this._debug(u,"begin");try{const f=await Mc(this.storage,this.storageKey);if(f&&this.userStorage){let h=await Mc(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!h&&(h={user:f.user},await $f(this.userStorage,this.storageKey+"-user",h)),f.user=(n=h==null?void 0:h.user)!==null&&n!==void 0?n:pS()}else if(f&&!f.user&&!f.user){const h=await Mc(this.storage,this.storageKey+"-user");h&&(h!=null&&h.user)?(f.user=h.user,await ai(this.storage,this.storageKey+"-user"),await $f(this.storage,this.storageKey,f)):f.user=pS()}if(this._debug(u,"session from storage",f),!this._isValidSession(f)){this._debug(u,"session is not valid"),f!==null&&await this._removeSession();return}const v=((s=f.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<fS;if(this._debug(u,`session has${v?"":" not"} expired with margin of ${fS}s`),v){if(this.autoRefreshToken&&f.refresh_token){const{error:h}=await this._callRefreshToken(f.refresh_token);h&&(console.error(h),hS(h)||(this._debug(u,"refresh failed with a non-retryable error, removing the session",h),await this._removeSession()))}}else if(f.user&&f.user.__isUserNotAvailableProxy===!0)try{const{data:h,error:g}=await this._getUser(f.access_token);!g&&(h!=null&&h.user)?(f.user=h.user,await this._saveSession(f),await this._notifyAllSubscribers("SIGNED_IN",f)):this._debug(u,"could not get user data, skipping SIGNED_IN notification")}catch(h){console.error("Error getting user data:",h),this._debug(u,"error getting user data, skipping SIGNED_IN notification",h)}else await this._notifyAllSubscribers("SIGNED_IN",f)}catch(f){this._debug(u,"error",f),console.error(f);return}finally{this._debug(u,"end")}}async _callRefreshToken(n){var s,u;if(!n)throw new zr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const f=`#_callRefreshToken(${n.substring(0,5)}...)`;this._debug(f,"begin");try{this.refreshingDeferred=new Hy;const{data:v,error:h}=await this._refreshAccessToken(n);if(h)throw h;if(!v.session)throw new zr;await this._saveSession(v.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",v.session);const g={data:v.session,error:null};return this.refreshingDeferred.resolve(g),g}catch(v){if(this._debug(f,"error",v),He(v)){const h={data:null,error:v};return hS(v)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(h),h}throw(u=this.refreshingDeferred)===null||u===void 0||u.reject(v),v}finally{this.refreshingDeferred=null,this._debug(f,"end")}}async _notifyAllSubscribers(n,s,u=!0){const f=`#_notifyAllSubscribers(${n})`;this._debug(f,"begin",s,`broadcast = ${u}`);try{this.broadcastChannel&&u&&this.broadcastChannel.postMessage({event:n,session:s});const v=[],h=Array.from(this.stateChangeEmitters.values()).map(async g=>{try{await g.callback(n,s)}catch(b){v.push(b)}});if(await Promise.all(h),v.length>0){for(let g=0;g<v.length;g+=1)console.error(v[g]);throw v[0]}}finally{this._debug(f,"end")}}async _saveSession(n){this._debug("#_saveSession()",n),this.suppressGetSessionWarning=!0,await ai(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},n),u=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!u&&s.user&&await $f(this.userStorage,this.storageKey+"-user",{user:s.user});const f=Object.assign({},s);delete f.user;const v=vC(f);await $f(this.storage,this.storageKey,v)}else{const f=vC(s);await $f(this.storage,this.storageKey,f)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ai(this.storage,this.storageKey),await ai(this.storage,this.storageKey+"-code-verifier"),await ai(this.storage,this.storageKey+"-user"),this.userStorage&&await ai(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const n=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{n&&oi()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",n)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const n=setInterval(()=>this._autoRefreshTokenTick(),Mf);this.autoRefreshTicker=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const n=this.autoRefreshTicker;this.autoRefreshTicker=null,n&&clearInterval(n);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const n=Date.now();try{return await this._useSession(async s=>{const{data:{session:u}}=s;if(!u||!u.refresh_token||!u.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const f=Math.floor((u.expires_at*1e3-n)/Mf);this._debug("#_autoRefreshTokenTick()",`access token expires in ${f} ticks, a tick lasts ${Mf}ms, refresh threshold is ${MS} ticks`),f<=MS&&await this._callRefreshToken(u.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(n){if(n instanceof k1)this._debug("auto refresh token tick lock not available");else throw n}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!oi()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(n){this._debug("#visibilityChangedCallback","error",n)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(n){console.error("_handleVisibilityChange",n)}}async _onVisibilityChanged(n){const s=`#_onVisibilityChanged(${n})`;this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),n||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(n,s,u){const f=[`provider=${encodeURIComponent(s)}`];if(u!=null&&u.redirectTo&&f.push(`redirect_to=${encodeURIComponent(u.redirectTo)}`),u!=null&&u.scopes&&f.push(`scopes=${encodeURIComponent(u.scopes)}`),this.flowType==="pkce"){const[v,h]=await jf(this.storage,this.storageKey),g=new URLSearchParams({code_challenge:`${encodeURIComponent(v)}`,code_challenge_method:`${encodeURIComponent(h)}`});f.push(g.toString())}if(u!=null&&u.queryParams){const v=new URLSearchParams(u.queryParams);f.push(v.toString())}return u!=null&&u.skipBrowserRedirect&&f.push(`skip_http_redirect=${u.skipBrowserRedirect}`),`${n}?${f.join("&")}`}async _unenroll(n){try{return await this._useSession(async s=>{var u;const{data:f,error:v}=s;return v?this._returnResult({data:null,error:v}):await it(this.fetch,"DELETE",`${this.url}/factors/${n.factorId}`,{headers:this.headers,jwt:(u=f==null?void 0:f.session)===null||u===void 0?void 0:u.access_token})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(n){try{return await this._useSession(async s=>{var u,f;const{data:v,error:h}=s;if(h)return this._returnResult({data:null,error:h});const g=Object.assign({friendly_name:n.friendlyName,factor_type:n.factorType},n.factorType==="phone"?{phone:n.phone}:n.factorType==="totp"?{issuer:n.issuer}:{}),{data:b,error:_}=await it(this.fetch,"POST",`${this.url}/factors`,{body:g,headers:this.headers,jwt:(u=v==null?void 0:v.session)===null||u===void 0?void 0:u.access_token});return _?this._returnResult({data:null,error:_}):(n.factorType==="totp"&&b.type==="totp"&&(!((f=b==null?void 0:b.totp)===null||f===void 0)&&f.qr_code)&&(b.totp.qr_code=`data:image/svg+xml;utf-8,${b.totp.qr_code}`),this._returnResult({data:b,error:null}))})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _verify(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var u;const{data:f,error:v}=s;if(v)return this._returnResult({data:null,error:v});const h=Object.assign({challenge_id:n.challengeId},"webauthn"in n?{webauthn:Object.assign(Object.assign({},n.webauthn),{credential_response:n.webauthn.type==="create"?_C(n.webauthn.credential_response):EC(n.webauthn.credential_response)})}:{code:n.code}),{data:g,error:b}=await it(this.fetch,"POST",`${this.url}/factors/${n.factorId}/verify`,{body:h,headers:this.headers,jwt:(u=f==null?void 0:f.session)===null||u===void 0?void 0:u.access_token});return b?this._returnResult({data:null,error:b}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+g.expires_in},g)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",g),this._returnResult({data:g,error:b}))})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}})}async _challenge(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var u;const{data:f,error:v}=s;if(v)return this._returnResult({data:null,error:v});const h=await it(this.fetch,"POST",`${this.url}/factors/${n.factorId}/challenge`,{body:n,headers:this.headers,jwt:(u=f==null?void 0:f.session)===null||u===void 0?void 0:u.access_token});if(h.error)return h;const{data:g}=h;if(g.type!=="webauthn")return{data:g,error:null};switch(g.webauthn.type){case"create":return{data:Object.assign(Object.assign({},g),{webauthn:Object.assign(Object.assign({},g.webauthn),{credential_options:Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:SC(g.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},g),{webauthn:Object.assign(Object.assign({},g.webauthn),{credential_options:Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:xC(g.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}})}async _challengeAndVerify(n){const{data:s,error:u}=await this._challenge({factorId:n.factorId});return u?this._returnResult({data:null,error:u}):await this._verify({factorId:n.factorId,challengeId:s.id,code:n.code})}async _listFactors(){var n;const{data:{user:s},error:u}=await this.getUser();if(u)return{data:null,error:u};const f={all:[],phone:[],totp:[],webauthn:[]};for(const v of(n=s==null?void 0:s.factors)!==null&&n!==void 0?n:[])f.all.push(v),v.status==="verified"&&f[v.factor_type].push(v);return{data:f,error:null}}async _getAuthenticatorAssuranceLevel(n){var s,u,f,v;if(n)try{const{payload:A}=wy(n);let j=null;A.aal&&(j=A.aal);let P=j;const{data:{user:F},error:Y}=await this.getUser(n);if(Y)return this._returnResult({data:null,error:Y});((u=(s=F==null?void 0:F.factors)===null||s===void 0?void 0:s.filter(ie=>ie.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(P="aal2");const I=A.amr||[];return{data:{currentLevel:j,nextLevel:P,currentAuthenticationMethods:I},error:null}}catch(A){if(He(A))return this._returnResult({data:null,error:A});throw A}const{data:{session:h},error:g}=await this.getSession();if(g)return this._returnResult({data:null,error:g});if(!h)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:b}=wy(h.access_token);let _=null;b.aal&&(_=b.aal);let k=_;((v=(f=h.user.factors)===null||f===void 0?void 0:f.filter(A=>A.status==="verified"))!==null&&v!==void 0?v:[]).length>0&&(k="aal2");const N=b.amr||[];return{data:{currentLevel:_,nextLevel:k,currentAuthenticationMethods:N},error:null}}async _getAuthorizationDetails(n){try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;return f?this._returnResult({data:null,error:f}):u?await it(this.fetch,"GET",`${this.url}/oauth/authorizations/${n}`,{headers:this.headers,jwt:u.access_token,xform:v=>({data:v,error:null})}):this._returnResult({data:null,error:new zr})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(n,s){try{return await this._useSession(async u=>{const{data:{session:f},error:v}=u;if(v)return this._returnResult({data:null,error:v});if(!f)return this._returnResult({data:null,error:new zr});const h=await it(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:f.access_token,body:{action:"approve"},xform:g=>({data:g,error:null})});return h.data&&h.data.redirect_url&&oi()&&!(s!=null&&s.skipBrowserRedirect)&&window.location.assign(h.data.redirect_url),h})}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async _denyAuthorization(n,s){try{return await this._useSession(async u=>{const{data:{session:f},error:v}=u;if(v)return this._returnResult({data:null,error:v});if(!f)return this._returnResult({data:null,error:new zr});const h=await it(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:f.access_token,body:{action:"deny"},xform:g=>({data:g,error:null})});return h.data&&h.data.redirect_url&&oi()&&!(s!=null&&s.skipBrowserRedirect)&&window.location.assign(h.data.redirect_url),h})}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async _listOAuthGrants(){try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;return u?this._returnResult({data:null,error:u}):s?await it(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:f=>({data:f,error:null})}):this._returnResult({data:null,error:new zr})})}catch(n){if(He(n))return this._returnResult({data:null,error:n});throw n}}async _revokeOAuthGrant(n){try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;return f?this._returnResult({data:null,error:f}):u?(await it(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:u.access_token,query:{client_id:n.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new zr})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(n,s={keys:[]}){let u=s.keys.find(g=>g.kid===n);if(u)return u;const f=Date.now();if(u=this.jwks.keys.find(g=>g.kid===n),u&&this.jwks_cached_at+QL>f)return u;const{data:v,error:h}=await it(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(h)throw h;return!v.keys||v.keys.length===0||(this.jwks=v,this.jwks_cached_at=f,u=v.keys.find(g=>g.kid===n),!u)?null:u}async getClaims(n,s={}){try{let u=n;if(!u){const{data:A,error:j}=await this.getSession();if(j||!A.session)return this._returnResult({data:null,error:j});u=A.session.access_token}const{header:f,payload:v,signature:h,raw:{header:g,payload:b}}=wy(u);s!=null&&s.allowExpired||b2(v.exp);const _=!f.alg||f.alg.startsWith("HS")||!f.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(f.kid,s!=null&&s.keys?{keys:s.keys}:s==null?void 0:s.jwks);if(!_){const{error:A}=await this.getUser(u);if(A)throw A;return{data:{claims:v,header:f,signature:h},error:null}}const k=S2(f.alg),R=await crypto.subtle.importKey("jwk",_,k,!0,["verify"]);if(!await crypto.subtle.verify(k,R,h,s2(`${g}.${b}`)))throw new zS("Invalid JWT signature");return{data:{claims:v,header:f,signature:h},error:null}}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async signInWithPasskey(n){var s,u,f;To(this.experimental);try{if(!Ly())return this._returnResult({data:null,error:new Oo("Browser does not support WebAuthn",null)});const{data:v,error:h}=await this._startPasskeyAuthentication({options:{captchaToken:(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.captchaToken}});if(h||!v)return this._returnResult({data:null,error:h});const g=xC(v.options),b=(f=(u=n==null?void 0:n.options)===null||u===void 0?void 0:u.signal)!==null&&f!==void 0?f:FS.createNewAbortSignal(),{data:_,error:k}=await O1({publicKey:g,signal:b});if(k||!_)return this._returnResult({data:null,error:k??new Oo("WebAuthn ceremony failed",null)});const R=EC(_);return this._verifyPasskeyAuthentication({challengeId:v.challenge_id,credential:R})}catch(v){if(He(v))return this._returnResult({data:null,error:v});throw v}}async registerPasskey(n){var s,u;To(this.experimental);try{if(!Ly())return this._returnResult({data:null,error:new Oo("Browser does not support WebAuthn",null)});const{data:f,error:v}=await this._startPasskeyRegistration();if(v||!f)return this._returnResult({data:null,error:v});const h=SC(f.options),g=(u=(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.signal)!==null&&u!==void 0?u:FS.createNewAbortSignal(),{data:b,error:_}=await R1({publicKey:h,signal:g});if(_||!b)return this._returnResult({data:null,error:_??new Oo("WebAuthn ceremony failed",null)});const k=_C(b);return this._verifyPasskeyRegistration({challengeId:f.challenge_id,credential:k})}catch(f){if(He(f))return this._returnResult({data:null,error:f});throw f}}async _startPasskeyRegistration(){To(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;if(u)return this._returnResult({data:null,error:u});if(!s)return this._returnResult({data:null,error:new zr});const{data:f,error:v}=await it(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return v?this._returnResult({data:null,error:v}):this._returnResult({data:f,error:null})})}catch(n){if(He(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyRegistration(n){To(this.experimental);try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;if(f)return this._returnResult({data:null,error:f});if(!u)return this._returnResult({data:null,error:new zr});const{data:v,error:h}=await it(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:u.access_token,body:{challenge_id:n.challengeId,credential:n.credential}});return h?this._returnResult({data:null,error:h}):this._returnResult({data:v,error:null})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(n){var s;To(this.experimental);try{const{data:u,error:f}=await it(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=n==null?void 0:n.options)===null||s===void 0?void 0:s.captchaToken}}});return f?this._returnResult({data:null,error:f}):this._returnResult({data:u,error:null})}catch(u){if(He(u))return this._returnResult({data:null,error:u});throw u}}async _verifyPasskeyAuthentication(n){To(this.experimental);try{const{data:s,error:u}=await it(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:n.challengeId,credential:n.credential},xform:Xa});return u?this._returnResult({data:null,error:u}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){To(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:u}=n;if(u)return this._returnResult({data:null,error:u});if(!s)return this._returnResult({data:null,error:new zr});const{data:f,error:v}=await it(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:h=>({data:h,error:null})});return v?this._returnResult({data:null,error:v}):this._returnResult({data:f,error:null})})}catch(n){if(He(n))return this._returnResult({data:null,error:n});throw n}}async _updatePasskey(n){To(this.experimental);try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;if(f)return this._returnResult({data:null,error:f});if(!u)return this._returnResult({data:null,error:new zr});const{data:v,error:h}=await it(this.fetch,"PATCH",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:u.access_token,body:{friendly_name:n.friendlyName}});return h?this._returnResult({data:null,error:h}):this._returnResult({data:v,error:null})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(n){To(this.experimental);try{return await this._useSession(async s=>{const{data:{session:u},error:f}=s;if(f)return this._returnResult({data:null,error:f});if(!u)return this._returnResult({data:null,error:new zr});const{error:v}=await it(this.fetch,"DELETE",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:u.access_token,noResolveJson:!0});return v?this._returnResult({data:null,error:v}):this._returnResult({data:null,error:null})})}catch(s){if(He(s))return this._returnResult({data:null,error:s});throw s}}}dv.nextInstanceID={};const W2=dv,q2="2.106.1";let rv="";typeof Deno<"u"?rv="deno":typeof document<"u"?rv="web":typeof navigator<"u"&&navigator.product==="ReactNative"?rv="react-native":rv="node";const Y2={"X-Client-Info":`supabase-js-${rv}/${q2}`},G2={headers:Y2},K2={schema:"public"},J2={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},X2={},Q2={enabled:!1,respectSamplingDecision:!0};function Z2(i,n,s,u){function f(v){return v instanceof s?v:new s(function(h){h(v)})}return new(s||(s=Promise))(function(v,h){function g(k){try{_(u.next(k))}catch(R){h(R)}}function b(k){try{_(u.throw(k))}catch(R){h(R)}}function _(k){k.done?v(k.value):f(k.value).then(g,b)}_((u=u.apply(i,[])).next())})}let mS=null;const eP="@opentelemetry/api";function tP(){return mS===null&&(mS=import(eP).catch(()=>null)),mS}function nP(){return Z2(this,void 0,void 0,function*(){try{const i=yield tP();if(!i||!i.propagation||!i.context)return null;const n={};i.propagation.inject(i.context.active(),n);const s=n.traceparent;return s?{traceparent:s,tracestate:n.tracestate,baggage:n.baggage}:null}catch{return null}})}function rP(i){if(!i||typeof i!="string")return null;const n=i.split("-");if(n.length!==4)return null;const[s,u,f,v]=n;if(s.length!==2||u.length!==32||f.length!==16||v.length!==2)return null;const h=/^[0-9a-f]+$/i;return!h.test(s)||!h.test(u)||!h.test(f)||!h.test(v)||u==="00000000000000000000000000000000"||f==="0000000000000000"?null:{version:s,traceId:u,parentId:f,traceFlags:v,isSampled:(parseInt(v,16)&1)===1}}function iP(i,n){if(!i||!n||n.length===0)return!1;let s;if(i instanceof URL)s=i;else try{s=new URL(i)}catch{return!1}for(const u of n)try{if(typeof u=="string"){if(aP(s.hostname,u))return!0}else if(u instanceof RegExp){if(u.test(s.hostname))return!0}else if(typeof u=="function"&&u(s))return!0}catch{continue}return!1}function aP(i,n){if(n===i)return!0;if(n.startsWith("*.")){const s=n.slice(2);if(i.endsWith(s)&&(i===s||i.endsWith("."+s)))return!0}return!1}function oP(i){const n=[];try{const s=new URL(i);n.push(s.hostname)}catch{}return n.push("*.supabase.co","*.supabase.in"),n.push("localhost","127.0.0.1","[::1]"),n}function fv(i){"@babel/helpers - typeof";return fv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fv(i)}function sP(i,n){if(fv(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var u=s.call(i,n);if(fv(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function lP(i){var n=sP(i,"string");return fv(n)=="symbol"?n:n+""}function uP(i,n,s){return(n=lP(n))in i?Object.defineProperty(i,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[n]=s,i}function CC(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);n&&(u=u.filter(function(f){return Object.getOwnPropertyDescriptor(i,f).enumerable})),s.push.apply(s,u)}return s}function lr(i){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?CC(Object(s),!0).forEach(function(u){uP(i,u,s[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):CC(Object(s)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(s,u))})}return i}const cP=i=>i?(...n)=>i(...n):(...n)=>fetch(...n),dP=()=>Headers,fP=(i,n,s,u,f)=>{const v=cP(u),h=dP(),g=(f==null?void 0:f.enabled)===!0,b=(f==null?void 0:f.respectSamplingDecision)!==!1,_=g?oP(n):null;return async(k,R)=>{var N;const A=(N=await s())!==null&&N!==void 0?N:i;let j=new h(R==null?void 0:R.headers);if(j.has("apikey")||j.set("apikey",i),j.has("Authorization")||j.set("Authorization",`Bearer ${A}`),_){const P=await hP(k,_,b);P&&(P.traceparent&&!j.has("traceparent")&&j.set("traceparent",P.traceparent),P.tracestate&&!j.has("tracestate")&&j.set("tracestate",P.tracestate),P.baggage&&!j.has("baggage")&&j.set("baggage",P.baggage))}return v(k,lr(lr({},R),{},{headers:j}))}};async function hP(i,n,s){if(!iP(typeof i=="string"||i instanceof URL?i:i.url,n))return null;const u=await nP();if(!u||!u.traceparent)return null;if(s){const f=rP(u.traceparent);if(f&&!f.isSampled)return null}return u}function TC(i){return typeof i=="boolean"?{enabled:i}:i}function pP(i){return i.endsWith("/")?i:i+"/"}function vP(i,n){var s,u,f,v,h,g;const{db:b,auth:_,realtime:k,global:R}=i,{db:N,auth:A,realtime:j,global:P}=n,F=TC(i.tracePropagation),Y=TC(n.tracePropagation),q={db:lr(lr({},N),b),auth:lr(lr({},A),_),realtime:lr(lr({},j),k),storage:{},global:lr(lr(lr({},P),R),{},{headers:lr(lr({},(s=P==null?void 0:P.headers)!==null&&s!==void 0?s:{}),(u=R==null?void 0:R.headers)!==null&&u!==void 0?u:{})}),tracePropagation:{enabled:(f=(v=F==null?void 0:F.enabled)!==null&&v!==void 0?v:Y==null?void 0:Y.enabled)!==null&&f!==void 0?f:!1,respectSamplingDecision:(h=(g=F==null?void 0:F.respectSamplingDecision)!==null&&g!==void 0?g:Y==null?void 0:Y.respectSamplingDecision)!==null&&h!==void 0?h:!0},accessToken:async()=>""};return i.accessToken?q.accessToken=i.accessToken:delete q.accessToken,q}function mP(i){const n=i==null?void 0:i.trim();if(!n)throw new Error("supabaseUrl is required.");if(!n.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(pP(n))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var gP=class extends W2{constructor(i){super(i)}},yP=class{constructor(i,n,s){var u,f;this.supabaseUrl=i,this.supabaseKey=n;const v=mP(i);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",v),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",v),this.storageUrl=new URL("storage/v1",v),this.functionsUrl=new URL("functions/v1",v);const h=`sb-${v.hostname.split(".")[0]}-auth-token`,g={db:K2,realtime:X2,auth:lr(lr({},J2),{},{storageKey:h}),global:G2,tracePropagation:Q2},b=vP(s??{},g);if(this.settings=b,this.storageKey=(u=b.auth.storageKey)!==null&&u!==void 0?u:"",this.headers=(f=b.global.headers)!==null&&f!==void 0?f:{},b.accessToken)this.accessToken=b.accessToken,this.auth=new Proxy({},{get:(k,R)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(R)} is not possible`)}});else{var _;this.auth=this._initSupabaseAuthClient((_=b.auth)!==null&&_!==void 0?_:{},this.headers,b.global.fetch)}this.fetch=fP(n,i,this._getAccessToken.bind(this),b.global.fetch,b.tracePropagation),this.realtime=this._initRealtimeClient(lr({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},b.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(k=>this.realtime.setAuth(k)).catch(k=>console.warn("Failed to set initial Realtime auth token:",k)),this.rest=new Lj(new URL("rest/v1",v).href,{headers:this.headers,schema:b.db.schema,fetch:this.fetch,timeout:b.db.timeout,urlLengthLimit:b.db.urlLengthLimit}),this.storage=new YL(this.storageUrl.href,this.headers,this.fetch,s==null?void 0:s.storage),b.accessToken||this._listenForAuthEvents()}get functions(){return new Ej(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(i){return this.rest.from(i)}schema(i){return this.rest.schema(i)}rpc(i,n={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(i,n,s)}channel(i,n={config:{}}){return this.realtime.channel(i,n)}getChannels(){return this.realtime.getChannels()}removeChannel(i){return this.realtime.removeChannel(i)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var i=this,n,s;if(i.accessToken)return await i.accessToken();const{data:u}=await i.auth.getSession();return(n=(s=u.session)===null||s===void 0?void 0:s.access_token)!==null&&n!==void 0?n:i.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:i,persistSession:n,detectSessionInUrl:s,storage:u,userStorage:f,storageKey:v,flowType:h,lock:g,debug:b,throwOnError:_,experimental:k,lockAcquireTimeout:R,skipAutoInitialize:N},A,j){const P={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new gP({url:this.authUrl.href,headers:lr(lr({},P),A),storageKey:v,autoRefreshToken:i,persistSession:n,detectSessionInUrl:s,storage:u,userStorage:f,flowType:h,lock:g,debug:b,throwOnError:_,experimental:k,fetch:j,lockAcquireTimeout:R,skipAutoInitialize:N,hasCustomAuthorizationHeader:Object.keys(this.headers).some(F=>F.toLowerCase()==="authorization")})}_initRealtimeClient(i){return new mL(this.realtimeUrl.href,lr(lr({},i),{},{params:lr(lr({},{apikey:this.supabaseKey}),i==null?void 0:i.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((i,n)=>{this._handleTokenChanged(i,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(i,n,s){(i==="TOKEN_REFRESHED"||i==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):i==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const wP=(i,n,s)=>new yP(i,n,s);function bP(){if(typeof window<"u")return!1;const i=globalThis.process;if(!i)return!1;const n=i.version;if(n==null)return!1;const s=n.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}bP()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const RC="feedly_device_id",SP="feedly.auth.token";let by=null,$c=null;function A1(){if($c)return $c;try{const i=window.localStorage.getItem(RC);if(i)return $c=i,i;const n=crypto.randomUUID();return window.localStorage.setItem(RC,n),$c=n,n}catch{return $c||($c=crypto.randomUUID()),$c}}function D1(i,n){return by||(by=wP(i,n,{auth:{persistSession:!0,autoRefreshToken:!0,storageKey:SP,detectSessionInUrl:!0},global:{headers:{"x-feedly-device-id":A1()}}}),by)}async function xP(i,n){const s=n.trim();if(!s)return{ok:!1,error:"empty_email"};const{error:u}=await i.auth.signInWithOtp({email:s,options:{emailRedirectTo:typeof window<"u"?window.location.href:void 0}});return u?{ok:!1,error:u.message}:{ok:!0}}function _P(i,n){const[s,u]=G.useState({loading:!0,project:null});return G.useEffect(()=>{let f=!1;async function v(){const{data:g,error:b}=await i.from("projects").select("id, name, session_active").eq("id",n).maybeSingle();if(!f){if(b){console.warn("[feedly-widget] Failed to load project",b.message),u({loading:!1,project:null});return}u({loading:!1,project:g})}}v();const h=i.channel(`feedly:project:${n}`).on("postgres_changes",{event:"UPDATE",schema:"public",table:"projects",filter:`id=eq.${n}`},g=>{const b=g.new;u({loading:!1,project:b})}).subscribe();return()=>{f=!0,i.removeChannel(h)}},[i,n]),s}const tx="feedly_user";function EP(i){try{const n=window.localStorage.getItem(tx);if(!n)return null;const s=JSON.parse(n);return s.projectId!==i?null:s}catch{return null}}function Sy(i){try{window.localStorage.setItem(tx,JSON.stringify(i))}catch{}}function OC(){try{window.localStorage.removeItem(tx)}catch{}}const BS="feedly_pin_intent",kP=3e4;function CP(i,n){try{const s={projectId:i,annotationId:n,ts:Date.now()};window.localStorage.setItem(BS,JSON.stringify(s))}catch{}}function TP(i){try{const n=window.localStorage.getItem(BS);if(!n)return null;const s=JSON.parse(n);return window.localStorage.removeItem(BS),s.projectId!==i||Date.now()-s.ts>kP?null:s.annotationId}catch{return null}}const AC=["#E8593C","#1D9E75","#7F77DD","#D4537E","#378ADD","#BA7517","#639922","#888780"];function RP(i){return AC[i%AC.length]}function OP(i){return`feedly:bcast:${i}`}function AP(i){return`feedly:bcast-testers:${i}`}const HS="feedly";function DP(i,n){var b;const[s,u]=G.useState({identity:null,isAdmin:!1,initializing:!0});G.useEffect(()=>{let _=!1;async function k(){const R=EP(n);if(R){u({identity:R,isAdmin:!1,initializing:!1});const{data:Y,error:q}=await i.from("testers").select("id, is_admin").eq("id",R.id).maybeSingle();if(_||q)return;if(!Y)OC(),u({identity:null,isAdmin:!1,initializing:!1});else{u(I=>({...I,isAdmin:!!Y.is_admin}));return}}const{data:N}=await i.auth.getSession();if(_)return;if(!N.session){u({identity:null,isAdmin:!1,initializing:!1});return}const{data:A,error:j}=await i.rpc("feedly_link_tester_by_email",{p_project_id:n});if(_)return;const P=A;if(j||!P||P.error||!P.tester_id||!P.name||!P.color){u({identity:null,isAdmin:!1,initializing:!1});return}const F={id:P.tester_id,name:P.name,color:P.color,projectId:n};Sy(F),typeof window<"u"&&(window.location.hash&&/access_token|refresh_token|provider_token|type=/.test(window.location.hash)&&window.history.replaceState(null,"",window.location.pathname+window.location.search),window.dispatchEvent(new CustomEvent("feedly:navigate"))),u({identity:F,isAdmin:!!P.is_admin,initializing:!1})}return k(),()=>{_=!0}},[i,n]),G.useEffect(()=>{var N;const _=(N=s.identity)==null?void 0:N.id;if(!_)return;const k=i.channel(`feedly:tester:${_}`).on("postgres_changes",{event:"UPDATE",schema:"public",table:"testers",filter:`id=eq.${_}`},A=>{const j=A.new;u(P=>({...P,isAdmin:!!j.is_admin}))}).subscribe(),R=i.channel(AP(n),{config:{broadcast:{self:!1}}}).on("broadcast",{event:HS},({payload:A})=>{!A||A.t!=="tester"||A.id!==_||i.from("testers").select("id, is_admin").eq("id",_).maybeSingle().then(({data:j})=>{j&&u(P=>({...P,isAdmin:!!j.is_admin}))})}).subscribe();return()=>{i.removeChannel(k),i.removeChannel(R)}},[i,n,(b=s.identity)==null?void 0:b.id]);const f=G.useCallback(async(_,k)=>{var I,ie;const R=_.trim();if(!R)return null;const N=(k==null?void 0:k.trim())||null,A=A1(),j=await i.from("testers").select("id, name, color, is_admin").eq("project_id",n).eq("device_id",A).maybeSingle();if(j.error)return console.warn("[feedly-widget] tester lookup failed",j.error.message),null;if(j.data){N&&await i.from("testers").update({email:N}).eq("id",j.data.id).is("email",null);const le={id:j.data.id,name:j.data.name,color:j.data.color,projectId:n};return Sy(le),u({identity:le,isAdmin:!!j.data.is_admin,initializing:!1}),le}const{data:P}=await i.rpc("feedly_next_color",{p_project_id:n}),F=P??RP(0),Y=await i.from("testers").insert({project_id:n,name:R,device_id:A,color:F,email:N}).select("id, name, color, is_admin").single();if(Y.error||!Y.data){if(((I=Y.error)==null?void 0:I.code)==="23505"){const le=await i.from("testers").select("id, name, color, is_admin").eq("project_id",n).eq("device_id",A).maybeSingle();if(le.data){const fe={id:le.data.id,name:le.data.name,color:le.data.color,projectId:n};return Sy(fe),u({identity:fe,isAdmin:!!le.data.is_admin,initializing:!1}),fe}}return console.warn("[feedly-widget] Failed to register tester",(ie=Y.error)==null?void 0:ie.message),null}const q={id:Y.data.id,name:Y.data.name,color:Y.data.color,projectId:n};return Sy(q),u({identity:q,isAdmin:!!Y.data.is_admin,initializing:!1}),q},[i,n]),v=G.useCallback(async()=>{const{data:_}=await i.rpc("feedly_claim_admin",{p_project_id:n});_&&_.is_admin&&u(k=>k.isAdmin?k:{...k,isAdmin:!0})},[i,n]),h=G.useCallback(_=>xP(i,_),[i]),g=G.useCallback(()=>{OC(),u({identity:null,isAdmin:!1,initializing:!1})},[]);return{...s,register:f,sendCrossDeviceLink:h,claimAdmin:v,signOut:g}}const Uy="feedly:navigate";let VS=!1,WS=[],My=null,DC=!1;function NP(){if(DC||typeof window>"u")return;DC=!0;const i=()=>{try{window.dispatchEvent(new CustomEvent(Uy))}catch{}},n=window.history.pushState;window.history.pushState=function(...u){const f=n.apply(this,u);return i(),f};const s=window.history.replaceState;window.history.replaceState=function(...u){const f=s.apply(this,u);return i(),f}}function jP({hostId:i}){if(VS)return()=>{};VS=!0,My=n;async function n(f,v={push:!0}){var h;try{const g=await fetch(f,{credentials:"same-origin"});if(!g.ok){window.location.href=f;return}const b=await g.text(),_=new DOMParser().parseFromString(b,"text/html"),k=document.getElementById(i),R=document.getElementById("feedly-widget-pins");k==null||k.remove(),R==null||R.remove(),document.body.replaceChildren(...Array.from(_.body.childNodes).map(A=>A.cloneNode(!0))),document.body.querySelectorAll("script").forEach(A=>{const j=document.createElement("script");for(const P of Array.from(A.attributes))j.setAttribute(P.name,P.value);j.textContent=A.textContent,A.replaceWith(j)}),R&&document.body.appendChild(R),k&&document.body.appendChild(k);const N=(h=_.querySelector("title"))==null?void 0:h.textContent;N&&(document.title=N),v.push&&history.pushState({feedlySoftNav:!0},"",f),window.scrollTo(0,0),window.dispatchEvent(new CustomEvent(Uy))}catch{window.location.href=f}}function s(f){var b,_;if(f.defaultPrevented||f.button!==0||f.metaKey||f.ctrlKey||f.shiftKey||f.altKey)return;const v=(_=(b=f.target)==null?void 0:b.closest)==null?void 0:_.call(b,"a");if(!v||v.hasAttribute("data-no-feedly-nav")||v.hasAttribute("download")||v.target&&v.target!=="_self")return;const h=v.getAttribute("href");if(!h||h.startsWith("#")||h.startsWith("mailto:")||h.startsWith("tel:"))return;const g=new URL(v.href,location.href);g.origin===location.origin&&(g.pathname===location.pathname&&g.search===location.search&&g.hash||(f.preventDefault(),n(g.toString(),{push:!0})))}function u(){n(location.href,{push:!1})}return document.addEventListener("click",s,!0),window.addEventListener("popstate",u),WS.push(()=>document.removeEventListener("click",s,!0),()=>window.removeEventListener("popstate",u)),N1}function N1(){WS.forEach(i=>i()),WS=[],VS=!1,My=null}function LP(i){return window.addEventListener(Uy,i),()=>window.removeEventListener(Uy,i)}async function NC(i){if(My){await My(i,{push:!0});return}window.location.href=i}function jC(i,n){try{const s=new URL(i,window.location.href),u=new URL(n,window.location.href);return s.origin===u.origin&&s.pathname===u.pathname&&s.search===u.search}catch{return i===n}}function LC(){return typeof window>"u"?{href:"",pathname:""}:{href:window.location.href,pathname:window.location.pathname}}function j1(){const[i,n]=G.useState(LC);return G.useEffect(()=>{const s=()=>n(LC()),u=LP(s);return window.addEventListener("popstate",s),window.addEventListener("hashchange",s),()=>{u(),window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s)}},[]),i}function PP(i){const n=[[/Edg\/(\d+(?:\.\d+)?)/,"Edge"],[/OPR\/(\d+(?:\.\d+)?)/,"Opera"],[/Firefox\/(\d+(?:\.\d+)?)/,"Firefox"],[/Chrome\/(\d+(?:\.\d+)?)/,"Chrome"],[/Version\/(\d+(?:\.\d+)?).*Safari/,"Safari"]];for(const[s,u]of n){const f=i.match(s);if(f)return{name:u,version:f[1]??""}}}function UP(i){if(/Windows NT (\d+\.\d+)/.test(i)){const n=i.match(/Windows NT (\d+\.\d+)/);return{name:"Windows",version:(n==null?void 0:n[1])??""}}if(/Mac OS X (\d+[_\.]\d+(?:[_\.]\d+)?)/.test(i)){const n=i.match(/Mac OS X (\d+[_\.]\d+(?:[_\.]\d+)?)/);return{name:"macOS",version:((n==null?void 0:n[1])??"").replace(/_/g,".")}}if(/iPhone OS (\d+[_\.]\d+(?:[_\.]\d+)?)/.test(i)){const n=i.match(/iPhone OS (\d+[_\.]\d+(?:[_\.]\d+)?)/);return{name:"iOS",version:((n==null?void 0:n[1])??"").replace(/_/g,".")}}if(/Android (\d+(?:\.\d+)?)/.test(i)){const n=i.match(/Android (\d+(?:\.\d+)?)/);return{name:"Android",version:(n==null?void 0:n[1])??""}}if(/Linux/.test(i))return{name:"Linux",version:""}}function MP(){const i=navigator.userAgent;return{user_agent:i,platform:navigator.platform??"",language:navigator.language??"",page_title:document.title,viewport:{width:window.innerWidth,height:window.innerHeight},screen:{width:window.screen.width,height:window.screen.height},device_pixel_ratio:window.devicePixelRatio??1,browser:PP(i),os:UP(i)}}function $P(){return`FB-${Math.floor(1e3+Math.random()*9e3)}`}function L1(i){if(i.length===0)return"";if(i.length===1){const s=i[0];return`M${s.x},${s.y}`}if(i.length===2){const[s,u]=i;return`M${s.x},${s.y} L${u.x},${u.y}`}let n=`M${i[0].x},${i[0].y}`;for(let s=0;s<i.length-1;s++){const u=i[s-1]??i[s],f=i[s],v=i[s+1],h=i[s+2]??v,g=f.x+(v.x-u.x)/6,b=f.y+(v.y-u.y)/6,_=v.x-(h.x-f.x)/6,k=v.y-(h.y-f.y)/6;n+=` C${g},${b} ${_},${k} ${v.x},${v.y}`}return n}function P1(i){let n=1/0,s=1/0,u=-1/0,f=-1/0;for(const v of i)v.x<n&&(n=v.x),v.y<s&&(s=v.y),v.x>u&&(u=v.x),v.y>f&&(f=v.y);return Number.isFinite(n)?{x:n,y:s,width:u-n,height:f-s}:{x:0,y:0,width:0,height:0}}function IP(i){switch(i.kind){case"circle":return{...i.bbox};case"arrow":{const n=Math.min(i.from.x,i.to.x),s=Math.min(i.from.y,i.to.y);return{x:n,y:s,width:Math.abs(i.to.x-i.from.x),height:Math.abs(i.to.y-i.from.y)}}case"rectangle":return{x:i.x,y:i.y,width:i.width,height:i.height}}}function xy(i){switch(i.kind){case"circle":{const{x:n,y:s,width:u}=i.bbox;return{x:n+u,y:s}}case"arrow":return i.to;case"rectangle":return{x:i.x+i.width,y:i.y}}}function qS(i,n,s){switch(i.kind){case"circle":return{kind:"circle",path:zP(i.path,n,s),bbox:{x:i.bbox.x+n,y:i.bbox.y+s,width:i.bbox.width,height:i.bbox.height}};case"arrow":return{kind:"arrow",from:{x:i.from.x+n,y:i.from.y+s},to:{x:i.to.x+n,y:i.to.y+s}};case"rectangle":return{kind:"rectangle",x:i.x+n,y:i.y+s,width:i.width,height:i.height}}}function zP(i,n,s){return i.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(u,f,v)=>{const h=parseFloat(f)+n,g=parseFloat(v)+s;return`${h},${g}`})}let ys=null,PC=!1,Bc=null;const FP=6e4;function UC(){Bc&&clearTimeout(Bc),Bc=setTimeout(()=>{Bc=null,U1()},FP)}function U1(){Bc&&(clearTimeout(Bc),Bc=null),ys&&(ys.getTracks().forEach(i=>{try{i.stop()}catch{}}),ys=null)}function M1(){var i;return!(typeof navigator>"u"||!((i=navigator.mediaDevices)!=null&&i.getDisplayMedia))}function BP(i){if(typeof document>"u")return!1;const n=document.getElementsByTagName("iframe");if(n.length===0)return!1;const s=i.x+i.width,u=i.y+i.height;for(const f of Array.from(n)){if(f.closest("#feedly-widget-root, #feedly-widget-pins"))continue;const v=f.getBoundingClientRect();if(v.width===0||v.height===0)continue;const h=v.left+window.scrollX,g=v.top+window.scrollY,b=h+v.width,_=g+v.height;if(h<s&&b>i.x&&g<u&&_>i.y)return!0}return!1}async function HP(){if(PC)return null;if(ys){const i=ys.getVideoTracks();if(i.length>0&&i.every(n=>n.readyState==="live"))return UC(),ys;ys=null}try{const i=await navigator.mediaDevices.getDisplayMedia({preferCurrentTab:!0,video:{displaySurface:"browser"},audio:!1,selfBrowserSurface:"include",surfaceSwitching:"exclude",systemAudio:"exclude"});return ys=i,i.getVideoTracks().forEach(n=>{n.addEventListener("ended",()=>{ys===i&&(ys=null)})}),UC(),i}catch(i){return typeof i=="object"&&i!==null&&"name"in i&&i.name==="NotAllowedError"&&(PC=!0),null}}async function VP(i){var s;const n=window;if(typeof n.ImageCapture=="function")try{const f=await new n.ImageCapture(i).grabFrame(),v=document.createElement("canvas");v.width=f.width,v.height=f.height;const h=v.getContext("2d");return h?(h.drawImage(f,0,0),(s=f.close)==null||s.call(f),v):null}catch{}return new Promise(u=>{const f=document.createElement("video");f.muted=!0,f.playsInline=!0,f.srcObject=new MediaStream([i]);const v=h=>{try{f.pause(),f.srcObject=null,f.remove()}catch{}h||u(null)};f.play().then(()=>{requestAnimationFrame(()=>{const h=document.createElement("canvas");h.width=f.videoWidth,h.height=f.videoHeight;const g=h.getContext("2d");if(!g){v(!0),u(null);return}g.drawImage(f,0,0),v(!0),u(h)})}).catch(()=>{v(!1)})})}async function WP(i,n={}){if(!M1())return null;const s=await HP();if(!s)return null;const u=s.getVideoTracks()[0];if(!u||u.readyState!=="live")return null;const f={x:window.scrollX,y:window.scrollY},v=window.innerWidth,h=window.innerHeight,g=Math.max(0,Math.min(i.x+i.width/2-v/2,document.documentElement.scrollWidth-v)),b=Math.max(0,Math.min(i.y+i.height/2-h/2,document.documentElement.scrollHeight-h)),_=Math.abs(f.x-g)>1||Math.abs(f.y-b)>1;if(_&&n.allowScroll===!1)return null;_&&(window.scrollTo({left:g,top:b,behavior:"instant"}),await new Promise(ne=>requestAnimationFrame(()=>requestAnimationFrame(()=>ne()))));let k=null;try{k=await VP(u)}catch{k=null}if(_&&window.scrollTo({left:f.x,top:f.y,behavior:"instant"}),!k)return null;const R=i.x-(_?g:f.x),N=i.y-(_?b:f.y),A=k.width/v,j=k.height/h,P=Math.max(0,Math.round(R*A)),F=Math.max(0,Math.round(N*j)),Y=Math.max(1,Math.round(i.width*A)),q=Math.max(1,Math.round(i.height*j)),I=Math.min(Y,k.width-P),ie=Math.min(q,k.height-F);if(I<4||ie<4)return null;const le=document.createElement("canvas");le.width=I,le.height=ie;const fe=le.getContext("2d");return fe?(fe.drawImage(k,P,F,I,ie,0,0,I,ie),{dataUrl:le.toDataURL("image/jpeg",.85)}):null}const hv="feedback-snapshots",$1=["feedly-widget-root","feedly-widget-pins"];function qP(i){const n=[],s=[];for(const u of $1){const f=document.getElementById(u);f&&(n.push(f),s.push(f.style.visibility),f.style.visibility="hidden")}return i().finally(()=>{n.forEach((u,f)=>{u.style.visibility=s[f]??""})})}function MC(i){const n=[],s=[],u=[],f=[];try{document.querySelectorAll("select").forEach(v=>{v.querySelectorAll("option").forEach(h=>{const g=h,b=g.hasAttribute("selected"),_=g.getAttribute("selected");g.value===v.value?(b||g.setAttribute("selected","selected"),n.push({el:g,hadAttr:b,prev:_})):b&&(g.removeAttribute("selected"),n.push({el:g,hadAttr:!0,prev:_}))})}),document.querySelectorAll("input").forEach(v=>{const h=v;if(h.type==="checkbox"||h.type==="radio"){const g=h.hasAttribute("checked");h.checked&&!g?(h.setAttribute("checked","checked"),u.push({el:h,hadAttr:!1})):!h.checked&&g&&(h.removeAttribute("checked"),u.push({el:h,hadAttr:!0}))}else if(h.type!=="file"){const g=h.getAttribute("value");h.setAttribute("value",h.value),s.push({el:h,prev:g})}}),document.querySelectorAll("textarea").forEach(v=>{const h=v,g=h.textContent??"";h.textContent=h.value,f.push({el:h,prev:g})})}catch(v){console.warn("[feedly-widget] form state mirror partial failure",v)}return i().finally(()=>{for(const{el:v,hadAttr:h,prev:g}of n)h?v.setAttribute("selected",g??"selected"):v.removeAttribute("selected");for(const{el:v,prev:h}of s)h===null?v.removeAttribute("value"):v.setAttribute("value",h);for(const{el:v,hadAttr:h}of u)h?v.setAttribute("checked","checked"):v.removeAttribute("checked");for(const{el:v,prev:h}of f)v.textContent=h})}const _y=6;let $C=Promise.resolve();function YP(i){const n=()=>GP(i),s=$C.then(n,n);return $C=s.catch(()=>null),s}async function GP({supabase:i,projectId:n,bbox:s,shouldProceed:u}){if(u&&!u()||s.width<4||s.height<4)return null;const f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),v=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),h=Math.max(0,s.x-_y),g=Math.max(0,s.y-_y),b=Math.min(f-h,s.width+_y*2),_=Math.min(v-g,s.height+_y*2);if(b<4||_<4)return null;const k={x:h,y:g,width:b,height:_},R={...k,pads:{l:s.x-h,t:s.y-g,r:h+b-(s.x+s.width),b:g+_-(s.y+s.height)}},N=window.devicePixelRatio||1,A={vw:window.innerWidth,vh:window.innerHeight,dpr:N};if(M1()&&BP(k)){const ie=await qP(()=>MC(()=>WP(k,{allowScroll:!1})));if(ie){const le=IC(ie.dataUrl);if(le){const fe=zC(),ne=`${n}/${fe}.jpg`,{error:$e}=await i.storage.from(hv).upload(ne,le,{contentType:"image/jpeg",cacheControl:"31536000",upsert:!1});if(!$e)return{path:ne,viewport:A,capturedAt:new Date().toISOString(),bbox:R};console.warn("[feedly-widget] high-fidelity upload failed",$e.message)}}}let j;try{({domToJpeg:j}=await Promise.resolve().then(()=>t$))}catch(ie){return console.warn("[feedly-widget] snapshot lib failed to load",ie),null}let P=null;try{P=await MC(()=>j(document.body,{width:b,height:_,style:{transform:`translate(${-h}px, ${-g}px)`,transformOrigin:"top left"},quality:.85,scale:Math.min(N,1.5),backgroundColor:"#ffffff",filter:ie=>!(ie instanceof Element&&$1.includes(ie.id))}))}catch(ie){return console.warn("[feedly-widget] snapshot capture failed",ie),null}if(!P||!P.startsWith("data:image/"))return null;const F=IC(P);if(!F)return null;const Y=zC(),q=`${n}/${Y}.jpg`,{error:I}=await i.storage.from(hv).upload(q,F,{contentType:"image/jpeg",cacheControl:"31536000",upsert:!1});return I?(console.warn("[feedly-widget] snapshot upload failed",I.message),null):{path:q,viewport:A,capturedAt:new Date().toISOString(),bbox:R}}function KP(i,n){const{data:s}=i.storage.from(hv).getPublicUrl(n);return s.publicUrl}function IC(i){try{const[n,s]=i.split(",");if(!n||!s)return null;const u=/data:([^;]+);base64/.exec(n),f=(u==null?void 0:u[1])??"image/jpeg",v=atob(s),h=v.length,g=new Uint8Array(h);for(let b=0;b<h;b++)g[b]=v.charCodeAt(b);return new Blob([g],{type:f})}catch{return null}}function zC(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)+Date.now().toString(36)}function YS(i){const n=i.replace(/\/index\.html?$/,"").replace(/\/$/,""),s=n===""?"/":n,u=new Set([i,s]);return s==="/"?(u.add("/index.html"),u.add("/index.htm")):(u.add(s+"/"),u.add(s+"/index.html"),u.add(s+"/index.htm")),[...u]}function ev(i,n){return YS(n).includes(i)}function JP({supabase:i,projectId:n,testerId:s,isAdmin:u}){const[f,v]=G.useState([]),[h,g]=G.useState([]),[b,_]=G.useState(!0),{href:k,pathname:R}=j1(),N=G.useRef(R);N.current=R;const A=G.useRef(f);A.current=f;const j=G.useRef(h);j.current=h;const P=G.useRef(u);P.current=u;const F=G.useCallback(oe=>{const _e=u?j.current.find(ke=>ke.id===oe.tester_id):void 0;v(ke=>{const me=ke.findIndex(ze=>ze.id===oe.id);if(me===-1)return[...ke,{...oe,tester:_e}];const ue={...ke[me],...oe,tester:ke[me].tester??_e},Oe=ke.slice();return Oe[me]=ue,Oe}),!(!u||_e)&&i.from("testers").select("id, name, color").eq("id",oe.tester_id).maybeSingle().then(({data:ke})=>{if(!ke)return;const me=ke;g(ue=>ue.find(Oe=>Oe.id===me.id)?ue:[...ue,me]),v(ue=>ue.map(Oe=>Oe.tester_id===me.id?{...Oe,tester:Oe.tester??me}:Oe))})},[i,u]);G.useEffect(()=>{if(!s){v([]),g([]),_(!1);return}let oe=!1;async function _e(){_(!0);const ke=YS(R);if(u){const[me,ue]=await Promise.all([i.from("annotations").select("*").eq("project_id",n).in("page_path",ke).order("created_at",{ascending:!0}),i.from("testers").select("id, name, color").eq("project_id",n)]);if(oe)return;const Oe=ue.data??[],ze=new Map(Oe.map(De=>[De.id,De]));g(Oe),v((me.data??[]).map(De=>({...De,tester:ze.get(De.tester_id)})))}else{const{data:me}=await i.from("annotations").select("*").eq("tester_id",s).in("page_path",ke).order("created_at",{ascending:!0});if(oe)return;g([]),v(me??[])}_(!1)}return _e(),()=>{oe=!0}},[i,n,s,R,u]);const Y=G.useRef(null),q=G.useRef(()=>{});q.current=oe=>{if(!(!oe||oe.t!=="ann")){if(oe.op==="clear"){const _e=YS(N.current);let ke=i.from("annotations").select("*").eq("project_id",n).in("page_path",_e).order("created_at",{ascending:!0});P.current||(ke=ke.eq("tester_id",s)),ke.then(({data:me,error:ue})=>{if(ue||!me)return;const Oe=me;v(ze=>{const De=new Map(ze.map(be=>[be.id,be.tester]));return Oe.map(be=>({...be,tester:be.tester??De.get(be.id)}))})});return}if(oe.op==="delete"){i.from("annotations").select("id").eq("id",oe.id).maybeSingle().then(({data:_e,error:ke})=>{ke||_e||v(me=>me.filter(ue=>ue.id!==oe.id))});return}ev(oe.page_path,N.current)&&i.from("annotations").select("*").eq("id",oe.id).maybeSingle().then(({data:_e})=>{_e&&ev(_e.page_path,N.current)&&F(_e)})}},G.useEffect(()=>{if(!s)return;const oe=i.channel(OP(n),{config:{broadcast:{self:!1}}});return oe.on("broadcast",{event:HS},({payload:_e})=>q.current(_e)),oe.subscribe(_e=>{(_e==="CHANNEL_ERROR"||_e==="TIMED_OUT")&&console.warn("[feedly-widget] live-update channel join failed:",_e)}),Y.current=oe,()=>{Y.current=null,i.removeChannel(oe)}},[i,n,s]);const I=G.useCallback(oe=>{const _e=()=>{const me=Y.current;me&&me.send({type:"broadcast",event:HS,payload:oe}).catch(()=>{})},ke=Y.current;if(ke&&ke.state!=="joined"){setTimeout(_e,800);return}_e()},[]);G.useEffect(()=>{if(!s)return;const oe=i.channel(`feedly:annotations:${n}:${u?"admin":"self"}`).on("postgres_changes",{event:"UPDATE",schema:"public",table:"annotations",filter:`project_id=eq.${n}`},_e=>{const ke=_e.new;ev(ke.page_path,R)&&v(me=>{const ue=me.findIndex(De=>De.id===ke.id);if(ue===-1)return me;const Oe={...me[ue],...ke,tester:me[ue].tester},ze=me.slice();return ze[ue]=Oe,ze})});return u&&oe.on("postgres_changes",{event:"INSERT",schema:"public",table:"annotations",filter:`project_id=eq.${n}`},_e=>{const ke=_e.new;ev(ke.page_path,R)&&F(ke)}).on("postgres_changes",{event:"DELETE",schema:"public",table:"annotations",filter:`project_id=eq.${n}`},_e=>{const ke=_e.old.id;ke&&v(me=>me.filter(ue=>ue.id!==ke))}).on("postgres_changes",{event:"INSERT",schema:"public",table:"testers",filter:`project_id=eq.${n}`},_e=>{const ke=_e.new;g(me=>me.find(ue=>ue.id===ke.id)?me:[...me,{id:ke.id,name:ke.name,color:ke.color}])}),oe.subscribe(),()=>{i.removeChannel(oe)}},[i,n,s,u,R,F]);const ie=G.useCallback(async(oe,_e,ke,me,ue)=>{if(!s)return null;const{data:Oe,error:ze}=await i.from("annotations").insert({project_id:n,tester_id:s,page_url:k,page_path:R,type:oe,shape_data:_e,comment:ke.trim()||null,anchor:me,note_offset:ue,tech_details:MP(),jira_ticket:$P()}).select("*").single();if(ze||!Oe)return console.warn("[feedly-widget] Failed to save annotation",ze==null?void 0:ze.message),null;const De=Oe;return v(be=>[...be,De]),I({t:"ann",op:"insert",id:De.id,page_path:De.page_path}),_e.kind==="arrow"||(async()=>{try{const be=()=>ev(De.page_path,N.current),pe=await YP({supabase:i,projectId:n,bbox:IP(_e),shouldProceed:be});if(!pe)return;if(!be()){i.storage.from(hv).remove([pe.path]);return}const je={snapshot_path:pe.path,snapshot_bbox:pe.bbox,snapshot_viewport:pe.viewport,snapshot_captured_at:pe.capturedAt},{data:Re,error:B}=await i.from("annotations").update(je).eq("id",De.id).select("id");if(B){console.warn("[feedly-widget] Failed to attach snapshot",B.message);return}if(!Re||Re.length===0){i.storage.from(hv).remove([pe.path]);return}v(Q=>Q.map(Le=>Le.id===De.id?{...Le,...je}:Le)),I({t:"ann",op:"update",id:De.id,page_path:De.page_path})}catch(be){console.warn("[feedly-widget] snapshot capture failed",be)}})(),De},[i,n,s,k,R,I]),le=G.useCallback(async oe=>{const ke=A.current.find(ue=>ue.id===oe);v(ue=>ue.filter(Oe=>Oe.id!==oe));const{error:me}=await i.from("annotations").delete().eq("id",oe);return me?(console.warn("[feedly-widget] Failed to delete annotation",me.message),ke&&v(ue=>ue.find(Oe=>Oe.id===oe)?ue:[...ue,ke].sort((Oe,ze)=>Oe.created_at<ze.created_at?-1:Oe.created_at>ze.created_at?1:0)),!1):(I({t:"ann",op:"delete",id:oe}),!0)},[i,I]),fe=G.useCallback(async(oe,_e,ke)=>{const me=_e.trim()||null,ue={comment:me,note_offset:ke},{data:Oe,error:ze}=await i.from("annotations").update(ue).eq("id",oe).select("*").single();return ze||!Oe?(console.warn("[feedly-widget] Failed to update comment",ze==null?void 0:ze.message),!1):(v(De=>De.map(be=>be.id===oe?{...be,comment:me,note_offset:ke,tester:be.tester}:be)),I({t:"ann",op:"update",id:oe,page_path:Oe.page_path}),!0)},[i,I]),ne=G.useCallback(async(oe,_e)=>{const{data:ke,error:me}=await i.from("annotations").update({shape_data:_e}).eq("id",oe).select("*").single();return me||!ke?(console.warn("[feedly-widget] Failed to update annotation",me==null?void 0:me.message),!1):(v(ue=>ue.map(Oe=>Oe.id===oe?{...Oe,shape_data:_e}:Oe)),I({t:"ann",op:"update",id:oe,page_path:ke.page_path}),!0)},[i,I]),$e=G.useCallback(async(oe,_e,ke)=>{const{data:me,error:ue}=await i.rpc("feedly_set_annotation_status",{p_annotation_id:oe,p_new_status:_e,p_comment:ke??null});if(ue)return{ok:!1,error:ue.message};const Oe=me;if(!Oe||Oe.error)return{ok:!1,error:(Oe==null?void 0:Oe.error)??"unknown_error"};v(De=>De.map(be=>be.id===oe?{...be,status:_e}:be));const ze=A.current.find(De=>De.id===oe);return ze&&I({t:"ann",op:"update",id:oe,page_path:ze.page_path}),i.from("annotations").select("*").eq("id",oe).maybeSingle().then(({data:De})=>{De&&F(De)}),{ok:!0}},[i,I,F]);return{annotations:f,testers:h,loading:b,save:ie,remove:le,updateShape:ne,updateComment:fe,setStatus:$e}}function XP({supabase:i,projectId:n,testerId:s,isAdmin:u,enabled:f}){const[v,h]=G.useState([]),[g,b]=G.useState(!1),_=G.useCallback(async()=>{if(!s){h([]);return}b(!0);let R=i.from("annotations").select("*").eq("project_id",n).order("created_at",{ascending:!1});u||(R=R.eq("tester_id",s));const{data:N}=await R;let A=new Map;if(u){const{data:P}=await i.from("testers").select("id, name, color").eq("project_id",n);P&&(A=new Map(P.map(F=>[F.id,F])))}h((N??[]).map(P=>({...P,tester:u?A.get(P.tester_id):void 0}))),b(!1)},[i,n,s,u]);G.useEffect(()=>{f&&_()},[f,_]);const k=(()=>{const R=new Map;for(const N of v){const A=R.get(N.page_path)??{pagePath:N.page_path,pageUrl:N.page_url,items:[]};A.items.push(N),R.set(N.page_path,A)}return[...R.values()]})();return{annotations:v,grouped:k,loading:g,refresh:_}}const GS="feedly_invite";function QP(){if(!(typeof window>"u"))try{const i=new URL(window.location.href);if(!i.searchParams.has(GS))return;i.searchParams.delete(GS);const n=i.pathname+(i.search?i.search:"")+i.hash;window.history.replaceState(null,"",n)}catch{}}function ZP({supabase:i,projectId:n,enabled:s,recheckKey:u}){const[f,v]=G.useState(()=>s?"checking":"allowed");return G.useEffect(()=>{let h=!1;async function g(){let _=null;try{_=new URL(window.location.href).searchParams.get(GS)}catch{_=null}let k=!1;if(_){const{data:A,error:j}=await i.rpc("feedly_redeem_invite",{p_token:_});if(h)return;const P=A;!j&&P&&!P.error&&P.project_id===n&&(k=!0),QP()}if(!s){v("allowed");return}if(k){v("allowed");return}const{data:R,error:N}=await i.from("tester_invite_redemptions").select("id").eq("project_id",n).limit(1).maybeSingle();if(!h){if(N){v("checking"),b=window.setTimeout(()=>{h||g()},2500);return}v(R?"allowed":"blocked")}}let b=0;return g(),()=>{h=!0,b&&window.clearTimeout(b)}},[i,n,s,u]),f}const I1="feedly_replay_state",$y="feedly_recording_state",eU=60*60*1e3;function tU(i){try{window.localStorage.setItem(I1,JSON.stringify(i))}catch{}}function nU(){try{window.localStorage.removeItem(I1)}catch{}}function gS(i){try{const n=window.localStorage.getItem($y);if(!n)return null;const s=JSON.parse(n);return s.projectId!==i?null:Date.now()-s.startedAt>eU?(window.localStorage.removeItem($y),null):s}catch{return null}}function rU(i){try{window.localStorage.setItem($y,JSON.stringify(i))}catch{}}function FC(){try{window.localStorage.removeItem($y)}catch{}}function iU({supabase:i,projectId:n,testerId:s,isAdmin:u,enabled:f}){const[v,h]=G.useState([]),[g,b]=G.useState(!1),_=G.useCallback(async()=>{if(!s){h([]);return}b(!0);const{data:A}=await i.from("flows").select("*").eq("project_id",n).order("created_at",{ascending:!1});let j=A??[];if(u&&j.length>0){const P=Array.from(new Set(j.map(q=>q.tester_id))),{data:F}=await i.from("testers").select("id, name, color").in("id",P),Y=new Map((F??[]).map(q=>[q.id,q]));j=j.map(q=>({...q,tester:Y.get(q.tester_id)}))}h(j),b(!1)},[i,n,s,u]);G.useEffect(()=>{f&&_()},[f,_]);const k=G.useCallback(async(A,j="Untitled Flow")=>{if(!s)return null;const{data:P,error:F}=await i.from("flows").insert({project_id:n,tester_id:s,name:j,steps:A}).select("*").single();return F||!P?(console.warn("[feedly-widget] Failed to save flow",F==null?void 0:F.message),null):(h(Y=>[P,...Y]),P)},[i,n,s]),R=G.useCallback(async A=>{h(P=>P.filter(F=>F.id!==A));const{error:j}=await i.from("flows").delete().eq("id",A);return j?(console.warn("[feedly-widget] Failed to delete flow",j.message),!1):!0},[i]),N=G.useCallback(async A=>{const{data:j,error:P}=await i.from("flows").select("*").eq("id",A).maybeSingle();return P||!j?null:j},[i]);return{flows:v,loading:g,save:k,remove:R,fetchOne:N,refresh:_}}const z1="feedly_button_y",pv=44,aU=20,BC=12,oU=5;function HC(){return typeof window>"u"?0:window.innerWidth-pv-aU}function sU(){return typeof window>"u"?0:window.innerHeight-pv-20}function KS(i){return typeof window>"u"?i:Math.min(Math.max(i,BC),window.innerHeight-pv-BC)}function lU(){try{const i=window.localStorage.getItem(z1);if(i!==null)return KS(parseFloat(i))}catch{}return sU()}function uU(i){try{window.localStorage.setItem(z1,String(i))}catch{}}function cU({open:i,hasUnseen:n,onClick:s}){var A;const[u,f]=G.useState(()=>typeof window>"u"?0:lU()),[v,h]=G.useState(()=>typeof window>"u"?0:HC()),g=G.useRef(null),b=G.useRef(0);G.useEffect(()=>{const j=()=>{h(HC()),f(P=>KS(P))};return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const _=G.useCallback(j=>{j.currentTarget.setPointerCapture(j.pointerId),g.current={pointerId:j.pointerId,startY:j.clientY,btnY:u,moved:!1}},[u]),k=G.useCallback(j=>{const P=g.current;if(!P||P.pointerId!==j.pointerId)return;const F=j.clientY-P.startY;!P.moved&&Math.abs(F)<oU||(P.moved=!0,f(KS(P.btnY+F)))},[]),R=G.useCallback(j=>{const P=g.current;!P||P.pointerId!==j.pointerId||(g.current=null,b.current=Date.now(),P.moved?f(F=>(uU(F),F)):s())},[s]),N=G.useCallback(j=>{j.detail===0&&(Date.now()-b.current<500||s())},[s]);return O.jsxs("button",{type:"button",onPointerDown:_,onPointerMove:k,onPointerUp:R,onClick:N,onPointerCancel:()=>{g.current=null},"aria-label":i?"Close Feedly":"Open Feedly",style:{pointerEvents:"auto",position:"fixed",top:u,left:v,width:pv,height:pv,touchAction:"none",cursor:(A=g.current)!=null&&A.moved?"ns-resize":"grab"},className:`
285
285
  relative
286
286
  rounded-full
287
287
  flex items-center justify-center
@@ -296,7 +296,7 @@ ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var
296
296
  w-3 h-3 rounded-full
297
297
  bg-slate-400
298
298
  border-2 border-feedly-bg
299
- `})]})}function dU(){return O.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:O.jsx("path",{d:"M4 2.5h10v2.4H6.6v3.4h6v2.4h-6V15.5H4z",fill:"currentColor"})})}function fU(){return O.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:O.jsx("path",{d:"M2 2l10 10M12 2L2 12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})}const hU="feedly_last_seen";function z1(i){return`${hU}:${i}`}function VC(i){try{return window.localStorage.getItem(z1(i))}catch{return null}}function WC(i,n){try{window.localStorage.setItem(z1(i),n)}catch{}}function pU(i){const n=i.status_history;if(Array.isArray(n)&&n.length>0){const s=n[n.length-1];if(s&&typeof s.at=="string")return s.at}return i.created_at}function vU(i,n){if(n&&i.tester_id===n){const s=i.status_history;return!!(Array.isArray(s)&&s.length>0)}return!0}function mU({projectId:i,annotations:n,currentTesterId:s}){const[u,f]=G.useState(()=>typeof window>"u"?null:VC(i));G.useEffect(()=>{f(VC(i))},[i]);const v=G.useCallback(()=>{const g=new Date().toISOString();WC(i,g),f(g)},[i]);return G.useEffect(()=>{if(u!==null||typeof window>"u")return;const g=new Date().toISOString();WC(i,g),f(g)},[u,i]),{hasUnseen:(()=>{if(!u)return!1;for(const g of n)if(vU(g,s)&&pU(g)>u)return!0;return!1})(),markSeen:v}}function gU({onSubmit:i,onSendMagicLink:n,onDone:s,onCancel:u}){const[f,v]=G.useState({kind:"name"}),[h,g]=G.useState(""),[b,_]=G.useState(""),[k,R]=G.useState(!1),[N,A]=G.useState(null);async function j(Y){Y.preventDefault(),!(!h.trim()||k)&&v({kind:"email",name:h.trim()})}async function P(){if(k||f.kind!=="email")return;R(!0),A(null);const Y=await i(f.name);if(R(!1),!Y){A("Couldn't register. Try again?");return}s()}async function F(Y){if(Y.preventDefault(),k||f.kind!=="email"||!b.trim())return;if(R(!0),A(null),!await i(f.name,b.trim())){R(!1),A("Couldn't register. Try again?");return}const I=await n(b.trim());if(R(!1),!I.ok){A(xU(I.error));return}v({kind:"sent",email:b.trim()})}return O.jsx("div",{className:"fixed left-1/2 bottom-20 -translate-x-1/2 animate-spring-in",style:{pointerEvents:"auto"},children:O.jsxs("div",{className:`
299
+ `})]})}function dU(){return O.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:O.jsx("path",{d:"M4 2.5h10v2.4H6.6v3.4h6v2.4h-6V15.5H4z",fill:"currentColor"})})}function fU(){return O.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:O.jsx("path",{d:"M2 2l10 10M12 2L2 12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})}const hU="feedly_last_seen";function F1(i){return`${hU}:${i}`}function VC(i){try{return window.localStorage.getItem(F1(i))}catch{return null}}function WC(i,n){try{window.localStorage.setItem(F1(i),n)}catch{}}function pU(i){const n=i.status_history;if(Array.isArray(n)&&n.length>0){const s=n[n.length-1];if(s&&typeof s.at=="string")return s.at}return i.created_at}function vU(i,n){if(n&&i.tester_id===n){const s=i.status_history;return!!(Array.isArray(s)&&s.length>0)}return!0}function mU({projectId:i,annotations:n,currentTesterId:s}){const[u,f]=G.useState(()=>typeof window>"u"?null:VC(i));G.useEffect(()=>{f(VC(i))},[i]);const v=G.useCallback(()=>{const g=new Date().toISOString();WC(i,g),f(g)},[i]);return G.useEffect(()=>{if(u!==null||typeof window>"u")return;const g=new Date().toISOString();WC(i,g),f(g)},[u,i]),{hasUnseen:(()=>{if(!u)return!1;for(const g of n)if(vU(g,s)&&pU(g)>u)return!0;return!1})(),markSeen:v}}function gU({onSubmit:i,onSendMagicLink:n,onDone:s,onCancel:u}){const[f,v]=G.useState({kind:"name"}),[h,g]=G.useState(""),[b,_]=G.useState(""),[k,R]=G.useState(!1),[N,A]=G.useState(null);async function j(Y){Y.preventDefault(),!(!h.trim()||k)&&v({kind:"email",name:h.trim()})}async function P(){if(k||f.kind!=="email")return;R(!0),A(null);const Y=await i(f.name);if(R(!1),!Y){A("Couldn't register. Try again?");return}s()}async function F(Y){if(Y.preventDefault(),k||f.kind!=="email"||!b.trim())return;if(R(!0),A(null),!await i(f.name,b.trim())){R(!1),A("Couldn't register. Try again?");return}const I=await n(b.trim());if(R(!1),!I.ok){A(xU(I.error));return}v({kind:"sent",email:b.trim()})}return O.jsx("div",{className:"fixed left-1/2 bottom-20 -translate-x-1/2 animate-spring-in",style:{pointerEvents:"auto"},children:O.jsxs("div",{className:`
300
300
  w-80 p-5 rounded-2xl
301
301
  bg-feedly-surface/95
302
302
  backdrop-blur-xl
@@ -344,7 +344,7 @@ ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var
344
344
  bg-white text-black
345
345
  hover:bg-white/90
346
346
  transition
347
- `,children:"Got it"})})]})}function SU(i){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.trim())}function xU(i){return/invalid.*email/i.test(i)?"That email looks off — double-check it?":/rate/i.test(i)?"Too many requests — try again in a minute.":i}function yS(i){const n=i.ownerDocument||document;if(i===n.body)return"body";if(i===n.documentElement)return"html";if(i.id&&n.querySelectorAll(`#${CSS.escape(i.id)}`).length===1)return`#${CSS.escape(i.id)}`;const s=[];let u=i;for(;u&&u!==n.body&&u!==n.documentElement;){if(u.id&&n.querySelectorAll(`#${CSS.escape(u.id)}`).length===1){s.unshift(`#${CSS.escape(u.id)}`);break}let f=u.tagName.toLowerCase();const v=u.parentElement;if(v){const h=Array.from(v.children).filter(g=>g.tagName===u.tagName);if(h.length>1){const g=h.indexOf(u)+1;f+=`:nth-of-type(${g})`}}s.unshift(f),u=v}return s.length?s.join(" > "):"body"}function F1(i){try{return i.contentDocument}catch{return null}}function _U(i,n){const s=document.elementsFromPoint(i,n);for(const u of s)if(!(u.id==="feedly-widget-root"||u.closest("#feedly-widget-root"))&&!(u.id==="feedly-widget-pins"||u.closest("#feedly-widget-pins"))){if(u.tagName==="IFRAME"){const f=u,v=F1(f);if(!v)return{kind:"parent",el:f};const h=f.getBoundingClientRect(),g=i-h.left,b=n-h.top,k=v.elementFromPoint(g,b)??v.body??v.documentElement;return k?{kind:"iframe",iframe:f,inner:k}:{kind:"parent",el:f}}return{kind:"parent",el:u}}return null}function EU(i){switch(i.kind){case"circle":return{x:i.bbox.x+i.bbox.width/2,y:i.bbox.y+i.bbox.height/2};case"arrow":return{x:(i.from.x+i.to.x)/2,y:(i.from.y+i.to.y)/2};case"rectangle":return{x:i.x+i.width/2,y:i.y+i.height/2}}}function B1(i){const n=EU(i),s=n.x-window.scrollX,u=n.y-window.scrollY,f=_U(s,u);if(!f)return{ok:!0,anchor:null};if(f.kind==="blocked-iframe")return{ok:!1,reason:"blocked-iframe"};if(f.kind==="parent"){const g=f.el.getBoundingClientRect();return{ok:!0,anchor:{selector:yS(f.el),origin:{x:g.left+window.scrollX,y:g.top+window.scrollY}}}}const v=f.iframe.getBoundingClientRect(),h=f.inner.getBoundingClientRect();return{ok:!0,anchor:{selector:yS(f.iframe),origin:{x:v.left+h.left+window.scrollX,y:v.top+h.top+window.scrollY},iframeContent:{innerSelector:yS(f.inner)}}}}function qC(i){const n=B1(i);return n.ok?n.anchor:null}function kU(i){if(!i)return{x:0,y:0};if(i.iframeContent){let v=null;try{v=document.querySelector(i.selector)}catch{v=null}if(!v||v.tagName!=="IFRAME")return{x:0,y:0};const h=F1(v);if(!h)return{x:0,y:0};let g=null;try{g=h.querySelector(i.iframeContent.innerSelector)}catch{g=null}if(!g)return{x:0,y:0};const b=v.getBoundingClientRect(),_=g.getBoundingClientRect(),k=b.left+_.left+window.scrollX,R=b.top+_.top+window.scrollY;return{x:k-i.origin.x,y:R-i.origin.y}}let n=null;try{n=document.querySelector(i.selector)}catch{n=null}if(!n)return{x:0,y:0};const s=n.getBoundingClientRect(),u=s.left+window.scrollX,f=s.top+window.scrollY;return nx(n,s,i)?{x:0,y:0}:{x:u-i.origin.x,y:f-i.origin.y}}function nx(i,n,s){return n.width===0&&n.height===0&&n.top===0&&n.left===0?!0:!(!H1(i)||n.top>=200||s.origin.y<=500)}function CU(i){if(!i)return!1;let n=null;try{n=document.querySelector(i.selector)}catch{n=null}if(!n)return!0;const s=n.getBoundingClientRect();return nx(n,s,i)}function H1(i){let n=i;for(;n&&n!==document.body&&n!==document.documentElement;){if(getComputedStyle(n).position==="fixed")return!0;n=n.parentElement}return!1}function wS(i){const n=kU(i.anchor);return n.x===0&&n.y===0?i.shape_data:qS(i.shape_data,n.x,n.y)}function Ey(i){if(!i)return!1;let n=null;try{n=document.querySelector(i.selector)}catch{n=null}if(!n||!H1(n))return!1;const s=n.getBoundingClientRect();return!nx(n,s,i)}function TU({onSubmit:i,onCancel:n,disabled:s}){const[u,f]=G.useState(""),v=G.useRef(null);G.useEffect(()=>{var g;(g=v.current)==null||g.focus()},[]);const h=G.useCallback(()=>{const g=u.trim();g&&(i(g),f(""))},[u,i]);return O.jsx("input",{ref:v,type:"text",value:u,disabled:s,onChange:g=>f(g.target.value),onKeyDown:g=>{g.key==="Enter"?(g.preventDefault(),h()):g.key==="Escape"&&(g.preventDefault(),n())},placeholder:s?"Click something first…":"Note for the last step — Enter to attach",maxLength:280,style:{color:"#fff"},className:`
347
+ `,children:"Got it"})})]})}function SU(i){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.trim())}function xU(i){return/invalid.*email/i.test(i)?"That email looks off — double-check it?":/rate/i.test(i)?"Too many requests — try again in a minute.":i}function yS(i){const n=i.ownerDocument||document;if(i===n.body)return"body";if(i===n.documentElement)return"html";if(i.id&&n.querySelectorAll(`#${CSS.escape(i.id)}`).length===1)return`#${CSS.escape(i.id)}`;const s=[];let u=i;for(;u&&u!==n.body&&u!==n.documentElement;){if(u.id&&n.querySelectorAll(`#${CSS.escape(u.id)}`).length===1){s.unshift(`#${CSS.escape(u.id)}`);break}let f=u.tagName.toLowerCase();const v=u.parentElement;if(v){const h=Array.from(v.children).filter(g=>g.tagName===u.tagName);if(h.length>1){const g=h.indexOf(u)+1;f+=`:nth-of-type(${g})`}}s.unshift(f),u=v}return s.length?s.join(" > "):"body"}function B1(i){try{return i.contentDocument}catch{return null}}function _U(i,n){const s=document.elementsFromPoint(i,n);for(const u of s)if(!(u.id==="feedly-widget-root"||u.closest("#feedly-widget-root"))&&!(u.id==="feedly-widget-pins"||u.closest("#feedly-widget-pins"))){if(u.tagName==="IFRAME"){const f=u,v=B1(f);if(!v)return{kind:"parent",el:f};const h=f.getBoundingClientRect(),g=i-h.left,b=n-h.top,k=v.elementFromPoint(g,b)??v.body??v.documentElement;return k?{kind:"iframe",iframe:f,inner:k}:{kind:"parent",el:f}}return{kind:"parent",el:u}}return null}function EU(i){switch(i.kind){case"circle":return{x:i.bbox.x+i.bbox.width/2,y:i.bbox.y+i.bbox.height/2};case"arrow":return{x:(i.from.x+i.to.x)/2,y:(i.from.y+i.to.y)/2};case"rectangle":return{x:i.x+i.width/2,y:i.y+i.height/2}}}function H1(i){const n=EU(i),s=n.x-window.scrollX,u=n.y-window.scrollY,f=_U(s,u);if(!f)return{ok:!0,anchor:null};if(f.kind==="blocked-iframe")return{ok:!1,reason:"blocked-iframe"};if(f.kind==="parent"){const g=f.el.getBoundingClientRect();return{ok:!0,anchor:{selector:yS(f.el),origin:{x:g.left+window.scrollX,y:g.top+window.scrollY}}}}const v=f.iframe.getBoundingClientRect(),h=f.inner.getBoundingClientRect();return{ok:!0,anchor:{selector:yS(f.iframe),origin:{x:v.left+h.left+window.scrollX,y:v.top+h.top+window.scrollY},iframeContent:{innerSelector:yS(f.inner)}}}}function qC(i){const n=H1(i);return n.ok?n.anchor:null}function kU(i){if(!i)return{x:0,y:0};if(i.iframeContent){let v=null;try{v=document.querySelector(i.selector)}catch{v=null}if(!v||v.tagName!=="IFRAME")return{x:0,y:0};const h=B1(v);if(!h)return{x:0,y:0};let g=null;try{g=h.querySelector(i.iframeContent.innerSelector)}catch{g=null}if(!g)return{x:0,y:0};const b=v.getBoundingClientRect(),_=g.getBoundingClientRect(),k=b.left+_.left+window.scrollX,R=b.top+_.top+window.scrollY;return{x:k-i.origin.x,y:R-i.origin.y}}let n=null;try{n=document.querySelector(i.selector)}catch{n=null}if(!n)return{x:0,y:0};const s=n.getBoundingClientRect(),u=s.left+window.scrollX,f=s.top+window.scrollY;return nx(n,s,i)?{x:0,y:0}:{x:u-i.origin.x,y:f-i.origin.y}}function nx(i,n,s){return n.width===0&&n.height===0&&n.top===0&&n.left===0?!0:!(!V1(i)||n.top>=200||s.origin.y<=500)}function CU(i){if(!i)return!1;let n=null;try{n=document.querySelector(i.selector)}catch{n=null}if(!n)return!0;const s=n.getBoundingClientRect();return nx(n,s,i)}function V1(i){let n=i;for(;n&&n!==document.body&&n!==document.documentElement;){if(getComputedStyle(n).position==="fixed")return!0;n=n.parentElement}return!1}function wS(i){const n=kU(i.anchor);return n.x===0&&n.y===0?i.shape_data:qS(i.shape_data,n.x,n.y)}function Ey(i){if(!i)return!1;let n=null;try{n=document.querySelector(i.selector)}catch{n=null}if(!n||!V1(n))return!1;const s=n.getBoundingClientRect();return!nx(n,s,i)}function TU({onSubmit:i,onCancel:n,disabled:s}){const[u,f]=G.useState(""),v=G.useRef(null);G.useEffect(()=>{var g;(g=v.current)==null||g.focus()},[]);const h=G.useCallback(()=>{const g=u.trim();g&&(i(g),f(""))},[u,i]);return O.jsx("input",{ref:v,type:"text",value:u,disabled:s,onChange:g=>f(g.target.value),onKeyDown:g=>{g.key==="Enter"?(g.preventDefault(),h()):g.key==="Escape"&&(g.preventDefault(),n())},placeholder:s?"Click something first…":"Note for the last step — Enter to attach",maxLength:280,style:{color:"#fff"},className:`
348
348
  flex-1 min-w-[180px] max-w-[280px]
349
349
  bg-white/5 border border-white/10
350
350
  rounded-md px-2.5 py-1
@@ -352,7 +352,7 @@ ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var
352
352
  outline-none focus:border-white/25
353
353
  transition-colors
354
354
  disabled:opacity-50
355
- `})}const V1="feedly_toolbar_pos",Ja=8;function RU(){return typeof window>"u"?{x:0,y:0}:{x:Math.round(window.innerWidth/2-200),y:window.innerHeight-128}}function OU(){try{const i=window.localStorage.getItem(V1);return i?JSON.parse(i):null}catch{return null}}function AU(i){try{window.localStorage.setItem(V1,JSON.stringify(i))}catch{}}const DU=[{id:"circle",label:"Freehand",Icon:UU},{id:"arrow",label:"Arrow",Icon:MU},{id:"rectangle",label:"Rectangle",Icon:$U}];function NU({active:i,testerName:n,testerColor:s,onSelect:u,annotationsHidden:f,onToggleAnnotations:v,listOpen:h,onToggleList:g,flowsEnabled:b=!0,recording:_,recordingSteps:k,onStartRecording:R,onStopRecording:N,onAttachNote:A,flows:j,flowsLoading:P,flowsOpen:F,onToggleFlows:Y,onPickFlow:q,onDeleteFlow:I,currentTesterId:ie,isAdmin:le=!1,testers:fe=[],hiddenTesterIds:ne,onToggleTester:$e,onShowAll:oe,onHideAll:_e,pageCount:ke}){const[me,ue]=G.useState(!1),Oe=fe.length-((ne==null?void 0:ne.size)??0),ze=G.useRef(null),[De,be]=G.useState(()=>OU()??RU()),pe=G.useRef(null);G.useEffect(()=>{const Q=()=>{const Le=ze.current;if(!Le)return;const Ve=Le.getBoundingClientRect();be(st=>({x:Math.min(Math.max(st.x,Ja),Math.max(Ja,window.innerWidth-Ve.width-Ja)),y:Math.min(Math.max(st.y,Ja),Math.max(Ja,window.innerHeight-Ve.height-Ja))}))};return Q(),window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[]);const je=G.useCallback(Q=>{Q.currentTarget.setPointerCapture(Q.pointerId),pe.current={pointerId:Q.pointerId,startX:Q.clientX,startY:Q.clientY,toolbarX:De.x,toolbarY:De.y}},[De.x,De.y]),Re=G.useCallback(Q=>{const Le=pe.current;if(!Le||Le.pointerId!==Q.pointerId)return;const Ve=ze.current;if(!Ve)return;const st=Ve.getBoundingClientRect(),wt=Q.clientX-Le.startX,ct=Q.clientY-Le.startY;be({x:Math.min(Math.max(Le.toolbarX+wt,Ja),Math.max(Ja,window.innerWidth-st.width-Ja)),y:Math.min(Math.max(Le.toolbarY+ct,Ja),Math.max(Ja,window.innerHeight-st.height-Ja))})},[]),B=G.useCallback(Q=>{const Le=pe.current;!Le||Le.pointerId!==Q.pointerId||(pe.current=null,be(Ve=>(AU(Ve),Ve)))},[]);return O.jsxs("div",{ref:ze,style:{pointerEvents:"auto",position:"fixed",top:De.y,left:De.x},className:`
355
+ `})}const W1="feedly_toolbar_pos",Ja=8;function RU(){return typeof window>"u"?{x:0,y:0}:{x:Math.round(window.innerWidth/2-200),y:window.innerHeight-128}}function OU(){try{const i=window.localStorage.getItem(W1);return i?JSON.parse(i):null}catch{return null}}function AU(i){try{window.localStorage.setItem(W1,JSON.stringify(i))}catch{}}const DU=[{id:"circle",label:"Freehand",Icon:UU},{id:"arrow",label:"Arrow",Icon:MU},{id:"rectangle",label:"Rectangle",Icon:$U}];function NU({active:i,testerName:n,testerColor:s,onSelect:u,annotationsHidden:f,onToggleAnnotations:v,listOpen:h,onToggleList:g,flowsEnabled:b=!0,recording:_,recordingSteps:k,onStartRecording:R,onStopRecording:N,onAttachNote:A,flows:j,flowsLoading:P,flowsOpen:F,onToggleFlows:Y,onPickFlow:q,onDeleteFlow:I,currentTesterId:ie,isAdmin:le=!1,testers:fe=[],hiddenTesterIds:ne,onToggleTester:$e,onShowAll:oe,onHideAll:_e,pageCount:ke}){const[me,ue]=G.useState(!1),Oe=fe.length-((ne==null?void 0:ne.size)??0),ze=G.useRef(null),[De,be]=G.useState(()=>OU()??RU()),pe=G.useRef(null);G.useEffect(()=>{const Q=()=>{const Le=ze.current;if(!Le)return;const Ve=Le.getBoundingClientRect();be(st=>({x:Math.min(Math.max(st.x,Ja),Math.max(Ja,window.innerWidth-Ve.width-Ja)),y:Math.min(Math.max(st.y,Ja),Math.max(Ja,window.innerHeight-Ve.height-Ja))}))};return Q(),window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[]);const je=G.useCallback(Q=>{Q.currentTarget.setPointerCapture(Q.pointerId),pe.current={pointerId:Q.pointerId,startX:Q.clientX,startY:Q.clientY,toolbarX:De.x,toolbarY:De.y}},[De.x,De.y]),Re=G.useCallback(Q=>{const Le=pe.current;if(!Le||Le.pointerId!==Q.pointerId)return;const Ve=ze.current;if(!Ve)return;const st=Ve.getBoundingClientRect(),wt=Q.clientX-Le.startX,ct=Q.clientY-Le.startY;be({x:Math.min(Math.max(Le.toolbarX+wt,Ja),Math.max(Ja,window.innerWidth-st.width-Ja)),y:Math.min(Math.max(Le.toolbarY+ct,Ja),Math.max(Ja,window.innerHeight-st.height-Ja))})},[]),B=G.useCallback(Q=>{const Le=pe.current;!Le||Le.pointerId!==Q.pointerId||(pe.current=null,be(Ve=>(AU(Ve),Ve)))},[]);return O.jsxs("div",{ref:ze,style:{pointerEvents:"auto",position:"fixed",top:De.y,left:De.x},className:`
356
356
  flex items-center gap-1.5
357
357
  px-1.5 py-1.5 rounded-full
358
358
  bg-[rgba(15,15,15,0.7)]
@@ -601,13 +601,13 @@ ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var
601
601
  hover:bg-emerald-600/90
602
602
  disabled:opacity-50
603
603
  transition
604
- `,children:ue==="confirm"?"Confirming…":"Confirm Fixed"})]}):null})]})]})]})}function XU(){return O.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:O.jsx("path",{d:"M3.5 2l3 3-3 3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function QU(){return O.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[O.jsx("path",{d:"M9.5 2.5l2 2-7 7-2.5.5.5-2.5 7-7z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),O.jsx("path",{d:"M8 4l2 2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function ZU(){return O.jsx("svg",{width:"9",height:"13",viewBox:"0 0 10 14",fill:"none",children:O.jsxs("g",{fill:"currentColor",children:[O.jsx("circle",{cx:"3",cy:"3",r:"1"}),O.jsx("circle",{cx:"7",cy:"3",r:"1"}),O.jsx("circle",{cx:"3",cy:"7",r:"1"}),O.jsx("circle",{cx:"7",cy:"7",r:"1"}),O.jsx("circle",{cx:"3",cy:"11",r:"1"}),O.jsx("circle",{cx:"7",cy:"11",r:"1"})]})})}function e5(){return O.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[O.jsx("path",{d:"M1 7s2.2-4 6-4 6 4 6 4-2.2 4-6 4-6-4-6-4z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),O.jsx("circle",{cx:"7",cy:"7",r:"1.6",stroke:"currentColor",strokeWidth:"1.3"})]})}function t5(){return O.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[O.jsx("path",{d:"M2.5 3.5h9M5.5 3.5V2.5h3v1M3.5 3.5l.5 8h6l.5-8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),O.jsx("path",{d:"M6 6v4M8 6v4",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}const ky=6;function n5({supabase:i,annotation:n,currentShape:s,onClose:u}){var q;const f=G.useMemo(()=>n.snapshot_path?KP(i,n.snapshot_path):null,[i,n.snapshot_path]),[v,h]=G.useState(!1),[g,b]=G.useState(!1);G.useEffect(()=>{function I(ie){ie.key==="Escape"&&(ie.stopPropagation(),u())}return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),G.useEffect(()=>{if(h(!1),b(!1),!f)return;let I=!1;const ie=new Image;return ie.onload=()=>{I||h(!0)},ie.onerror=()=>{I||b(!0)},ie.src=f,()=>{I=!0}},[f]);const _=((q=n.snapshot_bbox)==null?void 0:q.pads)??{l:ky,t:ky,r:ky,b:ky},k=G.useMemo(()=>r5(s,_),[s,n.snapshot_bbox]);if(!k||!f)return null;const{left:R,top:N,width:A,height:j,clipPath:P,ringPath:F,viewBox:Y}=k;return g?O.jsx("div",{style:{position:"absolute",left:R,top:N-34,pointerEvents:"none",zIndex:2},"aria-hidden":!0,children:O.jsx("div",{style:{display:"inline-block",padding:"5px 10px",borderRadius:8,background:"rgba(15,23,42,0.88)",color:"white",fontSize:12,whiteSpace:"nowrap",boxShadow:"0 8px 24px rgba(0,0,0,0.35)"},children:"Snapshot couldn't load"})}):O.jsxs("div",{style:{position:"absolute",left:R,top:N,width:A,height:j,pointerEvents:"none",filter:"drop-shadow(0 2px 4px rgba(15,23,42,0.18)) drop-shadow(0 18px 36px rgba(15,23,42,0.28))",opacity:v?1:0,transform:v?"scale(1)":"scale(0.96)",transformOrigin:"50% 50%",transition:"opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1)",zIndex:2},"aria-hidden":!0,children:[O.jsx("div",{style:{position:"absolute",inset:0,backgroundImage:`url(${f})`,backgroundSize:"100% 100%",backgroundRepeat:"no-repeat",clipPath:P,WebkitClipPath:P,boxShadow:"inset 0 0 0 1px rgba(255,255,255,0.55), inset 0 1px 2px rgba(255,255,255,0.6)"}}),O.jsxs("svg",{viewBox:Y,preserveAspectRatio:"none",width:"100%",height:"100%",style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"visible"},children:[O.jsx("path",{d:F,fill:"none",stroke:"rgba(148, 163, 184, 0.85)",strokeWidth:"1.5",strokeLinejoin:"round"}),O.jsx("path",{d:F,fill:"none",stroke:"rgba(255,255,255,0.35)",strokeWidth:"0.5",strokeLinejoin:"round"})]})]})}function r5(i,n){switch(i.kind){case"rectangle":{const s=i.width+n.l+n.r,u=i.height+n.t+n.b,f=6,v=i5(n.l,n.t,i.width,i.height,f);return{left:i.x-n.l,top:i.y-n.t,width:s,height:u,clipPath:`inset(${n.t}px ${n.r}px ${n.b}px ${n.l}px round ${f}px)`,ringPath:v,viewBox:`0 0 ${s} ${u}`}}case"circle":{const{x:s,y:u,width:f,height:v}=i.bbox,h=f+n.l+n.r,g=v+n.t+n.b,b=s-n.l,_=u-n.t,k=a5(i.path,-b,-_);return{left:b,top:_,width:h,height:g,clipPath:`path('${k}')`,ringPath:k,viewBox:`0 0 ${h} ${g}`}}case"arrow":return null}}function i5(i,n,s,u,f){const v=Math.min(f,s/2,u/2);return[`M${i+v},${n}`,`H${i+s-v}`,`A${v},${v} 0 0 1 ${i+s},${n+v}`,`V${n+u-v}`,`A${v},${v} 0 0 1 ${i+s-v},${n+u}`,`H${i+v}`,`A${v},${v} 0 0 1 ${i},${n+u-v}`,`V${n+v}`,`A${v},${v} 0 0 1 ${i+v},${n}`,"Z"].join(" ")}function a5(i,n,s){return i.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(u,f,v)=>{const h=parseFloat(f)+n,g=parseFloat(v)+s;return`${h},${g}`})}const bS=2.5,Cy=.7;function W1(i){return i.replace(/[^0-9a-zA-Z]/g,"")}function o5({tool:i,testerColor:n,testerName:s,currentTesterId:u,isAdmin:f,annotations:v,onComplete:h,onMove:g,onSetStatus:b,onOpenDetails:_,onEditComment:k,onDelete:R,pinRequest:N,pinsContainer:A,onDiscardDraft:j,supabase:P}){var Wn;const F=G.useRef(null),Y=G.useRef(null),[q,I]=G.useState(null),[ie,le]=G.useState(null),[fe,ne]=G.useState(null);G.useEffect(()=>{if(!fe)return;const ge=setTimeout(()=>ne(null),3200);return()=>clearTimeout(ge)},[fe]);const[$e,oe]=G.useState(null),[_e,ke]=G.useState(null),[me,ue]=G.useState(null),Oe=G.useRef(null),ze=G.useRef(null),[De,be]=G.useState(null),pe=G.useRef(null),je=i!==null&&ie===null,[Re,B]=G.useState(()=>({x:typeof window<"u"?window.scrollX:0,y:typeof window<"u"?window.scrollY:0})),[Q,Le]=G.useState(0),Ve=G.useMemo(()=>v.some(ge=>Ey(ge.anchor??null)),[v,Q]),st=ie!==null||Ve,wt=G.useRef(st);wt.current=st,G.useEffect(()=>{st&&B({x:window.scrollX,y:window.scrollY})},[st]),G.useEffect(()=>{const ge=(vt,Yt)=>{Y.current&&Y.current.setAttribute("transform",`translate(${-vt}, ${-Yt})`)};ge(window.scrollX,window.scrollY);let Qe=0,Je=0,bt=0;const Tt=()=>{ge(window.scrollX,window.scrollY),wt.current&&(Je||(Je=requestAnimationFrame(()=>{Je=0,B({x:window.scrollX,y:window.scrollY})})))},It=()=>{Qe||(Qe=requestAnimationFrame(()=>{Qe=0,Tt()}))},at=()=>{It(),window.clearTimeout(bt),bt=window.setTimeout(()=>{B({x:window.scrollX,y:window.scrollY}),Le(vt=>vt+1)},100)};window.addEventListener("scroll",It,{passive:!0}),window.addEventListener("resize",at,{passive:!0});let dt=0;const qt=()=>{dt||(dt=window.setTimeout(()=>{dt=0,Le(vt=>vt+1)},120))},yn=vt=>{It(),vt.target!==document&&qt()};document.addEventListener("scroll",yn,{capture:!0,passive:!0});const Pe=[];function zt(vt){let Yt=null;try{Yt=vt.contentDocument}catch{Yt=null}if(!Yt)return;const rn=()=>{It(),qt()};try{Yt.addEventListener("scroll",rn,{passive:!0,capture:!0}),Pe.push(()=>{try{Yt.removeEventListener("scroll",rn,{capture:!0})}catch{}})}catch{}}function Ee(vt){var Yt;try{((Yt=vt.contentDocument)==null?void 0:Yt.readyState)==="complete"&&zt(vt)}catch{}vt.addEventListener("load",()=>zt(vt),{once:!1})}document.querySelectorAll("iframe").forEach(vt=>{Ee(vt)});let Ne=0;const nt=()=>{Ne||(Ne=window.setTimeout(()=>{Ne=0,Le(vt=>vt+1)},300))},Ut=new MutationObserver(vt=>{nt();for(const Yt of vt)Yt.addedNodes.forEach(rn=>{var mn;if(rn.nodeType!==1)return;const Ln=rn;Ln.tagName==="IFRAME"&&Ee(Ln),(mn=Ln.querySelectorAll)==null||mn.call(Ln,"iframe").forEach(fn=>{Ee(fn)})})});return Ut.observe(document.body,{childList:!0,subtree:!0}),()=>{Qe&&cancelAnimationFrame(Qe),Je&&cancelAnimationFrame(Je),window.clearTimeout(bt),window.clearTimeout(Ne),window.clearTimeout(dt),window.removeEventListener("scroll",It),window.removeEventListener("resize",at),document.removeEventListener("scroll",yn,{capture:!0}),Ut.disconnect(),Pe.forEach(vt=>vt())}},[]);const ct=G.useMemo(()=>{const ge=new Set([n]);return v.forEach(Qe=>{var Je;return ge.add(((Je=Qe.tester)==null?void 0:Je.color)??n)}),[...ge]},[v,n]),ut=G.useCallback(ge=>({x:ge.clientX+window.scrollX,y:ge.clientY+window.scrollY}),[]),Ot=G.useCallback(ge=>{var Je,bt;if(!i||ie||ge.button!==0||!ge.isPrimary||ze.current!==null)return;(bt=(Je=ge.currentTarget).setPointerCapture)==null||bt.call(Je,ge.pointerId),ze.current=ge.pointerId;const Qe=ut(ge);I(i==="circle"?{kind:"circle",points:[Qe]}:i==="arrow"?{kind:"arrow",from:Qe,to:Qe}:{kind:"rectangle",from:Qe,to:Qe})},[i,ie,ut]),Wt=G.useCallback(ge=>{if(!q||ze.current!==ge.pointerId)return;const Qe=ut(ge);I(Je=>Je&&(Je.kind==="circle"?{kind:"circle",points:[...Je.points,Qe]}:Je.kind==="arrow"?{kind:"arrow",from:Je.from,to:Qe}:{kind:"rectangle",from:Je.from,to:Qe}))},[q,ut]),gn=G.useCallback(ge=>{if(!q||!i||ze.current!==ge.pointerId)return;ze.current=null;let Qe=null;if(q.kind==="circle"&&q.points.length>2)Qe={kind:"circle",path:j1(q.points),bbox:L1(q.points)};else if(q.kind==="arrow"){const Je=q.to.x-q.from.x,bt=q.to.y-q.from.y;Je*Je+bt*bt>64&&(Qe={kind:"arrow",from:q.from,to:q.to})}else if(q.kind==="rectangle"){const Je=Math.min(q.from.x,q.to.x),bt=Math.min(q.from.y,q.to.y),Tt=Math.abs(q.to.x-q.from.x),It=Math.abs(q.to.y-q.from.y);Tt>6&&It>6&&(Qe={kind:"rectangle",x:Je,y:bt,width:Tt,height:It})}if(I(null),Qe){const Je=B1(Qe);if(!Je.ok&&Je.reason==="blocked-iframe"){ne("Can't annotate inside this iframe — it's cross-origin, so we can't track what you drew on."),j();return}le({type:i,shape:Qe})}},[q,i,j]),Hn=G.useCallback(ge=>{ze.current===ge.pointerId&&(ze.current=null,I(null))},[]);G.useEffect(()=>{function ge(Qe){if(Qe.key==="Escape"){if(ie)return;I(null),j()}}return window.addEventListener("keydown",ge),()=>window.removeEventListener("keydown",ge)},[j,ie]);const dn=_e??$e,pt=dn?v.find(ge=>ge.id===dn)??null:null;G.useEffect(()=>{_e&&!v.find(ge=>ge.id===_e)&&ke(null)},[v,_e]),G.useEffect(()=>{me&&me!==dn&&ue(null)},[dn,me]),G.useEffect(()=>{if(!_e)return;function ge(bt){const Tt=document.getElementById("feedly-widget-root"),It=document.getElementById("feedly-widget-pins"),at=bt.target;at&&(Tt&&(Tt===at||Tt.contains(at))||It&&(It===at||It.contains(at))||(ke(null),oe(null)))}function Qe(){ke(null),oe(null)}document.addEventListener("click",ge);const Je=[];return document.querySelectorAll("iframe").forEach(bt=>{let Tt=null;try{Tt=bt.contentDocument}catch{Tt=null}if(Tt)try{Tt.addEventListener("click",Qe,{capture:!0}),Je.push(()=>{try{Tt.removeEventListener("click",Qe,{capture:!0})}catch{}})}catch{}}),()=>{document.removeEventListener("click",ge),Je.forEach(bt=>bt())}},[_e]),G.useEffect(()=>{if(!N)return;const ge=v.find(Je=>Je.id===N.id);if(!ge)return;ke(ge.id),oe(null);const Qe=xy(wS(ge));window.scrollTo({top:Math.max(0,Qe.y-window.innerHeight/2),left:Math.max(0,Qe.x-window.innerWidth/2),behavior:"smooth"})},[N,v]);const An=G.useMemo(()=>{const ge=new Map;for(const Qe of v)ge.set(Qe.id,wS(Qe));return ge},[v,Q]),vn=ge=>An.get(ge.id)??wS(ge);return O.jsxs(O.Fragment,{children:[O.jsxs("svg",{ref:F,style:{position:"fixed",inset:0,width:"100vw",height:"100vh",pointerEvents:je?"auto":"none",touchAction:je?"none":"auto"},className:je?"feedly-cursor-crosshair":"",onPointerDown:Ot,onPointerMove:Wt,onPointerUp:gn,onPointerCancel:Hn,children:[O.jsx("defs",{children:ct.map(ge=>O.jsx("marker",{id:`feedly-arrow-${W1(ge)}`,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:O.jsx("path",{d:"M0,0 L10,5 L0,10 z",fill:ge})},ge))}),O.jsxs("g",{ref:Y,transform:`translate(${-Re.x}, ${-Re.y})`,children:[pt&&!De&&O.jsx(Ty,{shape:vn(pt),color:((Wn=pt.tester)==null?void 0:Wn.color)??n,opacity:Cy},pt.id),De&&(()=>{var Qe;const ge=v.find(Je=>Je.id===De.id);return ge?O.jsx(Ty,{shape:qS(vn(ge),De.dx,De.dy),color:((Qe=ge.tester)==null?void 0:Qe.color)??n,opacity:Cy},`drag-${ge.id}`):null})(),q&&O.jsx(Ty,{shape:s5(q),color:n,opacity:Cy}),ie&&O.jsx(Ty,{shape:ie.shape,color:n,opacity:Cy})]})]}),!je&&!ie&&s1.createPortal(v.map(ge=>{var zt,Ee;if(ge.status==="confirmed")return null;const Qe=xy(vn(ge)),Je=((zt=ge.tester)==null?void 0:zt.color)??n,bt=ge.status==="fixed",Tt=ge.status==="reopened",It=bt?"#FACC15":Je,at=u!==null&&ge.tester_id===u,dt=(De==null?void 0:De.id)===ge.id?De:null,qt=Ey(ge.anchor??null),yn=(qt?Qe.x-Re.x:Qe.x)+((dt==null?void 0:dt.dx)??0)-7,Pe=(qt?Qe.y-Re.y:Qe.y)+((dt==null?void 0:dt.dy)??0)-7;return O.jsx("button",{type:"button","aria-label":`Annotation by ${((Ee=ge.tester)==null?void 0:Ee.name)??s} (${ge.status})`,className:bt?"feedly-pin-fixed":"",onMouseEnter:()=>{pe.current||oe(ge.id)},onMouseLeave:()=>oe(Ne=>Ne===ge.id?null:Ne),onPointerDown:Ne=>{at&&(Ne.currentTarget.setPointerCapture(Ne.pointerId),pe.current={id:ge.id,pointerId:Ne.pointerId,startX:Ne.clientX,startY:Ne.clientY,moved:!1})},onPointerMove:Ne=>{const nt=pe.current;if(!nt||nt.pointerId!==Ne.pointerId||nt.id!==ge.id)return;const Ut=Ne.clientX-nt.startX,vt=Ne.clientY-nt.startY;!nt.moved&&Math.hypot(Ut,vt)<5||(nt.moved=!0,oe(null),be({id:ge.id,dx:Ut,dy:vt}))},onPointerUp:async Ne=>{const nt=pe.current;if(!nt||nt.pointerId!==Ne.pointerId||nt.id!==ge.id)return;if(pe.current=null,!nt.moved){be(null);return}Oe.current=ge.id;const Ut=Ne.clientX-nt.startX,vt=Ne.clientY-nt.startY,Yt=qS(ge.shape_data,Ut,vt);be(null),await g(ge.id,Yt)||ne("Couldn't move the pin — it snapped back.")},onPointerCancel:()=>{pe.current=null,be(null)},onClick:Ne=>{if(Oe.current===ge.id){Oe.current=null;return}Ne.stopPropagation(),ke(nt=>nt===ge.id?null:ge.id)},style:{pointerEvents:"auto",position:qt?"fixed":"absolute",left:yn,top:Pe,width:14,height:14,borderRadius:999,background:It,border:"2px solid white",outline:_e===ge.id?`2px solid ${It}`:"none",outlineOffset:_e===ge.id?"1px":0,boxShadow:bt?void 0:"0 4px 12px rgba(0,0,0,0.35)",cursor:at?dt?"grabbing":"grab":"pointer",touchAction:at?"none":"auto",transition:dt?"none":"transform 160ms ease",transform:$e===ge.id||_e===ge.id?"scale(1.15)":"scale(1)",willChange:"transform"},children:Tt&&O.jsx("span",{"aria-hidden":!0,style:{position:"absolute",top:-6,right:-6,width:12,height:12,borderRadius:999,background:"#fff",color:Je,fontSize:9,lineHeight:"12px",textAlign:"center",boxShadow:"0 2px 6px rgba(0,0,0,0.4)",pointerEvents:"none"},children:"↻"})},`pin-${ge.id}`)}),A),pt&&!ie&&(()=>{var at,dt;const ge=u!==null&&pt.tester_id===u,Qe=f,Je=ge||f,bt=Ey(pt.anchor??null),Tt=xy(vn(pt)),It=bt?{x:Tt.x-window.scrollX,y:Tt.y-window.scrollY}:Tt;return O.jsxs("div",{onMouseEnter:()=>oe(pt.id),onMouseLeave:()=>oe(null),children:[O.jsx(YC,{anchor:It,anchorFixed:bt,noteOffset:pt.note_offset,color:((at=pt.tester)==null?void 0:at.color)??n,testerName:((dt=pt.tester)==null?void 0:dt.name)??s,existingComment:pt.comment,createdAt:pt.created_at,status:pt.status,canMarkFixed:Qe,canVerify:Je,jiraTicket:pt.jira_ticket,onMarkFixed:async()=>{(await b(pt.id,"fixed")).ok||ne("Couldn't update the status — try again.")},onConfirmFixed:async()=>{(await b(pt.id,"confirmed")).ok||ne("Couldn't update the status — try again.")},onStillBroken:async qt=>{const yn=await b(pt.id,"reopened",qt);return yn.ok||ne("Couldn't send the rejection — try again."),{ok:yn.ok}},onOpenDetails:()=>_(pt.id),canEdit:ge,canDelete:ge,onEdit:async(qt,yn)=>{const Pe=await k(pt.id,qt,yn);return Pe||ne("Couldn't save your edit — try again."),Pe},onDelete:async()=>{if(!await R(pt.id)){ne("Couldn't delete — try again.");return}ke(null),oe(null),me===pt.id&&ue(null)},hasSnapshot:!!pt.snapshot_path&&pt.type!=="arrow",snapshotShown:me===pt.id,onToggleSnapshot:()=>{const qt=me!==pt.id;ue(qt?pt.id:null),qt&&ke(pt.id)}}),me===pt.id&&O.jsx(n5,{supabase:P,annotation:pt,currentShape:vn(pt),onClose:()=>ue(null)})]},pt.id)})(),ie&&(()=>{const ge=qC(ie.shape),Qe=Ey(ge),Je=xy(ie.shape),bt=Qe?{x:Je.x-window.scrollX,y:Je.y-window.scrollY}:Je;return O.jsx(YC,{editable:!0,anchor:bt,anchorFixed:Qe,color:n,testerName:s,onSave:async(Tt,It)=>{const at=qC(ie.shape);await h(ie.type,ie.shape,Tt,at,It)?le(null):ne("Couldn't save — check your connection and hit Save again.")},onCancel:()=>{le(null),j()}})})(),fe&&O.jsx("div",{style:{position:"fixed",left:"50%",bottom:90,transform:"translateX(-50%)",pointerEvents:"none"},className:`
604
+ `,children:ue==="confirm"?"Confirming…":"Confirm Fixed"})]}):null})]})]})]})}function XU(){return O.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:O.jsx("path",{d:"M3.5 2l3 3-3 3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function QU(){return O.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[O.jsx("path",{d:"M9.5 2.5l2 2-7 7-2.5.5.5-2.5 7-7z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),O.jsx("path",{d:"M8 4l2 2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function ZU(){return O.jsx("svg",{width:"9",height:"13",viewBox:"0 0 10 14",fill:"none",children:O.jsxs("g",{fill:"currentColor",children:[O.jsx("circle",{cx:"3",cy:"3",r:"1"}),O.jsx("circle",{cx:"7",cy:"3",r:"1"}),O.jsx("circle",{cx:"3",cy:"7",r:"1"}),O.jsx("circle",{cx:"7",cy:"7",r:"1"}),O.jsx("circle",{cx:"3",cy:"11",r:"1"}),O.jsx("circle",{cx:"7",cy:"11",r:"1"})]})})}function e5(){return O.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[O.jsx("path",{d:"M1 7s2.2-4 6-4 6 4 6 4-2.2 4-6 4-6-4-6-4z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),O.jsx("circle",{cx:"7",cy:"7",r:"1.6",stroke:"currentColor",strokeWidth:"1.3"})]})}function t5(){return O.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[O.jsx("path",{d:"M2.5 3.5h9M5.5 3.5V2.5h3v1M3.5 3.5l.5 8h6l.5-8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),O.jsx("path",{d:"M6 6v4M8 6v4",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}const ky=6;function n5({supabase:i,annotation:n,currentShape:s,onClose:u}){var q;const f=G.useMemo(()=>n.snapshot_path?KP(i,n.snapshot_path):null,[i,n.snapshot_path]),[v,h]=G.useState(!1),[g,b]=G.useState(!1);G.useEffect(()=>{function I(ie){ie.key==="Escape"&&(ie.stopPropagation(),u())}return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),G.useEffect(()=>{if(h(!1),b(!1),!f)return;let I=!1;const ie=new Image;return ie.onload=()=>{I||h(!0)},ie.onerror=()=>{I||b(!0)},ie.src=f,()=>{I=!0}},[f]);const _=((q=n.snapshot_bbox)==null?void 0:q.pads)??{l:ky,t:ky,r:ky,b:ky},k=G.useMemo(()=>r5(s,_),[s,n.snapshot_bbox]);if(!k||!f)return null;const{left:R,top:N,width:A,height:j,clipPath:P,ringPath:F,viewBox:Y}=k;return g?O.jsx("div",{style:{position:"absolute",left:R,top:N-34,pointerEvents:"none",zIndex:2},"aria-hidden":!0,children:O.jsx("div",{style:{display:"inline-block",padding:"5px 10px",borderRadius:8,background:"rgba(15,23,42,0.88)",color:"white",fontSize:12,whiteSpace:"nowrap",boxShadow:"0 8px 24px rgba(0,0,0,0.35)"},children:"Snapshot couldn't load"})}):O.jsxs("div",{style:{position:"absolute",left:R,top:N,width:A,height:j,pointerEvents:"none",filter:"drop-shadow(0 2px 4px rgba(15,23,42,0.18)) drop-shadow(0 18px 36px rgba(15,23,42,0.28))",opacity:v?1:0,transform:v?"scale(1)":"scale(0.96)",transformOrigin:"50% 50%",transition:"opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1)",zIndex:2},"aria-hidden":!0,children:[O.jsx("div",{style:{position:"absolute",inset:0,backgroundImage:`url(${f})`,backgroundSize:"100% 100%",backgroundRepeat:"no-repeat",clipPath:P,WebkitClipPath:P,boxShadow:"inset 0 0 0 1px rgba(255,255,255,0.55), inset 0 1px 2px rgba(255,255,255,0.6)"}}),O.jsxs("svg",{viewBox:Y,preserveAspectRatio:"none",width:"100%",height:"100%",style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"visible"},children:[O.jsx("path",{d:F,fill:"none",stroke:"rgba(148, 163, 184, 0.85)",strokeWidth:"1.5",strokeLinejoin:"round"}),O.jsx("path",{d:F,fill:"none",stroke:"rgba(255,255,255,0.35)",strokeWidth:"0.5",strokeLinejoin:"round"})]})]})}function r5(i,n){switch(i.kind){case"rectangle":{const s=i.width+n.l+n.r,u=i.height+n.t+n.b,f=6,v=i5(n.l,n.t,i.width,i.height,f);return{left:i.x-n.l,top:i.y-n.t,width:s,height:u,clipPath:`inset(${n.t}px ${n.r}px ${n.b}px ${n.l}px round ${f}px)`,ringPath:v,viewBox:`0 0 ${s} ${u}`}}case"circle":{const{x:s,y:u,width:f,height:v}=i.bbox,h=f+n.l+n.r,g=v+n.t+n.b,b=s-n.l,_=u-n.t,k=a5(i.path,-b,-_);return{left:b,top:_,width:h,height:g,clipPath:`path('${k}')`,ringPath:k,viewBox:`0 0 ${h} ${g}`}}case"arrow":return null}}function i5(i,n,s,u,f){const v=Math.min(f,s/2,u/2);return[`M${i+v},${n}`,`H${i+s-v}`,`A${v},${v} 0 0 1 ${i+s},${n+v}`,`V${n+u-v}`,`A${v},${v} 0 0 1 ${i+s-v},${n+u}`,`H${i+v}`,`A${v},${v} 0 0 1 ${i},${n+u-v}`,`V${n+v}`,`A${v},${v} 0 0 1 ${i+v},${n}`,"Z"].join(" ")}function a5(i,n,s){return i.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(u,f,v)=>{const h=parseFloat(f)+n,g=parseFloat(v)+s;return`${h},${g}`})}const bS=2.5,Cy=.7;function q1(i){return i.replace(/[^0-9a-zA-Z]/g,"")}function o5({tool:i,testerColor:n,testerName:s,currentTesterId:u,isAdmin:f,annotations:v,onComplete:h,onMove:g,onSetStatus:b,onOpenDetails:_,onEditComment:k,onDelete:R,pinRequest:N,pinsContainer:A,onDiscardDraft:j,supabase:P}){var Wn;const F=G.useRef(null),Y=G.useRef(null),[q,I]=G.useState(null),[ie,le]=G.useState(null),[fe,ne]=G.useState(null);G.useEffect(()=>{if(!fe)return;const ge=setTimeout(()=>ne(null),3200);return()=>clearTimeout(ge)},[fe]);const[$e,oe]=G.useState(null),[_e,ke]=G.useState(null),[me,ue]=G.useState(null),Oe=G.useRef(null),ze=G.useRef(null),[De,be]=G.useState(null),pe=G.useRef(null),je=i!==null&&ie===null,[Re,B]=G.useState(()=>({x:typeof window<"u"?window.scrollX:0,y:typeof window<"u"?window.scrollY:0})),[Q,Le]=G.useState(0),Ve=G.useMemo(()=>v.some(ge=>Ey(ge.anchor??null)),[v,Q]),st=ie!==null||Ve,wt=G.useRef(st);wt.current=st,G.useEffect(()=>{st&&B({x:window.scrollX,y:window.scrollY})},[st]),G.useEffect(()=>{const ge=(vt,Yt)=>{Y.current&&Y.current.setAttribute("transform",`translate(${-vt}, ${-Yt})`)};ge(window.scrollX,window.scrollY);let Qe=0,Je=0,bt=0;const Tt=()=>{ge(window.scrollX,window.scrollY),wt.current&&(Je||(Je=requestAnimationFrame(()=>{Je=0,B({x:window.scrollX,y:window.scrollY})})))},It=()=>{Qe||(Qe=requestAnimationFrame(()=>{Qe=0,Tt()}))},at=()=>{It(),window.clearTimeout(bt),bt=window.setTimeout(()=>{B({x:window.scrollX,y:window.scrollY}),Le(vt=>vt+1)},100)};window.addEventListener("scroll",It,{passive:!0}),window.addEventListener("resize",at,{passive:!0});let dt=0;const qt=()=>{dt||(dt=window.setTimeout(()=>{dt=0,Le(vt=>vt+1)},120))},yn=vt=>{It(),vt.target!==document&&qt()};document.addEventListener("scroll",yn,{capture:!0,passive:!0});const Pe=[];function zt(vt){let Yt=null;try{Yt=vt.contentDocument}catch{Yt=null}if(!Yt)return;const rn=()=>{It(),qt()};try{Yt.addEventListener("scroll",rn,{passive:!0,capture:!0}),Pe.push(()=>{try{Yt.removeEventListener("scroll",rn,{capture:!0})}catch{}})}catch{}}function Ee(vt){var Yt;try{((Yt=vt.contentDocument)==null?void 0:Yt.readyState)==="complete"&&zt(vt)}catch{}vt.addEventListener("load",()=>zt(vt),{once:!1})}document.querySelectorAll("iframe").forEach(vt=>{Ee(vt)});let Ne=0;const nt=()=>{Ne||(Ne=window.setTimeout(()=>{Ne=0,Le(vt=>vt+1)},300))},Ut=new MutationObserver(vt=>{nt();for(const Yt of vt)Yt.addedNodes.forEach(rn=>{var mn;if(rn.nodeType!==1)return;const Ln=rn;Ln.tagName==="IFRAME"&&Ee(Ln),(mn=Ln.querySelectorAll)==null||mn.call(Ln,"iframe").forEach(fn=>{Ee(fn)})})});return Ut.observe(document.body,{childList:!0,subtree:!0}),()=>{Qe&&cancelAnimationFrame(Qe),Je&&cancelAnimationFrame(Je),window.clearTimeout(bt),window.clearTimeout(Ne),window.clearTimeout(dt),window.removeEventListener("scroll",It),window.removeEventListener("resize",at),document.removeEventListener("scroll",yn,{capture:!0}),Ut.disconnect(),Pe.forEach(vt=>vt())}},[]);const ct=G.useMemo(()=>{const ge=new Set([n]);return v.forEach(Qe=>{var Je;return ge.add(((Je=Qe.tester)==null?void 0:Je.color)??n)}),[...ge]},[v,n]),ut=G.useCallback(ge=>({x:ge.clientX+window.scrollX,y:ge.clientY+window.scrollY}),[]),Ot=G.useCallback(ge=>{var Je,bt;if(!i||ie||ge.button!==0||!ge.isPrimary||ze.current!==null)return;(bt=(Je=ge.currentTarget).setPointerCapture)==null||bt.call(Je,ge.pointerId),ze.current=ge.pointerId;const Qe=ut(ge);I(i==="circle"?{kind:"circle",points:[Qe]}:i==="arrow"?{kind:"arrow",from:Qe,to:Qe}:{kind:"rectangle",from:Qe,to:Qe})},[i,ie,ut]),Wt=G.useCallback(ge=>{if(!q||ze.current!==ge.pointerId)return;const Qe=ut(ge);I(Je=>Je&&(Je.kind==="circle"?{kind:"circle",points:[...Je.points,Qe]}:Je.kind==="arrow"?{kind:"arrow",from:Je.from,to:Qe}:{kind:"rectangle",from:Je.from,to:Qe}))},[q,ut]),gn=G.useCallback(ge=>{if(!q||!i||ze.current!==ge.pointerId)return;ze.current=null;let Qe=null;if(q.kind==="circle"&&q.points.length>2)Qe={kind:"circle",path:L1(q.points),bbox:P1(q.points)};else if(q.kind==="arrow"){const Je=q.to.x-q.from.x,bt=q.to.y-q.from.y;Je*Je+bt*bt>64&&(Qe={kind:"arrow",from:q.from,to:q.to})}else if(q.kind==="rectangle"){const Je=Math.min(q.from.x,q.to.x),bt=Math.min(q.from.y,q.to.y),Tt=Math.abs(q.to.x-q.from.x),It=Math.abs(q.to.y-q.from.y);Tt>6&&It>6&&(Qe={kind:"rectangle",x:Je,y:bt,width:Tt,height:It})}if(I(null),Qe){const Je=H1(Qe);if(!Je.ok&&Je.reason==="blocked-iframe"){ne("Can't annotate inside this iframe — it's cross-origin, so we can't track what you drew on."),j();return}le({type:i,shape:Qe})}},[q,i,j]),Hn=G.useCallback(ge=>{ze.current===ge.pointerId&&(ze.current=null,I(null))},[]);G.useEffect(()=>{function ge(Qe){if(Qe.key==="Escape"){if(ie)return;I(null),j()}}return window.addEventListener("keydown",ge),()=>window.removeEventListener("keydown",ge)},[j,ie]);const dn=_e??$e,pt=dn?v.find(ge=>ge.id===dn)??null:null;G.useEffect(()=>{_e&&!v.find(ge=>ge.id===_e)&&ke(null)},[v,_e]),G.useEffect(()=>{me&&me!==dn&&ue(null)},[dn,me]),G.useEffect(()=>{if(!_e)return;function ge(bt){const Tt=document.getElementById("feedly-widget-root"),It=document.getElementById("feedly-widget-pins"),at=bt.target;at&&(Tt&&(Tt===at||Tt.contains(at))||It&&(It===at||It.contains(at))||(ke(null),oe(null)))}function Qe(){ke(null),oe(null)}document.addEventListener("click",ge);const Je=[];return document.querySelectorAll("iframe").forEach(bt=>{let Tt=null;try{Tt=bt.contentDocument}catch{Tt=null}if(Tt)try{Tt.addEventListener("click",Qe,{capture:!0}),Je.push(()=>{try{Tt.removeEventListener("click",Qe,{capture:!0})}catch{}})}catch{}}),()=>{document.removeEventListener("click",ge),Je.forEach(bt=>bt())}},[_e]),G.useEffect(()=>{if(!N)return;const ge=v.find(Je=>Je.id===N.id);if(!ge)return;ke(ge.id),oe(null);const Qe=xy(wS(ge));window.scrollTo({top:Math.max(0,Qe.y-window.innerHeight/2),left:Math.max(0,Qe.x-window.innerWidth/2),behavior:"smooth"})},[N,v]);const An=G.useMemo(()=>{const ge=new Map;for(const Qe of v)ge.set(Qe.id,wS(Qe));return ge},[v,Q]),vn=ge=>An.get(ge.id)??wS(ge);return O.jsxs(O.Fragment,{children:[O.jsxs("svg",{ref:F,style:{position:"fixed",inset:0,width:"100vw",height:"100vh",pointerEvents:je?"auto":"none",touchAction:je?"none":"auto"},className:je?"feedly-cursor-crosshair":"",onPointerDown:Ot,onPointerMove:Wt,onPointerUp:gn,onPointerCancel:Hn,children:[O.jsx("defs",{children:ct.map(ge=>O.jsx("marker",{id:`feedly-arrow-${q1(ge)}`,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:O.jsx("path",{d:"M0,0 L10,5 L0,10 z",fill:ge})},ge))}),O.jsxs("g",{ref:Y,transform:`translate(${-Re.x}, ${-Re.y})`,children:[pt&&!De&&O.jsx(Ty,{shape:vn(pt),color:((Wn=pt.tester)==null?void 0:Wn.color)??n,opacity:Cy},pt.id),De&&(()=>{var Qe;const ge=v.find(Je=>Je.id===De.id);return ge?O.jsx(Ty,{shape:qS(vn(ge),De.dx,De.dy),color:((Qe=ge.tester)==null?void 0:Qe.color)??n,opacity:Cy},`drag-${ge.id}`):null})(),q&&O.jsx(Ty,{shape:s5(q),color:n,opacity:Cy}),ie&&O.jsx(Ty,{shape:ie.shape,color:n,opacity:Cy})]})]}),!je&&!ie&&s1.createPortal(v.map(ge=>{var zt,Ee;if(ge.status==="confirmed")return null;const Qe=xy(vn(ge)),Je=((zt=ge.tester)==null?void 0:zt.color)??n,bt=ge.status==="fixed",Tt=ge.status==="reopened",It=bt?"#FACC15":Je,at=u!==null&&ge.tester_id===u,dt=(De==null?void 0:De.id)===ge.id?De:null,qt=Ey(ge.anchor??null),yn=(qt?Qe.x-Re.x:Qe.x)+((dt==null?void 0:dt.dx)??0)-7,Pe=(qt?Qe.y-Re.y:Qe.y)+((dt==null?void 0:dt.dy)??0)-7;return O.jsx("button",{type:"button","aria-label":`Annotation by ${((Ee=ge.tester)==null?void 0:Ee.name)??s} (${ge.status})`,className:bt?"feedly-pin-fixed":"",onMouseEnter:()=>{pe.current||oe(ge.id)},onMouseLeave:()=>oe(Ne=>Ne===ge.id?null:Ne),onPointerDown:Ne=>{at&&(Ne.currentTarget.setPointerCapture(Ne.pointerId),pe.current={id:ge.id,pointerId:Ne.pointerId,startX:Ne.clientX,startY:Ne.clientY,moved:!1})},onPointerMove:Ne=>{const nt=pe.current;if(!nt||nt.pointerId!==Ne.pointerId||nt.id!==ge.id)return;const Ut=Ne.clientX-nt.startX,vt=Ne.clientY-nt.startY;!nt.moved&&Math.hypot(Ut,vt)<5||(nt.moved=!0,oe(null),be({id:ge.id,dx:Ut,dy:vt}))},onPointerUp:async Ne=>{const nt=pe.current;if(!nt||nt.pointerId!==Ne.pointerId||nt.id!==ge.id)return;if(pe.current=null,!nt.moved){be(null);return}Oe.current=ge.id;const Ut=Ne.clientX-nt.startX,vt=Ne.clientY-nt.startY,Yt=qS(ge.shape_data,Ut,vt);be(null),await g(ge.id,Yt)||ne("Couldn't move the pin — it snapped back.")},onPointerCancel:()=>{pe.current=null,be(null)},onClick:Ne=>{if(Oe.current===ge.id){Oe.current=null;return}Ne.stopPropagation(),ke(nt=>nt===ge.id?null:ge.id)},style:{pointerEvents:"auto",position:qt?"fixed":"absolute",left:yn,top:Pe,width:14,height:14,borderRadius:999,background:It,border:"2px solid white",outline:_e===ge.id?`2px solid ${It}`:"none",outlineOffset:_e===ge.id?"1px":0,boxShadow:bt?void 0:"0 4px 12px rgba(0,0,0,0.35)",cursor:at?dt?"grabbing":"grab":"pointer",touchAction:at?"none":"auto",transition:dt?"none":"transform 160ms ease",transform:$e===ge.id||_e===ge.id?"scale(1.15)":"scale(1)",willChange:"transform"},children:Tt&&O.jsx("span",{"aria-hidden":!0,style:{position:"absolute",top:-6,right:-6,width:12,height:12,borderRadius:999,background:"#fff",color:Je,fontSize:9,lineHeight:"12px",textAlign:"center",boxShadow:"0 2px 6px rgba(0,0,0,0.4)",pointerEvents:"none"},children:"↻"})},`pin-${ge.id}`)}),A),pt&&!ie&&(()=>{var at,dt;const ge=u!==null&&pt.tester_id===u,Qe=f,Je=ge||f,bt=Ey(pt.anchor??null),Tt=xy(vn(pt)),It=bt?{x:Tt.x-window.scrollX,y:Tt.y-window.scrollY}:Tt;return O.jsxs("div",{onMouseEnter:()=>oe(pt.id),onMouseLeave:()=>oe(null),children:[O.jsx(YC,{anchor:It,anchorFixed:bt,noteOffset:pt.note_offset,color:((at=pt.tester)==null?void 0:at.color)??n,testerName:((dt=pt.tester)==null?void 0:dt.name)??s,existingComment:pt.comment,createdAt:pt.created_at,status:pt.status,canMarkFixed:Qe,canVerify:Je,jiraTicket:pt.jira_ticket,onMarkFixed:async()=>{(await b(pt.id,"fixed")).ok||ne("Couldn't update the status — try again.")},onConfirmFixed:async()=>{(await b(pt.id,"confirmed")).ok||ne("Couldn't update the status — try again.")},onStillBroken:async qt=>{const yn=await b(pt.id,"reopened",qt);return yn.ok||ne("Couldn't send the rejection — try again."),{ok:yn.ok}},onOpenDetails:()=>_(pt.id),canEdit:ge,canDelete:ge,onEdit:async(qt,yn)=>{const Pe=await k(pt.id,qt,yn);return Pe||ne("Couldn't save your edit — try again."),Pe},onDelete:async()=>{if(!await R(pt.id)){ne("Couldn't delete — try again.");return}ke(null),oe(null),me===pt.id&&ue(null)},hasSnapshot:!!pt.snapshot_path&&pt.type!=="arrow",snapshotShown:me===pt.id,onToggleSnapshot:()=>{const qt=me!==pt.id;ue(qt?pt.id:null),qt&&ke(pt.id)}}),me===pt.id&&O.jsx(n5,{supabase:P,annotation:pt,currentShape:vn(pt),onClose:()=>ue(null)})]},pt.id)})(),ie&&(()=>{const ge=qC(ie.shape),Qe=Ey(ge),Je=xy(ie.shape),bt=Qe?{x:Je.x-window.scrollX,y:Je.y-window.scrollY}:Je;return O.jsx(YC,{editable:!0,anchor:bt,anchorFixed:Qe,color:n,testerName:s,onSave:async(Tt,It)=>{const at=qC(ie.shape);await h(ie.type,ie.shape,Tt,at,It)?le(null):ne("Couldn't save — check your connection and hit Save again.")},onCancel:()=>{le(null),j()}})})(),fe&&O.jsx("div",{style:{position:"fixed",left:"50%",bottom:90,transform:"translateX(-50%)",pointerEvents:"none"},className:`
605
605
  px-3.5 py-2 rounded-lg
606
606
  bg-black/85 text-white text-[12.5px]
607
607
  shadow-[0_8px_24px_rgba(0,0,0,0.35)]
608
608
  max-w-[420px] text-center
609
609
  animate-spring-in
610
- `,children:fe})]})}function s5(i){if(i.kind==="circle")return{kind:"circle",path:j1(i.points),bbox:L1(i.points)};if(i.kind==="arrow")return{kind:"arrow",from:i.from,to:i.to};const n=Math.min(i.from.x,i.to.x),s=Math.min(i.from.y,i.to.y);return{kind:"rectangle",x:n,y:s,width:Math.abs(i.to.x-i.from.x),height:Math.abs(i.to.y-i.from.y)}}function Ty({shape:i,color:n,opacity:s}){const u=`feedly-arrow-${W1(n)}`;return i.kind==="circle"?O.jsx("path",{d:i.path,fill:"none",stroke:n,strokeWidth:bS,strokeLinecap:"round",strokeLinejoin:"round",opacity:s}):i.kind==="arrow"?O.jsx("line",{x1:i.from.x,y1:i.from.y,x2:i.to.x,y2:i.to.y,stroke:n,strokeWidth:bS,strokeLinecap:"round",markerEnd:`url(#${u})`,opacity:s}):O.jsx("rect",{x:i.x,y:i.y,width:i.width,height:i.height,fill:"none",stroke:n,strokeWidth:bS,opacity:s,rx:2})}const q1=360,l5=560,Ry=12,Y1="feedly_list_pos",G1="feedly_list_collapsed",u5={open:"Open",fixed:"Fixed",confirmed:"Confirmed",reopened:"Reopened"},c5={open:"bg-blue-500/15 text-blue-300",fixed:"bg-amber-500/15 text-amber-300",confirmed:"bg-emerald-500/15 text-emerald-300",reopened:"bg-red-500/15 text-red-300"},d5=[{value:"all",label:"All"},{value:"open",label:"Open"},{value:"fixed",label:"Fixed"},{value:"confirmed",label:"Confirmed"}];function f5(){return typeof window>"u"?{x:24,y:80}:{x:24,y:Math.max(80,Math.round(window.innerHeight/2-260))}}function JS(i,n){return typeof window>"u"?i:{x:Math.min(Math.max(i.x,Ry),window.innerWidth-q1-Ry),y:Math.min(Math.max(i.y,Ry),window.innerHeight-n-Ry)}}function h5(){try{const i=window.localStorage.getItem(Y1);if(i)return JS(JSON.parse(i),200)}catch{}return f5()}function p5(i){try{window.localStorage.setItem(Y1,JSON.stringify(i))}catch{}}function v5(){try{const i=window.localStorage.getItem(G1);if(i)return new Set(JSON.parse(i))}catch{}return new Set}function m5(i){try{window.localStorage.setItem(G1,JSON.stringify([...i]))}catch{}}function g5(i){const n=Date.now()-new Date(i).getTime(),s=Math.round(n/6e4);if(s<1)return"now";if(s<60)return`${s}m`;const u=Math.round(s/60);if(u<24)return`${u}h`;const f=Math.round(u/24);return f<7?`${f}d`:new Date(i).toLocaleDateString()}function y5(i){try{return new URL(i,window.location.href).pathname}catch{return""}}function w5({grouped:i,loading:n,fallbackColor:s,fallbackName:u,currentPageUrl:f,onPick:v,onClose:h}){const[g,b]=G.useState(()=>typeof window>"u"?{x:0,y:0}:h5()),[,_]=G.useState(0),[k,R]=G.useState("all"),[N,A]=G.useState(()=>typeof window>"u"?new Set:v5()),j=G.useRef(null),P=G.useRef(null);G.useEffect(()=>{const ne=()=>{var oe;const $e=((oe=j.current)==null?void 0:oe.getBoundingClientRect().height)??200;b(_e=>JS(_e,$e)),_(_e=>_e+1)};return window.addEventListener("resize",ne),()=>window.removeEventListener("resize",ne)},[]);const F=G.useCallback(ne=>{ne.target.closest("[data-no-drag]")||(ne.currentTarget.setPointerCapture(ne.pointerId),P.current={pointerId:ne.pointerId,startX:ne.clientX,startY:ne.clientY,panelX:g.x,panelY:g.y})},[g.x,g.y]),Y=G.useCallback(ne=>{var me;const $e=P.current;if(!$e||$e.pointerId!==ne.pointerId)return;const oe=ne.clientX-$e.startX,_e=ne.clientY-$e.startY,ke=((me=j.current)==null?void 0:me.getBoundingClientRect().height)??200;b(JS({x:$e.panelX+oe,y:$e.panelY+_e},ke))},[]),q=G.useCallback(ne=>{const $e=P.current;!$e||$e.pointerId!==ne.pointerId||(P.current=null,b(oe=>(p5(oe),oe)))},[]),I=G.useMemo(()=>y5(f),[f]),ie=G.useMemo(()=>{const ne=new Map;for(const $e of i)for(const oe of $e.items){if(k!=="all"&&(k==="open"&&oe.status!=="open"&&oe.status!=="reopened"||k!=="open"&&oe.status!==k))continue;const _e=ne.get(oe.page_path)??{pageUrl:$e.pageUrl,items:[]};_e.items.push(oe),ne.set(oe.page_path,_e)}for(const $e of ne.values())$e.items.sort((oe,_e)=>_e.created_at.localeCompare(oe.created_at));return[...ne.entries()].sort(([$e],[oe])=>$e===I?-1:oe===I?1:$e.localeCompare(oe))},[i,k,I]),le=G.useMemo(()=>i.reduce((ne,$e)=>ne+$e.items.length,0),[i]),fe=G.useCallback(ne=>{A($e=>{const oe=new Set($e);return oe.has(ne)?oe.delete(ne):oe.add(ne),m5(oe),oe})},[]);return O.jsxs("div",{ref:j,style:{pointerEvents:"auto",position:"fixed",top:g.y,left:g.x,width:q1,maxHeight:l5},className:`
610
+ `,children:fe})]})}function s5(i){if(i.kind==="circle")return{kind:"circle",path:L1(i.points),bbox:P1(i.points)};if(i.kind==="arrow")return{kind:"arrow",from:i.from,to:i.to};const n=Math.min(i.from.x,i.to.x),s=Math.min(i.from.y,i.to.y);return{kind:"rectangle",x:n,y:s,width:Math.abs(i.to.x-i.from.x),height:Math.abs(i.to.y-i.from.y)}}function Ty({shape:i,color:n,opacity:s}){const u=`feedly-arrow-${q1(n)}`;return i.kind==="circle"?O.jsx("path",{d:i.path,fill:"none",stroke:n,strokeWidth:bS,strokeLinecap:"round",strokeLinejoin:"round",opacity:s}):i.kind==="arrow"?O.jsx("line",{x1:i.from.x,y1:i.from.y,x2:i.to.x,y2:i.to.y,stroke:n,strokeWidth:bS,strokeLinecap:"round",markerEnd:`url(#${u})`,opacity:s}):O.jsx("rect",{x:i.x,y:i.y,width:i.width,height:i.height,fill:"none",stroke:n,strokeWidth:bS,opacity:s,rx:2})}const Y1=360,l5=560,Ry=12,G1="feedly_list_pos",K1="feedly_list_collapsed",u5={open:"Open",fixed:"Fixed",confirmed:"Confirmed",reopened:"Reopened"},c5={open:"bg-blue-500/15 text-blue-300",fixed:"bg-amber-500/15 text-amber-300",confirmed:"bg-emerald-500/15 text-emerald-300",reopened:"bg-red-500/15 text-red-300"},d5=[{value:"all",label:"All"},{value:"open",label:"Open"},{value:"fixed",label:"Fixed"},{value:"confirmed",label:"Confirmed"}];function f5(){return typeof window>"u"?{x:24,y:80}:{x:24,y:Math.max(80,Math.round(window.innerHeight/2-260))}}function JS(i,n){return typeof window>"u"?i:{x:Math.min(Math.max(i.x,Ry),window.innerWidth-Y1-Ry),y:Math.min(Math.max(i.y,Ry),window.innerHeight-n-Ry)}}function h5(){try{const i=window.localStorage.getItem(G1);if(i)return JS(JSON.parse(i),200)}catch{}return f5()}function p5(i){try{window.localStorage.setItem(G1,JSON.stringify(i))}catch{}}function v5(){try{const i=window.localStorage.getItem(K1);if(i)return new Set(JSON.parse(i))}catch{}return new Set}function m5(i){try{window.localStorage.setItem(K1,JSON.stringify([...i]))}catch{}}function g5(i){const n=Date.now()-new Date(i).getTime(),s=Math.round(n/6e4);if(s<1)return"now";if(s<60)return`${s}m`;const u=Math.round(s/60);if(u<24)return`${u}h`;const f=Math.round(u/24);return f<7?`${f}d`:new Date(i).toLocaleDateString()}function y5(i){try{return new URL(i,window.location.href).pathname}catch{return""}}function w5({grouped:i,loading:n,fallbackColor:s,fallbackName:u,currentPageUrl:f,onPick:v,onClose:h}){const[g,b]=G.useState(()=>typeof window>"u"?{x:0,y:0}:h5()),[,_]=G.useState(0),[k,R]=G.useState("all"),[N,A]=G.useState(()=>typeof window>"u"?new Set:v5()),j=G.useRef(null),P=G.useRef(null);G.useEffect(()=>{const ne=()=>{var oe;const $e=((oe=j.current)==null?void 0:oe.getBoundingClientRect().height)??200;b(_e=>JS(_e,$e)),_(_e=>_e+1)};return window.addEventListener("resize",ne),()=>window.removeEventListener("resize",ne)},[]);const F=G.useCallback(ne=>{ne.target.closest("[data-no-drag]")||(ne.currentTarget.setPointerCapture(ne.pointerId),P.current={pointerId:ne.pointerId,startX:ne.clientX,startY:ne.clientY,panelX:g.x,panelY:g.y})},[g.x,g.y]),Y=G.useCallback(ne=>{var me;const $e=P.current;if(!$e||$e.pointerId!==ne.pointerId)return;const oe=ne.clientX-$e.startX,_e=ne.clientY-$e.startY,ke=((me=j.current)==null?void 0:me.getBoundingClientRect().height)??200;b(JS({x:$e.panelX+oe,y:$e.panelY+_e},ke))},[]),q=G.useCallback(ne=>{const $e=P.current;!$e||$e.pointerId!==ne.pointerId||(P.current=null,b(oe=>(p5(oe),oe)))},[]),I=G.useMemo(()=>y5(f),[f]),ie=G.useMemo(()=>{const ne=new Map;for(const $e of i)for(const oe of $e.items){if(k!=="all"&&(k==="open"&&oe.status!=="open"&&oe.status!=="reopened"||k!=="open"&&oe.status!==k))continue;const _e=ne.get(oe.page_path)??{pageUrl:$e.pageUrl,items:[]};_e.items.push(oe),ne.set(oe.page_path,_e)}for(const $e of ne.values())$e.items.sort((oe,_e)=>_e.created_at.localeCompare(oe.created_at));return[...ne.entries()].sort(([$e],[oe])=>$e===I?-1:oe===I?1:$e.localeCompare(oe))},[i,k,I]),le=G.useMemo(()=>i.reduce((ne,$e)=>ne+$e.items.length,0),[i]),fe=G.useCallback(ne=>{A($e=>{const oe=new Set($e);return oe.has(ne)?oe.delete(ne):oe.add(ne),m5(oe),oe})},[]);return O.jsxs("div",{ref:j,style:{pointerEvents:"auto",position:"fixed",top:g.y,left:g.x,width:Y1,maxHeight:l5},className:`
611
611
  flex flex-col
612
612
  rounded-xl
613
613
  bg-[#14141A]
@@ -699,18 +699,18 @@ ${Y}`}class wr extends Error{constructor({message:n,code:s,cause:u,name:f}){var
699
699
  absolute left-[-17px] top-[6px]
700
700
  w-2.5 h-2.5 rounded-full
701
701
  ${R5(_.to)}
702
- `}),O.jsxs("div",{className:"flex items-baseline gap-1.5 text-[12px]",children:[O.jsx("span",{className:"text-white/90 font-medium",children:T5(_.to)}),O.jsx("span",{className:"text-white/40",children:"·"}),O.jsx("span",{className:"text-white/45 truncate",children:_.by_tester_name}),O.jsx("span",{className:"ml-auto text-[10.5px] text-white/35 shrink-0",children:GC(_.at)})]}),_.comment&&O.jsx("div",{className:"text-[12px] text-white/70 mt-1 leading-relaxed whitespace-pre-wrap",children:_.comment})]},k)})})})]})]})})}function SS({title:i,children:n}){return O.jsxs("div",{children:[O.jsx("div",{className:"text-[10.5px] uppercase tracking-[0.10em] text-white/40 font-semibold mb-2",children:i}),n]})}function KC({children:i}){return O.jsx("dl",{className:"grid grid-cols-[88px_1fr] gap-y-1.5 gap-x-3 items-baseline",children:i})}function gu({label:i,children:n}){return O.jsxs(O.Fragment,{children:[O.jsx("dt",{className:"text-white/45 text-[11.5px]",children:i}),O.jsx("dd",{className:"text-white/90 text-right font-mono text-[11.5px]",children:n})]})}function T5(i){switch(i){case"open":return"Open";case"fixed":return"Marked fixed";case"confirmed":return"Confirmed";case"reopened":return"Reopened";default:return i}}function R5(i){switch(i){case"open":return"bg-blue-400";case"fixed":return"bg-amber-400";case"confirmed":return"bg-emerald-400";case"reopened":return"bg-red-400";default:return"bg-white/40"}}function O5(){return O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:O.jsx("path",{d:"M2 2l8 8M10 2L2 10",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}const K1="feedly_panel_open",xS=!1;function A5(){try{return window.localStorage.getItem(K1)==="1"}catch{return!1}}function D5(i){try{window.localStorage.setItem(K1,i?"1":"0")}catch{}}function N5({projectId:i,supabaseUrl:n,supabaseAnonKey:s,requireInvite:u,pinsContainer:f}){const v=G.useMemo(()=>SP(n,s),[n,s]),{project:h,loading:g}=_P(v,i),{identity:b,isAdmin:_,initializing:k,register:R,sendCrossDeviceLink:N,claimAdmin:A}=DP(v,i),j=ZP({supabase:v,projectId:i,enabled:u,recheckKey:(b==null?void 0:b.id)??null});G.useEffect(()=>{b&&j==="allowed"&&A()},[b,j,A]);const{annotations:P,testers:F,save:Y,updateShape:q,updateComment:I,setStatus:ie,remove:le}=JP({supabase:v,projectId:i,testerId:(b==null?void 0:b.id)??null,isAdmin:_}),[fe,ne]=G.useState(()=>typeof window>"u"?!1:A5());G.useEffect(()=>{D5(fe)},[fe]);const[$e,oe]=G.useState(!1);G.useEffect(()=>{fe&&!k&&!b&&oe(!0)},[fe,k,b]);const[_e,ke]=G.useState(null),[me,ue]=G.useState(new Set),[Oe,ze]=G.useState(!1),[De,be]=G.useState(!1),[pe,je]=G.useState(null),[Re,B]=G.useState(null);G.useEffect(()=>{if(typeof window>"u")return;const Pe=TP(i);Pe&&B({id:Pe,ts:Date.now()})},[i]);const[Q,Le]=G.useState(()=>typeof window>"u"?!1:gS(i)!==null),[Ve,st]=G.useState(()=>{var Pe;return typeof window>"u"?[]:((Pe=gS(i))==null?void 0:Pe.steps)??[]});G.useEffect(()=>{if(!Q)return;const Pe=gS(i);rU({projectId:i,steps:Ve,startedAt:(Pe==null?void 0:Pe.startedAt)??Date.now()})},[Q,Ve,i]);const[wt,ct]=G.useState(!1),[ut,Ot]=G.useState(null),Wt=wt||ut!==null,{flows:gn,loading:Hn,save:dn,remove:pt,fetchOne:An}=iU({supabase:v,projectId:i,testerId:(b==null?void 0:b.id)??null,isAdmin:_,enabled:Wt}),vn=G.useMemo(()=>({done:!1}),[]);G.useEffect(()=>{{nU();return}},[b,i,An,ut,vn]);const{grouped:Wn,loading:ge}=XP({supabase:v,projectId:i,testerId:(b==null?void 0:b.id)??null,isAdmin:_,enabled:De}),Qe=G.useMemo(()=>Oe?[]:!_||me.size===0?P:P.filter(Pe=>!me.has(Pe.tester_id)),[P,_,me,Oe]),{href:Je}=N1(),{hasUnseen:bt,markSeen:Tt}=mU({projectId:i,annotations:P,currentTesterId:(b==null?void 0:b.id)??null});if(g||!h||!h.session_active||j!=="allowed")return null;const It=()=>{const Pe=!fe;ne(Pe),Pe?Tt():(ke(null),be(!1),ct(!1),je(null),oe(!1))};function at(){FC(),st([]),Le(!0),ke(null)}async function dt(){if(!Q)return;const Pe=Ve;if(Le(!1),st([]),FC(),Pe.length===0)return;const zt=`Flow · ${new Date().toLocaleString()}`;await dn(Pe,zt)}function qt(Pe){st(zt=>{if(zt.length===0)return zt;const Ne={...zt[zt.length-1],note:Pe};return[...zt.slice(0,-1),Ne]})}async function yn(Pe){if(Pe.steps.length===0)return;const zt=Pe.steps[0];jC(zt.page_url,window.location.href)||await NC(zt.page_url),Ot({flow:Pe,stepIndex:0,preStart:!0}),tU({flowId:Pe.id,stepIndex:0,projectId:i})}return O.jsxs(O.Fragment,{children:[b&&!Q&&!ut&&O.jsx(o5,{tool:fe?_e:null,testerColor:b.color,testerName:b.name,currentTesterId:b.id,isAdmin:_,annotations:Qe,onComplete:async(Pe,zt,Ee,Ne,nt)=>{const Ut=await Y(Pe,zt,Ee,Ne,nt);return Ut&&ke(null),Ut!==null},onMove:q,onSetStatus:ie,onOpenDetails:Pe=>je(Pe),onEditComment:I,onDelete:async Pe=>{const zt=await le(Pe);return zt&&je(Ee=>Ee===Pe?null:Ee),zt},pinRequest:Re,pinsContainer:f,onDiscardDraft:()=>ke(null),supabase:v}),b&&pe&&(()=>{const Pe=P.find(zt=>zt.id===pe);return Pe?O.jsx(C5,{annotation:Pe,fallbackName:b.name,fallbackColor:b.color,onClose:()=>je(null)}):null})(),xS,xS,fe&&b&&!$e&&O.jsx(NU,{active:_e,testerName:b.name,testerColor:b.color,onSelect:Pe=>ke(zt=>zt===Pe?null:Pe),annotationsHidden:Oe,onToggleAnnotations:()=>ze(Pe=>!Pe),listOpen:De,onToggleList:()=>be(Pe=>!Pe),flowsEnabled:xS,recording:Q,recordingSteps:Ve,onStartRecording:at,onStopRecording:dt,onAttachNote:qt,flows:gn,flowsLoading:Hn,flowsOpen:wt,onToggleFlows:()=>ct(Pe=>!Pe),onPickFlow:Pe=>yn(Pe),onDeleteFlow:pt,currentTesterId:b.id,isAdmin:_,testers:F,hiddenTesterIds:me,onToggleTester:Pe=>ue(zt=>{const Ee=new Set(zt);return Ee.has(Pe)?Ee.delete(Pe):Ee.add(Pe),Ee}),onShowAll:()=>ue(new Set),onHideAll:()=>ue(new Set(F.map(Pe=>Pe.id))),pageCount:P.length}),fe&&b&&De&&O.jsx(w5,{grouped:Wn,loading:ge,fallbackColor:b.color,fallbackName:b.name,currentPageUrl:Je,onPick:Pe=>{jC(Pe.page_url,Je)?B({id:Pe.id,ts:Date.now()}):(CP(i,Pe.id),NC(Pe.page_url)),be(!1)},onClose:()=>be(!1)}),fe&&(!b||$e)&&O.jsx(gU,{onSubmit:async(Pe,zt)=>await R(Pe,zt)!==null,onSendMagicLink:N,onDone:()=>{oe(!1)},onCancel:()=>{oe(!1),ne(!1)}}),O.jsx(cU,{open:fe,hasUnseen:bt,onClick:It})]})}const j5="*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-bottom-\\[10px\\]{bottom:-10px}.bottom-0{bottom:0}.bottom-20{bottom:5rem}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-3{left:.75rem}.left-\\[-12\\.5px\\]{left:-12.5px}.left-\\[-17px\\]{left:-17px}.right-0{right:0}.right-2\\.5{right:.625rem}.right-3{right:.75rem}.right-\\[-2px\\]{right:-2px}.top-2\\.5{top:.625rem}.top-\\[-2px\\]{top:-2px}.top-\\[16px\\]{top:16px}.top-\\[6px\\]{top:6px}.z-10{z-index:10}.-ml-0\\.5{margin-left:-.125rem}.-mr-1{margin-right:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-\\[2px\\]{height:2px}.max-h-64{max-height:16rem}.max-h-\\[420px\\]{max-height:420px}.max-h-\\[calc\\(100vh-48px\\)\\]{max-height:calc(100vh - 48px)}.w-1{width:.25rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[360px\\]{width:360px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[18px\\]{min-width:18px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[420px\\]{max-width:420px}.max-w-\\[90px\\]{max-width:90px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes slideUp{0%{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-up{animation:slideUp .22s cubic-bezier(.16,1,.3,1)}@keyframes springIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.animate-spring-in{animation:springIn .24s cubic-bezier(.34,1.56,.64,1)}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-\\[88px_1fr\\]{grid-template-columns:88px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-1\\.5{row-gap:.375rem}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-black\\/10{border-color:#0000001a}.border-black\\/5{border-color:#0000000d}.border-feedly-bg{--tw-border-opacity: 1;border-color:rgb(15 15 15 / var(--tw-border-opacity, 1))}.border-red-500\\/30{border-color:#ef44444d}.border-red-500\\/40{border-color:#ef444466}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white\\/10{border-color:#ffffff1a}.border-white\\/15{border-color:#ffffff26}.border-white\\/\\[0\\.04\\]{border-color:#ffffff0a}.border-white\\/\\[0\\.06\\]{border-color:#ffffff0f}.bg-\\[\\#101013\\]{--tw-bg-opacity: 1;background-color:rgb(16 16 19 / var(--tw-bg-opacity, 1))}.bg-\\[\\#14141A\\]{--tw-bg-opacity: 1;background-color:rgb(20 20 26 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FEFCE8\\]{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-\\[rgba\\(15\\,15\\,15\\,0\\.7\\)\\]{background-color:#0f0f0fb3}.bg-\\[rgba\\(15\\,15\\,15\\,0\\.78\\)\\]{background-color:#0f0f0fc7}.bg-amber-300\\/85{background-color:#fcd34dd9}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500\\/15{background-color:#f59e0b26}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-black\\/40{background-color:#0006}.bg-black\\/5{background-color:#0000000d}.bg-black\\/85{background-color:#000000d9}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\\/10{background-color:#3b82f61a}.bg-blue-500\\/15{background-color:#3b82f626}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500\\/10{background-color:#10b9811a}.bg-emerald-500\\/15{background-color:#10b98126}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-feedly-bg{--tw-bg-opacity: 1;background-color:rgb(15 15 15 / var(--tw-bg-opacity, 1))}.bg-feedly-surface\\/95{background-color:#1a1a1af2}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\\/10{background-color:#ef44441a}.bg-red-500\\/15{background-color:#ef444426}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/10{background-color:#ffffff1a}.bg-white\\/15{background-color:#ffffff26}.bg-white\\/40{background-color:#fff6}.bg-white\\/5{background-color:#ffffff0d}.bg-white\\/60{background-color:#fff9}.bg-white\\/\\[0\\.06\\]{background-color:#ffffff0f}.bg-yellow-400\\/20{background-color:#facc1533}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-5{padding:1.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-1\\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-2\\.5{padding-bottom:.625rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-\\[26px\\]{padding-left:26px}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-2\\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-3\\.5{padding-right:.875rem}.pt-1{padding-top:.25rem}.pt-1\\.5{padding-top:.375rem}.pt-3{padding-top:.75rem}.pt-3\\.5{padding-top:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13\\.5px\\]{font-size:13.5px}.text-\\[13px\\]{font-size:13px}.text-\\[14\\.5px\\]{font-size:14.5px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[9px\\]{font-size:9px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-\\[0\\.08em\\]{letter-spacing:.08em}.tracking-\\[0\\.10em\\]{letter-spacing:.1em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\\[\\#1a1a1a\\]{--tw-text-opacity: 1;color:rgb(26 26 26 / var(--tw-text-opacity, 1))}.text-amber-200\\/90{color:#fde68ae6}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-300\\/85{color:#fcd34dd9}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-black\\/30{color:#0000004d}.text-black\\/40{color:#0006}.text-black\\/50{color:#00000080}.text-black\\/55{color:#0000008c}.text-black\\/60{color:#0009}.text-black\\/70{color:#000000b3}.text-black\\/75{color:#000000bf}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-red-100\\/55{color:#fee2e28c}.text-red-100\\/85{color:#fee2e2d9}.text-red-100\\/95{color:#fee2e2f2}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-300\\/90{color:#fca5a5e6}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/35{color:#ffffff59}.text-white\\/40{color:#fff6}.text-white\\/45{color:#ffffff73}.text-white\\/50{color:#ffffff80}.text-white\\/55{color:#ffffff8c}.text-white\\/60{color:#fff9}.text-white\\/65{color:#ffffffa6}.text-white\\/70{color:#ffffffb3}.text-white\\/75{color:#ffffffbf}.text-white\\/80{color:#fffc}.text-white\\/85{color:#ffffffd9}.text-white\\/90{color:#ffffffe6}.text-white\\/95{color:#fffffff2}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.placeholder-black\\/35::-moz-placeholder{color:#00000059}.placeholder-black\\/35::placeholder{color:#00000059}.placeholder-white\\/30::-moz-placeholder{color:#ffffff4d}.placeholder-white\\/30::placeholder{color:#ffffff4d}.placeholder-white\\/35::-moz-placeholder{color:#ffffff59}.placeholder-white\\/35::placeholder{color:#ffffff59}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_10px_40px_rgba\\(0\\,0\\,0\\,0\\.5\\)\\]{--tw-shadow: 0 10px 40px rgba(0,0,0,.5);--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_12px_32px_rgba\\(0\\,0\\,0\\,0\\.25\\)\\]{--tw-shadow: 0 12px 32px rgba(0,0,0,.25);--tw-shadow-colored: 0 12px 32px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_20px_60px_rgba\\(0\\,0\\,0\\,0\\.5\\)\\]{--tw-shadow: 0 20px 60px rgba(0,0,0,.5);--tw-shadow-colored: 0 20px 60px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_24px_60px_rgba\\(0\\,0\\,0\\,0\\.55\\)\\]{--tw-shadow: 0 24px 60px rgba(0,0,0,.55);--tw-shadow-colored: 0 24px 60px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_24px_60px_rgba\\(0\\,0\\,0\\,0\\.6\\)\\]{--tw-shadow: 0 24px 60px rgba(0,0,0,.6);--tw-shadow-colored: 0 24px 60px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_6px_24px_rgba\\(0\\,0\\,0\\,0\\.45\\)\\]{--tw-shadow: 0 6px 24px rgba(0,0,0,.45);--tw-shadow-colored: 0 6px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.35\\)\\]{--tw-shadow: 0 8px 24px rgba(0,0,0,.35);--tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,box-shadow\\]{transition-property:transform,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:host{all:initial;font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,sans-serif;color:#fff;line-height:1.4;-webkit-font-smoothing:antialiased}:host *{box-sizing:border-box}button,input,select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit}button{cursor:pointer;outline:0}button::-moz-focus-inner{border:0;padding:0}:host :focus-visible{outline:2px solid #94a3b8;outline-offset:2px;border-radius:4px}textarea{resize:none;font-family:inherit}.feedly-cursor-crosshair,.feedly-cursor-crosshair *{cursor:crosshair!important}@keyframes feedly-spotlight-pulse{0%,to{box-shadow:0 0 0 9999px #00000073,0 0 0 3px var(--feedly-ring-color, #fff),0 0 18px 6px var(--feedly-ring-glow, rgba(255, 255, 255, .4))}50%{box-shadow:0 0 0 9999px #00000073,0 0 0 4px var(--feedly-ring-color, #fff),0 0 32px 12px var(--feedly-ring-glow, rgba(255, 255, 255, .6))}}.feedly-spotlight{animation:feedly-spotlight-pulse 1.6s ease-in-out infinite;border-radius:6px;will-change:transform,width,height}@keyframes feedly-fixed-pulse{0%,to{box-shadow:0 4px 12px #00000059,0 0 #facc15b3}50%{box-shadow:0 4px 12px #00000059,0 0 0 6px #facc1500}}.feedly-pin-fixed{animation:feedly-fixed-pulse 1.6s ease-in-out infinite}.first\\:border-t-0:first-child{border-top-width:0px}.first\\:pl-0:first-child{padding-left:0}.last\\:border-b-0:last-child{border-bottom-width:0px}.last\\:pb-0:last-child{padding-bottom:0}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-black\\/10:hover{background-color:#0000001a}.hover\\:bg-black\\/5:hover{background-color:#0000000d}.hover\\:bg-black\\/85:hover{background-color:#000000d9}.hover\\:bg-emerald-600\\/90:hover{background-color:#059669e6}.hover\\:bg-red-500\\/10:hover{background-color:#ef44441a}.hover\\:bg-red-600\\/90:hover{background-color:#dc2626e6}.hover\\:bg-slate-500:hover{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.hover\\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}.hover\\:bg-white\\/5:hover{background-color:#ffffff0d}.hover\\:bg-white\\/90:hover{background-color:#ffffffe6}.hover\\:bg-white\\/\\[0\\.025\\]:hover{background-color:#ffffff06}.hover\\:bg-white\\/\\[0\\.03\\]:hover{background-color:#ffffff08}.hover\\:bg-white\\/\\[0\\.04\\]:hover{background-color:#ffffff0a}.hover\\:text-black\\/85:hover{color:#000000d9}.hover\\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:text-white\\/70:hover{color:#ffffffb3}.hover\\:text-white\\/80:hover{color:#fffc}.hover\\:text-white\\/85:hover{color:#ffffffd9}.hover\\:text-white\\/90:hover{color:#ffffffe6}.focus\\:border-black\\/30:focus{border-color:#0000004d}.focus\\:border-white\\/25:focus{border-color:#ffffff40}.focus\\:border-white\\/30:focus{border-color:#ffffff4d}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-white\\/25:disabled{color:#ffffff40}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent}@media (min-width: 768px){.md\\:block{display:block}}",L5="https://ndpkcaxzsdfuxqoexiut.supabase.co",P5="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5kcGtjYXh6c2RmdXhxb2V4aXV0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzk1NTc0NjcsImV4cCI6MjA5NTEzMzQ2N30.ugXgH8jJ5MQGqt4wG1h73RSBSNhs5dMuq-U1bIF6MZg",JC="feedly-widget-pins",_S="feedly-widget-root";let zc=null;function XC(i){const n=document.createElement("div");n.id=i.id,n.style.cssText=`all: initial; position: absolute; top: 0; left: 0; pointer-events: none; z-index: ${i.zIndex};`,document.body.appendChild(n);const s=n.attachShadow({mode:"open"}),u=document.createElement("style");u.textContent=j5,s.appendChild(u);const f=document.createElement("div");return f.style.cssText="pointer-events: none; color-scheme: dark;",s.appendChild(f),{host:n,shadow:s,container:f}}function U5(i){if(zc)return;if(typeof window<"u")try{if(window.top!==window.self)return}catch{return}if(typeof document<"u"&&(document.getElementById(_S)||document.getElementById(JC)))return;const n=i.supabaseUrl??L5,s=i.supabaseAnonKey??P5;if(!n||!s)return;const u=XC({id:JC,zIndex:i.pinsZIndex??100}),f=XC({id:_S,zIndex:2147483e3}),v=RS(f.container);v.render(O.jsx(G.StrictMode,{children:O.jsx(N5,{projectId:i.projectId,supabaseUrl:n,supabaseAnonKey:s,requireInvite:!!i.requireInvite,shadowRoot:f.shadow,pinsContainer:u.container})})),zc={pinsHost:u.host,pinsShadow:u.shadow,uiHost:f.host,uiShadow:f.shadow,root:v},NP(),i.smoothNavigation&&jP({hostId:_S})}function M5(){zc&&(D1(),P1(),zc.root.unmount(),zc.uiHost.remove(),zc.pinsHost.remove(),zc=null)}const J1={init:U5,destroy:M5};function X1(i,n){return i[13]=1,i[14]=n>>8,i[15]=n&255,i[16]=n>>8,i[17]=n&255,i}const Q1=112,Z1=72,eT=89,tT=115;let ES;function $5(){const i=new Int32Array(256);for(let n=0;n<256;n++){let s=n;for(let u=0;u<8;u++)s=s&1?3988292384^s>>>1:s>>>1;i[n]=s}return i}function I5(i){let n=-1;ES||(ES=$5());for(let s=0;s<i.length;s++)n=ES[(n^i[s])&255]^n>>>8;return n^-1}function z5(i){const n=i.length-1;for(let s=n;s>=4;s--)if(i[s-4]===9&&i[s-3]===Q1&&i[s-2]===Z1&&i[s-1]===eT&&i[s]===tT)return s-3;return 0}function nT(i,n,s=!1){const u=new Uint8Array(13);n*=39.3701,u[0]=Q1,u[1]=Z1,u[2]=eT,u[3]=tT,u[4]=n>>>24,u[5]=n>>>16,u[6]=n>>>8,u[7]=n&255,u[8]=u[4],u[9]=u[5],u[10]=u[6],u[11]=u[7],u[12]=1;const f=I5(u),v=new Uint8Array(4);if(v[0]=f>>>24,v[1]=f>>>16,v[2]=f>>>8,v[3]=f&255,s){const h=z5(i);return i.set(u,h),i.set(v,h+13),i}else{const h=new Uint8Array(4);h[0]=0,h[1]=0,h[2]=0,h[3]=9;const g=new Uint8Array(54);return g.set(i,0),g.set(h,33),g.set(u,37),g.set(v,50),g}}const F5="AAlwSFlz",B5="AAAJcEhZ",H5="AAAACXBI";function V5(i){let n=i.indexOf(F5);return n===-1&&(n=i.indexOf(B5)),n===-1&&(n=i.indexOf(H5)),n}const rT="[modern-screenshot]",bu=typeof window<"u",W5=bu&&"Worker"in window,iT=bu&&"atob"in window,q5=bu&&"btoa"in window;var i1;const rx=bu?(i1=window.navigator)==null?void 0:i1.userAgent:"",aT=rx.includes("Chrome"),Iy=rx.includes("AppleWebKit")&&!aT,ix=rx.includes("Firefox"),Y5=i=>i&&"__CONTEXT__"in i,G5=i=>i.constructor.name==="CSSFontFaceRule",K5=i=>i.constructor.name==="CSSImportRule",J5=i=>i.constructor.name==="CSSLayerBlockRule",bs=i=>i.nodeType===1,yv=i=>typeof i.className=="object",oT=i=>i.tagName==="image",X5=i=>i.tagName==="use",vv=i=>bs(i)&&typeof i.style<"u"&&!yv(i),Q5=i=>i.nodeType===8,Z5=i=>i.nodeType===3,Bf=i=>i.tagName==="IMG",Vy=i=>i.tagName==="VIDEO",eM=i=>i.tagName==="CANVAS",tM=i=>i.tagName==="TEXTAREA",nM=i=>i.tagName==="INPUT",rM=i=>i.tagName==="STYLE",iM=i=>i.tagName==="SCRIPT",aM=i=>i.tagName==="SELECT",oM=i=>i.tagName==="SLOT",sM=i=>i.tagName==="IFRAME",lM=(...i)=>console.warn(rT,...i);function uM(i){var s;const n=(s=i==null?void 0:i.createElement)==null?void 0:s.call(i,"canvas");return n&&(n.height=n.width=1),!!n&&"toDataURL"in n&&!!n.toDataURL("image/webp").includes("image/webp")}const XS=i=>i.startsWith("data:");function sT(i,n){if(i.match(/^[a-z]+:\/\//i))return i;if(bu&&i.match(/^\/\//))return window.location.protocol+i;if(i.match(/^[a-z]+:/i)||!bu)return i;const s=Wy().implementation.createHTMLDocument(),u=s.createElement("base"),f=s.createElement("a");return s.head.appendChild(u),s.body.appendChild(f),n&&(u.href=n),f.href=i,f.href}function Wy(i){return(i&&bs(i)?i==null?void 0:i.ownerDocument:i)??window.document}const qy="http://www.w3.org/2000/svg";function lT(i,n,s){const u=Wy(s).createElementNS(qy,"svg");return u.setAttributeNS(null,"width",i.toString()),u.setAttributeNS(null,"height",n.toString()),u.setAttributeNS(null,"viewBox",`0 0 ${i} ${n}`),u}function uT(i,n){let s=new XMLSerializer().serializeToString(i);return n&&(s=s.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`}async function cM(i,n="image/png",s=1){try{return await new Promise((u,f)=>{i.toBlob(v=>{v?u(v):f(new Error("Blob is null"))},n,s)})}catch(u){if(iT)return dM(i.toDataURL(n,s));throw u}}function dM(i){var g;const[n,s]=i.split(","),u=((g=n.match(/data:(.+);/))==null?void 0:g[1])??void 0,f=window.atob(s),v=f.length,h=new Uint8Array(v);for(let b=0;b<v;b+=1)h[b]=f.charCodeAt(b);return new Blob([h],{type:u})}function cT(i,n){return new Promise((s,u)=>{const f=new FileReader;f.onload=()=>s(f.result),f.onerror=()=>u(f.error),f.onabort=()=>u(new Error(`Failed read blob to ${n}`)),n==="dataUrl"?f.readAsDataURL(i):n==="arrayBuffer"&&f.readAsArrayBuffer(i)})}const fM=i=>cT(i,"dataUrl"),hM=i=>cT(i,"arrayBuffer");function Hc(i,n){const s=Wy(n).createElement("img");return s.decoding="sync",s.loading="eager",s.src=i,s}function Hf(i,n){return new Promise(s=>{const{timeout:u,ownerDocument:f,onError:v,onWarn:h}=n??{},g=typeof i=="string"?Hc(i,Wy(f)):i;let b=null,_=null;function k(){s(g),b&&clearTimeout(b),_==null||_()}if(u&&(b=setTimeout(k,u)),Vy(g)){const R=g.currentSrc||g.src;if(!R)return g.poster?Hf(g.poster,n).then(s):k();if(g.readyState>=2)return k();const N=k,A=j=>{h==null||h("Failed video load",R,j),v==null||v(j),k()};_=()=>{g.removeEventListener("loadeddata",N),g.removeEventListener("error",A)},g.addEventListener("loadeddata",N,{once:!0}),g.addEventListener("error",A,{once:!0})}else{const R=oT(g)?g.href.baseVal:g.currentSrc||g.src;if(!R)return k();const N=async()=>{if(Bf(g)&&"decode"in g)try{await g.decode()}catch(j){h==null||h("Failed to decode image, trying to render anyway",g.dataset.originalSrc||R,j)}k()},A=j=>{h==null||h("Failed image load",g.dataset.originalSrc||R,j),k()};if(Bf(g)&&g.complete)return N();_=()=>{g.removeEventListener("load",N),g.removeEventListener("error",A)},g.addEventListener("load",N,{once:!0}),g.addEventListener("error",A,{once:!0})}})}async function dT(i,n){vv(i)&&(Bf(i)||Vy(i)?await Hf(i,n):await Promise.all(["img","video"].flatMap(s=>Array.from(i.querySelectorAll(s)).map(u=>Hf(u,n)))))}const fT=function(){let n=0;const s=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${s()}${n}`)}();function hT(i){return i==null?void 0:i.split(",").map(n=>n.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}let QC=0;function pM(i){const n=`${rT}[#${QC}]`;return QC++,{time:s=>i&&console.time(`${n} ${s}`),timeEnd:s=>i&&console.timeEnd(`${n} ${s}`),warn:(...s)=>i&&lM(...s)}}function vM(i){return{cache:i?"no-cache":"force-cache"}}async function Ss(i,n){return Y5(i)?i:pT(i,{...n,autoDestruct:!0})}async function pT(i,n){var A,j;const{scale:s=1,workerUrl:u,workerNumber:f=1}=n||{},v=!!(n!=null&&n.debug),h=(n==null?void 0:n.features)??!0,g=i.ownerDocument??(bu?window.document:void 0),b=((A=i.ownerDocument)==null?void 0:A.defaultView)??(bu?window:void 0),_=new Map,k={width:0,height:0,quality:1,type:"image/png",scale:s,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:v,fetch:{requestInit:vM((j=n==null?void 0:n.fetch)==null?void 0:j.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...n==null?void 0:n.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:f,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...n,__CONTEXT__:!0,log:pM(v),node:i,ownerDocument:g,ownerWindow:b,dpi:s===1?null:96*s,svgStyleElement:vT(g),svgDefsElement:g==null?void 0:g.createElementNS(qy,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:W5&&u&&f?f:0})].map(()=>{try{const P=new Worker(u);return P.onmessage=async F=>{var I,ie,le,fe;const{url:Y,result:q}=F.data;q?(ie=(I=_.get(Y))==null?void 0:I.resolve)==null||ie.call(I,q):(fe=(le=_.get(Y))==null?void 0:le.reject)==null||fe.call(le,new Error(`Error receiving message from worker: ${Y}`))},P.onmessageerror=F=>{var q,I;const{url:Y}=F.data;(I=(q=_.get(Y))==null?void 0:q.reject)==null||I.call(q,new Error(`Error receiving message from worker: ${Y}`))},P}catch(P){return k.log.warn("Failed to new Worker",P),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[uM(g)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:_,drawImageCount:0,tasks:[],features:h,isEnable:P=>P==="restoreScrollPosition"?typeof h=="boolean"?!1:h[P]??!1:typeof h=="boolean"?h:h[P]??!0,shadowRoots:[]};k.log.time("wait until load"),await dT(i,{timeout:k.timeout,onWarn:k.log.warn}),k.log.timeEnd("wait until load");const{width:R,height:N}=mM(i,k);return k.width=R,k.height=N,k}function vT(i){if(!i)return;const n=i.createElement("style"),s=n.ownerDocument.createTextNode(`
702
+ `}),O.jsxs("div",{className:"flex items-baseline gap-1.5 text-[12px]",children:[O.jsx("span",{className:"text-white/90 font-medium",children:T5(_.to)}),O.jsx("span",{className:"text-white/40",children:"·"}),O.jsx("span",{className:"text-white/45 truncate",children:_.by_tester_name}),O.jsx("span",{className:"ml-auto text-[10.5px] text-white/35 shrink-0",children:GC(_.at)})]}),_.comment&&O.jsx("div",{className:"text-[12px] text-white/70 mt-1 leading-relaxed whitespace-pre-wrap",children:_.comment})]},k)})})})]})]})})}function SS({title:i,children:n}){return O.jsxs("div",{children:[O.jsx("div",{className:"text-[10.5px] uppercase tracking-[0.10em] text-white/40 font-semibold mb-2",children:i}),n]})}function KC({children:i}){return O.jsx("dl",{className:"grid grid-cols-[88px_1fr] gap-y-1.5 gap-x-3 items-baseline",children:i})}function gu({label:i,children:n}){return O.jsxs(O.Fragment,{children:[O.jsx("dt",{className:"text-white/45 text-[11.5px]",children:i}),O.jsx("dd",{className:"text-white/90 text-right font-mono text-[11.5px]",children:n})]})}function T5(i){switch(i){case"open":return"Open";case"fixed":return"Marked fixed";case"confirmed":return"Confirmed";case"reopened":return"Reopened";default:return i}}function R5(i){switch(i){case"open":return"bg-blue-400";case"fixed":return"bg-amber-400";case"confirmed":return"bg-emerald-400";case"reopened":return"bg-red-400";default:return"bg-white/40"}}function O5(){return O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:O.jsx("path",{d:"M2 2l8 8M10 2L2 10",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}const J1="feedly_panel_open",xS=!1;function A5(){try{return window.localStorage.getItem(J1)==="1"}catch{return!1}}function D5(i){try{window.localStorage.setItem(J1,i?"1":"0")}catch{}}function N5({projectId:i,supabaseUrl:n,supabaseAnonKey:s,requireInvite:u,pinsContainer:f}){const v=G.useMemo(()=>D1(n,s),[n,s]),{project:h,loading:g}=_P(v,i),{identity:b,isAdmin:_,initializing:k,register:R,sendCrossDeviceLink:N,claimAdmin:A}=DP(v,i),j=ZP({supabase:v,projectId:i,enabled:u,recheckKey:(b==null?void 0:b.id)??null});G.useEffect(()=>{b&&j==="allowed"&&A()},[b,j,A]);const{annotations:P,testers:F,save:Y,updateShape:q,updateComment:I,setStatus:ie,remove:le}=JP({supabase:v,projectId:i,testerId:(b==null?void 0:b.id)??null,isAdmin:_}),[fe,ne]=G.useState(()=>typeof window>"u"?!1:A5());G.useEffect(()=>{D5(fe)},[fe]);const[$e,oe]=G.useState(!1);G.useEffect(()=>{fe&&!k&&!b&&oe(!0)},[fe,k,b]);const[_e,ke]=G.useState(null),[me,ue]=G.useState(new Set),[Oe,ze]=G.useState(!1),[De,be]=G.useState(!1),[pe,je]=G.useState(null),[Re,B]=G.useState(null);G.useEffect(()=>{if(typeof window>"u")return;const Pe=TP(i);Pe&&B({id:Pe,ts:Date.now()})},[i]);const[Q,Le]=G.useState(()=>typeof window>"u"?!1:gS(i)!==null),[Ve,st]=G.useState(()=>{var Pe;return typeof window>"u"?[]:((Pe=gS(i))==null?void 0:Pe.steps)??[]});G.useEffect(()=>{if(!Q)return;const Pe=gS(i);rU({projectId:i,steps:Ve,startedAt:(Pe==null?void 0:Pe.startedAt)??Date.now()})},[Q,Ve,i]);const[wt,ct]=G.useState(!1),[ut,Ot]=G.useState(null),Wt=wt||ut!==null,{flows:gn,loading:Hn,save:dn,remove:pt,fetchOne:An}=iU({supabase:v,projectId:i,testerId:(b==null?void 0:b.id)??null,isAdmin:_,enabled:Wt}),vn=G.useMemo(()=>({done:!1}),[]);G.useEffect(()=>{{nU();return}},[b,i,An,ut,vn]);const{grouped:Wn,loading:ge}=XP({supabase:v,projectId:i,testerId:(b==null?void 0:b.id)??null,isAdmin:_,enabled:De}),Qe=G.useMemo(()=>Oe?[]:!_||me.size===0?P:P.filter(Pe=>!me.has(Pe.tester_id)),[P,_,me,Oe]),{href:Je}=j1(),{hasUnseen:bt,markSeen:Tt}=mU({projectId:i,annotations:P,currentTesterId:(b==null?void 0:b.id)??null});if(g||!h||!h.session_active||j!=="allowed")return null;const It=()=>{const Pe=!fe;ne(Pe),Pe?Tt():(ke(null),be(!1),ct(!1),je(null),oe(!1))};function at(){FC(),st([]),Le(!0),ke(null)}async function dt(){if(!Q)return;const Pe=Ve;if(Le(!1),st([]),FC(),Pe.length===0)return;const zt=`Flow · ${new Date().toLocaleString()}`;await dn(Pe,zt)}function qt(Pe){st(zt=>{if(zt.length===0)return zt;const Ne={...zt[zt.length-1],note:Pe};return[...zt.slice(0,-1),Ne]})}async function yn(Pe){if(Pe.steps.length===0)return;const zt=Pe.steps[0];jC(zt.page_url,window.location.href)||await NC(zt.page_url),Ot({flow:Pe,stepIndex:0,preStart:!0}),tU({flowId:Pe.id,stepIndex:0,projectId:i})}return O.jsxs(O.Fragment,{children:[b&&!Q&&!ut&&O.jsx(o5,{tool:fe?_e:null,testerColor:b.color,testerName:b.name,currentTesterId:b.id,isAdmin:_,annotations:Qe,onComplete:async(Pe,zt,Ee,Ne,nt)=>{const Ut=await Y(Pe,zt,Ee,Ne,nt);return Ut&&ke(null),Ut!==null},onMove:q,onSetStatus:ie,onOpenDetails:Pe=>je(Pe),onEditComment:I,onDelete:async Pe=>{const zt=await le(Pe);return zt&&je(Ee=>Ee===Pe?null:Ee),zt},pinRequest:Re,pinsContainer:f,onDiscardDraft:()=>ke(null),supabase:v}),b&&pe&&(()=>{const Pe=P.find(zt=>zt.id===pe);return Pe?O.jsx(C5,{annotation:Pe,fallbackName:b.name,fallbackColor:b.color,onClose:()=>je(null)}):null})(),xS,xS,fe&&b&&!$e&&O.jsx(NU,{active:_e,testerName:b.name,testerColor:b.color,onSelect:Pe=>ke(zt=>zt===Pe?null:Pe),annotationsHidden:Oe,onToggleAnnotations:()=>ze(Pe=>!Pe),listOpen:De,onToggleList:()=>be(Pe=>!Pe),flowsEnabled:xS,recording:Q,recordingSteps:Ve,onStartRecording:at,onStopRecording:dt,onAttachNote:qt,flows:gn,flowsLoading:Hn,flowsOpen:wt,onToggleFlows:()=>ct(Pe=>!Pe),onPickFlow:Pe=>yn(Pe),onDeleteFlow:pt,currentTesterId:b.id,isAdmin:_,testers:F,hiddenTesterIds:me,onToggleTester:Pe=>ue(zt=>{const Ee=new Set(zt);return Ee.has(Pe)?Ee.delete(Pe):Ee.add(Pe),Ee}),onShowAll:()=>ue(new Set),onHideAll:()=>ue(new Set(F.map(Pe=>Pe.id))),pageCount:P.length}),fe&&b&&De&&O.jsx(w5,{grouped:Wn,loading:ge,fallbackColor:b.color,fallbackName:b.name,currentPageUrl:Je,onPick:Pe=>{jC(Pe.page_url,Je)?B({id:Pe.id,ts:Date.now()}):(CP(i,Pe.id),NC(Pe.page_url)),be(!1)},onClose:()=>be(!1)}),fe&&(!b||$e)&&O.jsx(gU,{onSubmit:async(Pe,zt)=>await R(Pe,zt)!==null,onSendMagicLink:N,onDone:()=>{oe(!1)},onCancel:()=>{oe(!1),ne(!1)}}),O.jsx(cU,{open:fe,hasUnseen:bt,onClick:It})]})}const j5="*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-bottom-\\[10px\\]{bottom:-10px}.bottom-0{bottom:0}.bottom-20{bottom:5rem}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-3{left:.75rem}.left-\\[-12\\.5px\\]{left:-12.5px}.left-\\[-17px\\]{left:-17px}.right-0{right:0}.right-2\\.5{right:.625rem}.right-3{right:.75rem}.right-\\[-2px\\]{right:-2px}.top-2\\.5{top:.625rem}.top-\\[-2px\\]{top:-2px}.top-\\[16px\\]{top:16px}.top-\\[6px\\]{top:6px}.z-10{z-index:10}.-ml-0\\.5{margin-left:-.125rem}.-mr-1{margin-right:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-\\[2px\\]{height:2px}.max-h-64{max-height:16rem}.max-h-\\[420px\\]{max-height:420px}.max-h-\\[calc\\(100vh-48px\\)\\]{max-height:calc(100vh - 48px)}.w-1{width:.25rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[360px\\]{width:360px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[18px\\]{min-width:18px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[420px\\]{max-width:420px}.max-w-\\[90px\\]{max-width:90px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes slideUp{0%{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-up{animation:slideUp .22s cubic-bezier(.16,1,.3,1)}@keyframes springIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.animate-spring-in{animation:springIn .24s cubic-bezier(.34,1.56,.64,1)}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-\\[88px_1fr\\]{grid-template-columns:88px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-1\\.5{row-gap:.375rem}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-black\\/10{border-color:#0000001a}.border-black\\/5{border-color:#0000000d}.border-feedly-bg{--tw-border-opacity: 1;border-color:rgb(15 15 15 / var(--tw-border-opacity, 1))}.border-red-500\\/30{border-color:#ef44444d}.border-red-500\\/40{border-color:#ef444466}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white\\/10{border-color:#ffffff1a}.border-white\\/15{border-color:#ffffff26}.border-white\\/\\[0\\.04\\]{border-color:#ffffff0a}.border-white\\/\\[0\\.06\\]{border-color:#ffffff0f}.bg-\\[\\#101013\\]{--tw-bg-opacity: 1;background-color:rgb(16 16 19 / var(--tw-bg-opacity, 1))}.bg-\\[\\#14141A\\]{--tw-bg-opacity: 1;background-color:rgb(20 20 26 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FEFCE8\\]{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-\\[rgba\\(15\\,15\\,15\\,0\\.7\\)\\]{background-color:#0f0f0fb3}.bg-\\[rgba\\(15\\,15\\,15\\,0\\.78\\)\\]{background-color:#0f0f0fc7}.bg-amber-300\\/85{background-color:#fcd34dd9}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500\\/15{background-color:#f59e0b26}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-black\\/40{background-color:#0006}.bg-black\\/5{background-color:#0000000d}.bg-black\\/85{background-color:#000000d9}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\\/10{background-color:#3b82f61a}.bg-blue-500\\/15{background-color:#3b82f626}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500\\/10{background-color:#10b9811a}.bg-emerald-500\\/15{background-color:#10b98126}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-feedly-bg{--tw-bg-opacity: 1;background-color:rgb(15 15 15 / var(--tw-bg-opacity, 1))}.bg-feedly-surface\\/95{background-color:#1a1a1af2}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\\/10{background-color:#ef44441a}.bg-red-500\\/15{background-color:#ef444426}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/10{background-color:#ffffff1a}.bg-white\\/15{background-color:#ffffff26}.bg-white\\/40{background-color:#fff6}.bg-white\\/5{background-color:#ffffff0d}.bg-white\\/60{background-color:#fff9}.bg-white\\/\\[0\\.06\\]{background-color:#ffffff0f}.bg-yellow-400\\/20{background-color:#facc1533}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-5{padding:1.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-1\\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-2\\.5{padding-bottom:.625rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-\\[26px\\]{padding-left:26px}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-2\\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-3\\.5{padding-right:.875rem}.pt-1{padding-top:.25rem}.pt-1\\.5{padding-top:.375rem}.pt-3{padding-top:.75rem}.pt-3\\.5{padding-top:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13\\.5px\\]{font-size:13.5px}.text-\\[13px\\]{font-size:13px}.text-\\[14\\.5px\\]{font-size:14.5px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[9px\\]{font-size:9px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-\\[0\\.08em\\]{letter-spacing:.08em}.tracking-\\[0\\.10em\\]{letter-spacing:.1em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\\[\\#1a1a1a\\]{--tw-text-opacity: 1;color:rgb(26 26 26 / var(--tw-text-opacity, 1))}.text-amber-200\\/90{color:#fde68ae6}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-300\\/85{color:#fcd34dd9}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-black\\/30{color:#0000004d}.text-black\\/40{color:#0006}.text-black\\/50{color:#00000080}.text-black\\/55{color:#0000008c}.text-black\\/60{color:#0009}.text-black\\/70{color:#000000b3}.text-black\\/75{color:#000000bf}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-red-100\\/55{color:#fee2e28c}.text-red-100\\/85{color:#fee2e2d9}.text-red-100\\/95{color:#fee2e2f2}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-300\\/90{color:#fca5a5e6}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/35{color:#ffffff59}.text-white\\/40{color:#fff6}.text-white\\/45{color:#ffffff73}.text-white\\/50{color:#ffffff80}.text-white\\/55{color:#ffffff8c}.text-white\\/60{color:#fff9}.text-white\\/65{color:#ffffffa6}.text-white\\/70{color:#ffffffb3}.text-white\\/75{color:#ffffffbf}.text-white\\/80{color:#fffc}.text-white\\/85{color:#ffffffd9}.text-white\\/90{color:#ffffffe6}.text-white\\/95{color:#fffffff2}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.placeholder-black\\/35::-moz-placeholder{color:#00000059}.placeholder-black\\/35::placeholder{color:#00000059}.placeholder-white\\/30::-moz-placeholder{color:#ffffff4d}.placeholder-white\\/30::placeholder{color:#ffffff4d}.placeholder-white\\/35::-moz-placeholder{color:#ffffff59}.placeholder-white\\/35::placeholder{color:#ffffff59}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_10px_40px_rgba\\(0\\,0\\,0\\,0\\.5\\)\\]{--tw-shadow: 0 10px 40px rgba(0,0,0,.5);--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_12px_32px_rgba\\(0\\,0\\,0\\,0\\.25\\)\\]{--tw-shadow: 0 12px 32px rgba(0,0,0,.25);--tw-shadow-colored: 0 12px 32px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_20px_60px_rgba\\(0\\,0\\,0\\,0\\.5\\)\\]{--tw-shadow: 0 20px 60px rgba(0,0,0,.5);--tw-shadow-colored: 0 20px 60px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_24px_60px_rgba\\(0\\,0\\,0\\,0\\.55\\)\\]{--tw-shadow: 0 24px 60px rgba(0,0,0,.55);--tw-shadow-colored: 0 24px 60px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_24px_60px_rgba\\(0\\,0\\,0\\,0\\.6\\)\\]{--tw-shadow: 0 24px 60px rgba(0,0,0,.6);--tw-shadow-colored: 0 24px 60px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_6px_24px_rgba\\(0\\,0\\,0\\,0\\.45\\)\\]{--tw-shadow: 0 6px 24px rgba(0,0,0,.45);--tw-shadow-colored: 0 6px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.35\\)\\]{--tw-shadow: 0 8px 24px rgba(0,0,0,.35);--tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,box-shadow\\]{transition-property:transform,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:host{all:initial;font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,sans-serif;color:#fff;line-height:1.4;-webkit-font-smoothing:antialiased}:host *{box-sizing:border-box}button,input,select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit}button{cursor:pointer;outline:0}button::-moz-focus-inner{border:0;padding:0}:host :focus-visible{outline:2px solid #94a3b8;outline-offset:2px;border-radius:4px}textarea{resize:none;font-family:inherit}.feedly-cursor-crosshair,.feedly-cursor-crosshair *{cursor:crosshair!important}@keyframes feedly-spotlight-pulse{0%,to{box-shadow:0 0 0 9999px #00000073,0 0 0 3px var(--feedly-ring-color, #fff),0 0 18px 6px var(--feedly-ring-glow, rgba(255, 255, 255, .4))}50%{box-shadow:0 0 0 9999px #00000073,0 0 0 4px var(--feedly-ring-color, #fff),0 0 32px 12px var(--feedly-ring-glow, rgba(255, 255, 255, .6))}}.feedly-spotlight{animation:feedly-spotlight-pulse 1.6s ease-in-out infinite;border-radius:6px;will-change:transform,width,height}@keyframes feedly-fixed-pulse{0%,to{box-shadow:0 4px 12px #00000059,0 0 #facc15b3}50%{box-shadow:0 4px 12px #00000059,0 0 0 6px #facc1500}}.feedly-pin-fixed{animation:feedly-fixed-pulse 1.6s ease-in-out infinite}.first\\:border-t-0:first-child{border-top-width:0px}.first\\:pl-0:first-child{padding-left:0}.last\\:border-b-0:last-child{border-bottom-width:0px}.last\\:pb-0:last-child{padding-bottom:0}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-black\\/10:hover{background-color:#0000001a}.hover\\:bg-black\\/5:hover{background-color:#0000000d}.hover\\:bg-black\\/85:hover{background-color:#000000d9}.hover\\:bg-emerald-600\\/90:hover{background-color:#059669e6}.hover\\:bg-red-500\\/10:hover{background-color:#ef44441a}.hover\\:bg-red-600\\/90:hover{background-color:#dc2626e6}.hover\\:bg-slate-500:hover{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.hover\\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}.hover\\:bg-white\\/5:hover{background-color:#ffffff0d}.hover\\:bg-white\\/90:hover{background-color:#ffffffe6}.hover\\:bg-white\\/\\[0\\.025\\]:hover{background-color:#ffffff06}.hover\\:bg-white\\/\\[0\\.03\\]:hover{background-color:#ffffff08}.hover\\:bg-white\\/\\[0\\.04\\]:hover{background-color:#ffffff0a}.hover\\:text-black\\/85:hover{color:#000000d9}.hover\\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:text-white\\/70:hover{color:#ffffffb3}.hover\\:text-white\\/80:hover{color:#fffc}.hover\\:text-white\\/85:hover{color:#ffffffd9}.hover\\:text-white\\/90:hover{color:#ffffffe6}.focus\\:border-black\\/30:focus{border-color:#0000004d}.focus\\:border-white\\/25:focus{border-color:#ffffff40}.focus\\:border-white\\/30:focus{border-color:#ffffff4d}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-white\\/25:disabled{color:#ffffff40}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent}@media (min-width: 768px){.md\\:block{display:block}}",L5="https://ndpkcaxzsdfuxqoexiut.supabase.co",P5="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5kcGtjYXh6c2RmdXhxb2V4aXV0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzk1NTc0NjcsImV4cCI6MjA5NTEzMzQ2N30.ugXgH8jJ5MQGqt4wG1h73RSBSNhs5dMuq-U1bIF6MZg",JC="feedly-widget-pins",_S="feedly-widget-root";let zc=null;function XC(i){const n=document.createElement("div");n.id=i.id,n.style.cssText=`all: initial; position: absolute; top: 0; left: 0; pointer-events: none; z-index: ${i.zIndex};`,document.body.appendChild(n);const s=n.attachShadow({mode:"open"}),u=document.createElement("style");u.textContent=j5,s.appendChild(u);const f=document.createElement("div");return f.style.cssText="pointer-events: none; color-scheme: dark;",s.appendChild(f),{host:n,shadow:s,container:f}}function U5(i){if(zc)return;if(typeof window<"u")try{if(window.top!==window.self)return}catch{return}if(typeof document<"u"&&(document.getElementById(_S)||document.getElementById(JC)))return;const n=i.supabaseUrl??L5,s=i.supabaseAnonKey??P5;if(!n||!s)return;const u=XC({id:JC,zIndex:i.pinsZIndex??100}),f=XC({id:_S,zIndex:2147483e3}),v=RS(f.container);v.render(O.jsx(G.StrictMode,{children:O.jsx(N5,{projectId:i.projectId,supabaseUrl:n,supabaseAnonKey:s,requireInvite:!!i.requireInvite,shadowRoot:f.shadow,pinsContainer:u.container})})),zc={pinsHost:u.host,pinsShadow:u.shadow,uiHost:f.host,uiShadow:f.shadow,root:v},NP();try{D1(n,s).rpc("feedly_install_ping",{p_project_id:i.projectId,p_url:typeof window<"u"?window.location.href:""}).then(()=>{},()=>{})}catch{}i.smoothNavigation&&jP({hostId:_S})}function M5(){zc&&(N1(),U1(),zc.root.unmount(),zc.uiHost.remove(),zc.pinsHost.remove(),zc=null)}const X1={init:U5,destroy:M5};function Q1(i,n){return i[13]=1,i[14]=n>>8,i[15]=n&255,i[16]=n>>8,i[17]=n&255,i}const Z1=112,eT=72,tT=89,nT=115;let ES;function $5(){const i=new Int32Array(256);for(let n=0;n<256;n++){let s=n;for(let u=0;u<8;u++)s=s&1?3988292384^s>>>1:s>>>1;i[n]=s}return i}function I5(i){let n=-1;ES||(ES=$5());for(let s=0;s<i.length;s++)n=ES[(n^i[s])&255]^n>>>8;return n^-1}function z5(i){const n=i.length-1;for(let s=n;s>=4;s--)if(i[s-4]===9&&i[s-3]===Z1&&i[s-2]===eT&&i[s-1]===tT&&i[s]===nT)return s-3;return 0}function rT(i,n,s=!1){const u=new Uint8Array(13);n*=39.3701,u[0]=Z1,u[1]=eT,u[2]=tT,u[3]=nT,u[4]=n>>>24,u[5]=n>>>16,u[6]=n>>>8,u[7]=n&255,u[8]=u[4],u[9]=u[5],u[10]=u[6],u[11]=u[7],u[12]=1;const f=I5(u),v=new Uint8Array(4);if(v[0]=f>>>24,v[1]=f>>>16,v[2]=f>>>8,v[3]=f&255,s){const h=z5(i);return i.set(u,h),i.set(v,h+13),i}else{const h=new Uint8Array(4);h[0]=0,h[1]=0,h[2]=0,h[3]=9;const g=new Uint8Array(54);return g.set(i,0),g.set(h,33),g.set(u,37),g.set(v,50),g}}const F5="AAlwSFlz",B5="AAAJcEhZ",H5="AAAACXBI";function V5(i){let n=i.indexOf(F5);return n===-1&&(n=i.indexOf(B5)),n===-1&&(n=i.indexOf(H5)),n}const iT="[modern-screenshot]",bu=typeof window<"u",W5=bu&&"Worker"in window,aT=bu&&"atob"in window,q5=bu&&"btoa"in window;var i1;const rx=bu?(i1=window.navigator)==null?void 0:i1.userAgent:"",oT=rx.includes("Chrome"),Iy=rx.includes("AppleWebKit")&&!oT,ix=rx.includes("Firefox"),Y5=i=>i&&"__CONTEXT__"in i,G5=i=>i.constructor.name==="CSSFontFaceRule",K5=i=>i.constructor.name==="CSSImportRule",J5=i=>i.constructor.name==="CSSLayerBlockRule",bs=i=>i.nodeType===1,yv=i=>typeof i.className=="object",sT=i=>i.tagName==="image",X5=i=>i.tagName==="use",vv=i=>bs(i)&&typeof i.style<"u"&&!yv(i),Q5=i=>i.nodeType===8,Z5=i=>i.nodeType===3,Bf=i=>i.tagName==="IMG",Vy=i=>i.tagName==="VIDEO",eM=i=>i.tagName==="CANVAS",tM=i=>i.tagName==="TEXTAREA",nM=i=>i.tagName==="INPUT",rM=i=>i.tagName==="STYLE",iM=i=>i.tagName==="SCRIPT",aM=i=>i.tagName==="SELECT",oM=i=>i.tagName==="SLOT",sM=i=>i.tagName==="IFRAME",lM=(...i)=>console.warn(iT,...i);function uM(i){var s;const n=(s=i==null?void 0:i.createElement)==null?void 0:s.call(i,"canvas");return n&&(n.height=n.width=1),!!n&&"toDataURL"in n&&!!n.toDataURL("image/webp").includes("image/webp")}const XS=i=>i.startsWith("data:");function lT(i,n){if(i.match(/^[a-z]+:\/\//i))return i;if(bu&&i.match(/^\/\//))return window.location.protocol+i;if(i.match(/^[a-z]+:/i)||!bu)return i;const s=Wy().implementation.createHTMLDocument(),u=s.createElement("base"),f=s.createElement("a");return s.head.appendChild(u),s.body.appendChild(f),n&&(u.href=n),f.href=i,f.href}function Wy(i){return(i&&bs(i)?i==null?void 0:i.ownerDocument:i)??window.document}const qy="http://www.w3.org/2000/svg";function uT(i,n,s){const u=Wy(s).createElementNS(qy,"svg");return u.setAttributeNS(null,"width",i.toString()),u.setAttributeNS(null,"height",n.toString()),u.setAttributeNS(null,"viewBox",`0 0 ${i} ${n}`),u}function cT(i,n){let s=new XMLSerializer().serializeToString(i);return n&&(s=s.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`}async function cM(i,n="image/png",s=1){try{return await new Promise((u,f)=>{i.toBlob(v=>{v?u(v):f(new Error("Blob is null"))},n,s)})}catch(u){if(aT)return dM(i.toDataURL(n,s));throw u}}function dM(i){var g;const[n,s]=i.split(","),u=((g=n.match(/data:(.+);/))==null?void 0:g[1])??void 0,f=window.atob(s),v=f.length,h=new Uint8Array(v);for(let b=0;b<v;b+=1)h[b]=f.charCodeAt(b);return new Blob([h],{type:u})}function dT(i,n){return new Promise((s,u)=>{const f=new FileReader;f.onload=()=>s(f.result),f.onerror=()=>u(f.error),f.onabort=()=>u(new Error(`Failed read blob to ${n}`)),n==="dataUrl"?f.readAsDataURL(i):n==="arrayBuffer"&&f.readAsArrayBuffer(i)})}const fM=i=>dT(i,"dataUrl"),hM=i=>dT(i,"arrayBuffer");function Hc(i,n){const s=Wy(n).createElement("img");return s.decoding="sync",s.loading="eager",s.src=i,s}function Hf(i,n){return new Promise(s=>{const{timeout:u,ownerDocument:f,onError:v,onWarn:h}=n??{},g=typeof i=="string"?Hc(i,Wy(f)):i;let b=null,_=null;function k(){s(g),b&&clearTimeout(b),_==null||_()}if(u&&(b=setTimeout(k,u)),Vy(g)){const R=g.currentSrc||g.src;if(!R)return g.poster?Hf(g.poster,n).then(s):k();if(g.readyState>=2)return k();const N=k,A=j=>{h==null||h("Failed video load",R,j),v==null||v(j),k()};_=()=>{g.removeEventListener("loadeddata",N),g.removeEventListener("error",A)},g.addEventListener("loadeddata",N,{once:!0}),g.addEventListener("error",A,{once:!0})}else{const R=sT(g)?g.href.baseVal:g.currentSrc||g.src;if(!R)return k();const N=async()=>{if(Bf(g)&&"decode"in g)try{await g.decode()}catch(j){h==null||h("Failed to decode image, trying to render anyway",g.dataset.originalSrc||R,j)}k()},A=j=>{h==null||h("Failed image load",g.dataset.originalSrc||R,j),k()};if(Bf(g)&&g.complete)return N();_=()=>{g.removeEventListener("load",N),g.removeEventListener("error",A)},g.addEventListener("load",N,{once:!0}),g.addEventListener("error",A,{once:!0})}})}async function fT(i,n){vv(i)&&(Bf(i)||Vy(i)?await Hf(i,n):await Promise.all(["img","video"].flatMap(s=>Array.from(i.querySelectorAll(s)).map(u=>Hf(u,n)))))}const hT=function(){let n=0;const s=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${s()}${n}`)}();function pT(i){return i==null?void 0:i.split(",").map(n=>n.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}let QC=0;function pM(i){const n=`${iT}[#${QC}]`;return QC++,{time:s=>i&&console.time(`${n} ${s}`),timeEnd:s=>i&&console.timeEnd(`${n} ${s}`),warn:(...s)=>i&&lM(...s)}}function vM(i){return{cache:i?"no-cache":"force-cache"}}async function Ss(i,n){return Y5(i)?i:vT(i,{...n,autoDestruct:!0})}async function vT(i,n){var A,j;const{scale:s=1,workerUrl:u,workerNumber:f=1}=n||{},v=!!(n!=null&&n.debug),h=(n==null?void 0:n.features)??!0,g=i.ownerDocument??(bu?window.document:void 0),b=((A=i.ownerDocument)==null?void 0:A.defaultView)??(bu?window:void 0),_=new Map,k={width:0,height:0,quality:1,type:"image/png",scale:s,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:v,fetch:{requestInit:vM((j=n==null?void 0:n.fetch)==null?void 0:j.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...n==null?void 0:n.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:f,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...n,__CONTEXT__:!0,log:pM(v),node:i,ownerDocument:g,ownerWindow:b,dpi:s===1?null:96*s,svgStyleElement:mT(g),svgDefsElement:g==null?void 0:g.createElementNS(qy,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:W5&&u&&f?f:0})].map(()=>{try{const P=new Worker(u);return P.onmessage=async F=>{var I,ie,le,fe;const{url:Y,result:q}=F.data;q?(ie=(I=_.get(Y))==null?void 0:I.resolve)==null||ie.call(I,q):(fe=(le=_.get(Y))==null?void 0:le.reject)==null||fe.call(le,new Error(`Error receiving message from worker: ${Y}`))},P.onmessageerror=F=>{var q,I;const{url:Y}=F.data;(I=(q=_.get(Y))==null?void 0:q.reject)==null||I.call(q,new Error(`Error receiving message from worker: ${Y}`))},P}catch(P){return k.log.warn("Failed to new Worker",P),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[uM(g)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:_,drawImageCount:0,tasks:[],features:h,isEnable:P=>P==="restoreScrollPosition"?typeof h=="boolean"?!1:h[P]??!1:typeof h=="boolean"?h:h[P]??!0,shadowRoots:[]};k.log.time("wait until load"),await fT(i,{timeout:k.timeout,onWarn:k.log.warn}),k.log.timeEnd("wait until load");const{width:R,height:N}=mM(i,k);return k.width=R,k.height=N,k}function mT(i){if(!i)return;const n=i.createElement("style"),s=n.ownerDocument.createTextNode(`
703
703
  .______background-clip--text {
704
704
  background-clip: text;
705
705
  -webkit-background-clip: text;
706
706
  }
707
- `);return n.appendChild(s),n}function mM(i,n){let{width:s,height:u}=n;if(bs(i)&&(!s||!u)){const f=i.getBoundingClientRect();s=s||f.width||Number(i.getAttribute("width"))||0,u=u||f.height||Number(i.getAttribute("height"))||0}return{width:s,height:u}}async function gM(i,n){const{log:s,timeout:u,drawImageCount:f,drawImageInterval:v}=n;s.time("image to canvas");const h=await Hf(i,{timeout:u,onWarn:n.log.warn}),{canvas:g,context2d:b}=yM(i.ownerDocument,n),_=()=>{try{b==null||b.drawImage(h,0,0,g.width,g.height)}catch(k){n.log.warn("Failed to drawImage",k)}};if(_(),n.isEnable("fixSvgXmlDecode"))for(let k=0;k<f;k++)await new Promise(R=>{setTimeout(()=>{b==null||b.clearRect(0,0,g.width,g.height),_(),R()},k+v)});return n.drawImageCount=0,s.timeEnd("image to canvas"),g}function yM(i,n){const{width:s,height:u,scale:f,backgroundColor:v,maximumCanvasSize:h}=n,g=i.createElement("canvas");g.width=Math.floor(s*f),g.height=Math.floor(u*f),g.style.width=`${s}px`,g.style.height=`${u}px`,h&&(g.width>h||g.height>h)&&(g.width>h&&g.height>h?g.width>g.height?(g.height*=h/g.width,g.width=h):(g.width*=h/g.height,g.height=h):g.width>h?(g.height*=h/g.width,g.width=h):(g.width*=h/g.height,g.height=h));const b=g.getContext("2d");return b&&v&&(b.fillStyle=v,b.fillRect(0,0,g.width,g.height)),{canvas:g,context2d:b}}function mT(i,n){if(i.ownerDocument)try{const v=i.toDataURL();if(v!=="data:,")return Hc(v,i.ownerDocument)}catch(v){n.log.warn("Failed to clone canvas",v)}const s=i.cloneNode(!1),u=i.getContext("2d"),f=s.getContext("2d");try{return u&&f&&f.putImageData(u.getImageData(0,0,i.width,i.height),0,0),s}catch(v){n.log.warn("Failed to clone canvas",v)}return s}function wM(i,n){var s;try{if((s=i==null?void 0:i.contentDocument)!=null&&s.documentElement)return ax(i.contentDocument.documentElement,n)}catch(u){n.log.warn("Failed to clone iframe",u)}return i.cloneNode(!1)}function bM(i){const n=i.cloneNode(!1);return i.currentSrc&&i.currentSrc!==i.src&&(n.src=i.currentSrc,n.srcset=""),n.loading==="lazy"&&(n.loading="eager"),n}async function SM(i,n){if(i.ownerDocument&&!i.currentSrc&&i.poster)return Hc(i.poster,i.ownerDocument);const s=i.cloneNode(!1);s.crossOrigin="anonymous",i.currentSrc&&i.currentSrc!==i.src&&(s.src=i.currentSrc);const u=s.ownerDocument;if(u){let f=!0;if(await Hf(s,{onError:()=>f=!1,onWarn:n.log.warn}),!f)return i.poster?Hc(i.poster,i.ownerDocument):s;s.currentTime=i.currentTime,await new Promise(h=>{s.addEventListener("seeked",h,{once:!0})});const v=u.createElement("canvas");v.width=i.offsetWidth,v.height=i.offsetHeight;try{const h=v.getContext("2d");h&&h.drawImage(s,0,0,v.width,v.height)}catch(h){return n.log.warn("Failed to clone video",h),i.poster?Hc(i.poster,i.ownerDocument):s}return mT(v,n)}return s}function xM(i,n){return eM(i)?mT(i,n):sM(i)?wM(i,n):Bf(i)?bM(i):Vy(i)?SM(i,n):i.cloneNode(!1)}function _M(i){let n=i.sandbox;if(!n){const{ownerDocument:s}=i;try{s&&(n=s.createElement("iframe"),n.id=`__SANDBOX__${fT()}`,n.width="0",n.height="0",n.style.visibility="hidden",n.style.position="fixed",s.body.appendChild(n),n.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',i.sandbox=n)}catch(u){i.log.warn("Failed to getSandBox",u)}}return n}const EM=["width","height","-webkit-text-fill-color"],kM=["stroke","fill"];function gT(i,n,s){const{defaultComputedStyles:u}=s,f=i.nodeName.toLowerCase(),v=yv(i)&&f!=="svg",h=v?kM.map(P=>[P,i.getAttribute(P)]).filter(([,P])=>P!==null):[],g=[v&&"svg",f,h.map((P,F)=>`${P}=${F}`).join(","),n].filter(Boolean).join(":");if(u.has(g))return u.get(g);const b=_M(s),_=b==null?void 0:b.contentWindow;if(!_)return new Map;const k=_==null?void 0:_.document;let R,N;v?(R=k.createElementNS(qy,"svg"),N=R.ownerDocument.createElementNS(R.namespaceURI,f),h.forEach(([P,F])=>{N.setAttributeNS(null,P,F)}),R.appendChild(N)):R=N=k.createElement(f),N.textContent=" ",k.body.appendChild(R);const A=_.getComputedStyle(N,n),j=new Map;for(let P=A.length,F=0;F<P;F++){const Y=A.item(F);EM.includes(Y)||j.set(Y,A.getPropertyValue(Y))}return k.body.removeChild(R),u.set(g,j),j}function yT(i,n,s){var g;const u=new Map,f=[],v=new Map;if(s)for(const b of s)h(b);else for(let b=i.length,_=0;_<b;_++){const k=i.item(_);h(k)}for(let b=f.length,_=0;_<b;_++)(g=v.get(f[_]))==null||g.forEach((k,R)=>u.set(R,k));function h(b){const _=i.getPropertyValue(b),k=i.getPropertyPriority(b),R=b.lastIndexOf("-"),N=R>-1?b.substring(0,R):void 0;if(N){let A=v.get(N);A||(A=new Map,v.set(N,A)),A.set(b,[_,k])}n.get(b)===_&&!k||(N?f.push(N):u.set(b,[_,k]))}return u}function CM(i,n,s,u){var R,N,A,j;const{ownerWindow:f,includeStyleProperties:v,currentParentNodeStyle:h}=u,g=n.style,b=f.getComputedStyle(i),_=gT(i,null,u);h==null||h.forEach((P,F)=>{_.delete(F)});const k=yT(b,_,v);k.delete("transition-property"),k.delete("all"),k.delete("d"),k.delete("content"),s&&(k.delete("position"),k.delete("margin-top"),k.delete("margin-right"),k.delete("margin-bottom"),k.delete("margin-left"),k.delete("margin-block-start"),k.delete("margin-block-end"),k.delete("margin-inline-start"),k.delete("margin-inline-end"),k.set("box-sizing",["border-box",""])),((R=k.get("background-clip"))==null?void 0:R[0])==="text"&&n.classList.add("______background-clip--text"),aT&&(k.has("font-kerning")||k.set("font-kerning",["normal",""]),(((N=k.get("overflow-x"))==null?void 0:N[0])==="hidden"||((A=k.get("overflow-y"))==null?void 0:A[0])==="hidden")&&((j=k.get("text-overflow"))==null?void 0:j[0])==="ellipsis"&&i.scrollWidth===i.clientWidth&&k.set("text-overflow",["clip",""]));for(let P=g.length,F=0;F<P;F++)g.removeProperty(g.item(F));return k.forEach(([P,F],Y)=>{g.setProperty(Y,P,F)}),k}function TM(i,n){(tM(i)||nM(i)||aM(i))&&n.setAttribute("value",i.value)}const RM=["::before","::after"],OM=["::-webkit-scrollbar","::-webkit-scrollbar-button","::-webkit-scrollbar-thumb","::-webkit-scrollbar-track","::-webkit-scrollbar-track-piece","::-webkit-scrollbar-corner","::-webkit-resizer"];function AM(i,n,s,u,f){const{ownerWindow:v,svgStyleElement:h,svgStyles:g,currentNodeStyle:b}=u;if(!h||!v)return;function _(k){var I;const R=v.getComputedStyle(i,k);let N=R.getPropertyValue("content");if(!N||N==="none")return;f==null||f(N),N=N.replace(/(')|(")|(counter\(.+\))/g,"");const A=[fT()],j=gT(i,k,u);b==null||b.forEach((ie,le)=>{j.delete(le)});const P=yT(R,j,u.includeStyleProperties);P.delete("content"),P.delete("-webkit-locale"),((I=P.get("background-clip"))==null?void 0:I[0])==="text"&&n.classList.add("______background-clip--text");const F=[`content: '${N}';`];if(P.forEach(([ie,le],fe)=>{F.push(`${fe}: ${ie}${le?" !important":""};`)}),F.length===1)return;try{n.className=[n.className,...A].join(" ")}catch(ie){u.log.warn("Failed to copyPseudoClass",ie);return}const Y=F.join(`
708
- `);let q=g.get(Y);q||(q=[],g.set(Y,q)),q.push(`.${A[0]}${k}`)}RM.forEach(_),s&&OM.forEach(_)}const ZC=new Set(["symbol"]);async function e1(i,n,s,u,f){if(bs(s)&&(rM(s)||iM(s))||u.filter&&!u.filter(s))return;ZC.has(n.nodeName)||ZC.has(s.nodeName)?u.currentParentNodeStyle=void 0:u.currentParentNodeStyle=u.currentNodeStyle;const v=await ax(s,u,!1,f);u.isEnable("restoreScrollPosition")&&DM(i,v),n.appendChild(v)}async function t1(i,n,s,u){var v;let f=i.firstChild;bs(i)&&i.shadowRoot&&(f=(v=i.shadowRoot)==null?void 0:v.firstChild,s.shadowRoots.push(i.shadowRoot));for(let h=f;h;h=h.nextSibling)if(!Q5(h))if(bs(h)&&oM(h)&&typeof h.assignedNodes=="function"){const g=h.assignedNodes();for(let b=0;b<g.length;b++)await e1(i,n,g[b],s,u)}else await e1(i,n,h,s,u)}function DM(i,n){if(!vv(i)||!vv(n))return;const{scrollTop:s,scrollLeft:u}=i;if(!s&&!u)return;const{transform:f}=n.style,v=new DOMMatrix(f),{a:h,b:g,c:b,d:_}=v;v.a=1,v.b=0,v.c=0,v.d=1,v.translateSelf(-u,-s),v.a=h,v.b=g,v.c=b,v.d=_,n.style.transform=v.toString()}function NM(i,n){const{backgroundColor:s,width:u,height:f,style:v}=n,h=i.style;if(s&&h.setProperty("background-color",s,"important"),u&&h.setProperty("width",`${u}px`,"important"),f&&h.setProperty("height",`${f}px`,"important"),v)for(const g in v)h[g]=v[g]}const jM=/^[\w-:]+$/;async function ax(i,n,s=!1,u){var _,k,R,N;const{ownerDocument:f,ownerWindow:v,fontFamilies:h,onCloneEachNode:g}=n;if(f&&Z5(i))return u&&/\S/.test(i.data)&&u(i.data),f.createTextNode(i.data);if(f&&v&&bs(i)&&(vv(i)||yv(i))){const A=await xM(i,n);if(n.isEnable("removeAbnormalAttributes")){const I=A.getAttributeNames();for(let ie=I.length,le=0;le<ie;le++){const fe=I[le];jM.test(fe)||A.removeAttribute(fe)}}const j=n.currentNodeStyle=CM(i,A,s,n);s&&NM(A,n);let P=!1;if(n.isEnable("copyScrollbar")){const I=[(_=j.get("overflow-x"))==null?void 0:_[0],(k=j.get("overflow-y"))==null?void 0:k[0]];P=I.includes("scroll")||(I.includes("auto")||I.includes("overlay"))&&(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)}const F=(R=j.get("text-transform"))==null?void 0:R[0],Y=hT((N=j.get("font-family"))==null?void 0:N[0]),q=Y?I=>{F==="uppercase"?I=I.toUpperCase():F==="lowercase"?I=I.toLowerCase():F==="capitalize"&&(I=I[0].toUpperCase()+I.substring(1)),Y.forEach(ie=>{let le=h.get(ie);le||h.set(ie,le=new Set),I.split("").forEach(fe=>le.add(fe))})}:void 0;return AM(i,A,P,n,q),TM(i,A),Vy(i)||await t1(i,A,n,q),await(g==null?void 0:g(A)),A}const b=i.cloneNode(!1);return await t1(i,b,n),await(g==null?void 0:g(b)),b}function wT(i){if(i.ownerDocument=void 0,i.ownerWindow=void 0,i.svgStyleElement=void 0,i.svgDefsElement=void 0,i.svgStyles.clear(),i.defaultComputedStyles.clear(),i.sandbox){try{i.sandbox.remove()}catch(n){i.log.warn("Failed to destroyContext",n)}i.sandbox=void 0}i.workers=[],i.fontFamilies.clear(),i.fontCssTexts.clear(),i.requests.clear(),i.tasks=[],i.shadowRoots=[]}function LM(i){const{url:n,timeout:s,responseType:u,...f}=i,v=new AbortController,h=s?setTimeout(()=>v.abort(),s):void 0;return fetch(n,{signal:v.signal,...f}).then(g=>{if(!g.ok)throw new Error("Failed fetch, not 2xx response",{cause:g});switch(u){case"arrayBuffer":return g.arrayBuffer();case"dataUrl":return g.blob().then(fM);case"text":default:return g.text()}}).finally(()=>clearTimeout(h))}function mv(i,n){const{url:s,requestType:u="text",responseType:f="text",imageDom:v}=n;let h=s;const{timeout:g,acceptOfImage:b,requests:_,fetchFn:k,fetch:{requestInit:R,bypassingCache:N,placeholderImage:A},font:j,workers:P,fontFamilies:F}=i;u==="image"&&(Iy||ix)&&i.drawImageCount++;let Y=_.get(s);if(!Y){N&&N instanceof RegExp&&N.test(h)&&(h+=(/\?/.test(h)?"&":"?")+new Date().getTime());const q=u.startsWith("font")&&j&&j.minify,I=new Set;q&&u.split(";")[1].split(",").forEach(ne=>{F.has(ne)&&F.get(ne).forEach($e=>I.add($e))});const ie=q&&I.size,le={url:h,timeout:g,responseType:ie?"arrayBuffer":f,headers:u==="image"?{accept:b}:void 0,...R};Y={type:u,resolve:void 0,reject:void 0,response:null},Y.response=(async()=>{if(k&&u==="image"){const fe=await k(s);if(fe)return fe}return!Iy&&s.startsWith("http")&&P.length?new Promise((fe,ne)=>{P[_.size&P.length-1].postMessage({rawUrl:s,...le}),Y.resolve=fe,Y.reject=ne}):LM(le)})().catch(fe=>{if(_.delete(s),u==="image"&&A)return i.log.warn("Failed to fetch image base64, trying to use placeholder image",h),typeof A=="string"?A:A(v);throw fe}),_.set(s,Y)}return Y.response}async function bT(i,n,s,u){if(!ST(i))return i;for(const[f,v]of PM(i,n))try{const h=await mv(s,{url:v,requestType:u?"image":"text",responseType:"dataUrl"});i=i.replace(UM(f),`$1${h}$3`)}catch(h){s.log.warn("Failed to fetch css data url",f,h)}return i}function ST(i){return/url\((['"]?)([^'"]+?)\1\)/.test(i)}const xT=/url\((['"]?)([^'"]+?)\1\)/g;function PM(i,n){const s=[];return i.replace(xT,(u,f,v)=>(s.push([v,sT(v,n)]),u)),s.filter(([u])=>!XS(u))}function UM(i){const n=i.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${n})(['"]?\\))`,"g")}const MM=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function $M(i,n){return MM.map(s=>{const u=i.getPropertyValue(s);return!u||u==="none"?null:((Iy||ix)&&n.drawImageCount++,bT(u,null,n,!0).then(f=>{!f||u===f||i.setProperty(s,f,i.getPropertyPriority(s))}))}).filter(Boolean)}function IM(i,n){if(Bf(i)){const s=i.currentSrc||i.src;if(!XS(s))return[mv(n,{url:s,imageDom:i,requestType:"image",responseType:"dataUrl"}).then(u=>{u&&(i.srcset="",i.dataset.originalSrc=s,i.src=u||"")})];(Iy||ix)&&n.drawImageCount++}else if(yv(i)&&!XS(i.href.baseVal)){const s=i.href.baseVal;return[mv(n,{url:s,imageDom:i,requestType:"image",responseType:"dataUrl"}).then(u=>{u&&(i.dataset.originalSrc=s,i.href.baseVal=u||"")})]}return[]}function zM(i,n){const{ownerDocument:s,svgDefsElement:u}=n,f=i.getAttribute("href")??i.getAttribute("xlink:href");if(!f)return[];const[v,h]=f.split("#");if(h){const g=`#${h}`,b=n.shadowRoots.reduce((_,k)=>_??k.querySelector(`svg ${g}`),s==null?void 0:s.querySelector(`svg ${g}`));if(v&&i.setAttribute("href",g),u!=null&&u.querySelector(g))return[];if(b)return u==null||u.appendChild(b.cloneNode(!0)),[];if(v)return[mv(n,{url:v,responseType:"text"}).then(_=>{u==null||u.insertAdjacentHTML("beforeend",_)})]}return[]}function _T(i,n){const{tasks:s}=n;bs(i)&&((Bf(i)||oT(i))&&s.push(...IM(i,n)),X5(i)&&s.push(...zM(i,n))),vv(i)&&s.push(...$M(i.style,n)),i.childNodes.forEach(u=>{_T(u,n)})}async function FM(i,n){const{ownerDocument:s,svgStyleElement:u,fontFamilies:f,fontCssTexts:v,tasks:h,font:g}=n;if(!(!s||!u||!f.size))if(g&&g.cssText){const b=r1(g.cssText,n);u.appendChild(s.createTextNode(`${b}
709
- `))}else{const b=Array.from(s.styleSheets).filter(A=>{try{return"cssRules"in A&&!!A.cssRules.length}catch(j){return n.log.warn(`Error while reading CSS rules from ${A.href}`,j),!1}}),_=s.implementation.createHTMLDocument(""),k=_.createElement("style");_.head.appendChild(k);const R=k.sheet;await Promise.all(b.flatMap(A=>Array.from(A.cssRules).map(async j=>{if(K5(j)){const P=j.href;let F="";try{F=await mv(n,{url:P,requestType:"text",responseType:"text"})}catch(q){n.log.warn(`Error fetch remote css import from ${P}`,q)}const Y=F.replace(xT,(q,I,ie)=>q.replace(ie,sT(ie,P)));for(const q of HM(Y))try{R.insertRule(q,R.cssRules.length)}catch(I){n.log.warn("Error inserting rule from remote css import",{rule:q,error:I})}}}))),R.cssRules.length&&b.push(R);const N=[];b.forEach(A=>{QS(A.cssRules,N)}),N.filter(A=>{var j;return G5(A)&&ST(A.style.getPropertyValue("src"))&&((j=hT(A.style.getPropertyValue("font-family")))==null?void 0:j.some(P=>f.has(P)))}).forEach(A=>{const j=A,P=v.get(j.cssText);P?u.appendChild(s.createTextNode(`${P}
710
- `)):h.push(bT(j.cssText,j.parentStyleSheet?j.parentStyleSheet.href:null,n).then(F=>{F=r1(F,n),v.set(j.cssText,F),u.appendChild(s.createTextNode(`${F}
711
- `))}))})}}const BM=/(\/\*[\s\S]*?\*\/)/g,n1=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function HM(i){if(i==null)return[];const n=[];let s=i.replace(BM,"");for(;;){const v=n1.exec(s);if(!v)break;n.push(v[0])}s=s.replace(n1,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,f=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let v=u.exec(s);if(v)f.lastIndex=u.lastIndex;else if(v=f.exec(s),v)u.lastIndex=f.lastIndex;else break;n.push(v[0])}return n}const VM=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,WM=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function r1(i,n){const{font:s}=n,u=s?s==null?void 0:s.preferredFormat:void 0;return u?i.replace(WM,f=>{for(;;){const[v,,h]=VM.exec(f)||[];if(!h)return"";if(h===u)return`src: ${v};`}}):i}function QS(i,n=[]){for(const s of Array.from(i))J5(s)?n.push(...QS(s.cssRules)):"cssRules"in s?QS(s.cssRules,n):n.push(s);return n}const qM=/\bx?link:?href\s*=\s*["'](?!data:)[^"']+["']/i;function YM(i){return qM.test(i.innerHTML)}async function ET(i,n){const s=await Ss(i,n);if(bs(s.node)&&yv(s.node)&&!YM(s.node))return s.node;const{ownerDocument:u,log:f,tasks:v,svgStyleElement:h,svgDefsElement:g,svgStyles:b,font:_,progress:k,autoDestruct:R,onCloneNode:N,onEmbedNode:A,onCreateForeignObjectSvg:j}=s;f.time("clone node");const P=await ax(s.node,s,!0);if(h&&u){let ie="";b.forEach((le,fe)=>{ie+=`${le.join(`,
707
+ `);return n.appendChild(s),n}function mM(i,n){let{width:s,height:u}=n;if(bs(i)&&(!s||!u)){const f=i.getBoundingClientRect();s=s||f.width||Number(i.getAttribute("width"))||0,u=u||f.height||Number(i.getAttribute("height"))||0}return{width:s,height:u}}async function gM(i,n){const{log:s,timeout:u,drawImageCount:f,drawImageInterval:v}=n;s.time("image to canvas");const h=await Hf(i,{timeout:u,onWarn:n.log.warn}),{canvas:g,context2d:b}=yM(i.ownerDocument,n),_=()=>{try{b==null||b.drawImage(h,0,0,g.width,g.height)}catch(k){n.log.warn("Failed to drawImage",k)}};if(_(),n.isEnable("fixSvgXmlDecode"))for(let k=0;k<f;k++)await new Promise(R=>{setTimeout(()=>{b==null||b.clearRect(0,0,g.width,g.height),_(),R()},k+v)});return n.drawImageCount=0,s.timeEnd("image to canvas"),g}function yM(i,n){const{width:s,height:u,scale:f,backgroundColor:v,maximumCanvasSize:h}=n,g=i.createElement("canvas");g.width=Math.floor(s*f),g.height=Math.floor(u*f),g.style.width=`${s}px`,g.style.height=`${u}px`,h&&(g.width>h||g.height>h)&&(g.width>h&&g.height>h?g.width>g.height?(g.height*=h/g.width,g.width=h):(g.width*=h/g.height,g.height=h):g.width>h?(g.height*=h/g.width,g.width=h):(g.width*=h/g.height,g.height=h));const b=g.getContext("2d");return b&&v&&(b.fillStyle=v,b.fillRect(0,0,g.width,g.height)),{canvas:g,context2d:b}}function gT(i,n){if(i.ownerDocument)try{const v=i.toDataURL();if(v!=="data:,")return Hc(v,i.ownerDocument)}catch(v){n.log.warn("Failed to clone canvas",v)}const s=i.cloneNode(!1),u=i.getContext("2d"),f=s.getContext("2d");try{return u&&f&&f.putImageData(u.getImageData(0,0,i.width,i.height),0,0),s}catch(v){n.log.warn("Failed to clone canvas",v)}return s}function wM(i,n){var s;try{if((s=i==null?void 0:i.contentDocument)!=null&&s.documentElement)return ax(i.contentDocument.documentElement,n)}catch(u){n.log.warn("Failed to clone iframe",u)}return i.cloneNode(!1)}function bM(i){const n=i.cloneNode(!1);return i.currentSrc&&i.currentSrc!==i.src&&(n.src=i.currentSrc,n.srcset=""),n.loading==="lazy"&&(n.loading="eager"),n}async function SM(i,n){if(i.ownerDocument&&!i.currentSrc&&i.poster)return Hc(i.poster,i.ownerDocument);const s=i.cloneNode(!1);s.crossOrigin="anonymous",i.currentSrc&&i.currentSrc!==i.src&&(s.src=i.currentSrc);const u=s.ownerDocument;if(u){let f=!0;if(await Hf(s,{onError:()=>f=!1,onWarn:n.log.warn}),!f)return i.poster?Hc(i.poster,i.ownerDocument):s;s.currentTime=i.currentTime,await new Promise(h=>{s.addEventListener("seeked",h,{once:!0})});const v=u.createElement("canvas");v.width=i.offsetWidth,v.height=i.offsetHeight;try{const h=v.getContext("2d");h&&h.drawImage(s,0,0,v.width,v.height)}catch(h){return n.log.warn("Failed to clone video",h),i.poster?Hc(i.poster,i.ownerDocument):s}return gT(v,n)}return s}function xM(i,n){return eM(i)?gT(i,n):sM(i)?wM(i,n):Bf(i)?bM(i):Vy(i)?SM(i,n):i.cloneNode(!1)}function _M(i){let n=i.sandbox;if(!n){const{ownerDocument:s}=i;try{s&&(n=s.createElement("iframe"),n.id=`__SANDBOX__${hT()}`,n.width="0",n.height="0",n.style.visibility="hidden",n.style.position="fixed",s.body.appendChild(n),n.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',i.sandbox=n)}catch(u){i.log.warn("Failed to getSandBox",u)}}return n}const EM=["width","height","-webkit-text-fill-color"],kM=["stroke","fill"];function yT(i,n,s){const{defaultComputedStyles:u}=s,f=i.nodeName.toLowerCase(),v=yv(i)&&f!=="svg",h=v?kM.map(P=>[P,i.getAttribute(P)]).filter(([,P])=>P!==null):[],g=[v&&"svg",f,h.map((P,F)=>`${P}=${F}`).join(","),n].filter(Boolean).join(":");if(u.has(g))return u.get(g);const b=_M(s),_=b==null?void 0:b.contentWindow;if(!_)return new Map;const k=_==null?void 0:_.document;let R,N;v?(R=k.createElementNS(qy,"svg"),N=R.ownerDocument.createElementNS(R.namespaceURI,f),h.forEach(([P,F])=>{N.setAttributeNS(null,P,F)}),R.appendChild(N)):R=N=k.createElement(f),N.textContent=" ",k.body.appendChild(R);const A=_.getComputedStyle(N,n),j=new Map;for(let P=A.length,F=0;F<P;F++){const Y=A.item(F);EM.includes(Y)||j.set(Y,A.getPropertyValue(Y))}return k.body.removeChild(R),u.set(g,j),j}function wT(i,n,s){var g;const u=new Map,f=[],v=new Map;if(s)for(const b of s)h(b);else for(let b=i.length,_=0;_<b;_++){const k=i.item(_);h(k)}for(let b=f.length,_=0;_<b;_++)(g=v.get(f[_]))==null||g.forEach((k,R)=>u.set(R,k));function h(b){const _=i.getPropertyValue(b),k=i.getPropertyPriority(b),R=b.lastIndexOf("-"),N=R>-1?b.substring(0,R):void 0;if(N){let A=v.get(N);A||(A=new Map,v.set(N,A)),A.set(b,[_,k])}n.get(b)===_&&!k||(N?f.push(N):u.set(b,[_,k]))}return u}function CM(i,n,s,u){var R,N,A,j;const{ownerWindow:f,includeStyleProperties:v,currentParentNodeStyle:h}=u,g=n.style,b=f.getComputedStyle(i),_=yT(i,null,u);h==null||h.forEach((P,F)=>{_.delete(F)});const k=wT(b,_,v);k.delete("transition-property"),k.delete("all"),k.delete("d"),k.delete("content"),s&&(k.delete("position"),k.delete("margin-top"),k.delete("margin-right"),k.delete("margin-bottom"),k.delete("margin-left"),k.delete("margin-block-start"),k.delete("margin-block-end"),k.delete("margin-inline-start"),k.delete("margin-inline-end"),k.set("box-sizing",["border-box",""])),((R=k.get("background-clip"))==null?void 0:R[0])==="text"&&n.classList.add("______background-clip--text"),oT&&(k.has("font-kerning")||k.set("font-kerning",["normal",""]),(((N=k.get("overflow-x"))==null?void 0:N[0])==="hidden"||((A=k.get("overflow-y"))==null?void 0:A[0])==="hidden")&&((j=k.get("text-overflow"))==null?void 0:j[0])==="ellipsis"&&i.scrollWidth===i.clientWidth&&k.set("text-overflow",["clip",""]));for(let P=g.length,F=0;F<P;F++)g.removeProperty(g.item(F));return k.forEach(([P,F],Y)=>{g.setProperty(Y,P,F)}),k}function TM(i,n){(tM(i)||nM(i)||aM(i))&&n.setAttribute("value",i.value)}const RM=["::before","::after"],OM=["::-webkit-scrollbar","::-webkit-scrollbar-button","::-webkit-scrollbar-thumb","::-webkit-scrollbar-track","::-webkit-scrollbar-track-piece","::-webkit-scrollbar-corner","::-webkit-resizer"];function AM(i,n,s,u,f){const{ownerWindow:v,svgStyleElement:h,svgStyles:g,currentNodeStyle:b}=u;if(!h||!v)return;function _(k){var I;const R=v.getComputedStyle(i,k);let N=R.getPropertyValue("content");if(!N||N==="none")return;f==null||f(N),N=N.replace(/(')|(")|(counter\(.+\))/g,"");const A=[hT()],j=yT(i,k,u);b==null||b.forEach((ie,le)=>{j.delete(le)});const P=wT(R,j,u.includeStyleProperties);P.delete("content"),P.delete("-webkit-locale"),((I=P.get("background-clip"))==null?void 0:I[0])==="text"&&n.classList.add("______background-clip--text");const F=[`content: '${N}';`];if(P.forEach(([ie,le],fe)=>{F.push(`${fe}: ${ie}${le?" !important":""};`)}),F.length===1)return;try{n.className=[n.className,...A].join(" ")}catch(ie){u.log.warn("Failed to copyPseudoClass",ie);return}const Y=F.join(`
708
+ `);let q=g.get(Y);q||(q=[],g.set(Y,q)),q.push(`.${A[0]}${k}`)}RM.forEach(_),s&&OM.forEach(_)}const ZC=new Set(["symbol"]);async function e1(i,n,s,u,f){if(bs(s)&&(rM(s)||iM(s))||u.filter&&!u.filter(s))return;ZC.has(n.nodeName)||ZC.has(s.nodeName)?u.currentParentNodeStyle=void 0:u.currentParentNodeStyle=u.currentNodeStyle;const v=await ax(s,u,!1,f);u.isEnable("restoreScrollPosition")&&DM(i,v),n.appendChild(v)}async function t1(i,n,s,u){var v;let f=i.firstChild;bs(i)&&i.shadowRoot&&(f=(v=i.shadowRoot)==null?void 0:v.firstChild,s.shadowRoots.push(i.shadowRoot));for(let h=f;h;h=h.nextSibling)if(!Q5(h))if(bs(h)&&oM(h)&&typeof h.assignedNodes=="function"){const g=h.assignedNodes();for(let b=0;b<g.length;b++)await e1(i,n,g[b],s,u)}else await e1(i,n,h,s,u)}function DM(i,n){if(!vv(i)||!vv(n))return;const{scrollTop:s,scrollLeft:u}=i;if(!s&&!u)return;const{transform:f}=n.style,v=new DOMMatrix(f),{a:h,b:g,c:b,d:_}=v;v.a=1,v.b=0,v.c=0,v.d=1,v.translateSelf(-u,-s),v.a=h,v.b=g,v.c=b,v.d=_,n.style.transform=v.toString()}function NM(i,n){const{backgroundColor:s,width:u,height:f,style:v}=n,h=i.style;if(s&&h.setProperty("background-color",s,"important"),u&&h.setProperty("width",`${u}px`,"important"),f&&h.setProperty("height",`${f}px`,"important"),v)for(const g in v)h[g]=v[g]}const jM=/^[\w-:]+$/;async function ax(i,n,s=!1,u){var _,k,R,N;const{ownerDocument:f,ownerWindow:v,fontFamilies:h,onCloneEachNode:g}=n;if(f&&Z5(i))return u&&/\S/.test(i.data)&&u(i.data),f.createTextNode(i.data);if(f&&v&&bs(i)&&(vv(i)||yv(i))){const A=await xM(i,n);if(n.isEnable("removeAbnormalAttributes")){const I=A.getAttributeNames();for(let ie=I.length,le=0;le<ie;le++){const fe=I[le];jM.test(fe)||A.removeAttribute(fe)}}const j=n.currentNodeStyle=CM(i,A,s,n);s&&NM(A,n);let P=!1;if(n.isEnable("copyScrollbar")){const I=[(_=j.get("overflow-x"))==null?void 0:_[0],(k=j.get("overflow-y"))==null?void 0:k[0]];P=I.includes("scroll")||(I.includes("auto")||I.includes("overlay"))&&(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)}const F=(R=j.get("text-transform"))==null?void 0:R[0],Y=pT((N=j.get("font-family"))==null?void 0:N[0]),q=Y?I=>{F==="uppercase"?I=I.toUpperCase():F==="lowercase"?I=I.toLowerCase():F==="capitalize"&&(I=I[0].toUpperCase()+I.substring(1)),Y.forEach(ie=>{let le=h.get(ie);le||h.set(ie,le=new Set),I.split("").forEach(fe=>le.add(fe))})}:void 0;return AM(i,A,P,n,q),TM(i,A),Vy(i)||await t1(i,A,n,q),await(g==null?void 0:g(A)),A}const b=i.cloneNode(!1);return await t1(i,b,n),await(g==null?void 0:g(b)),b}function bT(i){if(i.ownerDocument=void 0,i.ownerWindow=void 0,i.svgStyleElement=void 0,i.svgDefsElement=void 0,i.svgStyles.clear(),i.defaultComputedStyles.clear(),i.sandbox){try{i.sandbox.remove()}catch(n){i.log.warn("Failed to destroyContext",n)}i.sandbox=void 0}i.workers=[],i.fontFamilies.clear(),i.fontCssTexts.clear(),i.requests.clear(),i.tasks=[],i.shadowRoots=[]}function LM(i){const{url:n,timeout:s,responseType:u,...f}=i,v=new AbortController,h=s?setTimeout(()=>v.abort(),s):void 0;return fetch(n,{signal:v.signal,...f}).then(g=>{if(!g.ok)throw new Error("Failed fetch, not 2xx response",{cause:g});switch(u){case"arrayBuffer":return g.arrayBuffer();case"dataUrl":return g.blob().then(fM);case"text":default:return g.text()}}).finally(()=>clearTimeout(h))}function mv(i,n){const{url:s,requestType:u="text",responseType:f="text",imageDom:v}=n;let h=s;const{timeout:g,acceptOfImage:b,requests:_,fetchFn:k,fetch:{requestInit:R,bypassingCache:N,placeholderImage:A},font:j,workers:P,fontFamilies:F}=i;u==="image"&&(Iy||ix)&&i.drawImageCount++;let Y=_.get(s);if(!Y){N&&N instanceof RegExp&&N.test(h)&&(h+=(/\?/.test(h)?"&":"?")+new Date().getTime());const q=u.startsWith("font")&&j&&j.minify,I=new Set;q&&u.split(";")[1].split(",").forEach(ne=>{F.has(ne)&&F.get(ne).forEach($e=>I.add($e))});const ie=q&&I.size,le={url:h,timeout:g,responseType:ie?"arrayBuffer":f,headers:u==="image"?{accept:b}:void 0,...R};Y={type:u,resolve:void 0,reject:void 0,response:null},Y.response=(async()=>{if(k&&u==="image"){const fe=await k(s);if(fe)return fe}return!Iy&&s.startsWith("http")&&P.length?new Promise((fe,ne)=>{P[_.size&P.length-1].postMessage({rawUrl:s,...le}),Y.resolve=fe,Y.reject=ne}):LM(le)})().catch(fe=>{if(_.delete(s),u==="image"&&A)return i.log.warn("Failed to fetch image base64, trying to use placeholder image",h),typeof A=="string"?A:A(v);throw fe}),_.set(s,Y)}return Y.response}async function ST(i,n,s,u){if(!xT(i))return i;for(const[f,v]of PM(i,n))try{const h=await mv(s,{url:v,requestType:u?"image":"text",responseType:"dataUrl"});i=i.replace(UM(f),`$1${h}$3`)}catch(h){s.log.warn("Failed to fetch css data url",f,h)}return i}function xT(i){return/url\((['"]?)([^'"]+?)\1\)/.test(i)}const _T=/url\((['"]?)([^'"]+?)\1\)/g;function PM(i,n){const s=[];return i.replace(_T,(u,f,v)=>(s.push([v,lT(v,n)]),u)),s.filter(([u])=>!XS(u))}function UM(i){const n=i.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${n})(['"]?\\))`,"g")}const MM=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function $M(i,n){return MM.map(s=>{const u=i.getPropertyValue(s);return!u||u==="none"?null:((Iy||ix)&&n.drawImageCount++,ST(u,null,n,!0).then(f=>{!f||u===f||i.setProperty(s,f,i.getPropertyPriority(s))}))}).filter(Boolean)}function IM(i,n){if(Bf(i)){const s=i.currentSrc||i.src;if(!XS(s))return[mv(n,{url:s,imageDom:i,requestType:"image",responseType:"dataUrl"}).then(u=>{u&&(i.srcset="",i.dataset.originalSrc=s,i.src=u||"")})];(Iy||ix)&&n.drawImageCount++}else if(yv(i)&&!XS(i.href.baseVal)){const s=i.href.baseVal;return[mv(n,{url:s,imageDom:i,requestType:"image",responseType:"dataUrl"}).then(u=>{u&&(i.dataset.originalSrc=s,i.href.baseVal=u||"")})]}return[]}function zM(i,n){const{ownerDocument:s,svgDefsElement:u}=n,f=i.getAttribute("href")??i.getAttribute("xlink:href");if(!f)return[];const[v,h]=f.split("#");if(h){const g=`#${h}`,b=n.shadowRoots.reduce((_,k)=>_??k.querySelector(`svg ${g}`),s==null?void 0:s.querySelector(`svg ${g}`));if(v&&i.setAttribute("href",g),u!=null&&u.querySelector(g))return[];if(b)return u==null||u.appendChild(b.cloneNode(!0)),[];if(v)return[mv(n,{url:v,responseType:"text"}).then(_=>{u==null||u.insertAdjacentHTML("beforeend",_)})]}return[]}function ET(i,n){const{tasks:s}=n;bs(i)&&((Bf(i)||sT(i))&&s.push(...IM(i,n)),X5(i)&&s.push(...zM(i,n))),vv(i)&&s.push(...$M(i.style,n)),i.childNodes.forEach(u=>{ET(u,n)})}async function FM(i,n){const{ownerDocument:s,svgStyleElement:u,fontFamilies:f,fontCssTexts:v,tasks:h,font:g}=n;if(!(!s||!u||!f.size))if(g&&g.cssText){const b=r1(g.cssText,n);u.appendChild(s.createTextNode(`${b}
709
+ `))}else{const b=Array.from(s.styleSheets).filter(A=>{try{return"cssRules"in A&&!!A.cssRules.length}catch(j){return n.log.warn(`Error while reading CSS rules from ${A.href}`,j),!1}}),_=s.implementation.createHTMLDocument(""),k=_.createElement("style");_.head.appendChild(k);const R=k.sheet;await Promise.all(b.flatMap(A=>Array.from(A.cssRules).map(async j=>{if(K5(j)){const P=j.href;let F="";try{F=await mv(n,{url:P,requestType:"text",responseType:"text"})}catch(q){n.log.warn(`Error fetch remote css import from ${P}`,q)}const Y=F.replace(_T,(q,I,ie)=>q.replace(ie,lT(ie,P)));for(const q of HM(Y))try{R.insertRule(q,R.cssRules.length)}catch(I){n.log.warn("Error inserting rule from remote css import",{rule:q,error:I})}}}))),R.cssRules.length&&b.push(R);const N=[];b.forEach(A=>{QS(A.cssRules,N)}),N.filter(A=>{var j;return G5(A)&&xT(A.style.getPropertyValue("src"))&&((j=pT(A.style.getPropertyValue("font-family")))==null?void 0:j.some(P=>f.has(P)))}).forEach(A=>{const j=A,P=v.get(j.cssText);P?u.appendChild(s.createTextNode(`${P}
710
+ `)):h.push(ST(j.cssText,j.parentStyleSheet?j.parentStyleSheet.href:null,n).then(F=>{F=r1(F,n),v.set(j.cssText,F),u.appendChild(s.createTextNode(`${F}
711
+ `))}))})}}const BM=/(\/\*[\s\S]*?\*\/)/g,n1=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function HM(i){if(i==null)return[];const n=[];let s=i.replace(BM,"");for(;;){const v=n1.exec(s);if(!v)break;n.push(v[0])}s=s.replace(n1,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,f=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let v=u.exec(s);if(v)f.lastIndex=u.lastIndex;else if(v=f.exec(s),v)u.lastIndex=f.lastIndex;else break;n.push(v[0])}return n}const VM=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,WM=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function r1(i,n){const{font:s}=n,u=s?s==null?void 0:s.preferredFormat:void 0;return u?i.replace(WM,f=>{for(;;){const[v,,h]=VM.exec(f)||[];if(!h)return"";if(h===u)return`src: ${v};`}}):i}function QS(i,n=[]){for(const s of Array.from(i))J5(s)?n.push(...QS(s.cssRules)):"cssRules"in s?QS(s.cssRules,n):n.push(s);return n}const qM=/\bx?link:?href\s*=\s*["'](?!data:)[^"']+["']/i;function YM(i){return qM.test(i.innerHTML)}async function kT(i,n){const s=await Ss(i,n);if(bs(s.node)&&yv(s.node)&&!YM(s.node))return s.node;const{ownerDocument:u,log:f,tasks:v,svgStyleElement:h,svgDefsElement:g,svgStyles:b,font:_,progress:k,autoDestruct:R,onCloneNode:N,onEmbedNode:A,onCreateForeignObjectSvg:j}=s;f.time("clone node");const P=await ax(s.node,s,!0);if(h&&u){let ie="";b.forEach((le,fe)=>{ie+=`${le.join(`,
712
712
  `)} {
713
713
  ${fe}
714
714
  }
715
- `}),h.appendChild(u.createTextNode(ie))}f.timeEnd("clone node"),await(N==null?void 0:N(P)),_!==!1&&bs(P)&&(f.time("embed web font"),await FM(P,s),f.timeEnd("embed web font")),f.time("embed node"),_T(P,s);const F=v.length;let Y=0;const q=async()=>{for(;;){const ie=v.pop();if(!ie)break;try{await ie}catch(le){s.log.warn("Failed to run task",le)}k==null||k(++Y,F)}};k==null||k(Y,F),await Promise.all([...Array.from({length:4})].map(q)),f.timeEnd("embed node"),await(A==null?void 0:A(P));const I=GM(P,s);return g&&I.insertBefore(g,I.children[0]),h&&I.insertBefore(h,I.children[0]),R&&wT(s),await(j==null?void 0:j(I)),I}function GM(i,n){const{width:s,height:u}=n,f=lT(s,u,i.ownerDocument),v=f.ownerDocument.createElementNS(f.namespaceURI,"foreignObject");return v.setAttributeNS(null,"x","0%"),v.setAttributeNS(null,"y","0%"),v.setAttributeNS(null,"width","100%"),v.setAttributeNS(null,"height","100%"),v.append(i),f.appendChild(v),f}async function Yy(i,n){var h;const s=await Ss(i,n),u=await ET(s),f=uT(u,s.isEnable("removeControlCharacter"));s.autoDestruct||(s.svgStyleElement=vT(s.ownerDocument),s.svgDefsElement=(h=s.ownerDocument)==null?void 0:h.createElementNS(qy,"defs"),s.svgStyles.clear());const v=Hc(f,u.ownerDocument);return await gM(v,s)}async function KM(i,n){const s=await Ss(i,n),{log:u,type:f,quality:v,dpi:h}=s,g=await Yy(s);u.time("canvas to blob");const b=await cM(g,f,v);if(["image/png","image/jpeg"].includes(f)&&h){const _=await hM(b.slice(0,33));let k=new Uint8Array(_);return f==="image/png"?k=nT(k,h):f==="image/jpeg"&&(k=X1(k,h)),u.timeEnd("canvas to blob"),new Blob([k,b.slice(33)],{type:f})}return u.timeEnd("canvas to blob"),b}async function Wf(i,n){const s=await Ss(i,n),{log:u,quality:f,type:v,dpi:h}=s,g=await Yy(s);u.time("canvas to data url");let b=g.toDataURL(v,f);if(["image/png","image/jpeg"].includes(v)&&h&&iT&&q5){const[_,k]=b.split(",");let R=0,N=!1;if(v==="image/png"){const I=V5(k);I>=0?(R=Math.ceil((I+28)/3)*4,N=!0):R=33/3*4}else v==="image/jpeg"&&(R=18/3*4);const A=k.substring(0,R),j=k.substring(R),P=window.atob(A),F=new Uint8Array(P.length);for(let I=0;I<F.length;I++)F[I]=P.charCodeAt(I);const Y=v==="image/png"?nT(F,h,N):X1(F,h),q=window.btoa(String.fromCharCode(...Y));b=[_,",",q,j].join("")}return u.timeEnd("canvas to data url"),b}async function kT(i,n){const s=await Ss(i,n),{width:u,height:f,ownerDocument:v}=s,h=await Wf(s),g=lT(u,f,v),b=g.ownerDocument.createElementNS(g.namespaceURI,"image");return b.setAttributeNS(null,"href",h),b.setAttributeNS(null,"height","100%"),b.setAttributeNS(null,"width","100%"),g.appendChild(b),uT(g,s.isEnable("removeControlCharacter"))}async function JM(i,n){const s=await Ss(i,n),{ownerDocument:u,width:f,height:v,scale:h,type:g}=s,b=g==="image/svg+xml"?await kT(s):await Wf(s),_=Hc(b,u);return _.width=Math.floor(f*h),_.height=Math.floor(v*h),_.style.width=`${f}px`,_.style.height=`${v}px`,_}async function XM(i,n){return Wf(await Ss(i,{...n,type:"image/jpeg"}))}async function QM(i,n){const s=await Ss(i,n),u=await Yy(s);return u.getContext("2d").getImageData(0,0,u.width,u.height).data}async function ZM(i,n){return Wf(await Ss(i,{...n,type:"image/png"}))}async function e$(i,n){return Wf(await Ss(i,{...n,type:"image/webp"}))}const t$=Object.freeze(Object.defineProperty({__proto__:null,createContext:pT,destroyContext:wT,domToBlob:KM,domToCanvas:Yy,domToDataUrl:Wf,domToForeignObjectSvg:ET,domToImage:JM,domToJpeg:XM,domToPixel:QM,domToPng:ZM,domToSvg:kT,domToWebp:e$,loadMedia:Hf,waitUntilLoad:dT},Symbol.toStringTag,{value:"Module"}));exports.Feedly=J1;exports.default=J1;
715
+ `}),h.appendChild(u.createTextNode(ie))}f.timeEnd("clone node"),await(N==null?void 0:N(P)),_!==!1&&bs(P)&&(f.time("embed web font"),await FM(P,s),f.timeEnd("embed web font")),f.time("embed node"),ET(P,s);const F=v.length;let Y=0;const q=async()=>{for(;;){const ie=v.pop();if(!ie)break;try{await ie}catch(le){s.log.warn("Failed to run task",le)}k==null||k(++Y,F)}};k==null||k(Y,F),await Promise.all([...Array.from({length:4})].map(q)),f.timeEnd("embed node"),await(A==null?void 0:A(P));const I=GM(P,s);return g&&I.insertBefore(g,I.children[0]),h&&I.insertBefore(h,I.children[0]),R&&bT(s),await(j==null?void 0:j(I)),I}function GM(i,n){const{width:s,height:u}=n,f=uT(s,u,i.ownerDocument),v=f.ownerDocument.createElementNS(f.namespaceURI,"foreignObject");return v.setAttributeNS(null,"x","0%"),v.setAttributeNS(null,"y","0%"),v.setAttributeNS(null,"width","100%"),v.setAttributeNS(null,"height","100%"),v.append(i),f.appendChild(v),f}async function Yy(i,n){var h;const s=await Ss(i,n),u=await kT(s),f=cT(u,s.isEnable("removeControlCharacter"));s.autoDestruct||(s.svgStyleElement=mT(s.ownerDocument),s.svgDefsElement=(h=s.ownerDocument)==null?void 0:h.createElementNS(qy,"defs"),s.svgStyles.clear());const v=Hc(f,u.ownerDocument);return await gM(v,s)}async function KM(i,n){const s=await Ss(i,n),{log:u,type:f,quality:v,dpi:h}=s,g=await Yy(s);u.time("canvas to blob");const b=await cM(g,f,v);if(["image/png","image/jpeg"].includes(f)&&h){const _=await hM(b.slice(0,33));let k=new Uint8Array(_);return f==="image/png"?k=rT(k,h):f==="image/jpeg"&&(k=Q1(k,h)),u.timeEnd("canvas to blob"),new Blob([k,b.slice(33)],{type:f})}return u.timeEnd("canvas to blob"),b}async function Wf(i,n){const s=await Ss(i,n),{log:u,quality:f,type:v,dpi:h}=s,g=await Yy(s);u.time("canvas to data url");let b=g.toDataURL(v,f);if(["image/png","image/jpeg"].includes(v)&&h&&aT&&q5){const[_,k]=b.split(",");let R=0,N=!1;if(v==="image/png"){const I=V5(k);I>=0?(R=Math.ceil((I+28)/3)*4,N=!0):R=33/3*4}else v==="image/jpeg"&&(R=18/3*4);const A=k.substring(0,R),j=k.substring(R),P=window.atob(A),F=new Uint8Array(P.length);for(let I=0;I<F.length;I++)F[I]=P.charCodeAt(I);const Y=v==="image/png"?rT(F,h,N):Q1(F,h),q=window.btoa(String.fromCharCode(...Y));b=[_,",",q,j].join("")}return u.timeEnd("canvas to data url"),b}async function CT(i,n){const s=await Ss(i,n),{width:u,height:f,ownerDocument:v}=s,h=await Wf(s),g=uT(u,f,v),b=g.ownerDocument.createElementNS(g.namespaceURI,"image");return b.setAttributeNS(null,"href",h),b.setAttributeNS(null,"height","100%"),b.setAttributeNS(null,"width","100%"),g.appendChild(b),cT(g,s.isEnable("removeControlCharacter"))}async function JM(i,n){const s=await Ss(i,n),{ownerDocument:u,width:f,height:v,scale:h,type:g}=s,b=g==="image/svg+xml"?await CT(s):await Wf(s),_=Hc(b,u);return _.width=Math.floor(f*h),_.height=Math.floor(v*h),_.style.width=`${f}px`,_.style.height=`${v}px`,_}async function XM(i,n){return Wf(await Ss(i,{...n,type:"image/jpeg"}))}async function QM(i,n){const s=await Ss(i,n),u=await Yy(s);return u.getContext("2d").getImageData(0,0,u.width,u.height).data}async function ZM(i,n){return Wf(await Ss(i,{...n,type:"image/png"}))}async function e$(i,n){return Wf(await Ss(i,{...n,type:"image/webp"}))}const t$=Object.freeze(Object.defineProperty({__proto__:null,createContext:vT,destroyContext:bT,domToBlob:KM,domToCanvas:Yy,domToDataUrl:Wf,domToForeignObjectSvg:kT,domToImage:JM,domToJpeg:XM,domToPixel:QM,domToPng:ZM,domToSvg:CT,domToWebp:e$,loadMedia:Hf,waitUntilLoad:fT},Symbol.toStringTag,{value:"Module"}));exports.Feedly=X1;exports.default=X1;
716
716
  //# sourceMappingURL=feedly-widget.cjs.js.map