@alfatech/livechat 2025.5.1-2.3 → 2025.5.1-2.4

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.
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ec=(e,t,n)=>t.has(e)||Hm("Cannot "+n);var T=(e,t,n)=>(Ec(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Hm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(Ec(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(Ec(e,t,"access private method"),n);var Ba=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var O4=$T((Mt,Dt)=>{function VT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hv={exports:{}},ku={},Wv={exports:{}},Z={};/**
1
+ var Um=e=>{throw TypeError(e)};var LT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ec=(e,t,n)=>t.has(e)||Um("Cannot "+n);var T=(e,t,n)=>(Ec(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Um("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(Ec(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(Ec(e,t,"access private method"),n);var Ba=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var R4=LT((Mt,Dt)=>{function IT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uv={exports:{}},ku={},Hv={exports:{}},Z={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
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 xa=Symbol.for("react.element"),BT=Symbol.for("react.portal"),zT=Symbol.for("react.fragment"),UT=Symbol.for("react.strict_mode"),HT=Symbol.for("react.profiler"),WT=Symbol.for("react.provider"),KT=Symbol.for("react.context"),qT=Symbol.for("react.forward_ref"),GT=Symbol.for("react.suspense"),QT=Symbol.for("react.memo"),YT=Symbol.for("react.lazy"),Wm=Symbol.iterator;function XT(e){return e===null||typeof e!="object"?null:(e=Wm&&e[Wm]||e["@@iterator"],typeof e=="function"?e:null)}var Kv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qv=Object.assign,Gv={};function Ks(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qv(){}Qv.prototype=Ks.prototype;function Ch(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}var kh=Ch.prototype=new Qv;kh.constructor=Ch;qv(kh,Ks.prototype);kh.isPureReactComponent=!0;var Km=Array.isArray,Yv=Object.prototype.hasOwnProperty,_h={current:null},Xv={key:!0,ref:!0,__self:!0,__source:!0};function Zv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Yv.call(t,r)&&!Xv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xa,type:e,key:s,ref:o,props:i,_owner:_h.current}}function ZT(e,t){return{$$typeof:xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ph(e){return typeof e=="object"&&e!==null&&e.$$typeof===xa}function JT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qm=/\/+/g;function Cc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?JT(""+e.key):t.toString(36)}function yl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xa:case BT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Cc(o,0):r,Km(i)?(n="",e!=null&&(n=e.replace(qm,"$&/")+"/"),yl(i,t,n,"",function(u){return u})):i!=null&&(Ph(i)&&(i=ZT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(qm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Km(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Cc(s,a);o+=yl(s,t,n,l,i)}else if(l=XT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Cc(s,a++),o+=yl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function za(e,t,n){if(e==null)return e;var r=[],i=0;return yl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function eE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},vl={transition:null},tE={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:vl,ReactCurrentOwner:_h};function Jv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!Ph(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ks;Z.Fragment=zT;Z.Profiler=HT;Z.PureComponent=Ch;Z.StrictMode=UT;Z.Suspense=GT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tE;Z.act=Jv;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=qv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=_h.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Yv.call(t,l)&&!Xv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:xa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:KT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:WT,_context:e},e.Consumer=e};Z.createElement=Zv;Z.createFactory=function(e){var t=Zv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:qT,render:e}};Z.isValidElement=Ph;Z.lazy=function(e){return{$$typeof:YT,_payload:{_status:-1,_result:e},_init:eE}};Z.memo=function(e,t){return{$$typeof:QT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=vl.transition;vl.transition={};try{e()}finally{vl.transition=t}};Z.unstable_act=Jv;Z.useCallback=function(e,t){return dt.current.useCallback(e,t)};Z.useContext=function(e){return dt.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};Z.useEffect=function(e,t){return dt.current.useEffect(e,t)};Z.useId=function(){return dt.current.useId()};Z.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return dt.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};Z.useRef=function(e){return dt.current.useRef(e)};Z.useState=function(e){return dt.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return dt.current.useTransition()};Z.version="18.3.1";Wv.exports=Z;var y=Wv.exports;const R=Ws(y),Pf=VT({__proto__:null,default:R},[y]);/**
9
+ */var xa=Symbol.for("react.element"),$T=Symbol.for("react.portal"),VT=Symbol.for("react.fragment"),BT=Symbol.for("react.strict_mode"),zT=Symbol.for("react.profiler"),UT=Symbol.for("react.provider"),HT=Symbol.for("react.context"),WT=Symbol.for("react.forward_ref"),KT=Symbol.for("react.suspense"),qT=Symbol.for("react.memo"),GT=Symbol.for("react.lazy"),Hm=Symbol.iterator;function QT(e){return e===null||typeof e!="object"?null:(e=Hm&&e[Hm]||e["@@iterator"],typeof e=="function"?e:null)}var Wv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Kv=Object.assign,qv={};function Ks(e,t,n){this.props=e,this.context=t,this.refs=qv,this.updater=n||Wv}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gv(){}Gv.prototype=Ks.prototype;function Eh(e,t,n){this.props=e,this.context=t,this.refs=qv,this.updater=n||Wv}var Ch=Eh.prototype=new Gv;Ch.constructor=Eh;Kv(Ch,Ks.prototype);Ch.isPureReactComponent=!0;var Wm=Array.isArray,Qv=Object.prototype.hasOwnProperty,kh={current:null},Yv={key:!0,ref:!0,__self:!0,__source:!0};function Xv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Qv.call(t,r)&&!Yv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xa,type:e,key:s,ref:o,props:i,_owner:kh.current}}function YT(e,t){return{$$typeof:xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _h(e){return typeof e=="object"&&e!==null&&e.$$typeof===xa}function XT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Km=/\/+/g;function Cc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?XT(""+e.key):t.toString(36)}function yl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xa:case $T:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Cc(o,0):r,Wm(i)?(n="",e!=null&&(n=e.replace(Km,"$&/")+"/"),yl(i,t,n,"",function(u){return u})):i!=null&&(_h(i)&&(i=YT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Km,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Wm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Cc(s,a);o+=yl(s,t,n,l,i)}else if(l=QT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Cc(s,a++),o+=yl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function za(e,t,n){if(e==null)return e;var r=[],i=0;return yl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function ZT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},vl={transition:null},JT={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:vl,ReactCurrentOwner:kh};function Zv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!_h(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ks;Z.Fragment=VT;Z.Profiler=zT;Z.PureComponent=Eh;Z.StrictMode=BT;Z.Suspense=KT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=JT;Z.act=Zv;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Kv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=kh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Qv.call(t,l)&&!Yv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:xa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:HT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:UT,_context:e},e.Consumer=e};Z.createElement=Xv;Z.createFactory=function(e){var t=Xv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:WT,render:e}};Z.isValidElement=_h;Z.lazy=function(e){return{$$typeof:GT,_payload:{_status:-1,_result:e},_init:ZT}};Z.memo=function(e,t){return{$$typeof:qT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=vl.transition;vl.transition={};try{e()}finally{vl.transition=t}};Z.unstable_act=Zv;Z.useCallback=function(e,t){return dt.current.useCallback(e,t)};Z.useContext=function(e){return dt.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};Z.useEffect=function(e,t){return dt.current.useEffect(e,t)};Z.useId=function(){return dt.current.useId()};Z.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return dt.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};Z.useRef=function(e){return dt.current.useRef(e)};Z.useState=function(e){return dt.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return dt.current.useTransition()};Z.version="18.3.1";Hv.exports=Z;var y=Hv.exports;const R=Ws(y),_f=IT({__proto__:null,default:R},[y]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
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
- */var nE=y,rE=Symbol.for("react.element"),iE=Symbol.for("react.fragment"),sE=Object.prototype.hasOwnProperty,oE=nE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aE={key:!0,ref:!0,__self:!0,__source:!0};function e1(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)sE.call(t,r)&&!aE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:rE,type:e,key:s,ref:o,props:i,_owner:oE.current}}ku.Fragment=iE;ku.jsx=e1;ku.jsxs=e1;Hv.exports=ku;var w=Hv.exports,t1={exports:{}},It={},n1={exports:{}},r1={};/**
17
+ */var eE=y,tE=Symbol.for("react.element"),nE=Symbol.for("react.fragment"),rE=Object.prototype.hasOwnProperty,iE=eE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sE={key:!0,ref:!0,__self:!0,__source:!0};function Jv(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)rE.call(t,r)&&!sE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:tE,type:e,key:s,ref:o,props:i,_owner:iE.current}}ku.Fragment=nE;ku.jsx=Jv;ku.jsxs=Jv;Uv.exports=ku;var w=Uv.exports,e1={exports:{}},It={},t1={exports:{}},n1={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(O,L){var B=O.length;O.push(L);e:for(;0<B;){var V=B-1>>>1,H=O[V];if(0<i(H,L))O[V]=L,O[B]=H,B=V;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],B=O.pop();if(B!==L){O[0]=B;e:for(var V=0,H=O.length,q=H>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ve=O[J];if(0>i(ye,B))J<H&&0>i(Ve,ye)?(O[V]=Ve,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<H&&0>i(Ve,B))O[V]=Ve,O[J]=B,V=J;else break e}}return L}function i(O,L){var B=O.sortIndex-L.sortIndex;return B!==0?B:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,m=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function E(O){if(x=!1,v(O),!m)if(n(l)!==null)m=!0,Q(S);else{var L=n(u);L!==null&&ne(E,L.startTime-O)}}function S(O,L){m=!1,x&&(x=!1,p(P),P=-1),h=!0;var B=d;try{for(v(L),c=n(l);c!==null&&(!(c.expirationTime>L)||O&&!I());){var V=c.callback;if(typeof V=="function"){c.callback=null,d=c.priorityLevel;var H=V(c.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),v(L)}else r(l);c=n(l)}if(c!==null)var q=!0;else{var ce=n(u);ce!==null&&ne(E,ce.startTime-L),q=!1}return q}finally{c=null,d=B,h=!1}}var C=!1,k=null,P=-1,j=5,N=-1;function I(){return!(e.unstable_now()-N<j)}function re(){if(k!==null){var O=e.unstable_now();N=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(C=!1,k=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Oe=xe.port2;xe.port1.onmessage=re,ie=function(){Oe.postMessage(null)}}else ie=function(){b(re,0)};function Q(O){k=O,C||(C=!0,ie())}function ne(O,L){P=b(function(){O(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,Q(S))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var B=d;d=L;try{return O()}finally{d=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var B=d;d=O;try{return L()}finally{d=B}},e.unstable_scheduleCallback=function(O,L,B){var V=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?V+B:V):B=V,O){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,O={id:f++,callback:L,priorityLevel:O,startTime:B,expirationTime:H,sortIndex:-1},B>V?(O.sortIndex=B,t(u,O),n(l)===null&&O===n(u)&&(x?(p(P),P=-1):x=!0,ne(E,B-V))):(O.sortIndex=H,t(l,O),m||h||(m=!0,Q(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var L=d;return function(){var B=d;d=L;try{return O.apply(this,arguments)}finally{d=B}}}})(r1);n1.exports=r1;var lE=n1.exports;/**
25
+ */(function(e){function t(O,L){var B=O.length;O.push(L);e:for(;0<B;){var V=B-1>>>1,H=O[V];if(0<i(H,L))O[V]=L,O[B]=H,B=V;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],B=O.pop();if(B!==L){O[0]=B;e:for(var V=0,H=O.length,q=H>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ve=O[J];if(0>i(ye,B))J<H&&0>i(Ve,ye)?(O[V]=Ve,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<H&&0>i(Ve,B))O[V]=Ve,O[J]=B,V=J;else break e}}return L}function i(O,L){var B=O.sortIndex-L.sortIndex;return B!==0?B:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function E(O){if(v=!1,x(O),!m)if(n(l)!==null)m=!0,Q(S);else{var L=n(u);L!==null&&ne(E,L.startTime-O)}}function S(O,L){m=!1,v&&(v=!1,p(P),P=-1),h=!0;var B=d;try{for(x(L),c=n(l);c!==null&&(!(c.expirationTime>L)||O&&!I());){var V=c.callback;if(typeof V=="function"){c.callback=null,d=c.priorityLevel;var H=V(c.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),x(L)}else r(l);c=n(l)}if(c!==null)var q=!0;else{var ce=n(u);ce!==null&&ne(E,ce.startTime-L),q=!1}return q}finally{c=null,d=B,h=!1}}var C=!1,k=null,P=-1,j=5,N=-1;function I(){return!(e.unstable_now()-N<j)}function re(){if(k!==null){var O=e.unstable_now();N=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(C=!1,k=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Oe=xe.port2;xe.port1.onmessage=re,ie=function(){Oe.postMessage(null)}}else ie=function(){b(re,0)};function Q(O){k=O,C||(C=!0,ie())}function ne(O,L){P=b(function(){O(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,Q(S))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var B=d;d=L;try{return O()}finally{d=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var B=d;d=O;try{return L()}finally{d=B}},e.unstable_scheduleCallback=function(O,L,B){var V=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?V+B:V):B=V,O){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,O={id:f++,callback:L,priorityLevel:O,startTime:B,expirationTime:H,sortIndex:-1},B>V?(O.sortIndex=B,t(u,O),n(l)===null&&O===n(u)&&(v?(p(P),P=-1):v=!0,ne(E,B-V))):(O.sortIndex=H,t(l,O),m||h||(m=!0,Q(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var L=d;return function(){var B=d;d=L;try{return O.apply(this,arguments)}finally{d=B}}}})(n1);t1.exports=n1;var oE=t1.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var uE=y,Lt=lE;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i1=new Set,Io={};function Mi(e,t){Ms(e,t),Ms(e+"Capture",t)}function Ms(e,t){for(Io[e]=t,e=0;e<t.length;e++)i1.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Af=Object.prototype.hasOwnProperty,cE=/^[: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]*$/,Gm={},Qm={};function fE(e){return Af.call(Qm,e)?!0:Af.call(Gm,e)?!1:cE.test(e)?Qm[e]=!0:(Gm[e]=!0,!1)}function dE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hE(e,t,n,r){if(t===null||typeof t>"u"||dE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ah=/[\-:]([a-z])/g;function Rh(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".split(" ").forEach(function(e){var t=e.replace(Ah,Rh);Ye[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ah,Rh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ah,Rh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hE(t,n,i,r)&&(n=null),r||i===null?fE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tr=uE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ua=Symbol.for("react.element"),Yi=Symbol.for("react.portal"),Xi=Symbol.for("react.fragment"),jh=Symbol.for("react.strict_mode"),Rf=Symbol.for("react.profiler"),s1=Symbol.for("react.provider"),o1=Symbol.for("react.context"),Nh=Symbol.for("react.forward_ref"),Of=Symbol.for("react.suspense"),jf=Symbol.for("react.suspense_list"),Mh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),a1=Symbol.for("react.offscreen"),Ym=Symbol.iterator;function no(e){return e===null||typeof e!="object"?null:(e=Ym&&e[Ym]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,kc;function po(e){if(kc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kc=t&&t[1]||""}return`
33
+ */var aE=y,Lt=oE;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r1=new Set,Io={};function Mi(e,t){Ms(e,t),Ms(e+"Capture",t)}function Ms(e,t){for(Io[e]=t,e=0;e<t.length;e++)r1.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pf=Object.prototype.hasOwnProperty,lE=/^[: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]*$/,qm={},Gm={};function uE(e){return Pf.call(Gm,e)?!0:Pf.call(qm,e)?!1:lE.test(e)?Gm[e]=!0:(qm[e]=!0,!1)}function cE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function fE(e,t,n,r){if(t===null||typeof t>"u"||cE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ph=/[\-:]([a-z])/g;function Ah(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".split(" ").forEach(function(e){var t=e.replace(Ph,Ah);Ye[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ph,Ah);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ph,Ah);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rh(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(fE(t,n,i,r)&&(n=null),r||i===null?uE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tr=aE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ua=Symbol.for("react.element"),Yi=Symbol.for("react.portal"),Xi=Symbol.for("react.fragment"),Oh=Symbol.for("react.strict_mode"),Af=Symbol.for("react.profiler"),i1=Symbol.for("react.provider"),s1=Symbol.for("react.context"),jh=Symbol.for("react.forward_ref"),Rf=Symbol.for("react.suspense"),Of=Symbol.for("react.suspense_list"),Nh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),o1=Symbol.for("react.offscreen"),Qm=Symbol.iterator;function no(e){return e===null||typeof e!="object"?null:(e=Qm&&e[Qm]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,kc;function po(e){if(kc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kc=t&&t[1]||""}return`
34
34
  `+kc+e}var _c=!1;function Pc(e,t){if(!e||_c)return"";_c=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
35
  `),s=r.stack.split(`
36
36
  `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
- `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{_c=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?po(e):""}function pE(e){switch(e.tag){case 5:return po(e.type);case 16:return po("Lazy");case 13:return po("Suspense");case 19:return po("SuspenseList");case 0:case 2:case 15:return e=Pc(e.type,!1),e;case 11:return e=Pc(e.type.render,!1),e;case 1:return e=Pc(e.type,!0),e;default:return""}}function Nf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xi:return"Fragment";case Yi:return"Portal";case Rf:return"Profiler";case jh:return"StrictMode";case Of:return"Suspense";case jf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o1:return(e.displayName||"Context")+".Consumer";case s1:return(e._context.displayName||"Context")+".Provider";case Nh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mh:return t=e.displayName||null,t!==null?t:Nf(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Nf(e(t))}catch{}}return null}function mE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Nf(t);case 8:return t===jh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gE(e){var t=l1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=gE(e))}function u1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mf(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function c1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function Df(e,t){c1(e,t);var n=Vr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ff(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ff(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ff(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function ps(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jm(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(mo(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function f1(e,t){var n=Vr(t.value),r=Vr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function eg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function If(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wa,h1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $o(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yE=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){yE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function p1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function m1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=p1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vE=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $f(e,t){if(t){if(vE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bf=null;function Dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zf=null,ms=null,gs=null;function tg(e){if(e=Sa(e)){if(typeof zf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Ou(t),zf(e.stateNode,e.type,t))}}function g1(e){ms?gs?gs.push(e):gs=[e]:ms=e}function y1(){if(ms){var e=ms,t=gs;if(gs=ms=null,tg(e),t)for(e=0;e<t.length;e++)tg(t[e])}}function v1(e,t){return e(t)}function x1(){}var Ac=!1;function w1(e,t,n){if(Ac)return e(t,n);Ac=!0;try{return v1(e,t,n)}finally{Ac=!1,(ms!==null||gs!==null)&&(x1(),y1())}}function Vo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ou(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(A(231,t,typeof n));return n}var Uf=!1;if(Yn)try{var ro={};Object.defineProperty(ro,"passive",{get:function(){Uf=!0}}),window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Uf=!1}function xE(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var To=!1,zl=null,Ul=!1,Hf=null,wE={onError:function(e){To=!0,zl=e}};function bE(e,t,n,r,i,s,o,a,l){To=!1,zl=null,xE.apply(wE,arguments)}function SE(e,t,n,r,i,s,o,a,l){if(bE.apply(this,arguments),To){if(To){var u=zl;To=!1,zl=null}else throw Error(A(198));Ul||(Ul=!0,Hf=u)}}function Di(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function b1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ng(e){if(Di(e)!==e)throw Error(A(188))}function TE(e){var t=e.alternate;if(!t){if(t=Di(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return ng(i),e;if(s===r)return ng(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function S1(e){return e=TE(e),e!==null?T1(e):null}function T1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=T1(e);if(t!==null)return t;e=e.sibling}return null}var E1=Lt.unstable_scheduleCallback,rg=Lt.unstable_cancelCallback,EE=Lt.unstable_shouldYield,CE=Lt.unstable_requestPaint,Ae=Lt.unstable_now,kE=Lt.unstable_getCurrentPriorityLevel,Fh=Lt.unstable_ImmediatePriority,C1=Lt.unstable_UserBlockingPriority,Hl=Lt.unstable_NormalPriority,_E=Lt.unstable_LowPriority,k1=Lt.unstable_IdlePriority,_u=null,_n=null;function PE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(_u,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:OE,AE=Math.log,RE=Math.LN2;function OE(e){return e>>>=0,e===0?32:31-(AE(e)/RE|0)|0}var Ka=64,qa=4194304;function go(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=go(a):(s&=o,s!==0&&(r=go(s)))}else o=n&~i,o!==0?r=go(o):s!==0&&(r=go(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function jE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function NE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=jE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Wf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _1(){var e=Ka;return Ka<<=1,!(Ka&4194240)&&(Ka=64),e}function Rc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function ME(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function P1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var A1,Ih,R1,O1,j1,Kf=!1,Ga=[],Pr=null,Ar=null,Rr=null,Bo=new Map,zo=new Map,hr=[],DE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ig(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(t.pointerId)}}function io(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Sa(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function FE(e,t,n,r,i){switch(t){case"focusin":return Pr=io(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=io(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=io(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Bo.set(s,io(Bo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,zo.set(s,io(zo.get(s)||null,e,t,n,r,i)),!0}return!1}function N1(e){var t=oi(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=b1(n),t!==null){e.blockedOn=t,j1(e.priority,function(){R1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bf=r,n.target.dispatchEvent(r),Bf=null}else return t=Sa(n),t!==null&&Ih(t),e.blockedOn=n,!1;t.shift()}return!0}function sg(e,t,n){xl(e)&&n.delete(t)}function LE(){Kf=!1,Pr!==null&&xl(Pr)&&(Pr=null),Ar!==null&&xl(Ar)&&(Ar=null),Rr!==null&&xl(Rr)&&(Rr=null),Bo.forEach(sg),zo.forEach(sg)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Kf||(Kf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,LE)))}function Uo(e){function t(i){return so(i,e)}if(0<Ga.length){so(Ga[0],e);for(var n=1;n<Ga.length;n++){var r=Ga[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&so(Pr,e),Ar!==null&&so(Ar,e),Rr!==null&&so(Rr,e),Bo.forEach(t),zo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&hr.shift()}var ys=tr.ReactCurrentBatchConfig,Kl=!0;function IE(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=1,$h(e,t,n,r)}finally{le=i,ys.transition=s}}function $E(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=4,$h(e,t,n,r)}finally{le=i,ys.transition=s}}function $h(e,t,n,r){if(Kl){var i=qf(e,t,n,r);if(i===null)Vc(e,t,r,ql,n),ig(e,r);else if(FE(i,e,t,n,r))r.stopPropagation();else if(ig(e,r),t&4&&-1<DE.indexOf(e)){for(;i!==null;){var s=Sa(i);if(s!==null&&A1(s),s=qf(e,t,n,r),s===null&&Vc(e,t,r,ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Vc(e,t,r,null,n)}}var ql=null;function qf(e,t,n,r){if(ql=null,e=Dh(r),e=oi(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=b1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ql=e,null}function M1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kE()){case Fh:return 1;case C1:return 4;case Hl:case _E:return 16;case k1:return 536870912;default:return 16}default:return 16}}var Er=null,Vh=null,wl=null;function D1(){if(wl)return wl;var e,t=Vh,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return wl=i.slice(e,1<r?1-r:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qa(){return!0}function og(){return!1}function $t(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qa:og,this.isPropagationStopped=og,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bh=$t(qs),ba=Te({},qs,{view:0,detail:0}),VE=$t(ba),Oc,jc,oo,Pu=Te({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==oo&&(oo&&e.type==="mousemove"?(Oc=e.screenX-oo.screenX,jc=e.screenY-oo.screenY):jc=Oc=0,oo=e),Oc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),ag=$t(Pu),BE=Te({},Pu,{dataTransfer:0}),zE=$t(BE),UE=Te({},ba,{relatedTarget:0}),Nc=$t(UE),HE=Te({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),WE=$t(HE),KE=Te({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qE=$t(KE),GE=Te({},qs,{data:0}),lg=$t(GE),QE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},XE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XE[e])?!!t[e]:!1}function zh(){return ZE}var JE=Te({},ba,{key:function(e){if(e.key){var t=QE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?YE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zh,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eC=$t(JE),tC=Te({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ug=$t(tC),nC=Te({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zh}),rC=$t(nC),iC=Te({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),sC=$t(iC),oC=Te({},Pu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),aC=$t(oC),lC=[9,13,27,32],Uh=Yn&&"CompositionEvent"in window,Eo=null;Yn&&"documentMode"in document&&(Eo=document.documentMode);var uC=Yn&&"TextEvent"in window&&!Eo,F1=Yn&&(!Uh||Eo&&8<Eo&&11>=Eo),cg=" ",fg=!1;function L1(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function cC(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(fg=!0,cg);case"textInput":return e=t.data,e===cg&&fg?null:e;default:return null}}function fC(e,t){if(Zi)return e==="compositionend"||!Uh&&L1(e,t)?(e=D1(),wl=Vh=Er=null,Zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return F1&&t.locale!=="ko"?null:t.data;default:return null}}var dC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function dg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dC[e.type]:t==="textarea"}function $1(e,t,n,r){g1(r),t=Gl(t,"onChange"),0<t.length&&(n=new Bh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Co=null,Ho=null;function hC(e){Y1(e,0)}function Au(e){var t=ts(e);if(u1(t))return e}function pC(e,t){if(e==="change")return t}var V1=!1;if(Yn){var Mc;if(Yn){var Dc="oninput"in document;if(!Dc){var hg=document.createElement("div");hg.setAttribute("oninput","return;"),Dc=typeof hg.oninput=="function"}Mc=Dc}else Mc=!1;V1=Mc&&(!document.documentMode||9<document.documentMode)}function pg(){Co&&(Co.detachEvent("onpropertychange",B1),Ho=Co=null)}function B1(e){if(e.propertyName==="value"&&Au(Ho)){var t=[];$1(t,Ho,e,Dh(e)),w1(hC,t)}}function mC(e,t,n){e==="focusin"?(pg(),Co=t,Ho=n,Co.attachEvent("onpropertychange",B1)):e==="focusout"&&pg()}function gC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Au(Ho)}function yC(e,t){if(e==="click")return Au(t)}function vC(e,t){if(e==="input"||e==="change")return Au(t)}function xC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:xC;function Wo(e,t){if(gn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Af.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gg(e,t){var n=mg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=mg(n)}}function z1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Hh(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 wC(e){var t=U1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z1(n.ownerDocument.documentElement,n)){if(r!==null&&Hh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=gg(n,s);var o=gg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bC=Yn&&"documentMode"in document&&11>=document.documentMode,Ji=null,Gf=null,ko=null,Qf=!1;function yg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qf||Ji==null||Ji!==Bl(r)||(r=Ji,"selectionStart"in r&&Hh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ko&&Wo(ko,r)||(ko=r,r=Gl(Gf,"onSelect"),0<r.length&&(t=new Bh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ji)))}function Ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var es={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Fc={},H1={};Yn&&(H1=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Ru(e){if(Fc[e])return Fc[e];if(!es[e])return e;var t=es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H1)return Fc[e]=t[n];return e}var W1=Ru("animationend"),K1=Ru("animationiteration"),q1=Ru("animationstart"),G1=Ru("transitionend"),Q1=new Map,vg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wr(e,t){Q1.set(e,t),Mi(t,[e])}for(var Lc=0;Lc<vg.length;Lc++){var Ic=vg[Lc],SC=Ic.toLowerCase(),TC=Ic[0].toUpperCase()+Ic.slice(1);Wr(SC,"on"+TC)}Wr(W1,"onAnimationEnd");Wr(K1,"onAnimationIteration");Wr(q1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(G1,"onTransitionEnd");Ms("onMouseEnter",["mouseout","mouseover"]);Ms("onMouseLeave",["mouseout","mouseover"]);Ms("onPointerEnter",["pointerout","pointerover"]);Ms("onPointerLeave",["pointerout","pointerover"]);Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),EC=new Set("cancel close invalid load scroll toggle".split(" ").concat(yo));function xg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,SE(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;xg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;xg(i,a,u),s=l}}}if(Ul)throw e=Hf,Ul=!1,Hf=null,e}function pe(e,t){var n=t[ed];n===void 0&&(n=t[ed]=new Set);var r=e+"__bubble";n.has(r)||(X1(t,e,2,!1),n.add(r))}function $c(e,t,n){var r=0;t&&(r|=4),X1(n,e,r,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[Xa]){e[Xa]=!0,i1.forEach(function(n){n!=="selectionchange"&&(EC.has(n)||$c(n,!1,e),$c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,$c("selectionchange",!1,t))}}function X1(e,t,n,r){switch(M1(t)){case 1:var i=IE;break;case 4:i=$E;break;default:i=$h}n=i.bind(null,t,n,e),i=void 0,!Uf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}w1(function(){var u=s,f=Dh(n),c=[];e:{var d=Q1.get(e);if(d!==void 0){var h=Bh,m=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":h=eC;break;case"focusin":m="focus",h=Nc;break;case"focusout":m="blur",h=Nc;break;case"beforeblur":case"afterblur":h=Nc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ag;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=zE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rC;break;case W1:case K1:case q1:h=WE;break;case G1:h=sC;break;case"scroll":h=VE;break;case"wheel":h=aC;break;case"copy":case"cut":case"paste":h=qE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ug}var x=(t&4)!==0,b=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=u,v;g!==null;){v=g;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,p!==null&&(E=Vo(g,p),E!=null&&x.push(qo(g,E,v)))),b)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Bf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Xn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?oi(m):null,m!==null&&(b=Di(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(x=ag,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=ug,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ts(h),v=m==null?d:ts(m),d=new x(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=v,E=null,oi(f)===u&&(x=new x(p,g+"enter",m,n,f),x.target=v,x.relatedTarget=b,E=x),b=E,h&&m)t:{for(x=h,p=m,g=0,v=x;v;v=Gi(v))g++;for(v=0,E=p;E;E=Gi(E))v++;for(;0<g-v;)x=Gi(x),g--;for(;0<v-g;)p=Gi(p),v--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=Gi(x),p=Gi(p)}x=null}else x=null;h!==null&&wg(c,d,h,x,!1),m!==null&&b!==null&&wg(c,b,m,x,!0)}}e:{if(d=u?ts(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=pC;else if(dg(d))if(V1)S=vC;else{S=gC;var C=mC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=yC);if(S&&(S=S(e,u))){$1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Ff(d,"number",d.value)}switch(C=u?ts(u):window,e){case"focusin":(dg(C)||C.contentEditable==="true")&&(Ji=C,Gf=u,ko=null);break;case"focusout":ko=Gf=Ji=null;break;case"mousedown":Qf=!0;break;case"contextmenu":case"mouseup":case"dragend":Qf=!1,yg(c,n,f);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":yg(c,n,f)}var k;if(Uh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Zi?L1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(F1&&n.locale!=="ko"&&(Zi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Zi&&(k=D1()):(Er=f,Vh="value"in Er?Er.value:Er.textContent,Zi=!0)),C=Gl(u,P),0<C.length&&(P=new lg(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=I1(n),k!==null&&(P.data=k)))),(k=uC?cC(e,n):fC(e,n))&&(u=Gl(u,"onBeforeInput"),0<u.length&&(f=new lg("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}Y1(c,t)})}function qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vo(e,n),s!=null&&r.unshift(qo(e,s,i)),s=Vo(e,t),s!=null&&r.push(qo(e,s,i))),e=e.return}return r}function Gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Vo(n,s),l!=null&&o.unshift(qo(n,l,a))):i||(l=Vo(n,s),l!=null&&o.push(qo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var CC=/\r\n?/g,kC=/\u0000|\uFFFD/g;function bg(e){return(typeof e=="string"?e:""+e).replace(CC,`
38
- `).replace(kC,"")}function Za(e,t,n){if(t=bg(t),bg(e)!==t&&n)throw Error(A(425))}function Ql(){}var Yf=null,Xf=null;function Zf(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}var Jf=typeof setTimeout=="function"?setTimeout:void 0,_C=typeof clearTimeout=="function"?clearTimeout:void 0,Sg=typeof Promise=="function"?Promise:void 0,PC=typeof queueMicrotask=="function"?queueMicrotask:typeof Sg<"u"?function(e){return Sg.resolve(null).then(e).catch(AC)}:Jf;function AC(e){setTimeout(function(){throw e})}function Bc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Uo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Uo(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Tg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Gs=Math.random().toString(36).slice(2),kn="__reactFiber$"+Gs,Go="__reactProps$"+Gs,Xn="__reactContainer$"+Gs,ed="__reactEvents$"+Gs,RC="__reactListeners$"+Gs,OC="__reactHandles$"+Gs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tg(e);e!==null;){if(n=e[kn])return n;e=Tg(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[kn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Ou(e){return e[Go]||null}var td=[],ns=-1;function Kr(e){return{current:e}}function ge(e){0>ns||(e.current=td[ns],td[ns]=null,ns--)}function de(e,t){ns++,td[ns]=e.current,e.current=t}var Br={},st=Kr(Br),Tt=Kr(!1),Ci=Br;function Ds(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Et(e){return e=e.childContextTypes,e!=null}function Yl(){ge(Tt),ge(st)}function Eg(e,t,n){if(st.current!==Br)throw Error(A(168));de(st,t),de(Tt,n)}function Z1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,mE(e)||"Unknown",i));return Te({},n,r)}function Xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=st.current,de(st,e),de(Tt,Tt.current),!0}function Cg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=Z1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var Bn=null,ju=!1,zc=!1;function J1(e){Bn===null?Bn=[e]:Bn.push(e)}function jC(e){ju=!0,J1(e)}function qr(){if(!zc&&Bn!==null){zc=!0;var e=0,t=le;try{var n=Bn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bn=null,ju=!1}catch(i){throw Bn!==null&&(Bn=Bn.slice(e+1)),E1(Fh,qr),i}finally{le=t,zc=!1}}return null}var rs=[],is=0,Zl=null,Jl=0,qt=[],Gt=0,ki=null,Hn=1,Wn="";function ei(e,t){rs[is++]=Jl,rs[is++]=Zl,Zl=e,Jl=t}function ex(e,t,n){qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,ki=e;var r=Hn;e=Wn;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Hn=1<<32-pn(t)+i|n<<i|r,Wn=s+e}else Hn=1<<s|n<<i|r,Wn=e}function Wh(e){e.return!==null&&(ei(e,1),ex(e,1,0))}function Kh(e){for(;e===Zl;)Zl=rs[--is],rs[is]=null,Jl=rs[--is],rs[is]=null;for(;e===ki;)ki=qt[--Gt],qt[Gt]=null,Wn=qt[--Gt],qt[Gt]=null,Hn=qt[--Gt],qt[Gt]=null}var Ft=null,Nt=null,ve=!1,dn=null;function tx(e,t){var n=Yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function kg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Hn,overflow:Wn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ft=e,Nt=null,!0):!1;default:return!1}}function nd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rd(e){if(ve){var t=Nt;if(t){var n=t;if(!kg(e,t)){if(nd(e))throw Error(A(418));t=Or(n.nextSibling);var r=Ft;t&&kg(e,t)?tx(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(nd(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function _g(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function Ja(e){if(e!==Ft)return!1;if(!ve)return _g(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zf(e.type,e.memoizedProps)),t&&(t=Nt)){if(nd(e))throw nx(),Error(A(418));for(;t;)tx(e,t),t=Or(t.nextSibling)}if(_g(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ft?Or(e.stateNode.nextSibling):null;return!0}function nx(){for(var e=Nt;e;)e=Or(e.nextSibling)}function Fs(){Nt=Ft=null,ve=!1}function qh(e){dn===null?dn=[e]:dn.push(e)}var NC=tr.ReactCurrentBatchConfig;function ao(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pg(e){var t=e._init;return t(e._payload)}function rx(e){function t(p,g){if(e){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,E){return g===null||g.tag!==6?(g=Qc(v,p.mode,E),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,E){var S=v.type;return S===Xi?f(p,g,v.props.children,E,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Pg(S)===g.type)?(E=i(g,v.props),E.ref=ao(p,g,v),E.return=p,E):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=ao(p,g,v),E.return=p,E)}function u(p,g,v,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Yc(v,p.mode,E),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function f(p,g,v,E,S){return g===null||g.tag!==7?(g=bi(v,p.mode,E,S),g.return=p,g):(g=i(g,v),g.return=p,g)}function c(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Qc(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ua:return v=Pl(g.type,g.key,g.props,null,p.mode,v),v.ref=ao(p,null,g),v.return=p,v;case Yi:return g=Yc(g,p.mode,v),g.return=p,g;case cr:var E=g._init;return c(p,E(g._payload),v)}if(mo(g)||no(g))return g=bi(g,p.mode,v,null),g.return=p,g;el(p,g)}return null}function d(p,g,v,E){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(p,g,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:return v.key===S?l(p,g,v,E):null;case Yi:return v.key===S?u(p,g,v,E):null;case cr:return S=v._init,d(p,g,S(v._payload),E)}if(mo(v)||no(v))return S!==null?null:f(p,g,v,E,null);el(p,v)}return null}function h(p,g,v,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(v)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ua:return p=p.get(E.key===null?v:E.key)||null,l(g,p,E,S);case Yi:return p=p.get(E.key===null?v:E.key)||null,u(g,p,E,S);case cr:var C=E._init;return h(p,g,v,C(E._payload),S)}if(mo(E)||no(E))return p=p.get(v)||null,f(g,p,E,S,null);el(g,E)}return null}function m(p,g,v,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<v.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,v[P],E);if(N===null){k===null&&(k=j);break}e&&k&&N.alternate===null&&t(p,k),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N,k=j}if(P===v.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<v.length;P++)k=c(p,v[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<v.length;P++)j=h(k,p,P,v[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function x(p,g,v,E){var S=no(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=v.next();k!==null&&!N.done;P++,N=v.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,N.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(N.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!N.done;P++,N=v.next())N=c(p,N.value,E),N!==null&&(g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return ve&&ei(p,P),S}for(k=r(p,k);!N.done;P++,N=v.next())N=h(k,p,P,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?P:N.key),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function b(p,g,v,E){if(typeof v=="object"&&v!==null&&v.type===Xi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:e:{for(var S=v.key,C=g;C!==null;){if(C.key===S){if(S=v.type,S===Xi){if(C.tag===7){n(p,C.sibling),g=i(C,v.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Pg(S)===C.type){n(p,C.sibling),g=i(C,v.props),g.ref=ao(p,C,v),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Xi?(g=bi(v.props.children,p.mode,E,v.key),g.return=p,p=g):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=ao(p,g,v),E.return=p,p=E)}return o(p);case Yi:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Yc(v,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=v._init,b(p,g,C(v._payload),E)}if(mo(v))return m(p,g,v,E);if(no(v))return x(p,g,v,E);el(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=Qc(v,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var Ls=rx(!0),ix=rx(!1),eu=Kr(null),tu=null,ss=null,Gh=null;function Qh(){Gh=ss=tu=null}function Yh(e){var t=eu.current;ge(eu),e._currentValue=t}function id(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vs(e,t){tu=e,Gh=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(Gh!==e)if(e={context:e,memoizedValue:t,next:null},ss===null){if(tu===null)throw Error(A(308));ss=e,tu.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return t}var ai=null;function Xh(e){ai===null?ai=[e]:ai.push(e)}function sx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Xh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zn(e,r)}function Zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function Zh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ox(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zn(e,n)}return i=r.interleaved,i===null?(t.next=t,Xh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Sl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}function Ag(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nu(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,f=u=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,x=a;switch(d=t,h=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){c=m.call(h,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Te({},c,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=c}}function Rg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ta={},Pn=Kr(Ta),Qo=Kr(Ta),Yo=Kr(Ta);function li(e){if(e===Ta)throw Error(A(174));return e}function Jh(e,t){switch(de(Yo,t),de(Qo,e),de(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:If(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=If(t,e)}ge(Pn),de(Pn,t)}function Is(){ge(Pn),ge(Qo),ge(Yo)}function ax(e){li(Yo.current);var t=li(Pn.current),n=If(t,e.type);t!==n&&(de(Qo,e),de(Pn,n))}function ep(e){Qo.current===e&&(ge(Pn),ge(Qo))}var we=Kr(0);function ru(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;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 Uc=[];function tp(){for(var e=0;e<Uc.length;e++)Uc[e]._workInProgressVersionPrimary=null;Uc.length=0}var Tl=tr.ReactCurrentDispatcher,Hc=tr.ReactCurrentBatchConfig,_i=0,Se=null,Fe=null,Ue=null,iu=!1,_o=!1,Xo=0,MC=0;function Ze(){throw Error(A(321))}function np(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gn(e[n],t[n]))return!1;return!0}function rp(e,t,n,r,i,s){if(_i=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tl.current=e===null||e.memoizedState===null?IC:$C,e=n(r,i),_o){s=0;do{if(_o=!1,Xo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,Tl.current=VC,e=n(r,i)}while(_o)}if(Tl.current=su,t=Fe!==null&&Fe.next!==null,_i=0,Ue=Fe=Se=null,iu=!1,t)throw Error(A(300));return e}function ip(){var e=Xo!==0;return Xo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function en(){if(Fe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Ue===null?Se.memoizedState:Ue.next;if(t!==null)Ue=t,Fe=e;else{if(e===null)throw Error(A(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Zo(e,t){return typeof t=="function"?t(e):t}function Wc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Fe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((_i&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Se.lanes|=f,Pi|=f}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,gn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);gn(s,t.memoizedState)||(St=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function lx(){}function ux(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,sp(dx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,Jo(9,fx.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));_i&30||cx(n,t,i)}return i}function cx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fx(e,t,n,r){t.value=n,t.getSnapshot=r,hx(t)&&px(e)}function dx(e,t,n){return n(function(){hx(t)&&px(e)})}function hx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function px(e){var t=Zn(e,1);t!==null&&mn(t,e,1,-1)}function Og(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e},t.queue=e,e=e.dispatch=LC.bind(null,Se,e),[t.memoizedState,e]}function Jo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function mx(){return en().memoizedState}function El(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=Jo(1|t,n,void 0,r===void 0?null:r)}function Nu(e,t,n,r){var i=en();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var o=Fe.memoizedState;if(s=o.destroy,r!==null&&np(r,o.deps)){i.memoizedState=Jo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Jo(1|t,n,s,r)}function jg(e,t){return El(8390656,8,e,t)}function sp(e,t){return Nu(2048,8,e,t)}function gx(e,t){return Nu(4,2,e,t)}function yx(e,t){return Nu(4,4,e,t)}function vx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xx(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4,4,vx.bind(null,t,e),n)}function op(){}function wx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&np(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&np(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sx(e,t,n){return _i&21?(gn(n,t)||(n=_1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function DC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Hc.transition;Hc.transition={};try{e(!1),t()}finally{le=n,Hc.transition=r}}function Tx(){return en().memoizedState}function FC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ex(e))Cx(t,n);else if(n=sx(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),kx(n,t,r)}}function LC(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ex(e))Cx(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,gn(a,o)){var l=t.interleaved;l===null?(i.next=i,Xh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sx(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),kx(n,t,r))}}function Ex(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Cx(e,t){_o=iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}var su={readContext:Jt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},IC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:jg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Og,useDebugValue:op,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Og(!1),t=e[0];return e=DC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),He===null)throw Error(A(349));_i&30||cx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,jg(dx.bind(null,r,s,e),[e]),r.flags|=2048,Jo(9,fx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=He.identifierPrefix;if(ve){var n=Wn,r=Hn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$C={readContext:Jt,useCallback:wx,useContext:Jt,useEffect:sp,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Wc,useRef:mx,useState:function(){return Wc(Zo)},useDebugValue:op,useDeferredValue:function(e){var t=en();return Sx(t,Fe.memoizedState,e)},useTransition:function(){var e=Wc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1},VC={readContext:Jt,useCallback:wx,useContext:Jt,useEffect:sp,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Kc,useRef:mx,useState:function(){return Kc(Zo)},useDebugValue:op,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:Sx(t,Fe.memoizedState,e)},useTransition:function(){var e=Kc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function sd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Mu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Mr(e),i=qn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(mn(t,e,r,n),Sl(t,e,r))}};function Ng(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Wo(n,r)||!Wo(i,s):!0}function _x(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Jt(s):(i=Et(t)?Ci:st.current,r=t.contextTypes,s=(r=r!=null)?Ds(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Mg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Mu.enqueueReplaceState(t,t.state,null)}function od(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Zh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Jt(s):(s=Et(t)?Ci:st.current,i.context=Ds(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(sd(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Mu.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var n="",r=t;do n+=pE(r),r=r.return;while(r);var i=n}catch(s){i=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{_c=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?po(e):""}function dE(e){switch(e.tag){case 5:return po(e.type);case 16:return po("Lazy");case 13:return po("Suspense");case 19:return po("SuspenseList");case 0:case 2:case 15:return e=Pc(e.type,!1),e;case 11:return e=Pc(e.type.render,!1),e;case 1:return e=Pc(e.type,!0),e;default:return""}}function jf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xi:return"Fragment";case Yi:return"Portal";case Af:return"Profiler";case Oh:return"StrictMode";case Rf:return"Suspense";case Of:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case s1:return(e.displayName||"Context")+".Consumer";case i1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nh:return t=e.displayName||null,t!==null?t:jf(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return jf(e(t))}catch{}}return null}function hE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jf(t);case 8:return t===Oh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function a1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pE(e){var t=a1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=pE(e))}function l1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=a1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Nf(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ym(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function u1(e,t){t=t.checked,t!=null&&Rh(e,"checked",t,!1)}function Mf(e,t){u1(e,t);var n=Vr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Df(e,t.type,n):t.hasOwnProperty("defaultValue")&&Df(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Df(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function ps(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ff(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Zm(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(mo(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function c1(e,t){var n=Vr(t.value),r=Vr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Jm(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function f1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Lf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?f1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wa,d1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $o(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mE=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){mE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function h1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function p1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=h1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var gE=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function If(e,t){if(t){if(gE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function $f(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vf=null;function Mh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bf=null,ms=null,gs=null;function eg(e){if(e=Sa(e)){if(typeof Bf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Ou(t),Bf(e.stateNode,e.type,t))}}function m1(e){ms?gs?gs.push(e):gs=[e]:ms=e}function g1(){if(ms){var e=ms,t=gs;if(gs=ms=null,eg(e),t)for(e=0;e<t.length;e++)eg(t[e])}}function y1(e,t){return e(t)}function v1(){}var Ac=!1;function x1(e,t,n){if(Ac)return e(t,n);Ac=!0;try{return y1(e,t,n)}finally{Ac=!1,(ms!==null||gs!==null)&&(v1(),g1())}}function Vo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ou(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(A(231,t,typeof n));return n}var zf=!1;if(Yn)try{var ro={};Object.defineProperty(ro,"passive",{get:function(){zf=!0}}),window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{zf=!1}function yE(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var To=!1,zl=null,Ul=!1,Uf=null,vE={onError:function(e){To=!0,zl=e}};function xE(e,t,n,r,i,s,o,a,l){To=!1,zl=null,yE.apply(vE,arguments)}function wE(e,t,n,r,i,s,o,a,l){if(xE.apply(this,arguments),To){if(To){var u=zl;To=!1,zl=null}else throw Error(A(198));Ul||(Ul=!0,Uf=u)}}function Di(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function w1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function tg(e){if(Di(e)!==e)throw Error(A(188))}function bE(e){var t=e.alternate;if(!t){if(t=Di(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return tg(i),e;if(s===r)return tg(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function b1(e){return e=bE(e),e!==null?S1(e):null}function S1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=S1(e);if(t!==null)return t;e=e.sibling}return null}var T1=Lt.unstable_scheduleCallback,ng=Lt.unstable_cancelCallback,SE=Lt.unstable_shouldYield,TE=Lt.unstable_requestPaint,Ae=Lt.unstable_now,EE=Lt.unstable_getCurrentPriorityLevel,Dh=Lt.unstable_ImmediatePriority,E1=Lt.unstable_UserBlockingPriority,Hl=Lt.unstable_NormalPriority,CE=Lt.unstable_LowPriority,C1=Lt.unstable_IdlePriority,_u=null,_n=null;function kE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(_u,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:AE,_E=Math.log,PE=Math.LN2;function AE(e){return e>>>=0,e===0?32:31-(_E(e)/PE|0)|0}var Ka=64,qa=4194304;function go(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=go(a):(s&=o,s!==0&&(r=go(s)))}else o=n&~i,o!==0?r=go(o):s!==0&&(r=go(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function RE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function OE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=RE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Hf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k1(){var e=Ka;return Ka<<=1,!(Ka&4194240)&&(Ka=64),e}function Rc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function jE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Fh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function _1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var P1,Lh,A1,R1,O1,Wf=!1,Ga=[],Pr=null,Ar=null,Rr=null,Bo=new Map,zo=new Map,hr=[],NE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function rg(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(t.pointerId)}}function io(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Sa(t),t!==null&&Lh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ME(e,t,n,r,i){switch(t){case"focusin":return Pr=io(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=io(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=io(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Bo.set(s,io(Bo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,zo.set(s,io(zo.get(s)||null,e,t,n,r,i)),!0}return!1}function j1(e){var t=oi(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=w1(n),t!==null){e.blockedOn=t,O1(e.priority,function(){A1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Vf=r,n.target.dispatchEvent(r),Vf=null}else return t=Sa(n),t!==null&&Lh(t),e.blockedOn=n,!1;t.shift()}return!0}function ig(e,t,n){xl(e)&&n.delete(t)}function DE(){Wf=!1,Pr!==null&&xl(Pr)&&(Pr=null),Ar!==null&&xl(Ar)&&(Ar=null),Rr!==null&&xl(Rr)&&(Rr=null),Bo.forEach(ig),zo.forEach(ig)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,DE)))}function Uo(e){function t(i){return so(i,e)}if(0<Ga.length){so(Ga[0],e);for(var n=1;n<Ga.length;n++){var r=Ga[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&so(Pr,e),Ar!==null&&so(Ar,e),Rr!==null&&so(Rr,e),Bo.forEach(t),zo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)j1(n),n.blockedOn===null&&hr.shift()}var ys=tr.ReactCurrentBatchConfig,Kl=!0;function FE(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=1,Ih(e,t,n,r)}finally{le=i,ys.transition=s}}function LE(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=4,Ih(e,t,n,r)}finally{le=i,ys.transition=s}}function Ih(e,t,n,r){if(Kl){var i=Kf(e,t,n,r);if(i===null)Vc(e,t,r,ql,n),rg(e,r);else if(ME(i,e,t,n,r))r.stopPropagation();else if(rg(e,r),t&4&&-1<NE.indexOf(e)){for(;i!==null;){var s=Sa(i);if(s!==null&&P1(s),s=Kf(e,t,n,r),s===null&&Vc(e,t,r,ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Vc(e,t,r,null,n)}}var ql=null;function Kf(e,t,n,r){if(ql=null,e=Mh(r),e=oi(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=w1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ql=e,null}function N1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(EE()){case Dh:return 1;case E1:return 4;case Hl:case CE:return 16;case C1:return 536870912;default:return 16}default:return 16}}var Er=null,$h=null,wl=null;function M1(){if(wl)return wl;var e,t=$h,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return wl=i.slice(e,1<r?1-r:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qa(){return!0}function sg(){return!1}function $t(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qa:sg,this.isPropagationStopped=sg,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vh=$t(qs),ba=Te({},qs,{view:0,detail:0}),IE=$t(ba),Oc,jc,oo,Pu=Te({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==oo&&(oo&&e.type==="mousemove"?(Oc=e.screenX-oo.screenX,jc=e.screenY-oo.screenY):jc=Oc=0,oo=e),Oc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),og=$t(Pu),$E=Te({},Pu,{dataTransfer:0}),VE=$t($E),BE=Te({},ba,{relatedTarget:0}),Nc=$t(BE),zE=Te({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),UE=$t(zE),HE=Te({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),WE=$t(HE),KE=Te({},qs,{data:0}),ag=$t(KE),qE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},QE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=QE[e])?!!t[e]:!1}function Bh(){return YE}var XE=Te({},ba,{key:function(e){if(e.key){var t=qE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?GE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bh,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ZE=$t(XE),JE=Te({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lg=$t(JE),eC=Te({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bh}),tC=$t(eC),nC=Te({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),rC=$t(nC),iC=Te({},Pu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),sC=$t(iC),oC=[9,13,27,32],zh=Yn&&"CompositionEvent"in window,Eo=null;Yn&&"documentMode"in document&&(Eo=document.documentMode);var aC=Yn&&"TextEvent"in window&&!Eo,D1=Yn&&(!zh||Eo&&8<Eo&&11>=Eo),ug=" ",cg=!1;function F1(e,t){switch(e){case"keyup":return oC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function L1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function lC(e,t){switch(e){case"compositionend":return L1(t);case"keypress":return t.which!==32?null:(cg=!0,ug);case"textInput":return e=t.data,e===ug&&cg?null:e;default:return null}}function uC(e,t){if(Zi)return e==="compositionend"||!zh&&F1(e,t)?(e=M1(),wl=$h=Er=null,Zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return D1&&t.locale!=="ko"?null:t.data;default:return null}}var cC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cC[e.type]:t==="textarea"}function I1(e,t,n,r){m1(r),t=Gl(t,"onChange"),0<t.length&&(n=new Vh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Co=null,Ho=null;function fC(e){Q1(e,0)}function Au(e){var t=ts(e);if(l1(t))return e}function dC(e,t){if(e==="change")return t}var $1=!1;if(Yn){var Mc;if(Yn){var Dc="oninput"in document;if(!Dc){var dg=document.createElement("div");dg.setAttribute("oninput","return;"),Dc=typeof dg.oninput=="function"}Mc=Dc}else Mc=!1;$1=Mc&&(!document.documentMode||9<document.documentMode)}function hg(){Co&&(Co.detachEvent("onpropertychange",V1),Ho=Co=null)}function V1(e){if(e.propertyName==="value"&&Au(Ho)){var t=[];I1(t,Ho,e,Mh(e)),x1(fC,t)}}function hC(e,t,n){e==="focusin"?(hg(),Co=t,Ho=n,Co.attachEvent("onpropertychange",V1)):e==="focusout"&&hg()}function pC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Au(Ho)}function mC(e,t){if(e==="click")return Au(t)}function gC(e,t){if(e==="input"||e==="change")return Au(t)}function yC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:yC;function Wo(e,t){if(gn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pf.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function pg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mg(e,t){var n=pg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pg(n)}}function B1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?B1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function z1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Uh(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 vC(e){var t=z1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&B1(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=mg(n,s);var o=mg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xC=Yn&&"documentMode"in document&&11>=document.documentMode,Ji=null,qf=null,ko=null,Gf=!1;function gg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gf||Ji==null||Ji!==Bl(r)||(r=Ji,"selectionStart"in r&&Uh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ko&&Wo(ko,r)||(ko=r,r=Gl(qf,"onSelect"),0<r.length&&(t=new Vh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ji)))}function Ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var es={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Fc={},U1={};Yn&&(U1=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Ru(e){if(Fc[e])return Fc[e];if(!es[e])return e;var t=es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in U1)return Fc[e]=t[n];return e}var H1=Ru("animationend"),W1=Ru("animationiteration"),K1=Ru("animationstart"),q1=Ru("transitionend"),G1=new Map,yg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wr(e,t){G1.set(e,t),Mi(t,[e])}for(var Lc=0;Lc<yg.length;Lc++){var Ic=yg[Lc],wC=Ic.toLowerCase(),bC=Ic[0].toUpperCase()+Ic.slice(1);Wr(wC,"on"+bC)}Wr(H1,"onAnimationEnd");Wr(W1,"onAnimationIteration");Wr(K1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(q1,"onTransitionEnd");Ms("onMouseEnter",["mouseout","mouseover"]);Ms("onMouseLeave",["mouseout","mouseover"]);Ms("onPointerEnter",["pointerout","pointerover"]);Ms("onPointerLeave",["pointerout","pointerover"]);Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),SC=new Set("cancel close invalid load scroll toggle".split(" ").concat(yo));function vg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,wE(r,t,void 0,e),e.currentTarget=null}function Q1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;vg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;vg(i,a,u),s=l}}}if(Ul)throw e=Uf,Ul=!1,Uf=null,e}function pe(e,t){var n=t[Jf];n===void 0&&(n=t[Jf]=new Set);var r=e+"__bubble";n.has(r)||(Y1(t,e,2,!1),n.add(r))}function $c(e,t,n){var r=0;t&&(r|=4),Y1(n,e,r,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[Xa]){e[Xa]=!0,r1.forEach(function(n){n!=="selectionchange"&&(SC.has(n)||$c(n,!1,e),$c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,$c("selectionchange",!1,t))}}function Y1(e,t,n,r){switch(N1(t)){case 1:var i=FE;break;case 4:i=LE;break;default:i=Ih}n=i.bind(null,t,n,e),i=void 0,!zf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}x1(function(){var u=s,f=Mh(n),c=[];e:{var d=G1.get(e);if(d!==void 0){var h=Vh,m=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":h=ZE;break;case"focusin":m="focus",h=Nc;break;case"focusout":m="blur",h=Nc;break;case"beforeblur":case"afterblur":h=Nc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=og;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=VE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=tC;break;case H1:case W1:case K1:h=UE;break;case q1:h=rC;break;case"scroll":h=IE;break;case"wheel":h=sC;break;case"copy":case"cut":case"paste":h=WE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=lg}var v=(t&4)!==0,b=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var g=u,x;g!==null;){x=g;var E=x.stateNode;if(x.tag===5&&E!==null&&(x=E,p!==null&&(E=Vo(g,p),E!=null&&v.push(qo(g,E,x)))),b)break;g=g.return}0<v.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Vf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Xn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?oi(m):null,m!==null&&(b=Di(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=og,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=lg,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ts(h),x=m==null?d:ts(m),d=new v(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=x,E=null,oi(f)===u&&(v=new v(p,g+"enter",m,n,f),v.target=x,v.relatedTarget=b,E=v),b=E,h&&m)t:{for(v=h,p=m,g=0,x=v;x;x=Gi(x))g++;for(x=0,E=p;E;E=Gi(E))x++;for(;0<g-x;)v=Gi(v),g--;for(;0<x-g;)p=Gi(p),x--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break t;v=Gi(v),p=Gi(p)}v=null}else v=null;h!==null&&xg(c,d,h,v,!1),m!==null&&b!==null&&xg(c,b,m,v,!0)}}e:{if(d=u?ts(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=dC;else if(fg(d))if($1)S=gC;else{S=pC;var C=hC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=mC);if(S&&(S=S(e,u))){I1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Df(d,"number",d.value)}switch(C=u?ts(u):window,e){case"focusin":(fg(C)||C.contentEditable==="true")&&(Ji=C,qf=u,ko=null);break;case"focusout":ko=qf=Ji=null;break;case"mousedown":Gf=!0;break;case"contextmenu":case"mouseup":case"dragend":Gf=!1,gg(c,n,f);break;case"selectionchange":if(xC)break;case"keydown":case"keyup":gg(c,n,f)}var k;if(zh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Zi?F1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(D1&&n.locale!=="ko"&&(Zi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Zi&&(k=M1()):(Er=f,$h="value"in Er?Er.value:Er.textContent,Zi=!0)),C=Gl(u,P),0<C.length&&(P=new ag(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=L1(n),k!==null&&(P.data=k)))),(k=aC?lC(e,n):uC(e,n))&&(u=Gl(u,"onBeforeInput"),0<u.length&&(f=new ag("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}Q1(c,t)})}function qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vo(e,n),s!=null&&r.unshift(qo(e,s,i)),s=Vo(e,t),s!=null&&r.push(qo(e,s,i))),e=e.return}return r}function Gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function xg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Vo(n,s),l!=null&&o.unshift(qo(n,l,a))):i||(l=Vo(n,s),l!=null&&o.push(qo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var TC=/\r\n?/g,EC=/\u0000|\uFFFD/g;function wg(e){return(typeof e=="string"?e:""+e).replace(TC,`
38
+ `).replace(EC,"")}function Za(e,t,n){if(t=wg(t),wg(e)!==t&&n)throw Error(A(425))}function Ql(){}var Qf=null,Yf=null;function Xf(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}var Zf=typeof setTimeout=="function"?setTimeout:void 0,CC=typeof clearTimeout=="function"?clearTimeout:void 0,bg=typeof Promise=="function"?Promise:void 0,kC=typeof queueMicrotask=="function"?queueMicrotask:typeof bg<"u"?function(e){return bg.resolve(null).then(e).catch(_C)}:Zf;function _C(e){setTimeout(function(){throw e})}function Bc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Uo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Uo(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Sg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Gs=Math.random().toString(36).slice(2),kn="__reactFiber$"+Gs,Go="__reactProps$"+Gs,Xn="__reactContainer$"+Gs,Jf="__reactEvents$"+Gs,PC="__reactListeners$"+Gs,AC="__reactHandles$"+Gs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sg(e);e!==null;){if(n=e[kn])return n;e=Sg(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[kn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Ou(e){return e[Go]||null}var ed=[],ns=-1;function Kr(e){return{current:e}}function ge(e){0>ns||(e.current=ed[ns],ed[ns]=null,ns--)}function de(e,t){ns++,ed[ns]=e.current,e.current=t}var Br={},st=Kr(Br),Tt=Kr(!1),Ci=Br;function Ds(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Et(e){return e=e.childContextTypes,e!=null}function Yl(){ge(Tt),ge(st)}function Tg(e,t,n){if(st.current!==Br)throw Error(A(168));de(st,t),de(Tt,n)}function X1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,hE(e)||"Unknown",i));return Te({},n,r)}function Xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=st.current,de(st,e),de(Tt,Tt.current),!0}function Eg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=X1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var Bn=null,ju=!1,zc=!1;function Z1(e){Bn===null?Bn=[e]:Bn.push(e)}function RC(e){ju=!0,Z1(e)}function qr(){if(!zc&&Bn!==null){zc=!0;var e=0,t=le;try{var n=Bn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bn=null,ju=!1}catch(i){throw Bn!==null&&(Bn=Bn.slice(e+1)),T1(Dh,qr),i}finally{le=t,zc=!1}}return null}var rs=[],is=0,Zl=null,Jl=0,qt=[],Gt=0,ki=null,Hn=1,Wn="";function ei(e,t){rs[is++]=Jl,rs[is++]=Zl,Zl=e,Jl=t}function J1(e,t,n){qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,ki=e;var r=Hn;e=Wn;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Hn=1<<32-pn(t)+i|n<<i|r,Wn=s+e}else Hn=1<<s|n<<i|r,Wn=e}function Hh(e){e.return!==null&&(ei(e,1),J1(e,1,0))}function Wh(e){for(;e===Zl;)Zl=rs[--is],rs[is]=null,Jl=rs[--is],rs[is]=null;for(;e===ki;)ki=qt[--Gt],qt[Gt]=null,Wn=qt[--Gt],qt[Gt]=null,Hn=qt[--Gt],qt[Gt]=null}var Ft=null,Nt=null,ve=!1,dn=null;function ex(e,t){var n=Yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Cg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Hn,overflow:Wn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ft=e,Nt=null,!0):!1;default:return!1}}function td(e){return(e.mode&1)!==0&&(e.flags&128)===0}function nd(e){if(ve){var t=Nt;if(t){var n=t;if(!Cg(e,t)){if(td(e))throw Error(A(418));t=Or(n.nextSibling);var r=Ft;t&&Cg(e,t)?ex(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(td(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function kg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function Ja(e){if(e!==Ft)return!1;if(!ve)return kg(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xf(e.type,e.memoizedProps)),t&&(t=Nt)){if(td(e))throw tx(),Error(A(418));for(;t;)ex(e,t),t=Or(t.nextSibling)}if(kg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ft?Or(e.stateNode.nextSibling):null;return!0}function tx(){for(var e=Nt;e;)e=Or(e.nextSibling)}function Fs(){Nt=Ft=null,ve=!1}function Kh(e){dn===null?dn=[e]:dn.push(e)}var OC=tr.ReactCurrentBatchConfig;function ao(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _g(e){var t=e._init;return t(e._payload)}function nx(e){function t(p,g){if(e){var x=p.deletions;x===null?(p.deletions=[g],p.flags|=16):x.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<g?(p.flags|=2,g):x):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,x,E){return g===null||g.tag!==6?(g=Qc(x,p.mode,E),g.return=p,g):(g=i(g,x),g.return=p,g)}function l(p,g,x,E){var S=x.type;return S===Xi?f(p,g,x.props.children,E,x.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&_g(S)===g.type)?(E=i(g,x.props),E.ref=ao(p,g,x),E.return=p,E):(E=Pl(x.type,x.key,x.props,null,p.mode,E),E.ref=ao(p,g,x),E.return=p,E)}function u(p,g,x,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=Yc(x,p.mode,E),g.return=p,g):(g=i(g,x.children||[]),g.return=p,g)}function f(p,g,x,E,S){return g===null||g.tag!==7?(g=bi(x,p.mode,E,S),g.return=p,g):(g=i(g,x),g.return=p,g)}function c(p,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Qc(""+g,p.mode,x),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ua:return x=Pl(g.type,g.key,g.props,null,p.mode,x),x.ref=ao(p,null,g),x.return=p,x;case Yi:return g=Yc(g,p.mode,x),g.return=p,g;case cr:var E=g._init;return c(p,E(g._payload),x)}if(mo(g)||no(g))return g=bi(g,p.mode,x,null),g.return=p,g;el(p,g)}return null}function d(p,g,x,E){var S=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(p,g,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ua:return x.key===S?l(p,g,x,E):null;case Yi:return x.key===S?u(p,g,x,E):null;case cr:return S=x._init,d(p,g,S(x._payload),E)}if(mo(x)||no(x))return S!==null?null:f(p,g,x,E,null);el(p,x)}return null}function h(p,g,x,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(x)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ua:return p=p.get(E.key===null?x:E.key)||null,l(g,p,E,S);case Yi:return p=p.get(E.key===null?x:E.key)||null,u(g,p,E,S);case cr:var C=E._init;return h(p,g,x,C(E._payload),S)}if(mo(E)||no(E))return p=p.get(x)||null,f(g,p,E,S,null);el(g,E)}return null}function m(p,g,x,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<x.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,x[P],E);if(N===null){k===null&&(k=j);break}e&&k&&N.alternate===null&&t(p,k),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N,k=j}if(P===x.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<x.length;P++)k=c(p,x[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<x.length;P++)j=h(k,p,P,x[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function v(p,g,x,E){var S=no(x);if(typeof S!="function")throw Error(A(150));if(x=S.call(x),x==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=x.next();k!==null&&!N.done;P++,N=x.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,N.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(N.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!N.done;P++,N=x.next())N=c(p,N.value,E),N!==null&&(g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return ve&&ei(p,P),S}for(k=r(p,k);!N.done;P++,N=x.next())N=h(k,p,P,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?P:N.key),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function b(p,g,x,E){if(typeof x=="object"&&x!==null&&x.type===Xi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ua:e:{for(var S=x.key,C=g;C!==null;){if(C.key===S){if(S=x.type,S===Xi){if(C.tag===7){n(p,C.sibling),g=i(C,x.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&_g(S)===C.type){n(p,C.sibling),g=i(C,x.props),g.ref=ao(p,C,x),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}x.type===Xi?(g=bi(x.props.children,p.mode,E,x.key),g.return=p,p=g):(E=Pl(x.type,x.key,x.props,null,p.mode,E),E.ref=ao(p,g,x),E.return=p,p=E)}return o(p);case Yi:e:{for(C=x.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(p,g.sibling),g=i(g,x.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Yc(x,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=x._init,b(p,g,C(x._payload),E)}if(mo(x))return m(p,g,x,E);if(no(x))return v(p,g,x,E);el(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,x),g.return=p,p=g):(n(p,g),g=Qc(x,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var Ls=nx(!0),rx=nx(!1),eu=Kr(null),tu=null,ss=null,qh=null;function Gh(){qh=ss=tu=null}function Qh(e){var t=eu.current;ge(eu),e._currentValue=t}function rd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vs(e,t){tu=e,qh=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(qh!==e)if(e={context:e,memoizedValue:t,next:null},ss===null){if(tu===null)throw Error(A(308));ss=e,tu.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return t}var ai=null;function Yh(e){ai===null?ai=[e]:ai.push(e)}function ix(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Yh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zn(e,r)}function Zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function Xh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zn(e,n)}return i=r.interleaved,i===null?(t.next=t,Yh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Sl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fh(e,n)}}function Pg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nu(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,f=u=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,v=a;switch(d=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){c=m.call(h,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Te({},c,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=c}}function Ag(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ta={},Pn=Kr(Ta),Qo=Kr(Ta),Yo=Kr(Ta);function li(e){if(e===Ta)throw Error(A(174));return e}function Zh(e,t){switch(de(Yo,t),de(Qo,e),de(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lf(t,e)}ge(Pn),de(Pn,t)}function Is(){ge(Pn),ge(Qo),ge(Yo)}function ox(e){li(Yo.current);var t=li(Pn.current),n=Lf(t,e.type);t!==n&&(de(Qo,e),de(Pn,n))}function Jh(e){Qo.current===e&&(ge(Pn),ge(Qo))}var we=Kr(0);function ru(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;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 Uc=[];function ep(){for(var e=0;e<Uc.length;e++)Uc[e]._workInProgressVersionPrimary=null;Uc.length=0}var Tl=tr.ReactCurrentDispatcher,Hc=tr.ReactCurrentBatchConfig,_i=0,Se=null,Fe=null,Ue=null,iu=!1,_o=!1,Xo=0,jC=0;function Ze(){throw Error(A(321))}function tp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gn(e[n],t[n]))return!1;return!0}function np(e,t,n,r,i,s){if(_i=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tl.current=e===null||e.memoizedState===null?FC:LC,e=n(r,i),_o){s=0;do{if(_o=!1,Xo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,Tl.current=IC,e=n(r,i)}while(_o)}if(Tl.current=su,t=Fe!==null&&Fe.next!==null,_i=0,Ue=Fe=Se=null,iu=!1,t)throw Error(A(300));return e}function rp(){var e=Xo!==0;return Xo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function en(){if(Fe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Ue===null?Se.memoizedState:Ue.next;if(t!==null)Ue=t,Fe=e;else{if(e===null)throw Error(A(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Zo(e,t){return typeof t=="function"?t(e):t}function Wc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Fe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((_i&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Se.lanes|=f,Pi|=f}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,gn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);gn(s,t.memoizedState)||(St=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ax(){}function lx(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,ip(fx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,Jo(9,cx.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));_i&30||ux(n,t,i)}return i}function ux(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cx(e,t,n,r){t.value=n,t.getSnapshot=r,dx(t)&&hx(e)}function fx(e,t,n){return n(function(){dx(t)&&hx(e)})}function dx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function hx(e){var t=Zn(e,1);t!==null&&mn(t,e,1,-1)}function Rg(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e},t.queue=e,e=e.dispatch=DC.bind(null,Se,e),[t.memoizedState,e]}function Jo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function px(){return en().memoizedState}function El(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=Jo(1|t,n,void 0,r===void 0?null:r)}function Nu(e,t,n,r){var i=en();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var o=Fe.memoizedState;if(s=o.destroy,r!==null&&tp(r,o.deps)){i.memoizedState=Jo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Jo(1|t,n,s,r)}function Og(e,t){return El(8390656,8,e,t)}function ip(e,t){return Nu(2048,8,e,t)}function mx(e,t){return Nu(4,2,e,t)}function gx(e,t){return Nu(4,4,e,t)}function yx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vx(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4,4,yx.bind(null,t,e),n)}function sp(){}function xx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&tp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&tp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function bx(e,t,n){return _i&21?(gn(n,t)||(n=k1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function NC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Hc.transition;Hc.transition={};try{e(!1),t()}finally{le=n,Hc.transition=r}}function Sx(){return en().memoizedState}function MC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tx(e))Ex(t,n);else if(n=ix(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),Cx(n,t,r)}}function DC(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tx(e))Ex(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,gn(a,o)){var l=t.interleaved;l===null?(i.next=i,Yh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=ix(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),Cx(n,t,r))}}function Tx(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Ex(e,t){_o=iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fh(e,n)}}var su={readContext:Jt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},FC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Og,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,yx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=MC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Rg,useDebugValue:sp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Rg(!1),t=e[0];return e=NC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),He===null)throw Error(A(349));_i&30||ux(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Og(fx.bind(null,r,s,e),[e]),r.flags|=2048,Jo(9,cx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=He.identifierPrefix;if(ve){var n=Wn,r=Hn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=jC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},LC={readContext:Jt,useCallback:xx,useContext:Jt,useEffect:ip,useImperativeHandle:vx,useInsertionEffect:mx,useLayoutEffect:gx,useMemo:wx,useReducer:Wc,useRef:px,useState:function(){return Wc(Zo)},useDebugValue:sp,useDeferredValue:function(e){var t=en();return bx(t,Fe.memoizedState,e)},useTransition:function(){var e=Wc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:ax,useSyncExternalStore:lx,useId:Sx,unstable_isNewReconciler:!1},IC={readContext:Jt,useCallback:xx,useContext:Jt,useEffect:ip,useImperativeHandle:vx,useInsertionEffect:mx,useLayoutEffect:gx,useMemo:wx,useReducer:Kc,useRef:px,useState:function(){return Kc(Zo)},useDebugValue:sp,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:bx(t,Fe.memoizedState,e)},useTransition:function(){var e=Kc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:ax,useSyncExternalStore:lx,useId:Sx,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function id(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Mu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Mr(e),i=qn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(mn(t,e,r,n),Sl(t,e,r))}};function jg(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Wo(n,r)||!Wo(i,s):!0}function kx(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Jt(s):(i=Et(t)?Ci:st.current,r=t.contextTypes,s=(r=r!=null)?Ds(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Ng(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Mu.enqueueReplaceState(t,t.state,null)}function sd(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Xh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Jt(s):(s=Et(t)?Ci:st.current,i.context=Ds(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(id(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Mu.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var n="",r=t;do n+=dE(r),r=r.return;while(r);var i=n}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function qc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ad(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BC=typeof WeakMap=="function"?WeakMap:Map;function Px(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,yd=r),ad(e,t)},n}function Ax(e,t,n){n=qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ad(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ad(e,t),typeof r!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Dg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=tk.bind(null,e,t,n),t.then(e,e))}function Fg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Lg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var zC=tr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?ix(t,null,n,r):Ls(t,e.child,n,r)}function Ig(e,t,n,r,i){n=n.render;var s=t.ref;return vs(t,i),r=rp(e,t,n,r,s,i),n=ip(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&n&&Wh(t),t.flags|=1,lt(e,t,r,i),t.child)}function $g(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!pp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rx(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Wo,n(o,r)&&e.ref===t.ref)return Jn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Wo(s,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(St=!0);else return t.lanes=e.lanes,Jn(e,t,i)}return ld(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(as,jt),jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(as,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(as,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(as,jt),jt|=r;return lt(e,t,i,n),t.child}function jx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ld(e,t,n,r,i){var s=Et(n)?Ci:st.current;return s=Ds(t,s),vs(t,i),n=rp(e,t,n,r,s,i),r=ip(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&r&&Wh(t),t.flags|=1,lt(e,t,n,i),t.child)}function Vg(e,t,n,r,i){if(Et(n)){var s=!0;Xl(t)}else s=!1;if(vs(t,i),t.stateNode===null)Cl(e,t),_x(t,n,r),od(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=Et(n)?Ci:st.current,u=Ds(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Mg(t,o,r,u),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||fr?(typeof f=="function"&&(sd(t,n,f,r),l=t.memoizedState),(a=fr||Ng(t,n,a,r,d,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ox(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ln(t.type,a),o.props=u,c=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=Et(n)?Ci:st.current,l=Ds(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||d!==l)&&Mg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||fr?(typeof h=="function"&&(sd(t,n,h,r),m=t.memoizedState),(u=fr||Ng(t,n,u,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ud(e,t,n,r,s,i)}function ud(e,t,n,r,i,s){jx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Cg(t,n,!1),Jn(e,t,s);r=t.stateNode,zC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ls(t,e.child,null,s),t.child=Ls(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&Cg(t,n,!0),t.child}function Nx(e){var t=e.stateNode;t.pendingContext?Eg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Eg(e,t.context,!1),Jh(e,t.containerInfo)}function Bg(e,t,n,r,i){return Fs(),qh(i),t.flags|=256,lt(e,t,n,r),t.child}var cd={dehydrated:null,treeContext:null,retryLane:0};function fd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return rd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=fd(n),t.memoizedState=cd,e):ap(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return UC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?fd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=cd,r}return s=e.child,e=s.sibling,r=Dr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ap(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&qh(r),Ls(t,e.child,null,n),e=ap(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=qc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ls(t,e.child,null,o),t.child.memoizedState=fd(o),t.memoizedState=cd,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=qc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,St||a){if(r=He,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Zn(e,i),mn(r,e,i,-1))}return hp(),r=qc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=nk.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Nt=Or(i.nextSibling),Ft=t,ve=!0,dn=null,e!==null&&(qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,Hn=e.id,Wn=e.overflow,ki=t),t=ap(t,r.children),t.flags|=4096,t)}function zg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),id(e.return,t,n)}function Gc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zg(e,n,t);else if(e.tag===19)zg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gc(t,!0,n,null,s);break;case"together":Gc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HC(e,t,n){switch(t.tag){case 3:Nx(t),Fs();break;case 5:ax(t);break;case 1:Et(t.type)&&Xl(t);break;case 4:Jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Mx(e,t,n):(de(we,we.current&1),e=Jn(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return Jn(e,t,n)}var Fx,dd,Lx,Ix;Fx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};dd=function(){};Lx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Mf(e,i),r=Mf(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=Lf(e,i),r=Lf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}$f(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Io.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Io.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function lo(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WC(e,t,n){var r=t.pendingProps;switch(Kh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Et(t.type)&&Yl(),Je(t),null;case 3:return r=t.stateNode,Is(),ge(Tt),ge(st),tp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(wd(dn),dn=null))),dd(e,t),Je(t),null;case 5:ep(t);var i=li(Yo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Je(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Go]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Xm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Jm(r,s),pe("invalid",r)}$f(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Io.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Zm(r,s,!0);break;case"textarea":Ha(r),eg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[Go]=r,Fx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Vf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Xm(e,r),i=Mf(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":Jm(e,r),i=Lf(e,r),pe("invalid",e);break;default:i=r}$f(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?m1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$o(e,l):typeof l=="number"&&$o(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Io.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Oh(e,s,l,o))}switch(n){case"input":Ha(e),Zm(e,r,!1);break;case"textarea":Ha(e),eg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ps(e,!!r.multiple,s,!1):r.defaultValue!=null&&ps(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Yo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Je(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Nt!==null&&t.mode&1&&!(t.flags&128))nx(),Fs(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Fs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(wd(dn),dn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):hp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return Is(),dd(e,t),e===null&&Ko(t.stateNode.containerInfo),Je(t),null;case 10:return Yh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Yl(),Je(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)lo(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,lo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>Vs&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>Vs&&n!==1073741824&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return dp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function KC(e,t){switch(Kh(t),t.tag){case 1:return Et(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Is(),ge(Tt),ge(st),tp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ep(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Is(),null;case 10:return Yh(t.type._context),null;case 22:case 23:return dp(),null;case 24:return null;default:return null}}var nl=!1,rt=!1,qC=typeof WeakSet=="function"?WeakSet:Set,F=null;function os(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function hd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Ug=!1;function GC(e,t){if(Yf=Kl,e=U1(),Hh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++f===r&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:ln(t.type,x),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Ug,Ug=!1,m}function Po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&hd(t,n,s)}i=i.next}while(i!==r)}}function Du(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Go],delete t[ed],delete t[RC],delete t[OC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vx(e){return e.tag===5||e.tag===3||e.tag===4}function Hg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function md(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ql));else if(r!==4&&(e=e.child,e!==null))for(md(e,t,n),e=e.sibling;e!==null;)md(e,t,n),e=e.sibling}function gd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}var qe=null,cn=!1;function ar(e,t,n){for(n=n.child;n!==null;)Bx(e,t,n),n=n.sibling}function Bx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:rt||os(n,t);case 6:var r=qe,i=cn;qe=null,ar(e,t,n),qe=r,cn=i,qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?Bc(e.parentNode,n):e.nodeType===1&&Bc(e,n),Uo(e)):Bc(qe,n.stateNode));break;case 4:r=qe,i=cn,qe=n.stateNode.containerInfo,cn=!0,ar(e,t,n),qe=r,cn=i;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&hd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!rt&&(os(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,ar(e,t,n),rt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Wg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qC),t.forEach(function(r){var i=rk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,cn=!1;break e;case 3:qe=a.stateNode.containerInfo,cn=!0;break e;case 4:qe=a.stateNode.containerInfo,cn=!0;break e}a=a.return}if(qe===null)throw Error(A(160));Bx(s,o,i),qe=null,cn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ke(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zx(t,e),t=t.sibling}function zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),vn(e),r&4){try{Po(3,e,e.return),Du(3,e)}catch(x){ke(e,e.return,x)}try{Po(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return),e.flags&32){var i=e.stateNode;try{$o(i,"")}catch(x){ke(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&c1(i,s),Vf(a,o);var u=Vf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?m1(i,c):f==="dangerouslySetInnerHTML"?h1(i,c):f==="children"?$o(i,c):Oh(i,f,c,u)}switch(a){case"input":Df(i,s);break;case"textarea":f1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ps(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ps(i,!!s.multiple,s.defaultValue,!0):ps(i,!!s.multiple,s.multiple?[]:"",!1))}i[Go]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(sn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){ke(e,e.return,x)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Uo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:sn(t,e),vn(e);break;case 13:sn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(cp=Ae())),r&4&&Wg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(u=rt)||f,sn(t,e),rt=u):sn(t,e),vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(c=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:Po(4,d,d.return);break;case 1:os(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){ke(r,n,x)}}break;case 5:os(d,d.return);break;case 22:if(d.memoizedState!==null){qg(c);continue}}h!==null?(h.return=d,F=h):qg(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=p1("display",o))}catch(x){ke(e,e.return,x)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){ke(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:sn(t,e),vn(e),r&4&&Wg(e);break;case 21:break;default:sn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vx(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($o(i,""),r.flags&=-33);var s=Hg(e);gd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Hg(e);md(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QC(e,t,n){F=e,Ux(e)}function Ux(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=nl;var u=rt;if(nl=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Gg(i):l!==null?(l.return=o,F=l):Gg(i);for(;s!==null;)F=s,Ux(s),s=s.sibling;F=i,nl=a,rt=u}Kg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Kg(e)}}function Kg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Rg(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Rg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Uo(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&pd(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function qg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Gg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{pd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{pd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var YC=Math.ceil,ou=tr.ReactCurrentDispatcher,lp=tr.ReactCurrentOwner,Xt=tr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,as=Kr(0),Ie=0,ea=null,Pi=0,Fu=0,up=0,Ao=null,wt=null,cp=0,Vs=1/0,Vn=null,au=!1,yd=null,Nr=null,rl=!1,Cr=null,lu=0,Ro=0,vd=null,kl=-1,_l=0;function ft(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:NC.transition!==null?(_l===0&&(_l=_1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:M1(e.type)),e):1}function mn(e,t,n,r){if(50<Ro)throw Ro=0,vd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Fu|=n),Ie===4&&pr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(Vs=Ae()+500,ju&&qr()))}function Ct(e,t){var n=e.callbackNode;NE(e,t);var r=Wl(e,e===He?Qe:0);if(r===0)n!==null&&rg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&rg(n),t===1)e.tag===0?jC(Qg.bind(null,e)):J1(Qg.bind(null,e)),PC(function(){!(se&6)&&qr()}),n=null;else{switch(P1(r)){case 1:n=Fh;break;case 4:n=C1;break;case 16:n=Hl;break;case 536870912:n=k1;break;default:n=Hl}n=Xx(n,Hx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hx(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var r=Wl(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Kx();(He!==e||Qe!==t)&&(Vn=null,Vs=Ae()+500,wi(e,t));do try{JC();break}catch(a){Wx(e,a)}while(!0);Qh(),ou.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=Wf(e),i!==0&&(r=i,t=xd(e,i))),t===1)throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!XC(i)&&(t=uu(e,r),t===2&&(s=Wf(e),s!==0&&(r=s,t=xd(e,s))),t===1))throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,wt,Vn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=cp+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Jf(ti.bind(null,e,wt,Vn),t);break}ti(e,wt,Vn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YC(r/1960))-r,10<r){e.timeoutHandle=Jf(ti.bind(null,e,wt,Vn),r);break}ti(e,wt,Vn);break;case 5:ti(e,wt,Vn);break;default:throw Error(A(329))}}}return Ct(e,Ae()),e.callbackNode===n?Hx.bind(null,e):null}function xd(e,t){var n=Ao;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=wt,wt=n,t!==null&&wd(t)),e}function wd(e){wt===null?wt=e:wt.push.apply(wt,e)}function XC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!gn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;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 pr(e,t){for(t&=~up,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function Qg(e){if(se&6)throw Error(A(327));xs();var t=Wl(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Wf(e);r!==0&&(t=r,n=xd(e,r))}if(n===1)throw n=ea,wi(e,0),pr(e,t),Ct(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,wt,Vn),Ct(e,Ae()),null}function fp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Vs=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&xs();var t=se;se|=1;var n=Xt.transition,r=le;try{if(Xt.transition=null,le=1,e)return e()}finally{le=r,Xt.transition=n,se=t,!(se&6)&&qr()}}function dp(){jt=as.current,ge(as)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_C(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Kh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Is(),ge(Tt),ge(st),tp();break;case 5:ep(r);break;case 4:Is();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Yh(r.type._context);break;case 22:case 23:dp()}n=n.return}if(He=e,je=e=Dr(e.current,null),Qe=jt=t,Ie=0,ea=null,up=Fu=Pi=0,wt=Ao=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Wx(e,t){do{var n=je;try{if(Qh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Ue=Fe=Se=null,_o=!1,Xo=0,lp.current=null,n===null||n.return===null){Ie=1,ea=t,je=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=a,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Fg(o);if(h!==null){h.flags&=-257,Lg(h,o,a,s,t),h.mode&1&&Dg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Dg(s,u,t),hp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Fg(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Lg(b,o,a,s,t),qh($s(l,a));break e}}s=l=$s(l,a),Ie!==4&&(Ie=2),Ao===null?Ao=[s]:Ao.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Px(s,l,t);Ag(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Nr===null||!Nr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Ax(s,a,t);Ag(s,E);break e}}s=s.return}while(s!==null)}Gx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Kx(){var e=ou.current;return ou.current=su,e===null?su:e}function hp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Pi&268435455)&&!(Fu&268435455)||pr(He,Qe)}function uu(e,t){var n=se;se|=2;var r=Kx();(He!==e||Qe!==t)&&(Vn=null,wi(e,t));do try{ZC();break}catch(i){Wx(e,i)}while(!0);if(Qh(),se=n,ou.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function ZC(){for(;je!==null;)qx(je)}function JC(){for(;je!==null&&!EE();)qx(je)}function qx(e){var t=Yx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Gx(e):je=t,lp.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KC(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,je=null;return}}else if(n=WC(n,t,jt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ie===0&&(Ie=5)}function ti(e,t,n){var r=le,i=Xt.transition;try{Xt.transition=null,le=1,ek(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function ek(e,t,n,r){do xs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ME(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Xx(Hl,function(){return xs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Xt.transition,Xt.transition=null;var o=le;le=1;var a=se;se|=4,lp.current=null,GC(e,n),zx(n,e),wC(Xf),Kl=!!Yf,Xf=Yf=null,e.current=n,QC(n),CE(),se=a,le=o,Xt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Nr=null),PE(n.stateNode),Ct(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=yd,yd=null,e;return lu&1&&e.tag!==0&&xs(),s=e.pendingLanes,s&1?e===vd?Ro++:(Ro=0,vd=e):Ro=0,qr(),null}function xs(){if(Cr!==null){var e=P1(lu),t=Xt.transition,n=le;try{if(Xt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:Po(8,f,s)}var c=f.child;if(c!==null)c.return=f,F=c;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if($x(f),f===u){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Po(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Yg(e,t,n){t=$s(n,t),t=Px(e,t,1),e=jr(e,t,1),t=ft(),e!==null&&(wa(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Yg(e,e,n);else for(;t!==null;){if(t.tag===3){Yg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nr===null||!Nr.has(r))){e=$s(n,e),e=Ax(t,e,1),t=jr(t,e,1),e=ft(),t!==null&&(wa(t,1,e),Ct(t,e));break}}t=t.return}}function tk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Qe&n)===n&&(Ie===4||Ie===3&&(Qe&130023424)===Qe&&500>Ae()-cp?wi(e,0):up|=n),Ct(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ft();e=Zn(e,t),e!==null&&(wa(e,t,n),Ct(e,n))}function nk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function rk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),Qx(e,n)}var Yx;Yx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,HC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&ex(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ds(t,st.current);vs(t,n),i=rp(null,t,r,e,i,n);var s=ip();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zh(t),i.updater=Mu,t.stateNode=i,i._reactInternals=t,od(t,r,e,n),t=ud(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&Wh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sk(r),e=ln(r,e),i){case 0:t=ld(null,t,r,e,n);break e;case 1:t=Vg(null,t,r,e,n);break e;case 11:t=Ig(null,t,r,e,n);break e;case 14:t=$g(null,t,r,ln(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),ld(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Vg(e,t,r,i,n);case 3:e:{if(Nx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ox(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=$s(Error(A(423)),t),t=Bg(e,t,r,n,i);break e}else if(r!==i){i=$s(Error(A(424)),t),t=Bg(e,t,r,n,i);break e}else for(Nt=Or(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fs(),r===i){t=Jn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return ax(t),e===null&&rd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Zf(r,i)?o=null:s!==null&&Zf(r,s)&&(t.flags|=32),jx(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&rd(t),null;case 13:return Mx(e,t,n);case 4:return Jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ls(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Ig(e,t,r,i,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(gn(s.value,o)){if(s.children===i.children&&!Tt.current){t=Jn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=qn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),id(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),id(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vs(t,n),i=Jt(i),r=r(i),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),$g(e,t,r,i,n);case 15:return Rx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Cl(e,t),t.tag=1,Et(r)?(e=!0,Xl(t)):e=!1,vs(t,n),_x(t,r,i),od(t,r,i,n),ud(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return Ox(e,t,n)}throw Error(A(156,t.tag))};function Xx(e,t){return E1(e,t)}function ik(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,n,r){return new ik(e,t,n,r)}function pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sk(e){if(typeof e=="function")return pp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nh)return 11;if(e===Mh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")pp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xi:return bi(n.children,i,s,t);case jh:o=8,i|=8;break;case Rf:return e=Yt(12,n,t,i|2),e.elementType=Rf,e.lanes=s,e;case Of:return e=Yt(13,n,t,i),e.elementType=Of,e.lanes=s,e;case jf:return e=Yt(19,n,t,i),e.elementType=jf,e.lanes=s,e;case a1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s1:o=10;break e;case o1:o=9;break e;case Nh:o=11;break e;case Mh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Yt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=a1,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Yc(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ok(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rc(0),this.expirationTimes=Rc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mp(e,t,n,r,i,s,o,a,l){return e=new ok(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Yt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zh(s),e}function ak(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zx(e){if(!e)return Br;e=e._reactInternals;e:{if(Di(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Et(n))return Z1(e,n,t)}return t}function Jx(e,t,n,r,i,s,o,a,l){return e=mp(n,r,!0,e,i,s,o,a,l),e.context=Zx(null),n=e.current,r=ft(),i=Mr(n),s=qn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Ct(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ft(),o=Mr(i);return n=Zx(n),t.context===null?t.context=n:t.pendingContext=n,t=qn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(mn(e,i,o,s),Sl(e,i,o)),o}function cu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Xg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){Xg(e,t),(e=e.alternate)&&Xg(e,t)}function lk(){return null}var ew=typeof reportError=="function"?reportError:function(e){console.error(e)};function yp(e){this._internalRoot=e}$u.prototype.render=yp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=yp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Xn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&N1(e)}};function vp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zg(){}function uk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=cu(o);s.call(u)}}var o=Jx(t,r,e,0,null,!1,!1,"",Zg);return e._reactRootContainer=o,e[Xn]=o.current,Ko(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=cu(l);a.call(u)}}var l=mp(e,0,!1,null,null,!1,!1,"",Zg);return e._reactRootContainer=l,e[Xn]=l.current,Ko(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=uk(n,t,e,i,r);return cu(o)}A1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=go(t.pendingLanes);n!==0&&(Lh(t,n|1),Ct(t,Ae()),!(se&6)&&(Vs=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Zn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),gp(e,1)}};Ih=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}gp(e,134217728)}};R1=function(e){if(e.tag===13){var t=Mr(e),n=Zn(e,t);if(n!==null){var r=ft();mn(n,e,t,r)}gp(e,t)}};O1=function(){return le};j1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};zf=function(e,t,n){switch(t){case"input":if(Df(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ou(r);if(!i)throw Error(A(90));u1(r),Df(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&ps(e,!!n.multiple,t,!1)}};v1=fp;x1=Ai;var ck={usingClientEntryPoint:!1,Events:[Sa,ts,Ou,g1,y1,fp]},uo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fk={bundleType:uo.bundleType,version:uo.version,rendererPackageName:uo.rendererPackageName,rendererConfig:uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=S1(e),e===null?null:e.stateNode},findFiberByHostInstance:uo.findFiberByHostInstance||lk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(fk),_n=il}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ck;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vp(t))throw Error(A(200));return ak(e,t,null,n)};It.createRoot=function(e,t){if(!vp(e))throw Error(A(299));var n=!1,r="",i=ew;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=mp(e,1,!1,null,null,n,!1,r,i),e[Xn]=t.current,Ko(e.nodeType===8?e.parentNode:e),new yp(t)};It.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=S1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ai(e)};It.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!vp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=ew;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jx(t,null,e,1,n??null,i,!1,s,o),e[Xn]=t.current,Ko(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};It.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};It.unstable_batchedUpdates=fp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function tw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tw)}catch(e){console.error(e)}}tw(),t1.exports=It;var nw=t1.exports;const dk=Ws(nw);var rw,Jg=nw;rw=Jg.createRoot,Jg.hydrateRoot;const hk="@alfatech/livechat",pk="v2025.05.12.3",mk="module",gk="https://api-live.alfatek.dev",yk="wss://api-live.alfatek.dev",vk=["dist","README.md"],xk="dist/widget.js",wk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},bk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},Sk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},iw={name:hk,private:!1,version:pk,type:mk,apiURL:gk,wsURL:yk,files:vk,main:xk,scripts:wk,dependencies:bk,devDependencies:Sk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Tk=iw.apiURL,Ek=iw.wsURL,Ck=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],kk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],_k={429:Ck,404:kk};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Tk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=_k[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const xp=e=>[200,201,204].includes(e);var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Kt(){}function Pk(e,t){return typeof e=="function"?e(t):e}function bd(e){return typeof e=="number"&&e>=0&&e!==1/0}function sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function e0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==wp(o,t.options))return!1}else if(!ta(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function t0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ta(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>Sd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ta(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ta(e[n],t[n])):!1}function ow(e,t){if(e===t)return e;const n=n0(e)&&n0(t);if(n||Sd(e)&&Sd(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function n0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sd(e){if(!r0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!r0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function r0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ak(e){return new Promise(t=>{setTimeout(t,e)})}function Td(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ow(e,t):t}function Rk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ok(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bp=Symbol();function aw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,bs,Mv,jk=(Mv=class extends Qs{constructor(){super();U(this,hi);U(this,mr);U(this,bs);D(this,bs,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,bs,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,bs=new WeakMap,Mv),Sp=new jk,Ss,gr,Ts,Dv,Nk=(Dv=class extends Qs{constructor(){super();U(this,Ss,!0);U(this,gr);U(this,Ts);D(this,Ts,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ts,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ss)!==t&&(D(this,Ss,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ss)}},Ss=new WeakMap,gr=new WeakMap,Ts=new WeakMap,Dv),du=new Nk;function Ed(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Mk(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?du.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xc(e){return e instanceof uw}function cw(e){let t=!1,n=0,r=!1,i;const s=Ed(),o=x=>{var b;r||(d(new uw(x)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Sp.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>lw(e.networkMode)&&e.canRun(),c=x=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var b;i=p=>{(r||u())&&x(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const b=n===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),v=e.retryDelay??Mk,E=typeof v=="function"?v(n,p):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Ak(E).then(()=>u()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Dk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Le=Dk(),pi,Fv,fw=(Fv=class{constructor(){U(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Fv),Es,Cs,Wt,tt,ma,mi,un,$n,Lv,Fk=(Lv=class extends fw{constructor(t){super();U(this,un);U(this,Es);U(this,Cs);U(this,Wt);U(this,tt);U(this,ma);U(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Es,Lk(this.options)),this.state=t.state??T(this,Es),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Td(this.state.data,t,this.options);return X(this,un,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,un,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,tt))==null?void 0:r.promise;return(i=T(this,tt))==null||i.cancel(t),n?n.then(Kt).catch(Kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Es))}isActive(){return this.observers.some(t=>hn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,tt)&&(T(this,mi)?T(this,tt).cancel({revert:!0}):T(this,tt).cancelRetry()),this.scheduleGc()),T(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,un,$n).call(this,{type:"invalidate"})}fetch(t,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,tt))return T(this,tt).continueRetry(),T(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const c=aw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&X(this,un,$n).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=c=>{var d,h,m,x;Xc(c)&&c.silent||X(this,un,$n).call(this,{type:"error",error:c}),Xc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(x=(m=T(this,Wt).config).onSettled)==null||x.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,cw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,x;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(h=(d=T(this,Wt).config).onSuccess)==null||h.call(d,c,this),(x=(m=T(this,Wt).config).onSettled)==null||x.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,d)=>{X(this,un,$n).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{X(this,un,$n).call(this,{type:"pause"})},onContinue:()=>{X(this,un,$n).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},Es=new WeakMap,Cs=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ma=new WeakMap,mi=new WeakMap,un=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Xc(i)&&i.revert&&T(this,Cs)?{...T(this,Cs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Wt).notify({query:this,type:"updated",action:t})})},Lv);function dw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Iv,Ik=(Iv=class extends Qs{constructor(t={}){super();U(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??wp(i,n);let o=this.get(s);return o||(o=new Fk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>e0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>e0(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Iv),Tn,ot,gi,En,lr,$v,$k=($v=class extends fw{constructor(t){super();U(this,En);U(this,Tn);U(this,ot);U(this,gi);this.mutationId=t.mutationId,D(this,ot,t.mutationCache),D(this,Tn,[]),this.state=t.state||hw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,ot).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,f,c,d,h,m,x,b,p,g,v,E,S,C,k;D(this,gi,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ot).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,ot).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((u=(l=T(this,ot).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context)),await((h=(d=T(this,ot).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(b=T(this,ot).config).onError)==null?void 0:p.call(b,P,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,P,t,this.state.context)),await((S=(E=T(this,ot).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},Tn=new WeakMap,ot=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Le.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,ot).notify({mutation:this,type:"updated",action:t})})},$v);function hw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,ga,Vv,Vk=(Vv=class extends Qs{constructor(t={}){super();U(this,Ot);U(this,ga);this.config=t,D(this,Ot,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new $k({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,Ot).get(n)??[];r.push(t),T(this,Ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,Ot).has(n)){const i=(r=T(this,Ot).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Ot).delete(n):T(this,Ot).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){return this.getAll().filter(n=>t0(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kt))))}},Ot=new WeakMap,ga=new WeakMap,Vv);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function i0(e){return{onFetch:(t,n)=>{var f,c,d,h,m;const r=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const b=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=aw(t.options,t.fetchOptions),g=async(v,E,S)=>{if(x)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};b(C);const k=await p(C),{maxPages:P}=t.options,j=S?Ok:Rk;return{pages:j(v.pages,k,P),pageParams:j(v.pageParams,E,P)}};if(i&&s.length){const v=i==="backward",E=v?Bk:s0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,v)}else{const v=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:s0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var x,b;return(b=(x=t.options).persister)==null?void 0:b.call(x,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function s0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Bk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,ks,_s,xr,Ps,As,Bv,zk=(Bv=class{constructor(e={}){U(this,Ee);U(this,yr);U(this,vr);U(this,ks);U(this,_s);U(this,xr);U(this,Ps);U(this,As);D(this,Ee,e.queryCache||new Ik),D(this,yr,e.mutationCache||new Vk),D(this,vr,e.defaultOptions||{}),D(this,ks,new Map),D(this,_s,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,Ps,Sp.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,As,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,Ps))==null||e.call(this),D(this,Ps,void 0),(t=T(this,As))==null||t.call(this),D(this,As,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(ws(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=Pk(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Le.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);Le.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return Le.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Le.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kt).catch(Kt)}invalidateQueries(e,t={}){return Le.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Le.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kt).catch(Kt)}fetchInfiniteQuery(e){return e.behavior=i0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=i0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,ks).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,ks).values()],n={};return t.forEach(r=>{ta(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,_s).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,_s).values()];let n={};return t.forEach(r=>{ta(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===bp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,ks=new WeakMap,_s=new WeakMap,xr=new WeakMap,Ps=new WeakMap,As=new WeakMap,Bv),yt,ee,ya,at,yi,Rs,wr,Cn,va,Os,js,vi,xi,br,Ns,ae,vo,Cd,kd,_d,Pd,Ad,Rd,Od,pw,zv,Uk=(zv=class extends Qs{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,ya);U(this,at);U(this,yi);U(this,Rs);U(this,wr);U(this,Cn);U(this,va);U(this,Os);U(this,js);U(this,vi);U(this,xi);U(this,br);U(this,Ns,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,wr,Ed()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),o0(T(this,ee),this.options)?X(this,ae,vo).call(this):this.updateResult(),X(this,ae,Pd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jd(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jd(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Ad).call(this),X(this,ae,Rd).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Od).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&a0(T(this,ee),i,this.options,r)&&X(this,ae,vo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||ws(this.options.staleTime,T(this,ee))!==ws(r.staleTime,T(this,ee)))&&X(this,ae,Cd).call(this);const o=X(this,ae,kd).call(this);s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,_d).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return Wk(this,r)&&(D(this,at,r),D(this,Rs,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,at)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,Ns).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,yt).defaultQueryOptions(t),r=T(this,yt).getQueryCache().build(T(this,yt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,at)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,at),o=T(this,yi),a=T(this,Rs),u=t!==r?t.state:T(this,ya),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&o0(t,n),I=j&&a0(t,r,n,i);(N||I)&&(c={...c,...dw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Os);else try{D(this,va,n.select),h=n.select(c.data),h=Td(s==null?void 0:s.data,h,n),D(this,Os,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,js))==null?void 0:P.state.data,T(this,js)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(N){D(this,Cn,N)}j!==void 0&&(b="success",h=Td(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Os),x=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",v=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:v,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:v&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&S,isStale:Tp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},N=()=>{const re=D(this,wr,k.promise=Ed());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&N();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&N();break}}return k}updateResult(t){const n=T(this,at),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,Rs,this.options),T(this,yi).data!==void 0&&D(this,js,T(this,ee)),fu(r,n))return;D(this,at,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,Ns).size)return!0;const l=new Set(a??T(this,Ns));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,at)).some(u=>{const f=u;return T(this,at)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,pw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Pd).call(this)}},yt=new WeakMap,ee=new WeakMap,ya=new WeakMap,at=new WeakMap,yi=new WeakMap,Rs=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Os=new WeakMap,js=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,Ns=new WeakMap,ae=new WeakSet,vo=function(t){X(this,ae,Od).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},Cd=function(){X(this,ae,Ad).call(this);const t=ws(this.options.staleTime,T(this,ee));if(Ri||T(this,at).isStale||!bd(t))return;const r=sw(T(this,at).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},kd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},_d=function(t){X(this,ae,Rd).call(this),D(this,br,t),!(Ri||hn(this.options.enabled,T(this,ee))===!1||!bd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Sp.isFocused())&&X(this,ae,vo).call(this)},T(this,br)))},Pd=function(){X(this,ae,Cd).call(this),X(this,ae,_d).call(this,X(this,ae,kd).call(this))},Ad=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Rd=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},Od=function(){const t=T(this,yt).getQueryCache().build(T(this,yt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pw=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,at))}),T(this,yt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},zv);function Hk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function o0(e,t){return Hk(e,t)||e.state.data!==void 0&&jd(e,t,t.refetchOnMount)}function jd(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Tp(e,t)}return!1}function a0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Tp(e,n)}function Tp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function Wk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,vt,Un,Qn,Al,Nd,Uv,Kk=(Uv=class extends Qs{constructor(t,n){super();U(this,Qn);U(this,Sr);U(this,Tr);U(this,vt);U(this,Un);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Qn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,vt))==null?void 0:r.state.status)==="pending"&&T(this,vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,vt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Qn,Al).call(this),X(this,Qn,Nd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,vt))==null||t.removeObserver(this),D(this,vt,void 0),X(this,Qn,Al).call(this),X(this,Qn,Nd).call(this)}mutate(t,n){var r;return D(this,Un,n),(r=T(this,vt))==null||r.removeObserver(this),D(this,vt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,vt).addObserver(this),T(this,vt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,vt=new WeakMap,Un=new WeakMap,Qn=new WeakSet,Al=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??hw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Nd=function(t){Le.batch(()=>{var n,r,i,s,o,a,l,u;if(T(this,Un)&&this.hasListeners()){const f=T(this,Tr).variables,c=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Un)).onSuccess)==null||r.call(n,t.data,f,c),(s=(i=T(this,Un)).onSettled)==null||s.call(i,t.data,null,f,c)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Un)).onError)==null||a.call(o,t.error,f,c),(u=(l=T(this,Un)).onSettled)==null||u.call(l,void 0,t.error,f,c))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Uv),mw=y.createContext(void 0),gw=e=>{const t=y.useContext(mw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(mw.Provider,{value:e,children:t})),yw=y.createContext(!1),Gk=()=>y.useContext(yw);yw.Provider;function Qk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Yk=y.createContext(Qk()),Xk=()=>y.useContext(Yk);function vw(e,t){return typeof e=="function"?e(...t):!!e}function Md(){}var Zk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Jk=e=>{y.useEffect(()=>{e.clearReset()},[e])},e_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vw(n,[e.error,r]),t_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},n_=(e,t)=>e.isLoading&&e.isFetching&&!t,r_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,l0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function i_(e,t,n){var f,c,d,h,m;const r=gw(),i=Gk(),s=Xk(),o=r.defaultQueryOptions(e);(c=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||c.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",t_(o),Zk(o,s),Jk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(x=>{const b=i?Md:l.subscribe(Le.batchCalls(x));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),r_(o,u))throw l0(o,l,s);if(e_({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,u),o.experimental_prefetchInRender&&!Ri&&n_(u,i)){const x=a?l0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(Md).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function s_(e,t){return i_(e,Uk)}function xw(e,t){const n=gw(),[r]=y.useState(()=>new Kk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Le.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Md)},[r]);if(i.error&&vw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const o_=e=>s_({queryKey:["widgets",e],queryFn:()=>a_(e)}),a_=e=>Ea(`widgets/with-link/${e}`);var K=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(K||{});function l_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function qc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function od(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $C=typeof WeakMap=="function"?WeakMap:Map;function _x(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,gd=r),od(e,t)},n}function Px(e,t,n){n=qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){od(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){od(e,t),typeof r!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Mg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $C;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=JC.bind(null,e,t,n),t.then(e,e))}function Dg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var VC=tr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?rx(t,null,n,r):Ls(t,e.child,n,r)}function Lg(e,t,n,r,i){n=n.render;var s=t.ref;return vs(t,i),r=np(e,t,n,r,s,i),n=rp(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&n&&Hh(t),t.flags|=1,lt(e,t,r,i),t.child)}function Ig(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!hp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ax(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Wo,n(o,r)&&e.ref===t.ref)return Jn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ax(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Wo(s,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(St=!0);else return t.lanes=e.lanes,Jn(e,t,i)}return ad(e,t,n,r,i)}function Rx(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(as,jt),jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(as,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(as,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(as,jt),jt|=r;return lt(e,t,i,n),t.child}function Ox(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ad(e,t,n,r,i){var s=Et(n)?Ci:st.current;return s=Ds(t,s),vs(t,i),n=np(e,t,n,r,s,i),r=rp(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&r&&Hh(t),t.flags|=1,lt(e,t,n,i),t.child)}function $g(e,t,n,r,i){if(Et(n)){var s=!0;Xl(t)}else s=!1;if(vs(t,i),t.stateNode===null)Cl(e,t),kx(t,n,r),sd(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=Et(n)?Ci:st.current,u=Ds(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Ng(t,o,r,u),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||fr?(typeof f=="function"&&(id(t,n,f,r),l=t.memoizedState),(a=fr||jg(t,n,a,r,d,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,sx(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ln(t.type,a),o.props=u,c=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=Et(n)?Ci:st.current,l=Ds(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||d!==l)&&Ng(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||fr?(typeof h=="function"&&(id(t,n,h,r),m=t.memoizedState),(u=fr||jg(t,n,u,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ld(e,t,n,r,s,i)}function ld(e,t,n,r,i,s){Ox(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Eg(t,n,!1),Jn(e,t,s);r=t.stateNode,VC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ls(t,e.child,null,s),t.child=Ls(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&Eg(t,n,!0),t.child}function jx(e){var t=e.stateNode;t.pendingContext?Tg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Tg(e,t.context,!1),Zh(e,t.containerInfo)}function Vg(e,t,n,r,i){return Fs(),Kh(i),t.flags|=256,lt(e,t,n,r),t.child}var ud={dehydrated:null,treeContext:null,retryLane:0};function cd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return nd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=cd(n),t.memoizedState=ud,e):op(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return BC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?cd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=ud,r}return s=e.child,e=s.sibling,r=Dr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function op(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&Kh(r),Ls(t,e.child,null,n),e=op(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function BC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=qc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ls(t,e.child,null,o),t.child.memoizedState=cd(o),t.memoizedState=ud,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=qc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,St||a){if(r=He,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Zn(e,i),mn(r,e,i,-1))}return dp(),r=qc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ek.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Nt=Or(i.nextSibling),Ft=t,ve=!0,dn=null,e!==null&&(qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,Hn=e.id,Wn=e.overflow,ki=t),t=op(t,r.children),t.flags|=4096,t)}function Bg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),rd(e.return,t,n)}function Gc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Mx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bg(e,n,t);else if(e.tag===19)Bg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gc(t,!0,n,null,s);break;case"together":Gc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function zC(e,t,n){switch(t.tag){case 3:jx(t),Fs();break;case 5:ox(t);break;case 1:Et(t.type)&&Xl(t);break;case 4:Zh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Nx(e,t,n):(de(we,we.current&1),e=Jn(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Mx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Rx(e,t,n)}return Jn(e,t,n)}var Dx,fd,Fx,Lx;Dx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};fd=function(){};Fx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Nf(e,i),r=Nf(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=Ff(e,i),r=Ff(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}If(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Io.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Io.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Lx=function(e,t,n,r){n!==r&&(t.flags|=4)};function lo(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function UC(e,t,n){var r=t.pendingProps;switch(Wh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Et(t.type)&&Yl(),Je(t),null;case 3:return r=t.stateNode,Is(),ge(Tt),ge(st),ep(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(xd(dn),dn=null))),fd(e,t),Je(t),null;case 5:Jh(t);var i=li(Yo.current);if(n=t.type,e!==null&&t.stateNode!=null)Fx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Je(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Go]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Ym(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Zm(r,s),pe("invalid",r)}If(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Io.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Xm(r,s,!0);break;case"textarea":Ha(r),Jm(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=f1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[Go]=r,Dx(e,t,!1,!1),t.stateNode=e;e:{switch(o=$f(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Ym(e,r),i=Nf(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":Zm(e,r),i=Ff(e,r),pe("invalid",e);break;default:i=r}If(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?p1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&d1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$o(e,l):typeof l=="number"&&$o(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Io.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Rh(e,s,l,o))}switch(n){case"input":Ha(e),Xm(e,r,!1);break;case"textarea":Ha(e),Jm(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ps(e,!!r.multiple,s,!1):r.defaultValue!=null&&ps(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)Lx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Yo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Je(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Nt!==null&&t.mode&1&&!(t.flags&128))tx(),Fs(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Fs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(xd(dn),dn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):dp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return Is(),fd(e,t),e===null&&Ko(t.stateNode.containerInfo),Je(t),null;case 10:return Qh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Yl(),Je(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)lo(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,lo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>Vs&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>Vs&&n!==1073741824&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return fp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function HC(e,t){switch(Wh(t),t.tag){case 1:return Et(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Is(),ge(Tt),ge(st),ep(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jh(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Is(),null;case 10:return Qh(t.type._context),null;case 22:case 23:return fp(),null;case 24:return null;default:return null}}var nl=!1,rt=!1,WC=typeof WeakSet=="function"?WeakSet:Set,F=null;function os(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function dd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var zg=!1;function KC(e,t){if(Qf=Kl,e=z1(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++f===r&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ln(t.type,v),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=zg,zg=!1,m}function Po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&dd(t,n,s)}i=i.next}while(i!==r)}}function Du(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function hd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ix(e){var t=e.alternate;t!==null&&(e.alternate=null,Ix(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Go],delete t[Jf],delete t[PC],delete t[AC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $x(e){return e.tag===5||e.tag===3||e.tag===4}function Ug(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$x(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ql));else if(r!==4&&(e=e.child,e!==null))for(pd(e,t,n),e=e.sibling;e!==null;)pd(e,t,n),e=e.sibling}function md(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(md(e,t,n),e=e.sibling;e!==null;)md(e,t,n),e=e.sibling}var qe=null,cn=!1;function ar(e,t,n){for(n=n.child;n!==null;)Vx(e,t,n),n=n.sibling}function Vx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:rt||os(n,t);case 6:var r=qe,i=cn;qe=null,ar(e,t,n),qe=r,cn=i,qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?Bc(e.parentNode,n):e.nodeType===1&&Bc(e,n),Uo(e)):Bc(qe,n.stateNode));break;case 4:r=qe,i=cn,qe=n.stateNode.containerInfo,cn=!0,ar(e,t,n),qe=r,cn=i;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&dd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!rt&&(os(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,ar(e,t,n),rt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Hg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new WC),t.forEach(function(r){var i=tk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,cn=!1;break e;case 3:qe=a.stateNode.containerInfo,cn=!0;break e;case 4:qe=a.stateNode.containerInfo,cn=!0;break e}a=a.return}if(qe===null)throw Error(A(160));Vx(s,o,i),qe=null,cn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ke(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bx(t,e),t=t.sibling}function Bx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),vn(e),r&4){try{Po(3,e,e.return),Du(3,e)}catch(v){ke(e,e.return,v)}try{Po(5,e,e.return)}catch(v){ke(e,e.return,v)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return),e.flags&32){var i=e.stateNode;try{$o(i,"")}catch(v){ke(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&u1(i,s),$f(a,o);var u=$f(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?p1(i,c):f==="dangerouslySetInnerHTML"?d1(i,c):f==="children"?$o(i,c):Rh(i,f,c,u)}switch(a){case"input":Mf(i,s);break;case"textarea":c1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ps(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ps(i,!!s.multiple,s.defaultValue,!0):ps(i,!!s.multiple,s.multiple?[]:"",!1))}i[Go]=s}catch(v){ke(e,e.return,v)}}break;case 6:if(sn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(v){ke(e,e.return,v)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Uo(t.containerInfo)}catch(v){ke(e,e.return,v)}break;case 4:sn(t,e),vn(e);break;case 13:sn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(up=Ae())),r&4&&Hg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(u=rt)||f,sn(t,e),rt=u):sn(t,e),vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(c=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:Po(4,d,d.return);break;case 1:os(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){ke(r,n,v)}}break;case 5:os(d,d.return);break;case 22:if(d.memoizedState!==null){Kg(c);continue}}h!==null?(h.return=d,F=h):Kg(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=h1("display",o))}catch(v){ke(e,e.return,v)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){ke(e,e.return,v)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:sn(t,e),vn(e),r&4&&Hg(e);break;case 21:break;default:sn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($x(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($o(i,""),r.flags&=-33);var s=Ug(e);md(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ug(e);pd(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qC(e,t,n){F=e,zx(e)}function zx(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=nl;var u=rt;if(nl=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?qg(i):l!==null?(l.return=o,F=l):qg(i);for(;s!==null;)F=s,zx(s),s=s.sibling;F=i,nl=a,rt=u}Wg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Wg(e)}}function Wg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Ag(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ag(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Uo(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&hd(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Kg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function qg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{hd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{hd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var GC=Math.ceil,ou=tr.ReactCurrentDispatcher,ap=tr.ReactCurrentOwner,Xt=tr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,as=Kr(0),Ie=0,ea=null,Pi=0,Fu=0,lp=0,Ao=null,wt=null,up=0,Vs=1/0,Vn=null,au=!1,gd=null,Nr=null,rl=!1,Cr=null,lu=0,Ro=0,yd=null,kl=-1,_l=0;function ft(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:OC.transition!==null?(_l===0&&(_l=k1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:N1(e.type)),e):1}function mn(e,t,n,r){if(50<Ro)throw Ro=0,yd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Fu|=n),Ie===4&&pr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(Vs=Ae()+500,ju&&qr()))}function Ct(e,t){var n=e.callbackNode;OE(e,t);var r=Wl(e,e===He?Qe:0);if(r===0)n!==null&&ng(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ng(n),t===1)e.tag===0?RC(Gg.bind(null,e)):Z1(Gg.bind(null,e)),kC(function(){!(se&6)&&qr()}),n=null;else{switch(_1(r)){case 1:n=Dh;break;case 4:n=E1;break;case 16:n=Hl;break;case 536870912:n=C1;break;default:n=Hl}n=Yx(n,Ux.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ux(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var r=Wl(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Wx();(He!==e||Qe!==t)&&(Vn=null,Vs=Ae()+500,wi(e,t));do try{XC();break}catch(a){Hx(e,a)}while(!0);Gh(),ou.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=Hf(e),i!==0&&(r=i,t=vd(e,i))),t===1)throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!QC(i)&&(t=uu(e,r),t===2&&(s=Hf(e),s!==0&&(r=s,t=vd(e,s))),t===1))throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,wt,Vn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=up+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Zf(ti.bind(null,e,wt,Vn),t);break}ti(e,wt,Vn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*GC(r/1960))-r,10<r){e.timeoutHandle=Zf(ti.bind(null,e,wt,Vn),r);break}ti(e,wt,Vn);break;case 5:ti(e,wt,Vn);break;default:throw Error(A(329))}}}return Ct(e,Ae()),e.callbackNode===n?Ux.bind(null,e):null}function vd(e,t){var n=Ao;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=wt,wt=n,t!==null&&xd(t)),e}function xd(e){wt===null?wt=e:wt.push.apply(wt,e)}function QC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!gn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;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 pr(e,t){for(t&=~lp,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function Gg(e){if(se&6)throw Error(A(327));xs();var t=Wl(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Hf(e);r!==0&&(t=r,n=vd(e,r))}if(n===1)throw n=ea,wi(e,0),pr(e,t),Ct(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,wt,Vn),Ct(e,Ae()),null}function cp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Vs=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&xs();var t=se;se|=1;var n=Xt.transition,r=le;try{if(Xt.transition=null,le=1,e)return e()}finally{le=r,Xt.transition=n,se=t,!(se&6)&&qr()}}function fp(){jt=as.current,ge(as)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,CC(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Wh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Is(),ge(Tt),ge(st),ep();break;case 5:Jh(r);break;case 4:Is();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Qh(r.type._context);break;case 22:case 23:fp()}n=n.return}if(He=e,je=e=Dr(e.current,null),Qe=jt=t,Ie=0,ea=null,lp=Fu=Pi=0,wt=Ao=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Hx(e,t){do{var n=je;try{if(Gh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Ue=Fe=Se=null,_o=!1,Xo=0,ap.current=null,n===null||n.return===null){Ie=1,ea=t,je=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=a,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Dg(o);if(h!==null){h.flags&=-257,Fg(h,o,a,s,t),h.mode&1&&Mg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){Mg(s,u,t),dp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Dg(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Fg(b,o,a,s,t),Kh($s(l,a));break e}}s=l=$s(l,a),Ie!==4&&(Ie=2),Ao===null?Ao=[s]:Ao.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=_x(s,l,t);Pg(s,p);break e;case 1:a=l;var g=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Nr===null||!Nr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Px(s,a,t);Pg(s,E);break e}}s=s.return}while(s!==null)}qx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Wx(){var e=ou.current;return ou.current=su,e===null?su:e}function dp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Pi&268435455)&&!(Fu&268435455)||pr(He,Qe)}function uu(e,t){var n=se;se|=2;var r=Wx();(He!==e||Qe!==t)&&(Vn=null,wi(e,t));do try{YC();break}catch(i){Hx(e,i)}while(!0);if(Gh(),se=n,ou.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function YC(){for(;je!==null;)Kx(je)}function XC(){for(;je!==null&&!SE();)Kx(je)}function Kx(e){var t=Qx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?qx(e):je=t,ap.current=null}function qx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=HC(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,je=null;return}}else if(n=UC(n,t,jt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ie===0&&(Ie=5)}function ti(e,t,n){var r=le,i=Xt.transition;try{Xt.transition=null,le=1,ZC(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function ZC(e,t,n,r){do xs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(jE(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Yx(Hl,function(){return xs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Xt.transition,Xt.transition=null;var o=le;le=1;var a=se;se|=4,ap.current=null,KC(e,n),Bx(n,e),vC(Yf),Kl=!!Qf,Yf=Qf=null,e.current=n,qC(n),TE(),se=a,le=o,Xt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Nr=null),kE(n.stateNode),Ct(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=gd,gd=null,e;return lu&1&&e.tag!==0&&xs(),s=e.pendingLanes,s&1?e===yd?Ro++:(Ro=0,yd=e):Ro=0,qr(),null}function xs(){if(Cr!==null){var e=_1(lu),t=Xt.transition,n=le;try{if(Xt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:Po(8,f,s)}var c=f.child;if(c!==null)c.return=f,F=c;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if(Ix(f),f===u){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Po(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,F=x;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Qg(e,t,n){t=$s(n,t),t=_x(e,t,1),e=jr(e,t,1),t=ft(),e!==null&&(wa(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Qg(e,e,n);else for(;t!==null;){if(t.tag===3){Qg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nr===null||!Nr.has(r))){e=$s(n,e),e=Px(t,e,1),t=jr(t,e,1),e=ft(),t!==null&&(wa(t,1,e),Ct(t,e));break}}t=t.return}}function JC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Qe&n)===n&&(Ie===4||Ie===3&&(Qe&130023424)===Qe&&500>Ae()-up?wi(e,0):lp|=n),Ct(e,t)}function Gx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ft();e=Zn(e,t),e!==null&&(wa(e,t,n),Ct(e,n))}function ek(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gx(e,n)}function tk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),Gx(e,n)}var Qx;Qx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,zC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&J1(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ds(t,st.current);vs(t,n),i=np(null,t,r,e,i,n);var s=rp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xh(t),i.updater=Mu,t.stateNode=i,i._reactInternals=t,sd(t,r,e,n),t=ld(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&Hh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=rk(r),e=ln(r,e),i){case 0:t=ad(null,t,r,e,n);break e;case 1:t=$g(null,t,r,e,n);break e;case 11:t=Lg(null,t,r,e,n);break e;case 14:t=Ig(null,t,r,ln(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),ad(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),$g(e,t,r,i,n);case 3:e:{if(jx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,sx(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=$s(Error(A(423)),t),t=Vg(e,t,r,n,i);break e}else if(r!==i){i=$s(Error(A(424)),t),t=Vg(e,t,r,n,i);break e}else for(Nt=Or(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=rx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fs(),r===i){t=Jn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return ox(t),e===null&&nd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Xf(r,i)?o=null:s!==null&&Xf(r,s)&&(t.flags|=32),Ox(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&nd(t),null;case 13:return Nx(e,t,n);case 4:return Zh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ls(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Lg(e,t,r,i,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(gn(s.value,o)){if(s.children===i.children&&!Tt.current){t=Jn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=qn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),rd(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),rd(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vs(t,n),i=Jt(i),r=r(i),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),Ig(e,t,r,i,n);case 15:return Ax(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Cl(e,t),t.tag=1,Et(r)?(e=!0,Xl(t)):e=!1,vs(t,n),kx(t,r,i),sd(t,r,i,n),ld(null,t,r,!0,e,n);case 19:return Mx(e,t,n);case 22:return Rx(e,t,n)}throw Error(A(156,t.tag))};function Yx(e,t){return T1(e,t)}function nk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,n,r){return new nk(e,t,n,r)}function hp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rk(e){if(typeof e=="function")return hp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Nh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")hp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xi:return bi(n.children,i,s,t);case Oh:o=8,i|=8;break;case Af:return e=Yt(12,n,t,i|2),e.elementType=Af,e.lanes=s,e;case Rf:return e=Yt(13,n,t,i),e.elementType=Rf,e.lanes=s,e;case Of:return e=Yt(19,n,t,i),e.elementType=Of,e.lanes=s,e;case o1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case i1:o=10;break e;case s1:o=9;break e;case jh:o=11;break e;case Nh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Yt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=o1,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Yc(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ik(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rc(0),this.expirationTimes=Rc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pp(e,t,n,r,i,s,o,a,l){return e=new ik(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Yt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xh(s),e}function sk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Xx(e){if(!e)return Br;e=e._reactInternals;e:{if(Di(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Et(n))return X1(e,n,t)}return t}function Zx(e,t,n,r,i,s,o,a,l){return e=pp(n,r,!0,e,i,s,o,a,l),e.context=Xx(null),n=e.current,r=ft(),i=Mr(n),s=qn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Ct(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ft(),o=Mr(i);return n=Xx(n),t.context===null?t.context=n:t.pendingContext=n,t=qn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(mn(e,i,o,s),Sl(e,i,o)),o}function cu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Yg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mp(e,t){Yg(e,t),(e=e.alternate)&&Yg(e,t)}function ok(){return null}var Jx=typeof reportError=="function"?reportError:function(e){console.error(e)};function gp(e){this._internalRoot=e}$u.prototype.render=gp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=gp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Xn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=R1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&j1(e)}};function yp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Xg(){}function ak(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=cu(o);s.call(u)}}var o=Zx(t,r,e,0,null,!1,!1,"",Xg);return e._reactRootContainer=o,e[Xn]=o.current,Ko(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=cu(l);a.call(u)}}var l=pp(e,0,!1,null,null,!1,!1,"",Xg);return e._reactRootContainer=l,e[Xn]=l.current,Ko(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=ak(n,t,e,i,r);return cu(o)}P1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=go(t.pendingLanes);n!==0&&(Fh(t,n|1),Ct(t,Ae()),!(se&6)&&(Vs=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Zn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),mp(e,1)}};Lh=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}mp(e,134217728)}};A1=function(e){if(e.tag===13){var t=Mr(e),n=Zn(e,t);if(n!==null){var r=ft();mn(n,e,t,r)}mp(e,t)}};R1=function(){return le};O1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Bf=function(e,t,n){switch(t){case"input":if(Mf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ou(r);if(!i)throw Error(A(90));l1(r),Mf(r,i)}}}break;case"textarea":c1(e,n);break;case"select":t=n.value,t!=null&&ps(e,!!n.multiple,t,!1)}};y1=cp;v1=Ai;var lk={usingClientEntryPoint:!1,Events:[Sa,ts,Ou,m1,g1,cp]},uo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uk={bundleType:uo.bundleType,version:uo.version,rendererPackageName:uo.rendererPackageName,rendererConfig:uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=b1(e),e===null?null:e.stateNode},findFiberByHostInstance:uo.findFiberByHostInstance||ok,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(uk),_n=il}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yp(t))throw Error(A(200));return sk(e,t,null,n)};It.createRoot=function(e,t){if(!yp(e))throw Error(A(299));var n=!1,r="",i=Jx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=pp(e,1,!1,null,null,n,!1,r,i),e[Xn]=t.current,Ko(e.nodeType===8?e.parentNode:e),new gp(t)};It.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=b1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ai(e)};It.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!yp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Jx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Zx(t,null,e,1,n??null,i,!1,s,o),e[Xn]=t.current,Ko(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};It.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};It.unstable_batchedUpdates=cp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function ew(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ew)}catch(e){console.error(e)}}ew(),e1.exports=It;var tw=e1.exports;const ck=Ws(tw);var nw,Zg=tw;nw=Zg.createRoot,Zg.hydrateRoot;const fk="@alfatech/livechat",dk="v2025.05.12.4",hk="module",pk="https://api-live.alfatek.dev",mk="wss://api-live.alfatek.dev",gk=["dist","README.md"],yk="dist/widget.js",vk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},xk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},wk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},rw={name:fk,private:!1,version:dk,type:hk,apiURL:pk,wsURL:mk,files:gk,main:yk,scripts:vk,dependencies:xk,devDependencies:wk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},bk=rw.apiURL,Sk=rw.wsURL,Tk=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],Ek=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],Ck={429:Tk,404:Ek};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${bk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=Ck[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const vp=e=>[200,201,204].includes(e);var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Kt(){}function kk(e,t){return typeof e=="function"?e(t):e}function wd(e){return typeof e=="number"&&e>=0&&e!==1/0}function iw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function Jg(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==xp(o,t.options))return!1}else if(!ta(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function e0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ta(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>bd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ta(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ta(e[n],t[n])):!1}function sw(e,t){if(e===t)return e;const n=t0(e)&&t0(t);if(n||bd(e)&&bd(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=sw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function t0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bd(e){if(!n0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!n0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function n0(e){return Object.prototype.toString.call(e)==="[object Object]"}function _k(e){return new Promise(t=>{setTimeout(t,e)})}function Sd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?sw(e,t):t}function Pk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ak(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wp=Symbol();function ow(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,bs,Nv,Rk=(Nv=class extends Qs{constructor(){super();U(this,hi);U(this,mr);U(this,bs);D(this,bs,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,bs,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,bs=new WeakMap,Nv),bp=new Rk,Ss,gr,Ts,Mv,Ok=(Mv=class extends Qs{constructor(){super();U(this,Ss,!0);U(this,gr);U(this,Ts);D(this,Ts,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ts,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ss)!==t&&(D(this,Ss,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ss)}},Ss=new WeakMap,gr=new WeakMap,Ts=new WeakMap,Mv),du=new Ok;function Td(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function jk(e){return Math.min(1e3*2**e,3e4)}function aw(e){return(e??"online")==="online"?du.isOnline():!0}var lw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xc(e){return e instanceof lw}function uw(e){let t=!1,n=0,r=!1,i;const s=Td(),o=v=>{var b;r||(d(new lw(v)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>bp.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>aw(e.networkMode)&&e.canRun(),c=v=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),s.resolve(v))},d=v=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),s.reject(v))},h=()=>new Promise(v=>{var b;i=p=>{(r||u())&&v(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(p){v=Promise.reject(p)}Promise.resolve(v).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),x=e.retryDelay??jk,E=typeof x=="function"?x(n,p):x,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),_k(E).then(()=>u()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Nk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Le=Nk(),pi,Dv,cw=(Dv=class{constructor(){U(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Dv),Es,Cs,Wt,tt,ma,mi,un,$n,Fv,Mk=(Fv=class extends cw{constructor(t){super();U(this,un);U(this,Es);U(this,Cs);U(this,Wt);U(this,tt);U(this,ma);U(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Es,Dk(this.options)),this.state=t.state??T(this,Es),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Sd(this.state.data,t,this.options);return X(this,un,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,un,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,tt))==null?void 0:r.promise;return(i=T(this,tt))==null||i.cancel(t),n?n.then(Kt).catch(Kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Es))}isActive(){return this.observers.some(t=>hn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!iw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,tt)&&(T(this,mi)?T(this,tt).cancel({revert:!0}):T(this,tt).cancelRetry()),this.scheduleGc()),T(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,un,$n).call(this,{type:"invalidate"})}fetch(t,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,tt))return T(this,tt).continueRetry(),T(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const c=ow(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&X(this,un,$n).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=c=>{var d,h,m,v;Xc(c)&&c.silent||X(this,un,$n).call(this,{type:"error",error:c}),Xc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,uw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,v;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(h=(d=T(this,Wt).config).onSuccess)==null||h.call(d,c,this),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,d)=>{X(this,un,$n).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{X(this,un,$n).call(this,{type:"pause"})},onContinue:()=>{X(this,un,$n).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},Es=new WeakMap,Cs=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ma=new WeakMap,mi=new WeakMap,un=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...fw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Xc(i)&&i.revert&&T(this,Cs)?{...T(this,Cs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Wt).notify({query:this,type:"updated",action:t})})},Fv);function fw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Dk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Lv,Fk=(Lv=class extends Qs{constructor(t={}){super();U(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??xp(i,n);let o=this.get(s);return o||(o=new Mk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Jg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Jg(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Lv),Tn,ot,gi,En,lr,Iv,Lk=(Iv=class extends cw{constructor(t){super();U(this,En);U(this,Tn);U(this,ot);U(this,gi);this.mutationId=t.mutationId,D(this,ot,t.mutationCache),D(this,Tn,[]),this.state=t.state||dw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,ot).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,f,c,d,h,m,v,b,p,g,x,E,S,C,k;D(this,gi,uw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ot).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,ot).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((u=(l=T(this,ot).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context)),await((h=(d=T(this,ot).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(b=T(this,ot).config).onError)==null?void 0:p.call(b,P,t,this.state.context,this)),await((x=(g=this.options).onError)==null?void 0:x.call(g,P,t,this.state.context)),await((S=(E=T(this,ot).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},Tn=new WeakMap,ot=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Le.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,ot).notify({mutation:this,type:"updated",action:t})})},Iv);function dw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,ga,$v,Ik=($v=class extends Qs{constructor(t={}){super();U(this,Ot);U(this,ga);this.config=t,D(this,Ot,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new Lk({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,Ot).get(n)??[];r.push(t),T(this,Ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,Ot).has(n)){const i=(r=T(this,Ot).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Ot).delete(n):T(this,Ot).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>e0(n,r))}findAll(t={}){return this.getAll().filter(n=>e0(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kt))))}},Ot=new WeakMap,ga=new WeakMap,$v);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function r0(e){return{onFetch:(t,n)=>{var f,c,d,h,m;const r=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},p=ow(t.options,t.fetchOptions),g=async(x,E,S)=>{if(v)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};b(C);const k=await p(C),{maxPages:P}=t.options,j=S?Ak:Pk;return{pages:j(x.pages,k,P),pageParams:j(x.pageParams,E,P)}};if(i&&s.length){const x=i==="backward",E=x?$k:i0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,x)}else{const x=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:i0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function i0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function $k(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,ks,_s,xr,Ps,As,Vv,Vk=(Vv=class{constructor(e={}){U(this,Ee);U(this,yr);U(this,vr);U(this,ks);U(this,_s);U(this,xr);U(this,Ps);U(this,As);D(this,Ee,e.queryCache||new Fk),D(this,yr,e.mutationCache||new Ik),D(this,vr,e.defaultOptions||{}),D(this,ks,new Map),D(this,_s,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,Ps,bp.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,As,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,Ps))==null||e.call(this),D(this,Ps,void 0),(t=T(this,As))==null||t.call(this),D(this,As,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(ws(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=kk(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Le.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);Le.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return Le.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Le.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kt).catch(Kt)}invalidateQueries(e,t={}){return Le.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Le.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kt).catch(Kt)}fetchInfiniteQuery(e){return e.behavior=r0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=r0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,ks).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,ks).values()],n={};return t.forEach(r=>{ta(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,_s).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,_s).values()];let n={};return t.forEach(r=>{ta(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===wp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,ks=new WeakMap,_s=new WeakMap,xr=new WeakMap,Ps=new WeakMap,As=new WeakMap,Vv),yt,ee,ya,at,yi,Rs,wr,Cn,va,Os,js,vi,xi,br,Ns,ae,vo,Ed,Cd,kd,_d,Pd,Ad,Rd,hw,Bv,Bk=(Bv=class extends Qs{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,ya);U(this,at);U(this,yi);U(this,Rs);U(this,wr);U(this,Cn);U(this,va);U(this,Os);U(this,js);U(this,vi);U(this,xi);U(this,br);U(this,Ns,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,wr,Td()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),s0(T(this,ee),this.options)?X(this,ae,vo).call(this):this.updateResult(),X(this,ae,_d).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Od(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Od(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Pd).call(this),X(this,ae,Ad).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Rd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&o0(T(this,ee),i,this.options,r)&&X(this,ae,vo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||ws(this.options.staleTime,T(this,ee))!==ws(r.staleTime,T(this,ee)))&&X(this,ae,Ed).call(this);const o=X(this,ae,Cd).call(this);s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,kd).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return Uk(this,r)&&(D(this,at,r),D(this,Rs,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,at)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,Ns).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,yt).defaultQueryOptions(t),r=T(this,yt).getQueryCache().build(T(this,yt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,at)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,at),o=T(this,yi),a=T(this,Rs),u=t!==r?t.state:T(this,ya),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&s0(t,n),I=j&&o0(t,r,n,i);(N||I)&&(c={...c,...fw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Os);else try{D(this,va,n.select),h=n.select(c.data),h=Sd(s==null?void 0:s.data,h,n),D(this,Os,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,js))==null?void 0:P.state.data,T(this,js)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(N){D(this,Cn,N)}j!==void 0&&(b="success",h=Sd(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Os),v=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",x=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:x,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:x&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&S,isStale:Sp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},N=()=>{const re=D(this,wr,k.promise=Td());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&N();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&N();break}}return k}updateResult(t){const n=T(this,at),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,Rs,this.options),T(this,yi).data!==void 0&&D(this,js,T(this,ee)),fu(r,n))return;D(this,at,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,Ns).size)return!0;const l=new Set(a??T(this,Ns));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,at)).some(u=>{const f=u;return T(this,at)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,hw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,_d).call(this)}},yt=new WeakMap,ee=new WeakMap,ya=new WeakMap,at=new WeakMap,yi=new WeakMap,Rs=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Os=new WeakMap,js=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,Ns=new WeakMap,ae=new WeakSet,vo=function(t){X(this,ae,Rd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},Ed=function(){X(this,ae,Pd).call(this);const t=ws(this.options.staleTime,T(this,ee));if(Ri||T(this,at).isStale||!wd(t))return;const r=iw(T(this,at).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},Cd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},kd=function(t){X(this,ae,Ad).call(this),D(this,br,t),!(Ri||hn(this.options.enabled,T(this,ee))===!1||!wd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||bp.isFocused())&&X(this,ae,vo).call(this)},T(this,br)))},_d=function(){X(this,ae,Ed).call(this),X(this,ae,kd).call(this,X(this,ae,Cd).call(this))},Pd=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Ad=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},Rd=function(){const t=T(this,yt).getQueryCache().build(T(this,yt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},hw=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,at))}),T(this,yt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},Bv);function zk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function s0(e,t){return zk(e,t)||e.state.data!==void 0&&Od(e,t,t.refetchOnMount)}function Od(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Sp(e,t)}return!1}function o0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Sp(e,n)}function Sp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function Uk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,vt,Un,Qn,Al,jd,zv,Hk=(zv=class extends Qs{constructor(t,n){super();U(this,Qn);U(this,Sr);U(this,Tr);U(this,vt);U(this,Un);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Qn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,vt))==null?void 0:r.state.status)==="pending"&&T(this,vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,vt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Qn,Al).call(this),X(this,Qn,jd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,vt))==null||t.removeObserver(this),D(this,vt,void 0),X(this,Qn,Al).call(this),X(this,Qn,jd).call(this)}mutate(t,n){var r;return D(this,Un,n),(r=T(this,vt))==null||r.removeObserver(this),D(this,vt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,vt).addObserver(this),T(this,vt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,vt=new WeakMap,Un=new WeakMap,Qn=new WeakSet,Al=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??dw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},jd=function(t){Le.batch(()=>{var n,r,i,s,o,a,l,u;if(T(this,Un)&&this.hasListeners()){const f=T(this,Tr).variables,c=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Un)).onSuccess)==null||r.call(n,t.data,f,c),(s=(i=T(this,Un)).onSettled)==null||s.call(i,t.data,null,f,c)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Un)).onError)==null||a.call(o,t.error,f,c),(u=(l=T(this,Un)).onSettled)==null||u.call(l,void 0,t.error,f,c))}this.listeners.forEach(f=>{f(T(this,Tr))})})},zv),pw=y.createContext(void 0),mw=e=>{const t=y.useContext(pw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Wk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(pw.Provider,{value:e,children:t})),gw=y.createContext(!1),Kk=()=>y.useContext(gw);gw.Provider;function qk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Gk=y.createContext(qk()),Qk=()=>y.useContext(Gk);function yw(e,t){return typeof e=="function"?e(...t):!!e}function Nd(){}var Yk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Xk=e=>{y.useEffect(()=>{e.clearReset()},[e])},Zk=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&yw(n,[e.error,r]),Jk=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},e_=(e,t)=>e.isLoading&&e.isFetching&&!t,t_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,a0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function n_(e,t,n){var f,c,d,h,m;const r=mw(),i=Kk(),s=Qk(),o=r.defaultQueryOptions(e);(c=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||c.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",Jk(o),Yk(o,s),Xk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(v=>{const b=i?Nd:l.subscribe(Le.batchCalls(v));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),t_(o,u))throw a0(o,l,s);if(Zk({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,u),o.experimental_prefetchInRender&&!Ri&&e_(u,i)){const v=a?a0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;v==null||v.catch(Nd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function r_(e,t){return n_(e,Bk)}function vw(e,t){const n=mw(),[r]=y.useState(()=>new Hk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Le.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Nd)},[r]);if(i.error&&yw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const i_=e=>r_({queryKey:["widgets",e],queryFn:()=>s_(e)}),s_=e=>Ea(`widgets/with-link/${e}`);var K=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(K||{});function o_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
41
41
  * @remix-run/router v1.21.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -46,7 +46,7 @@ Error generating stack: `+s.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function u_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>f(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=kr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function f(h,m,x){m===void 0&&(m=null);let b=f_(i?u().pathname:"/",h,m,x);return Ep(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Dd(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(h){return new URL(c(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?Fi(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=kr.Push;let x=f(h,m);s+=1,i.splice(s,i.length,x),r&&a&&a({action:o,location:x,delta:1})},replace(h,m){o=kr.Replace;let x=f(h,m);i[s]=x,r&&a&&a({action:o,location:x,delta:0})},go(h){o=kr.Pop;let m=l(s+h),x=i[m];s=m,a&&a({action:o,location:x,delta:h})},listen(h){return a=h,()=>{a=null}}}}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ep(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function c_(){return Math.random().toString(36).substr(2,8)}function f_(e,t,n,r){return n===void 0&&(n=null),hu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fi(t):t,{state:n,key:t&&t.key||r||c_()})}function Dd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var u0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(u0||(u0={}));function d_(e,t,n){return n===void 0&&(n="/"),h_(e,t,n,!1)}function h_(e,t,n,r){let i=typeof t=="string"?Fi(t):t,s=Cp(i.pathname||"/",n);if(s==null)return null;let o=ww(e);p_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=C_(s);a=T_(o[l],u,r)}return a}function ww(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&($e(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ww(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:b_(u,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of bw(s.path))i(s,o,l)}),t}function bw(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=bw(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function p_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:S_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const m_=/^:[\w-]+$/,g_=3,y_=2,v_=1,x_=10,w_=-2,c0=e=>e==="*";function b_(e,t){let n=e.split("/"),r=n.length;return n.some(c0)&&(r+=w_),t&&(r+=y_),n.filter(i=>!c0(i)).reduce((i,s)=>i+(m_.test(s)?g_:s===""?v_:x_),r)}function S_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function T_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",c=f0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=f0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Fr([s,c.pathname]),pathnameBase:A_(Fr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Fr([s,c.pathnameBase]))}return o}function f0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=E_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let x=a[c]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[c];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function E_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ep(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ep(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Cp(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function k_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fi(e):e;return{pathname:n?n.startsWith("/")?n:__(n,t):t,search:R_(r),hash:O_(i)}}function __(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function P_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sw(e,t){let n=P_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fi(e):(i=hu({},e),$e(!i.pathname||!i.pathname.includes("?"),Zc("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),Zc("#","pathname","hash",i)),$e(!i.search||!i.search.includes("#"),Zc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}a=c>=0?t[c]:"/"}let l=k_(i,a),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),A_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function j_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ew=["post","put","patch","delete"];new Set(Ew);const N_=["get",...Ew];new Set(N_);/**
49
+ */function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function a_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>f(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=kr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function f(h,m,v){m===void 0&&(m=null);let b=u_(i?u().pathname:"/",h,m,v);return Tp(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Md(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(h){return new URL(c(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?Fi(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=kr.Push;let v=f(h,m);s+=1,i.splice(s,i.length,v),r&&a&&a({action:o,location:v,delta:1})},replace(h,m){o=kr.Replace;let v=f(h,m);i[s]=v,r&&a&&a({action:o,location:v,delta:0})},go(h){o=kr.Pop;let m=l(s+h),v=i[m];s=m,a&&a({action:o,location:v,delta:h})},listen(h){return a=h,()=>{a=null}}}}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function l_(){return Math.random().toString(36).substr(2,8)}function u_(e,t,n,r){return n===void 0&&(n=null),hu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fi(t):t,{state:n,key:t&&t.key||r||l_()})}function Md(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var l0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(l0||(l0={}));function c_(e,t,n){return n===void 0&&(n="/"),f_(e,t,n,!1)}function f_(e,t,n,r){let i=typeof t=="string"?Fi(t):t,s=Ep(i.pathname||"/",n);if(s==null)return null;let o=xw(e);d_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=T_(s);a=b_(o[l],u,r)}return a}function xw(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&($e(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),xw(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:x_(u,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of ww(s.path))i(s,o,l)}),t}function ww(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=ww(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function d_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:w_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const h_=/^:[\w-]+$/,p_=3,m_=2,g_=1,y_=10,v_=-2,u0=e=>e==="*";function x_(e,t){let n=e.split("/"),r=n.length;return n.some(u0)&&(r+=v_),t&&(r+=m_),n.filter(i=>!u0(i)).reduce((i,s)=>i+(h_.test(s)?p_:s===""?g_:y_),r)}function w_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function b_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",c=c0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=c0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Fr([s,c.pathname]),pathnameBase:__(Fr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Fr([s,c.pathnameBase]))}return o}function c0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=S_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let v=a[c]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const m=a[c];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function S_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Tp(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function T_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tp(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ep(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function E_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fi(e):e;return{pathname:n?n.startsWith("/")?n:C_(n,t):t,search:P_(r),hash:A_(i)}}function C_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function k_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bw(e,t){let n=k_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fi(e):(i=hu({},e),$e(!i.pathname||!i.pathname.includes("?"),Zc("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),Zc("#","pathname","hash",i)),$e(!i.search||!i.search.includes("#"),Zc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}a=c>=0?t[c]:"/"}let l=E_(i,a),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),__=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,A_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function R_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tw=["post","put","patch","delete"];new Set(Tw);const O_=["get",...Tw];new Set(O_);/**
50
50
  * React Router v6.28.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+s.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},na.apply(this,arguments)}const kp=y.createContext(null),M_=y.createContext(null),Li=y.createContext(null),zu=y.createContext(null),Ii=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Cw=y.createContext(null);function D_(e,t){let{relative:n}=t===void 0?{}:t;Ca()||$e(!1);let{basename:r,navigator:i}=y.useContext(Li),{hash:s,pathname:o,search:a}=Pw(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ca(){return y.useContext(zu)!=null}function ka(){return Ca()||$e(!1),y.useContext(zu).location}function kw(e){y.useContext(Li).static||y.useLayoutEffect(e)}function _w(){let{isDataRoute:e}=y.useContext(Ii);return e?G_():F_()}function F_(){Ca()||$e(!1);let e=y.useContext(kp),{basename:t,future:n,navigator:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(Sw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return kw(()=>{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Tw(u,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Fr([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function Pw(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(Sw(i,r.v7_relativeSplatPath));return y.useMemo(()=>Tw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function L_(e,t){return I_(e,t)}function I_(e,t,n,r){Ca()||$e(!1);let{navigator:i}=y.useContext(Li),{matches:s}=y.useContext(Ii),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ka(),f;if(t){var c;let b=typeof t=="string"?Fi(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||$e(!1),f=b}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=d_(e,{pathname:h}),x=U_(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&x?y.createElement(zu.Provider,{value:{location:na({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},x):x}function $_(){let e=q_(),t=j_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const V_=y.createElement($_,null);class B_ extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Ii.Provider,{value:this.props.routeContext},y.createElement(Cw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z_(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(kp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ii.Provider,{value:t},r)}function U_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||$e(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:d,errors:h}=n,m=c.route.loader&&d[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,m=!1,x=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,x=c.route.errorElement||V_,l&&(u<0&&d===0?(m=!0,b=null):u===d&&(m=!0,b=c.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let v;return h?v=x:m?v=b:c.route.Component?v=y.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,y.createElement(z_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement(B_,{location:n.location,revalidation:n.revalidation,component:x,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var Aw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Aw||{}),pu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pu||{});function H_(e){let t=y.useContext(kp);return t||$e(!1),t}function W_(e){let t=y.useContext(M_);return t||$e(!1),t}function K_(e){let t=y.useContext(Ii);return t||$e(!1),t}function Rw(e){let t=K_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function q_(){var e;let t=y.useContext(Cw),n=W_(pu.UseRouteError),r=Rw(pu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function G_(){let{router:e}=H_(Aw.UseNavigateStable),t=Rw(pu.UseNavigateStable),n=y.useRef(!1);return kw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,na({fromRouteId:t},s)))},[e,t])}const d0={};function Q_(e,t){d0[t]||(d0[t]=!0,console.warn(t))}const h0=(e,t,n)=>Q_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Y_(e,t){e!=null&&e.v7_startTransition||h0("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&h0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const X_="startTransition",p0=Pf[X_];function Z_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=u_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=y.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},c=y.useCallback(d=>{f&&p0?p0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>Y_(s),[s]),y.createElement(J_,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Fd(e){$e(!1)}function J_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;Ca()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:na({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Fi(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:m="default"}=r,x=y.useMemo(()=>{let b=Cp(f,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:m},navigationType:i}},[l,f,c,d,h,m,i]);return x==null?null:y.createElement(Li.Provider,{value:u},y.createElement(zu.Provider,{children:n,value:x}))}function e2(e){let{children:t,location:n}=e;return L_(Ld(t),n)}new Promise(()=>{});function Ld(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let s=[...t,i];if(r.type===y.Fragment){n.push.apply(n,Ld(r.props.children,s));return}r.type!==Fd&&$e(!1),!r.props.index||!r.props.children||$e(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ld(r.props.children,s)),n.push(o)}),n}/**
58
+ */function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},na.apply(this,arguments)}const Cp=y.createContext(null),j_=y.createContext(null),Li=y.createContext(null),zu=y.createContext(null),Ii=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Ew=y.createContext(null);function N_(e,t){let{relative:n}=t===void 0?{}:t;Ca()||$e(!1);let{basename:r,navigator:i}=y.useContext(Li),{hash:s,pathname:o,search:a}=_w(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ca(){return y.useContext(zu)!=null}function ka(){return Ca()||$e(!1),y.useContext(zu).location}function Cw(e){y.useContext(Li).static||y.useLayoutEffect(e)}function kw(){let{isDataRoute:e}=y.useContext(Ii);return e?K_():M_()}function M_(){Ca()||$e(!1);let e=y.useContext(Cp),{basename:t,future:n,navigator:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(bw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return Cw(()=>{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Sw(u,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Fr([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function _w(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(bw(i,r.v7_relativeSplatPath));return y.useMemo(()=>Sw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function D_(e,t){return F_(e,t)}function F_(e,t,n,r){Ca()||$e(!1);let{navigator:i}=y.useContext(Li),{matches:s}=y.useContext(Ii),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ka(),f;if(t){var c;let b=typeof t=="string"?Fi(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||$e(!1),f=b}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=c_(e,{pathname:h}),v=B_(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&v?y.createElement(zu.Provider,{value:{location:na({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},v):v}function L_(){let e=W_(),t=R_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const I_=y.createElement(L_,null);class $_ extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Ii.Provider,{value:this.props.routeContext},y.createElement(Ew.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function V_(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(Cp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ii.Provider,{value:t},r)}function B_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||$e(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:d,errors:h}=n,m=c.route.loader&&d[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,m=!1,v=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,v=c.route.errorElement||I_,l&&(u<0&&d===0?(m=!0,b=null):u===d&&(m=!0,b=c.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let x;return h?x=v:m?x=b:c.route.Component?x=y.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,y.createElement(V_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:x})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement($_,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var Pw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Pw||{}),pu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pu||{});function z_(e){let t=y.useContext(Cp);return t||$e(!1),t}function U_(e){let t=y.useContext(j_);return t||$e(!1),t}function H_(e){let t=y.useContext(Ii);return t||$e(!1),t}function Aw(e){let t=H_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function W_(){var e;let t=y.useContext(Ew),n=U_(pu.UseRouteError),r=Aw(pu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function K_(){let{router:e}=z_(Pw.UseNavigateStable),t=Aw(pu.UseNavigateStable),n=y.useRef(!1);return Cw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,na({fromRouteId:t},s)))},[e,t])}const f0={};function q_(e,t){f0[t]||(f0[t]=!0,console.warn(t))}const d0=(e,t,n)=>q_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function G_(e,t){e!=null&&e.v7_startTransition||d0("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&d0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const Q_="startTransition",h0=_f[Q_];function Y_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=a_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=y.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},c=y.useCallback(d=>{f&&h0?h0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>G_(s),[s]),y.createElement(X_,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Dd(e){$e(!1)}function X_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;Ca()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:na({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Fi(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:m="default"}=r,v=y.useMemo(()=>{let b=Ep(f,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:m},navigationType:i}},[l,f,c,d,h,m,i]);return v==null?null:y.createElement(Li.Provider,{value:u},y.createElement(zu.Provider,{children:n,value:v}))}function Z_(e){let{children:t,location:n}=e;return D_(Fd(t),n)}new Promise(()=>{});function Fd(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let s=[...t,i];if(r.type===y.Fragment){n.push.apply(n,Fd(r.props.children,s));return}r.type!==Dd&&$e(!1),!r.props.index||!r.props.children||$e(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Fd(r.props.children,s)),n.push(o)}),n}/**
59
59
  * React Router DOM v6.28.0
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+s.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function Id(){return Id=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Id.apply(this,arguments)}function t2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function n2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function r2(e,t){return e.button===0&&(!t||t==="_self")&&!n2(e)}const i2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],s2="6";try{window.__reactRouterVersion=s2}catch{}const o2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,l2=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,d=t2(t,i2),{basename:h}=y.useContext(Li),m,x=!1;if(typeof u=="string"&&a2.test(u)&&(m=u,o2))try{let v=new URL(window.location.href),E=u.startsWith("//")?new URL(v.protocol+u):new URL(u),S=Cp(E.pathname,h);E.origin===v.origin&&S!=null?u=S+E.search+E.hash:x=!0}catch{}let b=D_(u,{relative:i}),p=u2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(v){r&&r(v),v.defaultPrevented||p(v)}return y.createElement("a",Id({},d,{href:m||b,onClick:x||s?r:g,ref:n,target:l}))});var m0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(m0||(m0={}));var g0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(g0||(g0={}));function u2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=_w(),u=ka(),f=Pw(e,{relative:o});return y.useCallback(c=>{if(r2(c,n)){c.preventDefault();let d=r!==void 0?r:Dd(u)===Dd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const c2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},y0=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(c2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},f2=e=>e?y0(e):y0;var Ow={exports:{}},jw={},Nw={exports:{}},Mw={};/**
67
+ */function Ld(){return Ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ld.apply(this,arguments)}function J_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function e2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t2(e,t){return e.button===0&&(!t||t==="_self")&&!e2(e)}const n2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],r2="6";try{window.__reactRouterVersion=r2}catch{}const i2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",s2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,o2=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,d=J_(t,n2),{basename:h}=y.useContext(Li),m,v=!1;if(typeof u=="string"&&s2.test(u)&&(m=u,i2))try{let x=new URL(window.location.href),E=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=Ep(E.pathname,h);E.origin===x.origin&&S!=null?u=S+E.search+E.hash:v=!0}catch{}let b=N_(u,{relative:i}),p=a2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(x){r&&r(x),x.defaultPrevented||p(x)}return y.createElement("a",Ld({},d,{href:m||b,onClick:v||s?r:g,ref:n,target:l}))});var p0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p0||(p0={}));var m0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(m0||(m0={}));function a2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=kw(),u=ka(),f=_w(e,{relative:o});return y.useCallback(c=>{if(t2(c,n)){c.preventDefault();let d=r!==void 0?r:Md(u)===Md(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const l2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},g0=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(l2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},u2=e=>e?g0(e):g0;var Rw={exports:{}},Ow={},jw={exports:{}},Nw={};/**
68
68
  * @license React
69
69
  * use-sync-external-store-shim.production.min.js
70
70
  *
@@ -72,7 +72,7 @@ Error generating stack: `+s.message+`
72
72
  *
73
73
  * This source code is licensed under the MIT license found in the
74
74
  * LICENSE file in the root directory of this source tree.
75
- */var Bs=y;function d2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h2=typeof Object.is=="function"?Object.is:d2,p2=Bs.useState,m2=Bs.useEffect,g2=Bs.useLayoutEffect,y2=Bs.useDebugValue;function v2(e,t){var n=t(),r=p2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return g2(function(){i.value=n,i.getSnapshot=t,Jc(i)&&s({inst:i})},[e,n,t]),m2(function(){return Jc(i)&&s({inst:i}),e(function(){Jc(i)&&s({inst:i})})},[e]),y2(n),n}function Jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!h2(e,n)}catch{return!0}}function x2(e,t){return t()}var w2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x2:v2;Mw.useSyncExternalStore=Bs.useSyncExternalStore!==void 0?Bs.useSyncExternalStore:w2;Nw.exports=Mw;var b2=Nw.exports;/**
75
+ */var Bs=y;function c2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var f2=typeof Object.is=="function"?Object.is:c2,d2=Bs.useState,h2=Bs.useEffect,p2=Bs.useLayoutEffect,m2=Bs.useDebugValue;function g2(e,t){var n=t(),r=d2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return p2(function(){i.value=n,i.getSnapshot=t,Jc(i)&&s({inst:i})},[e,n,t]),h2(function(){return Jc(i)&&s({inst:i}),e(function(){Jc(i)&&s({inst:i})})},[e]),m2(n),n}function Jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!f2(e,n)}catch{return!0}}function y2(e,t){return t()}var v2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y2:g2;Nw.useSyncExternalStore=Bs.useSyncExternalStore!==void 0?Bs.useSyncExternalStore:v2;jw.exports=Nw;var x2=jw.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,11 +80,11 @@ Error generating stack: `+s.message+`
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var Uu=y,S2=b2;function T2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var E2=typeof Object.is=="function"?Object.is:T2,C2=S2.useSyncExternalStore,k2=Uu.useRef,_2=Uu.useEffect,P2=Uu.useMemo,A2=Uu.useDebugValue;jw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=k2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=P2(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return c=m}return c=h}if(m=c,E2(f,h))return m;var x=r(h);return i!==void 0&&i(m,x)?m:(f=h,c=x)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=C2(e,s[0],s[1]);return _2(function(){o.hasValue=!0,o.value=a},[a]),A2(a),a};Ow.exports=jw;var R2=Ow.exports;const O2=Ws(R2),Dw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:j2}=R,{useSyncExternalStoreWithSelector:N2}=O2;let v0=!1;const M2=e=>e;function D2(e,t=M2,n){(Dw?"production":void 0)!=="production"&&n&&!v0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),v0=!0);const r=N2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return j2(r),r}const x0=e=>{(Dw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?f2(e):e,n=(r,i)=>D2(t,r,i);return Object.assign(n,t),n},F2=e=>e?x0(e):x0,tn=F2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())}})),L2={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},w0={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var Fw={exports:{}};/*!
83
+ */var Uu=y,w2=x2;function b2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S2=typeof Object.is=="function"?Object.is:b2,T2=w2.useSyncExternalStore,E2=Uu.useRef,C2=Uu.useEffect,k2=Uu.useMemo,_2=Uu.useDebugValue;Ow.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=E2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=k2(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return c=m}return c=h}if(m=c,S2(f,h))return m;var v=r(h);return i!==void 0&&i(m,v)?m:(f=h,c=v)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=T2(e,s[0],s[1]);return C2(function(){o.hasValue=!0,o.value=a},[a]),_2(a),a};Rw.exports=Ow;var P2=Rw.exports;const A2=Ws(P2),Mw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:R2}=R,{useSyncExternalStoreWithSelector:O2}=A2;let y0=!1;const j2=e=>e;function N2(e,t=j2,n){(Mw?"production":void 0)!=="production"&&n&&!y0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),y0=!0);const r=O2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return R2(r),r}const v0=e=>{(Mw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?u2(e):e,n=(r,i)=>N2(t,r,i);return Object.assign(n,t),n},M2=e=>e?v0(e):v0,tn=M2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})}})),D2={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},x0={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var Dw={exports:{}};/*!
84
84
  Copyright (c) 2018 Jed Watson.
85
85
  Licensed under the MIT License (MIT), see
86
86
  http://jedwatson.github.io/classnames
87
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fw);var I2=Fw.exports;const Ne=Ws(I2),_p=y.createContext({});function Pp(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ap=typeof window<"u",Lw=Ap?y.useLayoutEffect:y.useEffect,Hu=y.createContext(null),Rp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class $2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function V2({children:e,isPresent:t,anchorX:n}){const r=y.useId(),i=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=y.useContext(Rp);return y.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:f,right:c}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${c}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
87
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Dw);var F2=Dw.exports;const Ne=Ws(F2),kp=y.createContext({});function _p(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Pp=typeof window<"u",Fw=Pp?y.useLayoutEffect:y.useEffect,Hu=y.createContext(null),Ap=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class L2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function I2({children:e,isPresent:t,anchorX:n}){const r=y.useId(),i=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=y.useContext(Ap);return y.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:f,right:c}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${c}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
88
88
  [data-motion-pop-id="${r}"] {
89
89
  position: absolute !important;
90
90
  width: ${a}px !important;
@@ -92,19 +92,19 @@ Error generating stack: `+s.message+`
92
92
  ${d}px !important;
93
93
  top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(h)}},[t]),w.jsx($2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const B2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Pp(z2),u=y.useId();let f=!0,c=y.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(c={...c}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=w.jsx(V2,{isPresent:n,anchorX:a,children:e})),w.jsx(Hu.Provider,{value:c,children:e})};function z2(){return new Map}function Iw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function b0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const ji=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Iw(o),f=y.useMemo(()=>b0(e),[e]),c=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=Pp(()=>new Map),[x,b]=y.useState(f),[p,g]=y.useState(f);Lw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const v=[];if(f!==x){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);c.includes(P)||(S.splice(C,0,k),v.push(k))}return s==="wait"&&v.length&&(S=v),g(b0(S)),b(f),null}const{forceRender:E}=y.useContext(_p);return w.jsx(w.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||c.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(N=>{N||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(u==null||u()),r&&r())};return w.jsx(B2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Op(e,t){e.indexOf(t)===-1&&e.push(t)}function jp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let $d=()=>{};const Vd={skipAnimations:!1,useManualTiming:!1};function Np(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Mp{constructor(){this.subscriptions=[]}add(t){return Op(this.subscriptions,t),()=>jp(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function $w(e,t){return t?e*(1e3/t):0}const U2=Np(()=>window.ScrollTimeline!==void 0);class H2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(U2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class W2 extends H2{then(t,n){return this.finished.finally(t).then(()=>{})}}const S0={value:null,addProjectionMetrics:null},Dp=e=>Array.isArray(e)&&typeof e[0]=="number",K2={};function q2(e,t){const n=Np(e);return()=>K2[t]??n()}const ia=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},xo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xo([0,.65,.55,1]),circOut:xo([.55,0,1,.45]),backIn:xo([.31,.01,.66,-.59]),backOut:xo([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"&&ia()?Vw(e,t):Dp(e)?xo(e):Array.isArray(e)?e.map(n=>Bw(n,t)||Bd.easeOut):Bd[e]}function G2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const f={[t]:n};l&&(f.offset=l);const c=Bw(a,i);return Array.isArray(c)&&(f.easing=c),e.animate(f,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Fp(e){return typeof e=="function"&&"applyToOptions"in e}function Lp(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Ip(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function Q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Ip(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function zw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in Bd||ia())||Dp(e)||Array.isArray(e)&&e.every(zw))}function T0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function Y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(f.schedule(c),e()),l++,c(a)}const f={schedule:(c,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(c),x.has(c)||x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&S0.value&&S0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const X2=40;function Uw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=Y2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,X2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const v=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),v.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:$p,cancel:M4}=Uw(queueMicrotask,!1),{schedule:he,cancel:zr,state:Ge,steps:ef}=Uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let Rl;function Z2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(Ge.isProcessing||Vd.useManualTiming?Ge.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Z2)}},an={x:!1,y:!1};function Hw(){return an.x||an.y}function J2(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function eP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ww(e,t){const n=eP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function E0(e){return!(e.pointerType==="touch"||Hw())}function tP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{if(!E0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{E0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Kw=(e,t)=>t?e===t?!0:Kw(e,t.parentElement):!1,Vp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rP(e){return nP.has(e.tagName)||e.tabIndex!==-1}const wo=new WeakSet;function C0(e){return t=>{t.key==="Enter"&&e(t)}}function tf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=C0(()=>{if(wo.has(n))return;tf(n,"down");const i=C0(()=>{tf(n,"up")}),s=()=>tf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function k0(e){return Vp(e)&&!Hw()}function sP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{const l=a.currentTarget;if(!k0(a)||wo.has(l))return;wo.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!k0(h)||!wo.has(l))&&(wo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Kw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>iP(u,i)),!rP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const _0=30,oP=e=>!isNaN(parseFloat(e));class aP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Mp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return $w(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sa(e,t){return new aP(e,t)}const qw=y.createContext({strict:!1}),P0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zs={};for(const e in P0)zs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function lP(e){for(const t in e)zs[t]={...zs[t],...e[t]}}const uP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let Gw=e=>!gu(e);function cP(e){e&&(Gw=t=>t.startsWith("on")?!gu(t):e(t))}try{cP(require("@emotion/is-prop-valid").default)}catch{}function fP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Bp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zp=["initial",...Bp];function qu(e){return Ku(e.animate)||zp.some(t=>oa(e[t]))}function Qw(e){return!!(qu(e)||e.variants)}function hP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function pP(e){const{initial:t,animate:n}=hP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[A0(t),A0(n)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const mP=Symbol.for("motionComponentSymbol");function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ls(n)&&(n.current=r))},[t])}const Up=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yP="framerAppearId",Yw="data-"+Up(yP),Xw=y.createContext({});function vP(e,t,n,r,i){var x,b;const{visualElement:s}=y.useContext(Wu),o=y.useContext(qw),a=y.useContext(Hu),l=y.useContext(Rp).reducedMotion,u=y.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=u.current,c=y.useContext(Xw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&xP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Yw],m=y.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Lw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),$p.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function xP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ls(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function Zw(e){if(e)return e.options.allowProjection!==!1?e.projection:Zw(e.parent)}function wP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&lP(e);function s(a,l){let u;const f={...y.useContext(Rp),...a,layoutId:bP(a)},{isStatic:c}=f,d=pP(a),h=r(a,c);if(!c&&Ap){SP();const m=TP(f);u=m.MeasureLayout,d.visualElement=vP(i,h,f,t,m.ProjectionNode)}return w.jsxs(Wu.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,gP(h,d.visualElement,l),h,c,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[mP]=i,o}function bP({layoutId:e}){const t=y.useContext(_p).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){y.useContext(qw).strict}function TP(e){const{drag:t,layout:n}=zs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Jw=e=>t=>typeof t=="string"&&t.startsWith(e),Hp=Jw("--"),EP=Jw("var(--"),Wp=e=>EP(e)?CP.test(e.split("/*")[0].trim()):!1,CP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function kP(e){for(const t in e)aa[t]=e[t],Hp(t)&&(aa[t].isCSSVariable=!0)}const Ys=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Ys);function eb(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),tb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,er=(e,t,n)=>n>t?t:n<e?e:n,Xs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Xs,transform:e=>er(0,1,e)},ll={...Xs,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),W=_a("px"),_P=_a("vh"),PP=_a("vw"),R0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},AP={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W},RP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:la,originX:R0,originY:R0,originZ:W},O0={...Xs,transform:Math.round},Kp={...AP,...RP,zIndex:O0,size:W,fillOpacity:la,strokeOpacity:la,numOctaves:O0},OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jP=Ys.length;function NP(e,t,n){let r="",i=!0;for(let s=0;s<jP;s++){const o=Ys[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=tb(a,Kp[o]);if(!l){i=!1;const f=OP[o]||o;r+=`${f}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if($i.has(l)){o=!0;continue}else if(Hp(l)){i[l]=u;continue}else{const f=tb(u,Kp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=NP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${u} ${f}`}}const Gp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nb(e,t,n){for(const r in t)!it(t[r])&&!eb(r,n)&&(e[r]=t[r])}function MP({transformTemplate:e},t){return y.useMemo(()=>{const n=Gp();return qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DP(e,t){const n=e.style||{},r={};return nb(r,n,e),Object.assign(r,MP(e,t)),r}function FP(e,t){const n={},r=DP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qp(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const IP={offset:"stroke-dashoffset",array:"stroke-dasharray"},$P={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?IP:$P;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function j0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function BP(e,t,n){const r=j0(t,e.x,e.width),i=j0(n,e.y,e.height);return`${r} ${i}`}function Yp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},f,c){if(qp(e,u,c),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=BP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&VP(d,o,a,l,!1)}const rb=()=>({...Gp(),attrs:{}}),Xp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zP(e,t,n,r){const i=y.useMemo(()=>{const s=rb();return Yp(s,t,Xp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nb(s,e.style,e),i.style={...s,...i.style}}return i}function UP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qp(n)?zP:FP)(r,s,o,n),u=fP(r,typeof n=="string",e),f=n!==y.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=y.useMemo(()=>it(c)?c.get():c,[c]);return y.createElement(n,{...f,children:d})}}function N0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zp(e,t,n,r){if(typeof t=="function"){const[i,s]=N0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=N0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const zd=e=>Array.isArray(e),HP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WP=e=>zd(e)?e[e.length-1]||0:e;function Ol(e){const t=it(e)?e.get():e;return HP(t)?t.toValue():t}function KP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:qP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ib=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>KP(e,t,r,i);return n?s():Pp(s)};function qP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),u=Qw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const c=f?a:o;if(c&&typeof c!="boolean"&&!Ku(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=Zp(e,d[h]);if(m){const{transitionEnd:x,transition:b,...p}=m;for(const g in p){let v=p[g];if(Array.isArray(v)){const E=f?v.length-1:0;v=v[E]}v!==null&&(i[g]=v)}for(const g in x)i[g]=x[g]}}}return i}function Jp(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||eb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const GP={useVisualState:ib({scrapeMotionValuesFromProps:Jp,createRenderState:Gp})};function sb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ob(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ab=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lb(e,t,n,r){ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ab.has(i)?i:Up(i),t.attrs[i])}function ub(e,t,n){const r=Jp(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Ys.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const M0=["x","y","width","height","cx","cy","r"],QP={useVisualState:ib({scrapeMotionValuesFromProps:ub,createRenderState:rb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if($i.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<M0.length;a++){const l=M0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{sb(n,r),he.render(()=>{Yp(r,i,Xp(n.tagName),e.transformTemplate),lb(n,r)})})}})};function YP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qp(r)?QP:GP,preloadedFeatures:e,useRender:UP(i),createVisualElement:t,Component:r};return wP(o)}}function ua(e,t,n){const r=e.getProps();return Zp(r,t,n!==void 0?n:r.custom,e)}const cb=new Set(["width","height","top","left","right","bottom",...Ys]);function XP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function ZP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=WP(s[o]);XP(e,o,a)}}function JP(e){return!!(it(e)&&e.add)}function Ud(e,t){const n=e.getValue("willChange");if(JP(n))return n.add(t);if(!n&&Vd.WillChange){const r=new Vd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fb(e){return e.props[Yw]}const db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=db(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>eA&&++a<tA);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>nA(s,0,1,e,n);return s=>s===0||s===1?s:db(i(s),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pb=e=>t=>1-e(1-t),mb=Pa(.33,1.53,.69,.99),em=pb(mb),gb=hb(em),yb=e=>(e*=2)<1?.5*em(e):.5*(2-Math.pow(2,-10*(e-1))),tm=e=>1-Math.sin(Math.acos(e)),vb=pb(tm),xb=hb(tm),wb=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wb(e):!0}const Oo=e=>Math.round(e*1e5)/1e5,nm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iA(e){return e==null}const sA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rm=(e,t)=>n=>!!(typeof n=="string"&&sA.test(n)&&n.startsWith(e)||t&&!iA(n)&&Object.prototype.hasOwnProperty.call(n,t)),bb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(nm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oA=e=>er(0,255,e),nf={...Xs,transform:e=>Math.round(oA(e))},ui={test:rm("rgb","red"),parse:bb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+nf.transform(e)+", "+nf.transform(t)+", "+nf.transform(n)+", "+Oo(la.transform(r))+")"};function aA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Hd={test:rm("#"),parse:aA,transform:ui.transform},us={test:rm("hsl","hue"),parse:bb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Oo(t))+", "+jn.transform(Oo(n))+", "+Oo(la.transform(r))+")"},nt={test:e=>ui.test(e)||Hd.test(e)||us.test(e),parse:e=>ui.test(e)?ui.parse(e):us.test(e)?us.parse(e):Hd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):us.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nm))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const Sb="number",Tb="color",cA="var",fA="var(",D0="${}",dA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(dA,l=>(nt.test(l)?(r.color.push(s),i.push(Tb),n.push(nt.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(cA),n.push(l)):(r.number.push(s),i.push(Sb),n.push(parseFloat(l))),++s,D0)).split(D0);return{values:n,split:a,indexes:r,types:i}}function Eb(e){return ca(e).values}function Cb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Sb?s+=Oo(i[o]):a===Tb?s+=nt.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=Eb(e);return Cb(e)(t.map(hA))}const Ur={test:uA,parse:Eb,createTransformer:Cb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nm)||[];if(!r)return e;const i=n.replace(r,"");let s=mA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Wd={...Ur,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},vA={...Kp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:Wd,WebkitFilter:Wd},kb=e=>vA[e];function _b(e,t){let n=kb(e);return n!==Wd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xA=new Set(["auto","none","0"]);function wA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!xA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_b(n,i)}const ci=e=>e*180/Math.PI,Kd=e=>{const t=ci(Math.atan2(e[1],e[0]));return qd(t)},bA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Kd,rotateZ:Kd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qd=e=>(e=e%360,e<0&&(e+=360),e),F0=Kd,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:I0,scale:e=>(L0(e)+I0(e))/2,rotateX:e=>qd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>qd(ci(Math.atan2(-e[2],e[0]))),rotateZ:F0,rotate:F0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $0(e){return e.includes("scale")?1:0}function Gd(e,t){if(!e||e==="none")return $0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bA,i=a}if(!i)return $0(t);const s=r[t],o=i[1].split(",").map(EA);return typeof s=="function"?s(o):o[s]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gd(n,t)};function EA(e){return parseFloat(e.trim())}const V0=e=>e===Xs||e===W,CA=new Set(["x","y","z"]),kA=Ys.filter(e=>!CA.has(e));function _A(e){const t=[];return kA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Us={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Gd(t,"x"),y:(e,{transform:t})=>Gd(t,"y")};Us.translateX=Us.x;Us.translateY=Us.y;const Si=new Set;let Qd=!1,Yd=!1;function Pb(){if(Yd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=_A(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yd=!1,Qd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Ab(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yd=!0)})}function PA(){Ab(),Pb()}class im{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Qd||(Qd=!0,he.read(Ab),he.resolveKeyframes(Pb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ob(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rb(o)?parseFloat(o):o}return Wp(i)?Ob(i,t,n+1):i}const jb=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},Nb=[Xs,W,jn,ur,PP,_P,OA],B0=e=>Nb.find(jb(e));class Mb extends im{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Wp(u))){const f=Ob(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!cb.has(r)||t.length!==2)return;const[i,s]=t,o=B0(i),a=B0(s);if(o!==a)if(V0(o)&&V0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)rA(t[i])&&r.push(i);r.length&&wA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Us[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Us[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function jA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function NA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=z0(i,t),a=z0(s,t);return!o||!a?!1:jA(e)||(n==="spring"||Fp(n))&&r}const MA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(MA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const DA=40;class Db{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>DA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!NA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function rf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function FA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=rf(l,a,e+1/3),s=rf(l,a,e),o=rf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const sf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LA=[Hd,ui,us],IA=e=>LA.find(t=>t.test(e));function U0(e){const t=IA(e);if(!t)return!1;let n=t.parse(e);return t===us&&(n=FA(n)),n}const H0=(e,t)=>{const n=U0(e),r=U0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=sf(n.red,r.red,s),i.green=sf(n.green,r.green,s),i.blue=sf(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},$A=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce($A),Xd=new Set(["none","hidden"]);function VA(e,t){return Xd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>be(e,t,n)}function sm(e){return typeof e=="number"?BA:typeof e=="string"?Wp(e)?yu:nt.test(e)?H0:HA:Array.isArray(e)?Fb:typeof e=="object"?nt.test(e)?H0:zA:yu}function Fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>sm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function zA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function UA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const HA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Xd.has(e)&&!i.values.length||Xd.has(t)&&!r.values.length?VA(e,t):Aa(Fb(UA(r,i),i.values),n):yu(e,t)};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):sm(e)(e,t)}const WA=5;function Ib(e,t,n){const r=Math.max(t-WA,0);return $w(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},of=.001;function KA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=er(Ce.minDamping,Ce.maxDamping,o),e=er(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=Zd(u,o),m=Math.exp(-c);return of-d/h*m},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),x=Zd(Math.pow(u,2),o);return(-i(u)+of>0?-1:1)*((d-h)*m)/x}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-of+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=GA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const qA=12;function GA(e,t,n){let r=n;for(let i=1;i<qA;i++)r=r-e(r)/t(r);return r}function Zd(e,t){return e*Math.sqrt(1-t*t)}const QA=["duration","bounce"],YA=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function XA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!W0(e,YA)&&W0(e,QA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*er(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:f,duration:c,velocity:d,isResolvedFromDuration:h}=XA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,x=u/(2*Math.sqrt(l*f)),b=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(b)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let v;if(x<1){const S=Zd(p,x);v=C=>{const k=Math.exp(-x*p*C);return o-k*((m+x*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(x===1)v=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(x*x-1);v=C=>{const k=Math.exp(-x*p*C),P=Math.min(S*C,300);return o-k*((m+x*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=v(S);if(h)a.done=S>=c;else{let k=0;x<1&&(k=S===0?An(m):Ib(v,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Ip(E),mu),C=Vw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=Q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const b=c+x,p=o===void 0?b:o(b);p!==b&&(x=p-c);const g=P=>-x*Math.exp(-P/r),v=P=>p+g(P),E=P=>{const j=g(P),N=v(P);d.done=Math.abs(j)<=u,d.value=d.done?p:N};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Ib(v,P,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const ZA=Pa(.42,0,1,1),JA=Pa(0,0,.58,1),$b=Pa(.42,0,.58,1),eR=e=>Array.isArray(e)&&typeof e[0]!="number",q0={linear:Zt,easeIn:ZA,easeInOut:$b,easeOut:JA,circIn:tm,circInOut:xb,circOut:vb,backIn:em,backInOut:gb,backOut:mb,anticipate:yb},G0=e=>{if(Dp(e)){$d(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return $d(q0[e]!==void 0),q0[e];return e};function tR(e,t,n){const r=[],i=n||Lb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Zt:t;a=Aa(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if($d(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tR(t,r,i),l=a.length,u=f=>{if(o&&f<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(f<e[c+1]);c++);const d=ra(e[c],e[c+1],f);return a[c](d)};return n?f=>u(er(e[0],e[s-1],f)):u}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||$b).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=eR(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},lR={decay:K0,inertia:K0,tween:xu,keyframes:xu,spring:vu},uR=e=>e/100;class om extends Db{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||im,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Fp(n)?n:lR[n]||xu;let l,u;a!==xu&&typeof t[0]!="number"&&(l=Aa(uR,Lb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Ip(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let v=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/c;let j=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(N=1-N,x&&(N-=x/c)):m==="mirror"&&(E=o)),v=er(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(v);a&&(S.value=a(S.value));let{done:C}=S;!g&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),b&&b(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const cR=new Set(["opacity","clipPath","filter","transform"]),fR=Np(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,dR=2e4;function hR(e){return Fp(e.type)||e.type==="spring"||!zw(e.ease)}function pR(e,t){const n=new om({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<dR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const Vb={anticipate:yb,backInOut:gb,circInOut:xb};function mR(e){return e in Vb}class Q0 extends Db{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Mb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&mR(s)&&(s=Vb[s]),hR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...x}=this.options,b=pR(t,x);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=G2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(T0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Gu(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;T0(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,m=new om({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=An(this.time);u.setWithVelocity(m.sample(x-wu).value,m.sample(x).value,wu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return fR()&&r&&cR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const gR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vR={type:"keyframes",duration:.8},xR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?vR:$i.has(e)?e.startsWith("scale")?yR(t[1]):gR:xR;function bR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const am=(e,t,n,r={},i,s)=>o=>{const a=Lp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bR(a)||(f={...f,...wR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let c=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(c=!0)),f.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new W2([])}return!s&&Q0.supports(f)?new Q0(f):new om(f)};function SR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const c=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||u&&SR(u,f))continue;const h={delay:n,...Lp(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=fb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}Ud(e,f),c.start(am(f,c,d,e.shouldReduceMotion&&cb.has(f)?{type:!1}:h,e,m));const x=c.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&ZP(e,o)})}),l}function Jd(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Bb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return TR(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,f]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function TR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(ER).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(Jd(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function ER(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Jd(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Jd(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const kR=zp.length;function Ub(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ub(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=zp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const _R=[...Bp].reverse(),PR=Bp.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=Y0(),r=!0;const i=l=>(u,f)=>{var d;const c=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...x}=c;u={...u,...x,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=Ub(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<PR;b++){const p=_R[b],g=n[p],v=u[p]!==void 0?u[p]:f[p],E=oa(v),S=p===l?g.isActive:null;S===!1&&(m=b);let C=v===f[p]&&v!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Ku(v)||typeof v=="boolean")continue;const k=OR(g.prevProp,v);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(v)?v:[v];let I=N.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let B=!1;zd(O)&&zd(L)?B=!zb(O,L):B=O!==L,B?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=v,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&c.push(...N.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const b={};if(typeof u.initial!="boolean"){const p=ua(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(b.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let x=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let NR=0;class MR extends Gr{constructor(){super(...arguments),this.id=NR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DR={animation:{Feature:jR},exit:{Feature:MR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const FR=e=>t=>Vp(t)&&e(t,Ra(t));function jo(e,t,n,r){return fa(e,t,FR(n),r)}function Hb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,$R=1-Wb,VR=1+Wb,Kb=.01,BR=0-Kb,zR=0+Kb;function ct(e){return e.max-e.min}function UR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=VR||isNaN(e.scale))&&(e.scale=1),(e.translate>=BR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function No(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function HR(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Mo(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}const ey=()=>({translate:0,scale:1,origin:0,originPoint:0}),cs=()=>({x:ey(),y:ey()}),ty=()=>({min:0,max:0}),Pe=()=>({x:ty(),y:ty()});function Ht(e){return[e("x"),e("y")]}function af(e){return e===void 0||e===1}function eh({scale:e,scaleX:t,scaleY:n}){return!af(e)||!af(t)||!af(n)}function ni(e){return eh(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ry(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function th(e,t=0,n=1,r,i){e.min=ry(e.min,t,n,r,i),e.max=ry(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){th(e.x,t.translate,t.scale,t.originPoint),th(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,sy=1.0000000000001;function WR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&ni(s.latestValues)&&ds(e,s.latestValues))}t.x<sy&&t.x>iy&&(t.x=1),t.y<sy&&t.y>iy&&(t.y=1)}function fs(e,t){e.min=e.min+t,e.max=e.max+t}function oy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);th(e,t,n,s,r)}function ds(e,t){oy(e.x,t.x,t.scaleX,t.scale,t.originX),oy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Hb(IR(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=Qb(e,n),{scroll:i}=t;return i&&(fs(r.x,i.offset.x),fs(r.y,i.offset.y)),r}const Yb=({current:e})=>e?e.ownerDocument.defaultView:null,ay=(e,t)=>Math.abs(e-t);function qR(e,t){const n=ay(e.x,t.x),r=ay(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=uf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=qR(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=c,{timestamp:x}=Ge;this.history.push({...m,timestamp:x});const{onStart:b,onMove:p}=this.handlers;d||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=lf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=uf(c.type==="pointercancel"?this.lastMoveEventInfo:lf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!Vp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=lf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,uf(a,this.history)),this.removeListeners=Aa(jo(this.contextWindow,"pointermove",this.handlePointerMove),jo(this.contextWindow,"pointerup",this.handlePointerUp),jo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function lf(e,t){return t?{point:t(e.point)}:e}function ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uf({point:e},t){return{point:e,delta:ly(e,Zb(t)),offset:ly(e,GR(t)),velocity:QR(t,.1)}}function GR(e){return e[0]}function Zb(e){return e[e.length-1]}function QR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function uy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function XR(e,{top:t,left:n,bottom:r,right:i}){return{x:uy(e.x,n,i),y:uy(e.y,t,r)}}function cy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZR(e,t){return{x:cy(e.x,t.x),y:cy(e.y,t.y)}}function JR(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),er(0,1,n)}function eO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nh=.35;function tO(e=nh){return e===!1?e=0:e===!0&&(e=nh),{x:fy(e,"left","right"),y:fy(e,"top","bottom")}}function fy(e,t,n){return{min:dy(e,t),max:dy(e,n)}}function dy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;class rO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(b=>{let p=this.getAxisMotionValue(b).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[b];v&&(p=ct(v)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),Ud(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=iO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),x&&x(f,c)},a=(f,c)=>this.stop(f,c),l=()=>Ht(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Xb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Yb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XR(r.layoutBox,t):this.constraints=!1,this.elastic=tO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=ZR(i.layout.layoutBox,s);if(n){const a=n(LR(o));this.hasMutatedConstraints=!!a,a&&(o=Hb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ht(f=>{if(!ul(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ud(this.visualElement,t),r.start(am(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ht(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ls(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=JR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ht(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(be(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=jo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ls(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ht(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=nh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sO extends Gr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class oO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new Xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hy(t),onStart:hy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=jo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function py(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const co={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=py(e,t.target.x),r=py(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class lO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;kP(uO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$p.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Jb(e){const[t,n]=Iw(),r=y.useContext(_p);return w.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Xw),isPresent:t,safeToRemove:n})}const uO={borderRadius:{...co,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:co,borderTopRightRadius:co,borderBottomLeftRadius:co,borderBottomRightRadius:co,boxShadow:aO};function cO(e,t,n){const r=it(e)?e:sa(e);return r.start(am("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Op(this.children,t),this.isDirty=!0}remove(t){jp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}}function pO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const eS=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=eS.length,my=e=>typeof e=="string"?parseFloat(e):e,gy=e=>typeof e=="number"||W.test(e);function gO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,yO(r)),e.opacityExit=be(t.opacity??1,0,vO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<mO;o++){const a=`border${eS[o]}Radius`;let l=yy(t,a),u=yy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||gy(l)===gy(u)?(e[a]=Math.max(be(my(l),my(u),r),0),(jn.test(u)||jn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function yy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=tS(0,.5,vb),vO=tS(.5,.95,Zt);function tS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function vy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){vy(e.x,t.x),vy(e.y,t.y)}function xy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function xO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=wy(e.min,t,n,a,i),e.max=wy(e.max,t,n,a,i)}function by(e,t,[n,r,i],s,o){xO(e,t[n],t[r],t[i],t.scale,s,o)}const wO=["x","scaleX","originX"],bO=["y","scaleY","originY"];function Sy(e,t,n,r){by(e.x,t,wO,n?n.x:void 0,r?r.x:void 0),by(e.y,t,bO,n?n.y:void 0,r?r.y:void 0)}function Ty(e){return e.translate===0&&e.scale===1}function nS(e){return Ty(e.x)&&Ty(e.y)}function Ey(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rS(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function ky(e){return ct(e.x)/ct(e.y)}function _y(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TO{constructor(){this.members=[]}add(t){Op(this.members,t),t.scheduleRender()}remove(t){if(jp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const cf=["","X","Y","Z"],CO={visibility:"hidden"},Py=1e3;let kO=0;function ff(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iS(r)}function sS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(MO),this.nodes.forEach(DO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=pO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!rS(this.targetLayout,m),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,v);const E={...Lp(x,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(FO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ay);return}this.isUpdating||this.nodes.forEach(jO),this.isUpdating=!1,this.nodes.forEach(NO),this.nodes.forEach(_O),this.nodes.forEach(PO),this.clearAllSnapshots();const a=On.now();Ge.delta=er(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,ef.update.process(Ge),ef.preRender.process(Ge),ef.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$p.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(zO))){const{scroll:f}=this.root;f&&(fs(a.x,f.offset.x),fs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:c,options:d}=f;f!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&zt(a,o),fs(a.x,c.offset.x),fs(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();zt(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ds(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&ds(l,f.latestValues)}return ni(this.latestValues)&&ds(l,this.latestValues),l}removeTransform(o){const a=Pe();zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ni(u.latestValues))continue;eh(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),Sy(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Sy(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:c}=this.options;if(!(!this.layout||!(f||c))){if(this.resolvedRelativeTargetAt=Ge.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||eh(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ge.timestamp&&(l=!1),l)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,d=this.treeScale.y;WR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xy(this.prevProjectionDelta.x,this.projectionDelta.x),xy(this.prevProjectionDelta.y,this.projectionDelta.y)),No(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!_y(this.projectionDelta.x,this.prevProjectionDelta.x)||!_y(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cs(),this.projectionDelta=cs(),this.projectionDeltaWithTransform=cs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some($O));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Oy(c.x,o.x,S),Oy(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IO(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&SO(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Pe()),zt(v,this.relativeTarget)),x&&(this.animationValues=f,gO(f,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=cO(0,Py,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&oS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const c=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}zt(a,l),ds(a,f),No(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ff("z",o,u,this.animationValues);for(let f=0;f<cf.length;f++)ff(`rotate${cf[f]}`,o,u,this.animationValues),ff(`skew${cf[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=EO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:c,y:d}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:b}=aa[h],p=a.transform==="none"?f[h]:m(f[h],u);if(x){const g=x.length;for(let v=0;v<g;v++)a[x[v]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ay),this.root.sharedNodes.clear()}}}function _O(e){e.updateLayout()}function PO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(d);d.min=r[c].min,d.max=d.min+h}):oS(s,t.layoutBox,r)&&Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=cs();No(a,r,t.layoutBox);const l=cs();o?No(l,e.applyTransform(i,!0),t.measuredBox):No(l,r,t.layoutBox);const u=!nS(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),rS(m,x)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function Ay(e){e.clearMeasurements()}function jO(e){e.isLayoutDirty=!1}function NO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function MO(e){e.resolveTargetDelta()}function DO(e){e.calcProjection()}function FO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function IO(e,t,n,r){jy(e.x,t.x,n.x,r),jy(e.y,t.y,n.y,r)}function $O(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},Ny=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),My=Ny("applewebkit/")&&!Ny("chrome/")?Math.round:Zt;function Dy(e){e.min=My(e.min),e.max=My(e.max)}function BO(e){Dy(e.x),Dy(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!UR(ky(t),ky(n),.2)}function zO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const UO=sS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),df={current:void 0},aS=sS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!df.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),df.current=e}return df.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HO={pan:{Feature:oO},drag:{Feature:sO,ProjectionNode:aS,MeasureLayout:Jb}};function Fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=tP(t,(n,r)=>(Fy(this.node,r,"Start"),i=>Fy(this.node,i,"End"))))}unmount(){}}class KO extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ly(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=sP(t,(n,r)=>(Ly(this.node,r,"Start"),(i,{success:s})=>Ly(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rh=new WeakMap,hf=new WeakMap,GO=e=>{const t=rh.get(e.target);t&&t(e)},QO=e=>{e.forEach(GO)};function YO({root:e,...t}){const n=e||document;hf.has(n)||hf.set(n,{});const r=hf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(QO,{root:e,...t})),r[i]}function XO(e,t,n){const r=YO(t);return rh.set(e,n),r.observe(e),()=>{rh.delete(e),r.unobserve(e)}}const ZO={some:0,all:1};class JO extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZO[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ej(t,n))&&this.startObserver()}unmount(){}}function ej({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tj={inView:{Feature:JO},tap:{Feature:qO},focus:{Feature:KO},hover:{Feature:WO}},nj={layout:{ProjectionNode:aS,MeasureLayout:Jb}},ih={current:null},lS={current:!1};function rj(){if(lS.current=!0,!!Ap)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ih.current=e.matches;e.addListener(t),t()}else ih.current=!1}const ij=[...Nb,nt,Ur],sj=e=>ij.find(jb(e)),oj=new WeakMap;function aj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(it(i))e.addValue(r,i);else if(it(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=im,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&it(m)&&m.set(l[h],!1)}}mount(t){this.current=t,oj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),lS.current||rj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ih.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$i.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zs){const n=zs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Iy.length;r++){const i=Iy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rb(r)||wb(r))?r=parseFloat(r):!sj(r)&&Ur.test(n)&&(r=_b(t,n)),this.setBaseTarget(t,it(r)?r.get():r)),it(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Zp(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!it(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class uS extends lj{constructor(){super(...arguments),this.KeyframeResolver=Mb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uj(e){return window.getComputedStyle(e)}class cj extends uS{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(t,n){if($i.has(n))return TA(t,n);{const r=uj(t),i=(Hp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jp(t,n,r)}}class fj extends uS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&sb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=kb(n);return r&&r.default||0}return n=ab.has(n)?n:Up(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ub(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Yp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){lb(t,n,r,i)}mount(t){this.isSVGTag=Xp(t.tagName),super.mount(t)}}const dj=(e,t)=>Qp(e)?new fj(t):new cj(t,{allowProjection:e!==y.Fragment}),hj=YP({...DR,...tj,...HO,...nj},dj),Re=dP(hj),pj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),At=e=>{const[t,n]=e.split("-");return pj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const cS=y.createContext({}),mj={[K.Background]:"",[K.Border]:"initial",[K.TooltipText]:At("blue-700"),[K.TooltipBackground]:At("blue-100"),[K.TooltipBorder]:At("blue-500"),[K.HeaderBackground]:At("blue-600"),[K.HeaderBorder]:"initial",[K.HeaderText]:"white",[K.FooterBackground]:"",[K.FooterBorder]:"",[K.FooterText]:"",[K.MessageAdminBackground]:"",[K.MessageAdminText]:"",[K.MessageVisitorBackground]:"",[K.MessageVisitorText]:"",[K.GreeterBackground]:"white",[K.GreeterText]:At("slate-700"),[K.GreeterBorder]:At("slate-200"),[K.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[K.GreeterTopText]:"white",[K.GreeterButtonBackground]:At("indigo-600"),[K.GreeterButtonText]:At("white"),[K.ButtonBackground]:At("indigo-600"),[K.ButtonText]:At("white"),[K.InputBackground]:At("white"),[K.InputText]:At("slate-800"),[K.InputBorder]:At("slate-200")},gj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},yj=e=>{const t={...mj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function vj({children:e,widget:t}){const n=yj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>gj[r];return w.jsx(cS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const nr=()=>y.useContext(cS);function Gn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=K.ButtonText,bgKey:u=K.ButtonBackground,animations:f={},withoutTheming:c,...d}){const h=nr();return w.jsx(Re.button,{type:t,className:Ne("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,w0[n]&&w0[n][r],L2[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:h.getColor(l),backgroundColor:h.getColor(u),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function De(){}De.Home=function(t){return w.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};De.Chat=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Menu=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});De.MessageTyping=({className:e="size-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Check=function(t){return w.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};De.Website=function(t){return w.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),w.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};De.ArrowDown=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});De.XCircle=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});De.X=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});De.PaperAirplane=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Nl=Object.create(null);Object.keys(Mn).forEach(e=>{Nl[Mn[e]]=e});const sh={type:"error",data:"parser error"},fS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dS=typeof ArrayBuffer=="function",hS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lm=({type:e,data:t},n,r)=>fS&&t instanceof Blob?n?r(t):$y(t,r):dS&&(t instanceof ArrayBuffer||hS(t))?n?r(t):$y(new Blob([t]),r):r(Mn[e]+(t||"")),$y=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pf;function xj(e,t){if(fS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vy).then(t);if(dS&&(e.data instanceof ArrayBuffer||hS(e.data)))return t(Vy(e.data));lm(e,!1,n=>{pf||(pf=new TextEncoder),t(pf.encode(n))})}const By="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<By.length;e++)bo[By.charCodeAt(e)]=e;const wj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)s=bo[e.charCodeAt(r)],o=bo[e.charCodeAt(r+1)],a=bo[e.charCodeAt(r+2)],l=bo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},bj=typeof ArrayBuffer=="function",um=(e,t)=>{if(typeof e!="string")return{type:"message",data:pS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sj(e.substring(1),t)}:Nl[n]?e.length>1?{type:Nl[n],data:e.substring(1)}:{type:Nl[n]}:sh},Sj=(e,t)=>{if(bj){const n=wj(e);return pS(n,t)}else return{base64:!0,data:e}},pS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mS="",Tj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{lm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mS))})})},Ej=(e,t)=>{const n=e.split(mS),r=[];for(let i=0;i<n.length;i++){const s=um(n[i],t);if(r.push(s),s.type==="error")break}return r};function Cj(){return new TransformStream({transform(e,t){xj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function kj(e,t){mf||(mf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(sh);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(um(s?l:mf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(sh);break}}}})}const gS=4;function Me(e){if(e)return _j(e)}function _j(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pj="arraybuffer";function yS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Aj=Qt.setTimeout,Rj=Qt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Aj.bind(Qt),e.clearTimeoutFn=Rj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Oj=1.33;function jj(e){return typeof e=="string"?Nj(e):Math.ceil((e.byteLength||e.size)*Oj)}function Nj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Mj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Fj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class cm extends Me{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Fj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=um(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Mj(t);return n.length?"?"+n:""}}class Lj extends cm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ej(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xS=!1;try{xS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ij=xS;function $j(){}class Vj extends Lj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nn extends Me{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Nn.requestsCount++,Nn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$j,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Nn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Nn.requestsCount=0;Nn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zy);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,zy,!1)}}function zy(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const Bj=function(){const e=wS({xdomain:!1});return e&&e.responseType!==null}();class zj extends Vj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(wS,this.uri(),t)}}function wS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ij))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uj extends cm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=bS?{}:yS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;lm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gf=Qt.WebSocket||Qt.MozWebSocket;class Hj extends Uj{createSocket(t,n,r){return bS?new gf(t,n,r):n?new gf(t,n):new gf(t)}doWrite(t,n){this.ws.send(n)}}class Wj extends cm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=kj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Cj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Kj={websocket:Hj,webtransport:Wj,polling:zj},qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function oh(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qj.exec(e||""),s={},o=14;for(;o--;)s[Gj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Qj(s,s.path),s.queryKey=Yj(s,s.query),s}function Qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const ah=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ml=[];ah&&addEventListener("offline",()=>{Ml.forEach(e=>e())},!1);class Lr extends Me{constructor(t,n){if(super(),this.binaryType=Pj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=oh(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=oh(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dj(this.opts.query)),ah&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ml.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=jj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ah&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ml.indexOf(this._offlineEventListener);r!==-1&&Ml.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=gS;class Xj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zj=class extends Xj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Kj[i]).filter(i=>!!i)),super(t,r)}};function Jj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=oh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const eN=typeof ArrayBuffer=="function",tN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,SS=Object.prototype.toString,nN=typeof Blob=="function"||typeof Blob<"u"&&SS.call(Blob)==="[object BlobConstructor]",rN=typeof File=="function"||typeof File<"u"&&SS.call(File)==="[object FileConstructor]";function fm(e){return eN&&(e instanceof ArrayBuffer||tN(e))||nN&&e instanceof Blob||rN&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(fm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function iN(e){const t=[],n=e.data,r=e;return r.data=lh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function lh(e,t){if(!e)return e;if(fm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=lh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=lh(e[r],t));return n}return e}function sN(e,t){return e.data=uh(e.data,t),delete e.attachments,e}function uh(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=uh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=uh(e[n],t));return e}const oN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],aN=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class lN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=iN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Uy(e){return Object.prototype.toString.call(e)==="[object Object]"}class dm extends Me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new uN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(fm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(dm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Uy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Uy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oN.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:dm,Encoder:lN,get PacketType(){return te},protocol:aN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TS extends Me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fn(t,"open",this.onopen.bind(this)),fn(t,"packet",this.onpacket.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(fN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,c=n.pop();this._registerAckCallback(f,c),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Zs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zs.prototype.reset=function(){this.attempts=0};Zs.prototype.setMin=function(e){this.ms=e};Zs.prototype.setMax=function(e){this.max=e};Zs.prototype.setJitter=function(e){this.jitter=e};class ch extends Me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=fn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=fn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new TS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fo={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=fo[i]&&s in fo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new ch(r,t):(fo[i]||(fo[i]=new ch(r,t)),l=fo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:ch,Socket:TS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},ES=y.createContext(null),Vi=()=>y.useContext(ES),dN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Fl(Ek,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});c.on("error",d=>{console.error("Websocket error",d)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,d)=>{t&&t.on(c,d)},u=(c,d)=>{t&&t.off(c,d)},f=(c,d,h)=>{t&&t.emit(c,d,h)};return w.jsx(ES.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),ut=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(ut||{});const hm=e=>{const t=_w(),n=(r,i)=>{var o;const s=((o=k4.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},hN=()=>xw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),pN=e=>Ea(`clients/${e}/chats`),fh=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),mN=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),gN=()=>xw({mutationFn:e=>mN(e.rating,e.comment)}),CS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},pm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function kS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=tn(),r=nr();return w.jsxs(Re.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ne("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(K.TooltipBackground),color:r.getColor(K.TooltipText)},children:[w.jsx(Re.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(K.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),w.jsx("div",{className:Ne("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const yN="/notify.mp3",yf=async()=>{await new Audio(yN).play()};function vN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Vi(),{isHaveChat:i,open:s}=tn(),[o,a]=y.useState(!0),[l,u]=y.useState(0),[f,c]=y.useState(null),d=(h,m)=>{if(f&&clearInterval(f),h||!i||m===0||Number.isNaN(m)){window.document.title=n,c(null);return}const x=setInterval(()=>{if(h||!i||m===0||Number.isNaN(m)){window.document.title=n,clearInterval(x),c(null);return}const b=`${m} Yeni mesajınız var! - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return c(x),()=>{clearInterval(x),c(null)}};return y.useEffect(()=>d(s&&o,l),[l,s,o]),y.useEffect(()=>{const h=()=>{a(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",h,!1),()=>{document.removeEventListener("visibilitychange",h)}},[]),y.useEffect(()=>{if(!r||!i||s&&o)return;const h=()=>{!i||s&&o||(u(m=>m+1),yf())};return r.on(ut.MessageAgentCreate,h),r.on(ut.ChatUserAssignee,yf),()=>{r.off(ut.MessageAgentCreate,h),r.off(ut.ChatUserAssignee,yf)}},[r,i,s,o]),s?null:!i||l===0?t?e:null:w.jsx(kS,{text:"Yeni mesajlar var!"})}function xN({children:e,defaultOpen:t,border:n}){var p,g,v,E;const r=Vi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=hm(),c=ka(),d=nr(),h=pm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},b=()=>{s(!1),o(!1),fh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(ut.Banned,b),()=>{r.off(ut.Banned,b)}},[]),w.jsx("section",{className:"relative w-full h-full",children:w.jsxs(ji,{children:[i&&w.jsx(Re.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"21rem",height:h?"":((E=(v=l==null?void 0:l.appearance)==null?void 0:v.design)==null?void 0:E.height)||"30rem",left:h?"0":"",borderColor:d.getColor(K.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:Ne("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),w.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:w.jsxs(ji,{children:[w.jsx(vN,{fallback:w.jsx(kS,{}),fallbackOpen:u}),!i&&w.jsxs(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[w.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ne("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(K.ButtonBackground)}}),w.jsx(De.Chat,{className:"size-7"})]}),i&&!h&&w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function _S(e){const{widget:t}=tn();return w.jsx(vj,{widget:t,children:w.jsx(xN,{...e})})}function Bi(e){this._maxSize=e,this.clear()}Bi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Bi.prototype.get=function(e){return this._values[e]};Bi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var wN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,PS=/^\d+$/,bN=/^\d/,SN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,TN=/^\s*(['"]?)(.*?)(\1)\s*$/,mm=512,Hy=new Bi(mm),Wy=new Bi(mm),Ky=new Bi(mm),Ti={Cache:Bi,split:dh,normalizePath:vf,setter:function(e){var t=vf(e);return Wy.get(e)||Wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=vf(e);return Ky.get(e)||Ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(gm(n)||PS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){EN(Array.isArray(e)?e:dh(e),t,n)}};function vf(e){return Hy.get(e)||Hy.set(e,dh(e).map(function(t){return t.replace(TN,"$2")}))}function dh(e){return e.match(wN)||[""]}function EN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(_N(i)&&(i='"'+i+'"'),a=gm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function gm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function CN(e){return e.match(bN)&&!e.match(PS)}function kN(e){return SN.test(e)}function _N(e){return!gm(e)&&(CN(e)||kN(e))}const PN=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(PN)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),ym=(e,t)=>Xu(e).join(t).toLowerCase(),AS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),AN=e=>Zu(AS(e)),RN=e=>ym(e,"_"),ON=e=>ym(e,"-"),jN=e=>Zu(ym(e," ")),NN=e=>Xu(e).map(Zu).join(" ");var xf={words:Xu,upperFirst:Zu,camelCase:AS,pascalCase:AN,snakeCase:RN,kebabCase:ON,sentenceCase:jN,titleCase:NN},vm={exports:{}};vm.exports=function(e){return RS(MN(e),e)};vm.exports.array=RS;function RS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=DN(t),a=FN(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var m=h[--f];l(m,a.get(m),c)}while(f);c.delete(u)}r[--n]=u}}}function MN(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function DN(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function FN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var LN=vm.exports;const IN=Ws(LN),$N=Object.prototype.toString,VN=Error.prototype.toString,BN=RegExp.prototype.toString,zN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",UN=/^Symbol\((.*)\)(.*)$/;function HN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return HN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zN.call(e).replace(UN,"Symbol($1)");const r=$N.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+VN.call(e)+"]":r==="RegExp"?BN.call(e):null}function Ir(e,t){let n=qy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=qy(this[r],t);return s!==null?s:i},2)}function OS(e){return e==null?[]:[].concat(e)}let jS,NS,MS,WN=/\$\{\s*(\w+)\s*\}/g;jS=Symbol.toStringTag;class Gy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[jS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],OS(t).forEach(s=>{if(bt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}NS=Symbol.hasInstance;MS=Symbol.toStringTag;class bt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(WN,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Gy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[MS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,bt)}static[NS](t){return Gy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},gt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},KN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},qN={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},GN={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},QN={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return bt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:gt,number:KN,date:hh,object:Il,array:GN,boolean:qN,tuple:QN});const xm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var u;let f=o(...a)?i:s;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!xm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class zi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}zi.prototype.__isYupRef=!0;const fi=e=>e==null;function Qi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return zi.isRef(I)?I.getValue(n,m,x):I}function v(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},c,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new bt(bt.formatError(I.message||d,re),n,re.path,I.type||u,re.disableStackTrace);return ie.params=re,ie}const E=b?a:l;let S={path:r,parent:m,type:u,from:i.from,createError:v,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(v())},k=I=>{bt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var N;if(j=f.call(S,n,S),typeof((N=j)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function YN(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(zi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function hs(e,t=new Map){if(xm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=hs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,hs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(hs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=hs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=hs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
95
+ `),()=>{document.head.removeChild(h)}},[t]),w.jsx(L2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const $2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=_p(V2),u=y.useId();let f=!0,c=y.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(c={...c}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=w.jsx(I2,{isPresent:n,anchorX:a,children:e})),w.jsx(Hu.Provider,{value:c,children:e})};function V2(){return new Map}function Lw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function w0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const ji=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Lw(o),f=y.useMemo(()=>w0(e),[e]),c=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=_p(()=>new Map),[v,b]=y.useState(f),[p,g]=y.useState(f);Fw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const x=[];if(f!==v){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);c.includes(P)||(S.splice(C,0,k),x.push(k))}return s==="wait"&&x.length&&(S=x),g(w0(S)),b(f),null}const{forceRender:E}=y.useContext(kp);return w.jsx(w.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||c.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(N=>{N||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(u==null||u()),r&&r())};return w.jsx($2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Rp(e,t){e.indexOf(t)===-1&&e.push(t)}function Op(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Id=()=>{};const $d={skipAnimations:!1,useManualTiming:!1};function jp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Np{constructor(){this.subscriptions=[]}add(t){return Rp(this.subscriptions,t),()=>Op(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function Iw(e,t){return t?e*(1e3/t):0}const B2=jp(()=>window.ScrollTimeline!==void 0);class z2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(B2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class U2 extends z2{then(t,n){return this.finished.finally(t).then(()=>{})}}const b0={value:null,addProjectionMetrics:null},Mp=e=>Array.isArray(e)&&typeof e[0]=="number",H2={};function W2(e,t){const n=jp(e);return()=>H2[t]??n()}const ia=W2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$w=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},xo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Vd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xo([0,.65,.55,1]),circOut:xo([.55,0,1,.45]),backIn:xo([.31,.01,.66,-.59]),backOut:xo([.33,1.53,.69,.99])};function Vw(e,t){if(e)return typeof e=="function"&&ia()?$w(e,t):Mp(e)?xo(e):Array.isArray(e)?e.map(n=>Vw(n,t)||Vd.easeOut):Vd[e]}function K2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const f={[t]:n};l&&(f.offset=l);const c=Vw(a,i);return Array.isArray(c)&&(f.easing=c),e.animate(f,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Dp(e){return typeof e=="function"&&"applyToOptions"in e}function Fp(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Lp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Lp(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function Bw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in Vd||ia())||Mp(e)||Array.isArray(e)&&e.every(Bw))}function S0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function G2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(f.schedule(c),e()),l++,c(a)}const f={schedule:(c,d=!1,h=!1)=>{const v=h&&i?n:r;return d&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&b0.value&&b0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const Q2=40;function zw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=G2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,Q2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const x=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),x.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:Ip,cancel:N4}=zw(queueMicrotask,!1),{schedule:he,cancel:zr,state:Ge,steps:ef}=zw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let Rl;function Y2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(Ge.isProcessing||$d.useManualTiming?Ge.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Y2)}},an={x:!1,y:!1};function Uw(){return an.x||an.y}function X2(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function Z2(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Hw(e,t){const n=Z2(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function T0(e){return!(e.pointerType==="touch"||Uw())}function J2(e,t,n={}){const[r,i,s]=Hw(e,n),o=a=>{if(!T0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{T0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Ww=(e,t)=>t?e===t?!0:Ww(e,t.parentElement):!1,$p=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,eP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tP(e){return eP.has(e.tagName)||e.tabIndex!==-1}const wo=new WeakSet;function E0(e){return t=>{t.key==="Enter"&&e(t)}}function tf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=E0(()=>{if(wo.has(n))return;tf(n,"down");const i=E0(()=>{tf(n,"up")}),s=()=>tf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function C0(e){return $p(e)&&!Uw()}function rP(e,t,n={}){const[r,i,s]=Hw(e,n),o=a=>{const l=a.currentTarget;if(!C0(a)||wo.has(l))return;wo.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!C0(h)||!wo.has(l))&&(wo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Ww(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>nP(u,i)),!tP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const k0=30,iP=e=>!isNaN(parseFloat(e));class sP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=iP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Np);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>k0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,k0);return Iw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sa(e,t){return new sP(e,t)}const Kw=y.createContext({strict:!1}),_0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zs={};for(const e in _0)zs[e]={isEnabled:t=>_0[e].some(n=>!!t[n])};function oP(e){for(const t in e)zs[t]={...zs[t],...e[t]}}const aP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||aP.has(e)}let qw=e=>!gu(e);function lP(e){e&&(qw=t=>t.startsWith("on")?!gu(t):e(t))}try{lP(require("@emotion/is-prop-valid").default)}catch{}function uP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(qw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function cP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Vp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bp=["initial",...Vp];function qu(e){return Ku(e.animate)||Bp.some(t=>oa(e[t]))}function Gw(e){return!!(qu(e)||e.variants)}function fP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function dP(e){const{initial:t,animate:n}=fP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[P0(t),P0(n)])}function P0(e){return Array.isArray(e)?e.join(" "):e}const hP=Symbol.for("motionComponentSymbol");function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ls(n)&&(n.current=r))},[t])}const zp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mP="framerAppearId",Qw="data-"+zp(mP),Yw=y.createContext({});function gP(e,t,n,r,i){var v,b;const{visualElement:s}=y.useContext(Wu),o=y.useContext(Kw),a=y.useContext(Hu),l=y.useContext(Ap).reducedMotion,u=y.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=u.current,c=y.useContext(Yw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&yP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Qw],m=y.useRef(!!h&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Fw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Ip.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function yP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Xw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ls(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function Xw(e){if(e)return e.options.allowProjection!==!1?e.projection:Xw(e.parent)}function vP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&oP(e);function s(a,l){let u;const f={...y.useContext(Ap),...a,layoutId:xP(a)},{isStatic:c}=f,d=dP(a),h=r(a,c);if(!c&&Pp){wP();const m=bP(f);u=m.MeasureLayout,d.visualElement=gP(i,h,f,t,m.ProjectionNode)}return w.jsxs(Wu.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,pP(h,d.visualElement,l),h,c,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[hP]=i,o}function xP({layoutId:e}){const t=y.useContext(kp).id;return t&&e!==void 0?t+"-"+e:e}function wP(e,t){y.useContext(Kw).strict}function bP(e){const{drag:t,layout:n}=zs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Zw=e=>t=>typeof t=="string"&&t.startsWith(e),Up=Zw("--"),SP=Zw("var(--"),Hp=e=>SP(e)?TP.test(e.split("/*")[0].trim()):!1,TP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function EP(e){for(const t in e)aa[t]=e[t],Up(t)&&(aa[t].isCSSVariable=!0)}const Ys=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Ys);function Jw(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),eb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,er=(e,t,n)=>n>t?t:n<e?e:n,Xs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Xs,transform:e=>er(0,1,e)},ll={...Xs,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),W=_a("px"),CP=_a("vh"),kP=_a("vw"),A0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},_P={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W},PP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:la,originX:A0,originY:A0,originZ:W},R0={...Xs,transform:Math.round},Wp={..._P,...PP,zIndex:R0,size:W,fillOpacity:la,strokeOpacity:la,numOctaves:R0},AP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RP=Ys.length;function OP(e,t,n){let r="",i=!0;for(let s=0;s<RP;s++){const o=Ys[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=eb(a,Wp[o]);if(!l){i=!1;const f=AP[o]||o;r+=`${f}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Kp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if($i.has(l)){o=!0;continue}else if(Up(l)){i[l]=u;continue}else{const f=eb(u,Wp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=OP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${u} ${f}`}}const qp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tb(e,t,n){for(const r in t)!it(t[r])&&!Jw(r,n)&&(e[r]=t[r])}function jP({transformTemplate:e},t){return y.useMemo(()=>{const n=qp();return Kp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function NP(e,t){const n=e.style||{},r={};return tb(r,n,e),Object.assign(r,jP(e,t)),r}function MP(e,t){const n={},r=NP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const DP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Gp(e){return typeof e!="string"||e.includes("-")?!1:!!(DP.indexOf(e)>-1||/[A-Z]/u.test(e))}const FP={offset:"stroke-dashoffset",array:"stroke-dasharray"},LP={offset:"strokeDashoffset",array:"strokeDasharray"};function IP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?FP:LP;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function O0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function $P(e,t,n){const r=O0(t,e.x,e.width),i=O0(n,e.y,e.height);return`${r} ${i}`}function Qp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},f,c){if(Kp(e,u,c),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=$P(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&IP(d,o,a,l,!1)}const nb=()=>({...qp(),attrs:{}}),Yp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function VP(e,t,n,r){const i=y.useMemo(()=>{const s=nb();return Qp(s,t,Yp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};tb(s,e.style,e),i.style={...s,...i.style}}return i}function BP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Gp(n)?VP:MP)(r,s,o,n),u=uP(r,typeof n=="string",e),f=n!==y.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=y.useMemo(()=>it(c)?c.get():c,[c]);return y.createElement(n,{...f,children:d})}}function j0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xp(e,t,n,r){if(typeof t=="function"){const[i,s]=j0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=j0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Bd=e=>Array.isArray(e),zP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),UP=e=>Bd(e)?e[e.length-1]||0:e;function Ol(e){const t=it(e)?e.get():e;return zP(t)?t.toValue():t}function HP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:WP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const rb=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>HP(e,t,r,i);return n?s():_p(s)};function WP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),u=Gw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const c=f?a:o;if(c&&typeof c!="boolean"&&!Ku(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=Xp(e,d[h]);if(m){const{transitionEnd:v,transition:b,...p}=m;for(const g in p){let x=p[g];if(Array.isArray(x)){const E=f?x.length-1:0;x=x[E]}x!==null&&(i[g]=x)}for(const g in v)i[g]=v[g]}}}return i}function Zp(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||Jw(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const KP={useVisualState:rb({scrapeMotionValuesFromProps:Zp,createRenderState:qp})};function ib(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function sb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ob=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ab(e,t,n,r){sb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ob.has(i)?i:zp(i),t.attrs[i])}function lb(e,t,n){const r=Zp(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Ys.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const N0=["x","y","width","height","cx","cy","r"],qP={useVisualState:rb({scrapeMotionValuesFromProps:lb,createRenderState:nb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if($i.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<N0.length;a++){const l=N0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{ib(n,r),he.render(()=>{Qp(r,i,Yp(n.tagName),e.transformTemplate),ab(n,r)})})}})};function GP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Gp(r)?qP:KP,preloadedFeatures:e,useRender:BP(i),createVisualElement:t,Component:r};return vP(o)}}function ua(e,t,n){const r=e.getProps();return Xp(r,t,n!==void 0?n:r.custom,e)}const ub=new Set(["width","height","top","left","right","bottom",...Ys]);function QP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function YP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=UP(s[o]);QP(e,o,a)}}function XP(e){return!!(it(e)&&e.add)}function zd(e,t){const n=e.getValue("willChange");if(XP(n))return n.add(t);if(!n&&$d.WillChange){const r=new $d.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function cb(e){return e.props[Qw]}const fb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ZP=1e-7,JP=12;function eA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=fb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>ZP&&++a<JP);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>eA(s,0,1,e,n);return s=>s===0||s===1?s:fb(i(s),t,r)}const db=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hb=e=>t=>1-e(1-t),pb=Pa(.33,1.53,.69,.99),Jp=hb(pb),mb=db(Jp),gb=e=>(e*=2)<1?.5*Jp(e):.5*(2-Math.pow(2,-10*(e-1))),em=e=>1-Math.sin(Math.acos(e)),yb=hb(em),vb=db(em),xb=e=>/^0[^.\s]+$/u.test(e);function tA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xb(e):!0}const Oo=e=>Math.round(e*1e5)/1e5,tm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function nA(e){return e==null}const rA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nm=(e,t)=>n=>!!(typeof n=="string"&&rA.test(n)&&n.startsWith(e)||t&&!nA(n)&&Object.prototype.hasOwnProperty.call(n,t)),wb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(tm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},iA=e=>er(0,255,e),nf={...Xs,transform:e=>Math.round(iA(e))},ui={test:nm("rgb","red"),parse:wb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+nf.transform(e)+", "+nf.transform(t)+", "+nf.transform(n)+", "+Oo(la.transform(r))+")"};function sA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ud={test:nm("#"),parse:sA,transform:ui.transform},us={test:nm("hsl","hue"),parse:wb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Oo(t))+", "+jn.transform(Oo(n))+", "+Oo(la.transform(r))+")"},nt={test:e=>ui.test(e)||Ud.test(e)||us.test(e),parse:e=>ui.test(e)?ui.parse(e):us.test(e)?us.parse(e):Ud.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):us.transform(e)},oA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function aA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tm))==null?void 0:t.length)||0)+(((n=e.match(oA))==null?void 0:n.length)||0)>0}const bb="number",Sb="color",lA="var",uA="var(",M0="${}",cA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(cA,l=>(nt.test(l)?(r.color.push(s),i.push(Sb),n.push(nt.parse(l))):l.startsWith(uA)?(r.var.push(s),i.push(lA),n.push(l)):(r.number.push(s),i.push(bb),n.push(parseFloat(l))),++s,M0)).split(M0);return{values:n,split:a,indexes:r,types:i}}function Tb(e){return ca(e).values}function Eb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===bb?s+=Oo(i[o]):a===Sb?s+=nt.transform(i[o]):s+=i[o]}return s}}const fA=e=>typeof e=="number"?0:e;function dA(e){const t=Tb(e);return Eb(e)(t.map(fA))}const Ur={test:aA,parse:Tb,createTransformer:Eb,getAnimatableNone:dA},hA=new Set(["brightness","contrast","saturate","opacity"]);function pA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(tm)||[];if(!r)return e;const i=n.replace(r,"");let s=hA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const mA=/\b([a-z-]*)\(.*?\)/gu,Hd={...Ur,getAnimatableNone:e=>{const t=e.match(mA);return t?t.map(pA).join(" "):e}},gA={...Wp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:Hd,WebkitFilter:Hd},Cb=e=>gA[e];function kb(e,t){let n=Cb(e);return n!==Hd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yA=new Set(["auto","none","0"]);function vA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!yA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=kb(n,i)}const ci=e=>e*180/Math.PI,Wd=e=>{const t=ci(Math.atan2(e[1],e[0]));return Kd(t)},xA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wd,rotateZ:Wd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kd=e=>(e=e%360,e<0&&(e+=360),e),D0=Wd,F0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),L0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),wA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:F0,scaleY:L0,scale:e=>(F0(e)+L0(e))/2,rotateX:e=>Kd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>Kd(ci(Math.atan2(-e[2],e[0]))),rotateZ:D0,rotate:D0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function I0(e){return e.includes("scale")?1:0}function qd(e,t){if(!e||e==="none")return I0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=wA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=xA,i=a}if(!i)return I0(t);const s=r[t],o=i[1].split(",").map(SA);return typeof s=="function"?s(o):o[s]}const bA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qd(n,t)};function SA(e){return parseFloat(e.trim())}const $0=e=>e===Xs||e===W,TA=new Set(["x","y","z"]),EA=Ys.filter(e=>!TA.has(e));function CA(e){const t=[];return EA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Us={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>qd(t,"x"),y:(e,{transform:t})=>qd(t,"y")};Us.translateX=Us.x;Us.translateY=Us.y;const Si=new Set;let Gd=!1,Qd=!1;function _b(){if(Qd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=CA(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qd=!1,Gd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Pb(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qd=!0)})}function kA(){Pb(),_b()}class rm{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Gd||(Gd=!0,he.read(Pb),he.resolveKeyframes(_b))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ab=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_A=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function PA(e){const t=_A.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Rb(e,t,n=1){const[r,i]=PA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Ab(o)?parseFloat(o):o}return Hp(i)?Rb(i,t,n+1):i}const Ob=e=>t=>t.test(e),AA={test:e=>e==="auto",parse:e=>e},jb=[Xs,W,jn,ur,kP,CP,AA],V0=e=>jb.find(Ob(e));class Nb extends rm{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Hp(u))){const f=Rb(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ub.has(r)||t.length!==2)return;const[i,s]=t,o=V0(i),a=V0(s);if(o!==a)if($0(o)&&$0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)tA(t[i])&&r.push(i);r.length&&vA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Us[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Us[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const B0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function RA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function OA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=B0(i,t),a=B0(s,t);return!o||!a?!1:RA(e)||(n==="spring"||Dp(n))&&r}const jA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(jA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const NA=40;class Mb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>NA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&kA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!OA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function rf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=rf(l,a,e+1/3),s=rf(l,a,e),o=rf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const sf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},DA=[Ud,ui,us],FA=e=>DA.find(t=>t.test(e));function z0(e){const t=FA(e);if(!t)return!1;let n=t.parse(e);return t===us&&(n=MA(n)),n}const U0=(e,t)=>{const n=z0(e),r=z0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=sf(n.red,r.red,s),i.green=sf(n.green,r.green,s),i.blue=sf(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},LA=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce(LA),Yd=new Set(["none","hidden"]);function IA(e,t){return Yd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $A(e,t){return n=>be(e,t,n)}function im(e){return typeof e=="number"?$A:typeof e=="string"?Hp(e)?yu:nt.test(e)?U0:zA:Array.isArray(e)?Db:typeof e=="object"?nt.test(e)?U0:VA:yu}function Db(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>im(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function VA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=im(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function BA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const zA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yd.has(e)&&!i.values.length||Yd.has(t)&&!r.values.length?IA(e,t):Aa(Db(BA(r,i),i.values),n):yu(e,t)};function Fb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):im(e)(e,t)}const UA=5;function Lb(e,t,n){const r=Math.max(t-UA,0);return Iw(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},of=.001;function HA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=er(Ce.minDamping,Ce.maxDamping,o),e=er(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=Xd(u,o),m=Math.exp(-c);return of-d/h*m},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),v=Xd(Math.pow(u,2),o);return(-i(u)+of>0?-1:1)*((d-h)*m)/v}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-of+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=KA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const WA=12;function KA(e,t,n){let r=n;for(let i=1;i<WA;i++)r=r-e(r)/t(r);return r}function Xd(e,t){return e*Math.sqrt(1-t*t)}const qA=["duration","bounce"],GA=["stiffness","damping","mass"];function H0(e,t){return t.some(n=>e[n]!==void 0)}function QA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!H0(e,GA)&&H0(e,qA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*er(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=HA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:f,duration:c,velocity:d,isResolvedFromDuration:h}=QA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,v=u/(2*Math.sqrt(l*f)),b=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(b)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let x;if(v<1){const S=Xd(p,v);x=C=>{const k=Math.exp(-v*p*C);return o-k*((m+v*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(v===1)x=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(v*v-1);x=C=>{const k=Math.exp(-v*p*C),P=Math.min(S*C,300);return o-k*((m+v*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=x(S);if(h)a.done=S>=c;else{let k=0;v<1&&(k=S===0?An(m):Lb(x,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Lp(E),mu),C=$w(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function W0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let v=n*t;const b=c+v,p=o===void 0?b:o(b);p!==b&&(v=p-c);const g=P=>-v*Math.exp(-P/r),x=P=>p+g(P),E=P=>{const j=g(P),N=x(P);d.done=Math.abs(j)<=u,d.value=d.done?p:N};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Lb(x,P,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const YA=Pa(.42,0,1,1),XA=Pa(0,0,.58,1),Ib=Pa(.42,0,.58,1),ZA=e=>Array.isArray(e)&&typeof e[0]!="number",K0={linear:Zt,easeIn:YA,easeInOut:Ib,easeOut:XA,circIn:em,circInOut:vb,circOut:yb,backIn:Jp,backInOut:mb,backOut:pb,anticipate:gb},q0=e=>{if(Mp(e)){Id(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return Id(K0[e]!==void 0),K0[e];return e};function JA(e,t,n){const r=[],i=n||Fb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Zt:t;a=Aa(l,a)}r.push(a)}return r}function eR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Id(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=JA(t,r,i),l=a.length,u=f=>{if(o&&f<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(f<e[c+1]);c++);const d=ra(e[c],e[c+1],f);return a[c](d)};return n?f=>u(er(e[0],e[s-1],f)):u}function tR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function nR(e){const t=[0];return tR(t,e.length-1),t}function rR(e,t){return e.map(n=>n*t)}function iR(e,t){return e.map(()=>t||Ib).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=ZA(r)?r.map(q0):q0(r),s={done:!1,value:t[0]},o=rR(n&&n.length===t.length?n:nR(t),e),a=eR(o,t,{ease:Array.isArray(i)?i:iR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const sR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},oR={decay:W0,inertia:W0,tween:xu,keyframes:xu,spring:vu},aR=e=>e/100;class sm extends Mb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||rm,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Dp(n)?n:oR[n]||xu;let l,u;a!==xu&&typeof t[0]!="number"&&(l=Aa(aR,Fb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Lp(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/c;let j=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(N=1-N,v&&(N-=v/c)):m==="mirror"&&(E=o)),x=er(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(x);a&&(S.value=a(S.value));let{done:C}=S;!g&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),b&&b(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=sR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const lR=new Set(["opacity","clipPath","filter","transform"]),uR=jp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,cR=2e4;function fR(e){return Dp(e.type)||e.type==="spring"||!Bw(e.ease)}function dR(e,t){const n=new sm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<cR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const $b={anticipate:gb,backInOut:mb,circInOut:vb};function hR(e){return e in $b}class G0 extends Mb{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Nb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&hR(s)&&(s=$b[s]),fR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...v}=this.options,b=dR(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=K2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(S0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Gu(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;S0(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,m=new sm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),v=An(this.time);u.setWithVelocity(m.sample(v-wu).value,m.sample(v).value,wu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return uR()&&r&&lR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const pR={type:"spring",stiffness:500,damping:25,restSpeed:10},mR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gR={type:"keyframes",duration:.8},yR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vR=(e,{keyframes:t})=>t.length>2?gR:$i.has(e)?e.startsWith("scale")?mR(t[1]):pR:yR;function xR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const om=(e,t,n,r={},i,s)=>o=>{const a=Fp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};xR(a)||(f={...f,...vR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let c=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(c=!0)),f.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new U2([])}return!s&&G0.supports(f)?new G0(f):new sm(f)};function wR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const c=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||u&&wR(u,f))continue;const h={delay:n,...Fp(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=cb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}zd(e,f),c.start(om(f,c,d,e.shouldReduceMotion&&ub.has(f)?{type:!1}:h,e,m));const v=c.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&YP(e,o)})}),l}function Zd(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Vb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return bR(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,f]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function bR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(SR).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(Zd(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function SR(e,t){return e.sortNodePosition(t)}function TR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Zd(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Zd(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Vb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Bb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ER=Bp.length;function zb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ER;n++){const r=Bp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const CR=[...Vp].reverse(),kR=Vp.length;function _R(e){return t=>Promise.all(t.map(({animation:n,options:r})=>TR(e,n,r)))}function PR(e){let t=_R(e),n=Q0(),r=!0;const i=l=>(u,f)=>{var d;const c=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...v}=c;u={...u,...v,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=zb(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<kR;b++){const p=CR[b],g=n[p],x=u[p]!==void 0?u[p]:f[p],E=oa(x),S=p===l?g.isActive:null;S===!1&&(m=b);let C=x===f[p]&&x!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!x&&!g.prevProp||Ku(x)||typeof x=="boolean")continue;const k=AR(g.prevProp,x);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(x)?x:[x];let I=N.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let B=!1;Bd(O)&&Bd(L)?B=!Bb(O,L):B=O!==L,B?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=x,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&c.push(...N.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const b={};if(typeof u.initial!="boolean"){const p=ua(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(b.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),x=e.getValue(p);x&&(x.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let v=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Q0(),r=!0}}}function AR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Q0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class RR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=PR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let OR=0;class jR extends Gr{constructor(){super(...arguments),this.id=OR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const NR={animation:{Feature:RR},exit:{Feature:jR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const MR=e=>t=>$p(t)&&e(t,Ra(t));function jo(e,t,n,r){return fa(e,t,MR(n),r)}function Ub({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function DR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function FR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Hb=1e-4,LR=1-Hb,IR=1+Hb,Wb=.01,$R=0-Wb,VR=0+Wb;function ct(e){return e.max-e.min}function BR(e,t,n){return Math.abs(e-t)<=n}function Y0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=LR&&e.scale<=IR||isNaN(e.scale))&&(e.scale=1),(e.translate>=$R&&e.translate<=VR||isNaN(e.translate))&&(e.translate=0)}function No(e,t,n,r){Y0(e.x,t.x,n.x,r?r.originX:void 0),Y0(e.y,t.y,n.y,r?r.originY:void 0)}function X0(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function zR(e,t,n){X0(e.x,t.x,n.x),X0(e.y,t.y,n.y)}function Z0(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Mo(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}const J0=()=>({translate:0,scale:1,origin:0,originPoint:0}),cs=()=>({x:J0(),y:J0()}),ey=()=>({min:0,max:0}),Pe=()=>({x:ey(),y:ey()});function Ht(e){return[e("x"),e("y")]}function af(e){return e===void 0||e===1}function Jd({scale:e,scaleX:t,scaleY:n}){return!af(e)||!af(t)||!af(n)}function ni(e){return Jd(e)||Kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kb(e){return ty(e.x)||ty(e.y)}function ty(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ny(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function eh(e,t=0,n=1,r,i){e.min=ny(e.min,t,n,r,i),e.max=ny(e.max,t,n,r,i)}function qb(e,{x:t,y:n}){eh(e.x,t.translate,t.scale,t.originPoint),eh(e.y,n.translate,n.scale,n.originPoint)}const ry=.999999999999,iy=1.0000000000001;function UR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,qb(e,o)),r&&ni(s.latestValues)&&ds(e,s.latestValues))}t.x<iy&&t.x>ry&&(t.x=1),t.y<iy&&t.y>ry&&(t.y=1)}function fs(e,t){e.min=e.min+t,e.max=e.max+t}function sy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);eh(e,t,n,s,r)}function ds(e,t){sy(e.x,t.x,t.scaleX,t.scale,t.originX),sy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Gb(e,t){return Ub(FR(e.getBoundingClientRect(),t))}function HR(e,t,n){const r=Gb(e,n),{scroll:i}=t;return i&&(fs(r.x,i.offset.x),fs(r.y,i.offset.y)),r}const Qb=({current:e})=>e?e.ownerDocument.defaultView:null,oy=(e,t)=>Math.abs(e-t);function WR(e,t){const n=oy(e.x,t.x),r=oy(e.y,t.y);return Math.sqrt(n**2+r**2)}class Yb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=uf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=WR(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=c,{timestamp:v}=Ge;this.history.push({...m,timestamp:v});const{onStart:b,onMove:p}=this.handlers;d||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=lf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=uf(c.type==="pointercancel"?this.lastMoveEventInfo:lf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!$p(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=lf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,uf(a,this.history)),this.removeListeners=Aa(jo(this.contextWindow,"pointermove",this.handlePointerMove),jo(this.contextWindow,"pointerup",this.handlePointerUp),jo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function lf(e,t){return t?{point:t(e.point)}:e}function ay(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uf({point:e},t){return{point:e,delta:ay(e,Xb(t)),offset:ay(e,KR(t)),velocity:qR(t,.1)}}function KR(e){return e[0]}function Xb(e){return e[e.length-1]}function qR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function GR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function ly(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function QR(e,{top:t,left:n,bottom:r,right:i}){return{x:ly(e.x,n,i),y:ly(e.y,t,r)}}function uy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function YR(e,t){return{x:uy(e.x,t.x),y:uy(e.y,t.y)}}function XR(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),er(0,1,n)}function ZR(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const th=.35;function JR(e=th){return e===!1?e=0:e===!0&&(e=th),{x:cy(e,"left","right"),y:cy(e,"top","bottom")}}function cy(e,t,n){return{min:fy(e,t),max:fy(e,n)}}function fy(e,t){return typeof e=="number"?e:e[t]||0}const eO=new WeakMap;class tO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=X2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(b=>{let p=this.getAxisMotionValue(b).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[b];x&&(p=ct(x)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),zd(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:v}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=nO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),v&&v(f,c)},a=(f,c)=>this.stop(f,c),l=()=>Ht(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Yb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Qb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=GR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=QR(r.layoutBox,t):this.constraints=!1,this.elastic=JR(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ZR(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=HR(r,i.root,this.visualElement.getTransformPagePoint());let o=YR(i.layout.layoutBox,s);if(n){const a=n(DR(o));this.hasMutatedConstraints=!!a,a&&(o=Ub(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ht(f=>{if(!ul(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return zd(this.visualElement,t),r.start(om(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ht(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ls(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=XR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ht(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(be(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;eO.set(this.visualElement,this);const t=this.visualElement.current,n=jo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ls(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ht(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=th,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function nO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class rO extends Gr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new tO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const dy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class iO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new Yb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:dy(t),onStart:dy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=jo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const co={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=hy(e,t.target.x),r=hy(e,t.target.y);return`${n}% ${r}%`}},sO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class oO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;EP(aO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ip.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zb(e){const[t,n]=Lw(),r=y.useContext(kp);return w.jsx(oO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Yw),isPresent:t,safeToRemove:n})}const aO={borderRadius:{...co,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:co,borderTopRightRadius:co,borderBottomLeftRadius:co,borderBottomRightRadius:co,boxShadow:sO};function lO(e,t,n){const r=it(e)?e:sa(e);return r.start(om("",r,t,n)),r.animation}function uO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const cO=(e,t)=>e.depth-t.depth;class fO{constructor(){this.children=[],this.isDirty=!1}add(t){Rp(this.children,t),this.isDirty=!0}remove(t){Op(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cO),this.isDirty=!1,this.children.forEach(t)}}function dO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const Jb=["TopLeft","TopRight","BottomLeft","BottomRight"],hO=Jb.length,py=e=>typeof e=="string"?parseFloat(e):e,my=e=>typeof e=="number"||W.test(e);function pO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,mO(r)),e.opacityExit=be(t.opacity??1,0,gO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<hO;o++){const a=`border${Jb[o]}Radius`;let l=gy(t,a),u=gy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||my(l)===my(u)?(e[a]=Math.max(be(py(l),py(u),r),0),(jn.test(u)||jn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function gy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const mO=eS(0,.5,yb),gO=eS(.5,.95,Zt);function eS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function yy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){yy(e.x,t.x),yy(e.y,t.y)}function vy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function yO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=xy(e.min,t,n,a,i),e.max=xy(e.max,t,n,a,i)}function wy(e,t,[n,r,i],s,o){yO(e,t[n],t[r],t[i],t.scale,s,o)}const vO=["x","scaleX","originX"],xO=["y","scaleY","originY"];function by(e,t,n,r){wy(e.x,t,vO,n?n.x:void 0,r?r.x:void 0),wy(e.y,t,xO,n?n.y:void 0,r?r.y:void 0)}function Sy(e){return e.translate===0&&e.scale===1}function tS(e){return Sy(e.x)&&Sy(e.y)}function Ty(e,t){return e.min===t.min&&e.max===t.max}function wO(e,t){return Ty(e.x,t.x)&&Ty(e.y,t.y)}function Ey(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nS(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e){return ct(e.x)/ct(e.y)}function ky(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class bO{constructor(){this.members=[]}add(t){Rp(this.members,t),t.scheduleRender()}remove(t){if(Op(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function SO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const cf=["","X","Y","Z"],TO={visibility:"hidden"},_y=1e3;let EO=0;function ff(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function rS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=cb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&rS(r)}function iS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=EO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(_O),this.nodes.forEach(jO),this.nodes.forEach(NO),this.nodes.forEach(PO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new fO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Np),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=dO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ay))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||IO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!nS(this.targetLayout,m),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,x);const E={...Fp(v,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ay(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Py);return}this.isUpdating||this.nodes.forEach(RO),this.isUpdating=!1,this.nodes.forEach(OO),this.nodes.forEach(CO),this.nodes.forEach(kO),this.clearAllSnapshots();const a=On.now();Ge.delta=er(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,ef.update.process(Ge),ef.preRender.process(Ge),ef.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ip.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AO),this.sharedNodes.forEach(DO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!tS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),$O(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(VO))){const{scroll:f}=this.root;f&&(fs(a.x,f.offset.x),fs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:c,options:d}=f;f!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&zt(a,o),fs(a.x,c.offset.x),fs(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();zt(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ds(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&ds(l,f.latestValues)}return ni(this.latestValues)&&ds(l,this.latestValues),l}removeTransform(o){const a=Pe();zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ni(u.latestValues))continue;Jd(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),by(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&by(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:c}=this.options;if(!(!this.layout||!(f||c))){if(this.resolvedRelativeTargetAt=Ge.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),qb(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Jd(this.parent.latestValues)||Kb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ge.timestamp&&(l=!1),l)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,d=this.treeScale.y;UR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vy(this.prevProjectionDelta.x,this.projectionDelta.x),vy(this.prevProjectionDelta.y,this.projectionDelta.y)),No(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!ky(this.projectionDelta.x,this.prevProjectionDelta.x)||!ky(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cs(),this.projectionDelta=cs(),this.projectionDeltaWithTransform=cs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,v=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(v&&!p&&this.options.crossfade===!0&&!this.path.some(LO));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const S=E/1e3;Ry(c.x,o.x,S),Ry(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),FO(this.relativeTarget,this.relativeTargetOrigin,d,S),x&&wO(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Pe()),zt(x,this.relativeTarget)),v&&(this.animationValues=f,pO(f,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=lO(0,_y,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_y),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&sS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const c=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}zt(a,l),ds(a,f),No(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new bO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ff("z",o,u,this.animationValues);for(let f=0;f<cf.length;f++)ff(`rotate${cf[f]}`,o,u,this.animationValues),ff(`skew${cf[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return TO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=SO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:c,y:d}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:b}=aa[h],p=a.transform==="none"?f[h]:m(f[h],u);if(v){const g=v.length;for(let x=0;x<g;x++)a[v[x]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Py),this.root.sharedNodes.clear()}}}function CO(e){e.updateLayout()}function kO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(d);d.min=r[c].min,d.max=d.min+h}):sS(s,t.layoutBox,r)&&Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=cs();No(a,r,t.layoutBox);const l=cs();o?No(l,e.applyTransform(i,!0),t.measuredBox):No(l,r,t.layoutBox);const u=!tS(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const v=Pe();Mo(v,r,h.layoutBox),nS(m,v)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function _O(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function PO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function AO(e){e.clearSnapshot()}function Py(e){e.clearMeasurements()}function RO(e){e.isLayoutDirty=!1}function OO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ay(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jO(e){e.resolveTargetDelta()}function NO(e){e.calcProjection()}function MO(e){e.resetSkewAndRotation()}function DO(e){e.removeLeadSnapshot()}function Ry(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Oy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function FO(e,t,n,r){Oy(e.x,t.x,n.x,r),Oy(e.y,t.y,n.y,r)}function LO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IO={duration:.45,ease:[.4,0,.1,1]},jy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ny=jy("applewebkit/")&&!jy("chrome/")?Math.round:Zt;function My(e){e.min=Ny(e.min),e.max=Ny(e.max)}function $O(e){My(e.x),My(e.y)}function sS(e,t,n){return e==="position"||e==="preserve-aspect"&&!BR(Cy(t),Cy(n),.2)}function VO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const BO=iS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),df={current:void 0},oS=iS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!df.current){const e=new BO({});e.mount(window),e.setOptions({layoutScroll:!0}),df.current=e}return df.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),zO={pan:{Feature:iO},drag:{Feature:rO,ProjectionNode:oS,MeasureLayout:Zb}};function Dy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class UO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=J2(t,(n,r)=>(Dy(this.node,r,"Start"),i=>Dy(this.node,i,"End"))))}unmount(){}}class HO extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=rP(t,(n,r)=>(Fy(this.node,r,"Start"),(i,{success:s})=>Fy(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const nh=new WeakMap,hf=new WeakMap,KO=e=>{const t=nh.get(e.target);t&&t(e)},qO=e=>{e.forEach(KO)};function GO({root:e,...t}){const n=e||document;hf.has(n)||hf.set(n,{});const r=hf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(qO,{root:e,...t})),r[i]}function QO(e,t,n){const r=GO(t);return nh.set(e,n),r.observe(e),()=>{nh.delete(e),r.unobserve(e)}}const YO={some:0,all:1};class XO extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:YO[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return QO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ZO(t,n))&&this.startObserver()}unmount(){}}function ZO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const JO={inView:{Feature:XO},tap:{Feature:WO},focus:{Feature:HO},hover:{Feature:UO}},ej={layout:{ProjectionNode:oS,MeasureLayout:Zb}},rh={current:null},aS={current:!1};function tj(){if(aS.current=!0,!!Pp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rh.current=e.matches;e.addListener(t),t()}else rh.current=!1}const nj=[...jb,nt,Ur],rj=e=>nj.find(Ob(e)),ij=new WeakMap;function sj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(it(i))e.addValue(r,i);else if(it(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ly=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class oj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Gw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&it(m)&&m.set(l[h],!1)}}mount(t){this.current=t,ij.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),aS.current||tj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$i.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zs){const n=zs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ly.length;r++){const i=Ly[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=sj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Ab(r)||xb(r))?r=parseFloat(r):!rj(r)&&Ur.test(n)&&(r=kb(t,n)),this.setBaseTarget(t,it(r)?r.get():r)),it(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Xp(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!it(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Np),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class lS extends oj{constructor(){super(...arguments),this.KeyframeResolver=Nb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function aj(e){return window.getComputedStyle(e)}class lj extends lS{constructor(){super(...arguments),this.type="html",this.renderInstance=sb}readValueFromInstance(t,n){if($i.has(n))return bA(t,n);{const r=aj(t),i=(Up(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Gb(t,n)}build(t,n,r){Kp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Zp(t,n,r)}}class uj extends lS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ib(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=Cb(n);return r&&r.default||0}return n=ob.has(n)?n:zp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return lb(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Qp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){ab(t,n,r,i)}mount(t){this.isSVGTag=Yp(t.tagName),super.mount(t)}}const cj=(e,t)=>Gp(e)?new uj(t):new lj(t,{allowProjection:e!==y.Fragment}),fj=GP({...NR,...JO,...zO,...ej},cj),Re=cP(fj),dj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),At=e=>{const[t,n]=e.split("-");return dj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const uS=y.createContext({}),hj={[K.Background]:"",[K.Border]:"initial",[K.TooltipText]:At("blue-700"),[K.TooltipBackground]:At("blue-100"),[K.TooltipBorder]:At("blue-500"),[K.HeaderBackground]:At("blue-600"),[K.HeaderBorder]:"initial",[K.HeaderText]:"white",[K.FooterBackground]:"",[K.FooterBorder]:"",[K.FooterText]:"",[K.MessageAdminBackground]:"",[K.MessageAdminText]:"",[K.MessageVisitorBackground]:"",[K.MessageVisitorText]:"",[K.GreeterBackground]:"white",[K.GreeterText]:At("slate-700"),[K.GreeterBorder]:At("slate-200"),[K.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[K.GreeterTopText]:"white",[K.GreeterButtonBackground]:At("indigo-600"),[K.GreeterButtonText]:At("white"),[K.ButtonBackground]:At("indigo-600"),[K.ButtonText]:At("white"),[K.InputBackground]:At("white"),[K.InputText]:At("slate-800"),[K.InputBorder]:At("slate-200")},pj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},mj=e=>{const t={...hj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function gj({children:e,widget:t}){const n=mj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>pj[r];return w.jsx(uS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const nr=()=>y.useContext(uS);function Gn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=K.ButtonText,bgKey:u=K.ButtonBackground,animations:f={},withoutTheming:c,...d}){const h=nr();return w.jsx(Re.button,{type:t,className:Ne("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,x0[n]&&x0[n][r],D2[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:h.getColor(l),backgroundColor:h.getColor(u),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function De(){}De.Home=function(t){return w.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};De.Chat=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Menu=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});De.MessageTyping=({className:e="size-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Check=function(t){return w.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};De.Website=function(t){return w.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),w.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};De.ArrowDown=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});De.XCircle=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});De.X=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});De.PaperAirplane=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Nl=Object.create(null);Object.keys(Mn).forEach(e=>{Nl[Mn[e]]=e});const ih={type:"error",data:"parser error"},cS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fS=typeof ArrayBuffer=="function",dS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,am=({type:e,data:t},n,r)=>cS&&t instanceof Blob?n?r(t):Iy(t,r):fS&&(t instanceof ArrayBuffer||dS(t))?n?r(t):Iy(new Blob([t]),r):r(Mn[e]+(t||"")),Iy=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function $y(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pf;function yj(e,t){if(cS&&e.data instanceof Blob)return e.data.arrayBuffer().then($y).then(t);if(fS&&(e.data instanceof ArrayBuffer||dS(e.data)))return t($y(e.data));am(e,!1,n=>{pf||(pf=new TextEncoder),t(pf.encode(n))})}const Vy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Vy.length;e++)bo[Vy.charCodeAt(e)]=e;const vj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)s=bo[e.charCodeAt(r)],o=bo[e.charCodeAt(r+1)],a=bo[e.charCodeAt(r+2)],l=bo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},xj=typeof ArrayBuffer=="function",lm=(e,t)=>{if(typeof e!="string")return{type:"message",data:hS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:wj(e.substring(1),t)}:Nl[n]?e.length>1?{type:Nl[n],data:e.substring(1)}:{type:Nl[n]}:ih},wj=(e,t)=>{if(xj){const n=vj(e);return hS(n,t)}else return{base64:!0,data:e}},hS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},pS="",bj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{am(s,!1,a=>{r[o]=a,++i===n&&t(r.join(pS))})})},Sj=(e,t)=>{const n=e.split(pS),r=[];for(let i=0;i<n.length;i++){const s=lm(n[i],t);if(r.push(s),s.type==="error")break}return r};function Tj(){return new TransformStream({transform(e,t){yj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Ej(e,t){mf||(mf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(ih);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(lm(s?l:mf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(ih);break}}}})}const mS=4;function Me(e){if(e)return Cj(e)}function Cj(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),kj="arraybuffer";function gS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const _j=Qt.setTimeout,Pj=Qt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=_j.bind(Qt),e.clearTimeoutFn=Pj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Aj=1.33;function Rj(e){return typeof e=="string"?Oj(e):Math.ceil((e.byteLength||e.size)*Aj)}function Oj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function yS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function jj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Nj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Mj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class um extends Me{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Mj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=lm(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=jj(t);return n.length?"?"+n:""}}class Dj extends um{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Sj(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,bj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=yS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let vS=!1;try{vS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Fj=vS;function Lj(){}class Ij extends Dj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nn extends Me{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=gS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Nn.requestsCount++,Nn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lj,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Nn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Nn.requestsCount=0;Nn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",By);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,By,!1)}}function By(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const $j=function(){const e=xS({xdomain:!1});return e&&e.responseType!==null}();class Vj extends Ij{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=$j&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(xS,this.uri(),t)}}function xS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Fj))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const wS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bj extends um{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=wS?{}:gS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;am(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gf=Qt.WebSocket||Qt.MozWebSocket;class zj extends Bj{createSocket(t,n,r){return wS?new gf(t,n,r):n?new gf(t,n):new gf(t)}doWrite(t,n){this.ws.send(n)}}class Uj extends um{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Ej(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Tj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Hj={websocket:zj,webtransport:Uj,polling:Vj},Wj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Kj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function sh(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Wj.exec(e||""),s={},o=14;for(;o--;)s[Kj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=qj(s,s.path),s.queryKey=Gj(s,s.query),s}function qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Gj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const oh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ml=[];oh&&addEventListener("offline",()=>{Ml.forEach(e=>e())},!1);class Lr extends Me{constructor(t,n){if(super(),this.binaryType=kj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=sh(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=sh(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Nj(this.opts.query)),oh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ml.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=mS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Rj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),oh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ml.indexOf(this._offlineEventListener);r!==-1&&Ml.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=mS;class Qj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Yj=class extends Qj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Hj[i]).filter(i=>!!i)),super(t,r)}};function Xj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=sh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const Zj=typeof ArrayBuffer=="function",Jj=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,bS=Object.prototype.toString,eN=typeof Blob=="function"||typeof Blob<"u"&&bS.call(Blob)==="[object BlobConstructor]",tN=typeof File=="function"||typeof File<"u"&&bS.call(File)==="[object FileConstructor]";function cm(e){return Zj&&(e instanceof ArrayBuffer||Jj(e))||eN&&e instanceof Blob||tN&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(cm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function nN(e){const t=[],n=e.data,r=e;return r.data=ah(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ah(e,t){if(!e)return e;if(cm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=ah(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ah(e[r],t));return n}return e}function rN(e,t){return e.data=lh(e.data,t),delete e.attachments,e}function lh(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=lh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=lh(e[n],t));return e}const iN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],sN=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class oN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=nN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function zy(e){return Object.prototype.toString.call(e)==="[object Object]"}class fm extends Me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new aN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(cm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(fm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return zy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||zy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&iN.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class aN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=rN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fm,Encoder:oN,get PacketType(){return te},protocol:sN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const uN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class SS extends Me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fn(t,"open",this.onopen.bind(this)),fn(t,"packet",this.onpacket.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(uN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,c=n.pop();this._registerAckCallback(f,c),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Zs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zs.prototype.reset=function(){this.attempts=0};Zs.prototype.setMin=function(e){this.ms=e};Zs.prototype.setMax=function(e){this.max=e};Zs.prototype.setJitter=function(e){this.jitter=e};class uh extends Me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||lN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Yj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=fn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=fn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new SS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fo={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Xj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=fo[i]&&s in fo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new uh(r,t):(fo[i]||(fo[i]=new uh(r,t)),l=fo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:uh,Socket:SS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},TS=y.createContext(null),Vi=()=>y.useContext(TS),cN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Fl(Sk,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});c.on("error",d=>{console.error("Websocket error",d)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,d)=>{t&&t.on(c,d)},u=(c,d)=>{t&&t.off(c,d)},f=(c,d,h)=>{t&&t.emit(c,d,h)};return w.jsx(TS.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),ut=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(ut||{});const dm=e=>{const t=kw(),n=(r,i)=>{var o;const s=((o=C4.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},fN=()=>vw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),dN=e=>Ea(`clients/${e}/chats`),ch=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),hN=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),pN=()=>vw({mutationFn:e=>hN(e.rating,e.comment)}),ES=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},hm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function CS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=tn(),r=nr();return w.jsxs(Re.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ne("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(K.TooltipBackground),color:r.getColor(K.TooltipText)},children:[w.jsx(Re.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(K.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),w.jsx("div",{className:Ne("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const mN="/notify.mp3",gN=async e=>{await new Audio(e||mN).play()};function yN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Vi(),{isHaveChat:i,open:s,soundPath:o}=tn(),[a,l]=y.useState(!0),[u,f]=y.useState(0),[c,d]=y.useState(null),h=()=>{gN(o)},m=(v,b)=>{if(c&&clearInterval(c),v||!i||b===0||Number.isNaN(b)){window.document.title=n,d(null);return}const p=setInterval(()=>{if(v||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(p),d(null);return}const g=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==g?window.document.title=g:window.document.title=n},1e3);return d(p),()=>{clearInterval(p),d(null)}};return y.useEffect(()=>m(s&&a,u),[u,s,a]),y.useEffect(()=>{const v=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",v,!1),()=>{document.removeEventListener("visibilitychange",v)}},[]),y.useEffect(()=>{if(!r||!i||s&&a)return;const v=()=>{!i||s&&a||(f(b=>b+1),h())};return r.on(ut.MessageAgentCreate,v),r.on(ut.ChatUserAssignee,h),()=>{r.off(ut.MessageAgentCreate,v),r.off(ut.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:w.jsx(CS,{text:"Yeni mesajlar var!"})}function vN({children:e,defaultOpen:t,border:n}){var p,g,x,E;const r=Vi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=dm(),c=ka(),d=nr(),h=hm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},v=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},b=()=>{s(!1),o(!1),ch(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(ut.Banned,b),()=>{r.off(ut.Banned,b)}},[]),w.jsx("section",{className:"relative w-full h-full",children:w.jsxs(ji,{children:[i&&w.jsx(Re.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"21rem",height:h?"":((E=(x=l==null?void 0:l.appearance)==null?void 0:x.design)==null?void 0:E.height)||"30rem",left:h?"0":"",borderColor:d.getColor(K.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:Ne("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),w.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:w.jsxs(ji,{children:[w.jsx(yN,{fallback:w.jsx(CS,{}),fallbackOpen:u}),!i&&w.jsxs(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[w.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ne("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(K.ButtonBackground)}}),w.jsx(De.Chat,{className:"size-7"})]}),i&&!h&&w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:v,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function kS(e){const{widget:t}=tn();return w.jsx(gj,{widget:t,children:w.jsx(vN,{...e})})}function Bi(e){this._maxSize=e,this.clear()}Bi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Bi.prototype.get=function(e){return this._values[e]};Bi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var xN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,_S=/^\d+$/,wN=/^\d/,bN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,SN=/^\s*(['"]?)(.*?)(\1)\s*$/,pm=512,Uy=new Bi(pm),Hy=new Bi(pm),Wy=new Bi(pm),Ti={Cache:Bi,split:fh,normalizePath:yf,setter:function(e){var t=yf(e);return Hy.get(e)||Hy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=yf(e);return Wy.get(e)||Wy.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(mm(n)||_S.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){TN(Array.isArray(e)?e:fh(e),t,n)}};function yf(e){return Uy.get(e)||Uy.set(e,fh(e).map(function(t){return t.replace(SN,"$2")}))}function fh(e){return e.match(xN)||[""]}function TN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(kN(i)&&(i='"'+i+'"'),a=mm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function mm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function EN(e){return e.match(wN)&&!e.match(_S)}function CN(e){return bN.test(e)}function kN(e){return!mm(e)&&(EN(e)||CN(e))}const _N=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(_N)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),gm=(e,t)=>Xu(e).join(t).toLowerCase(),PS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),PN=e=>Zu(PS(e)),AN=e=>gm(e,"_"),RN=e=>gm(e,"-"),ON=e=>Zu(gm(e," ")),jN=e=>Xu(e).map(Zu).join(" ");var vf={words:Xu,upperFirst:Zu,camelCase:PS,pascalCase:PN,snakeCase:AN,kebabCase:RN,sentenceCase:ON,titleCase:jN},ym={exports:{}};ym.exports=function(e){return AS(NN(e),e)};ym.exports.array=AS;function AS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=MN(t),a=DN(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var m=h[--f];l(m,a.get(m),c)}while(f);c.delete(u)}r[--n]=u}}}function NN(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function MN(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function DN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var FN=ym.exports;const LN=Ws(FN),IN=Object.prototype.toString,$N=Error.prototype.toString,VN=RegExp.prototype.toString,BN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",zN=/^Symbol\((.*)\)(.*)$/;function UN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Ky(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return UN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return BN.call(e).replace(zN,"Symbol($1)");const r=IN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+$N.call(e)+"]":r==="RegExp"?VN.call(e):null}function Ir(e,t){let n=Ky(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Ky(this[r],t);return s!==null?s:i},2)}function RS(e){return e==null?[]:[].concat(e)}let OS,jS,NS,HN=/\$\{\s*(\w+)\s*\}/g;OS=Symbol.toStringTag;class qy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[OS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],RS(t).forEach(s=>{if(bt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}jS=Symbol.hasInstance;NS=Symbol.toStringTag;class bt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(HN,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new qy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[NS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,bt)}static[jS](t){return qy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},gt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},WN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},dh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},KN={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},qN={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},GN={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return bt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:gt,number:WN,date:dh,object:Il,array:qN,boolean:KN,tuple:GN});const vm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var u;let f=o(...a)?i:s;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!vm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class zi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}zi.prototype.__isYupRef=!0;const fi=e=>e==null;function Qi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:m,context:v,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return zi.isRef(I)?I.getValue(n,m,v):I}function x(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},c,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new bt(bt.formatError(I.message||d,re),n,re.path,I.type||u,re.disableStackTrace);return ie.params=re,ie}const E=b?a:l;let S={path:r,parent:m,type:u,from:i.from,createError:x,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(x())},k=I=>{bt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var N;if(j=f.call(S,n,S),typeof((N=j)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function QN(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(zi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function hs(e,t=new Map){if(vm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=hs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,hs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(hs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=hs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=hs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
- `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,f=x=>{i||(i=!0,n(x,o))},c=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let x=0;x<s.length;x++){const b=s[x];b(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&c(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,d,h)=>this.resolve(f)._validate(u,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{bt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new bt(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw bt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new bt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(bt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(bt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):hs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Qi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Qi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Qi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=OS(t).map(s=>new zi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Su(i,n):Su.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Qi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Qi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Qi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=YN(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const XN=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZN(e){const t=ph(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function ph(e){var t,n;const r=XN.exec(e);return r?{year:In(r[1]),month:In(r[2],1)-1,day:In(r[3],1),hour:In(r[4]),minute:In(r[5]),second:In(r[6]),millisecond:r[7]?In(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:In(r[10]),minuteOffset:In(r[11])}:null}function In(e,t=0){return Number(e)||t}let JN=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eM=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,tM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,nM="^\\d{4}-\\d{2}-\\d{2}",rM="\\d{2}:\\d{2}:\\d{2}",iM="(([+-]\\d{2}(:?\\d{2})?)|Z)",sM=new RegExp(`${nM}T${rM}(\\.\\d+)?${iM}$`),oM=e=>fi(e)||e===e.trim(),aM={}.toString();function Eu(){return new DS}class DS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===aM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=gt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=gt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=gt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||gt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=gt.email){return this.matches(JN,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(eM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(tM,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(sM,{name:"datetime",message:n||gt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||gt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=ph(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||gt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=ph(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=gt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:oM})}lowercase(t=gt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=gt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Eu.prototype=DS.prototype;let lM=new Date(""),uM=e=>Object.prototype.toString.call(e)==="[object Date]";class Ju extends Fn{constructor(){super({type:"date",check(t){return uM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=ZN(t),isNaN(t)?Ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(zi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=hh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=hh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ju.INVALID_DATE=lM;Ju.prototype;function cM(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ti.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),zi.isRef(a)&&a.isSibling?s(a.path,o):xm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return IN.array(Array.from(r),n).reverse()}function Qy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function FS(e){return(t,n)=>Qy(e,t)-Qy(e,n)}const fM=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function $l(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=$l(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=$l(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map($l)}):"optional"in e?e.optional():e}const dM=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ti.getter(Ti.join(n),!0)(e);return!!(i&&r in i)};let Yy=e=>Object.prototype.toString.call(e)==="[object Object]";function Xy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const hM=FS([]);function wm(e){return new LS(e)}class LS extends Fn{constructor(t){super({type:"object",check(n){return Yy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=hM,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const c of a){let d=s[c],h=c in i;if(d){let m,x=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:x,context:n.context,parent:l});let b=d instanceof Fn?d.spec:void 0,p=b==null?void 0:b.strict;if(b!=null&&b.strip){f=f||c in i;continue}m=!n.__validating||!p?d.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Yy(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||zi.isRef(d)||f.push(d.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=cM(t,n),r._sortErrors=FS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return $l(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ti.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return dM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(fM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Il.exact,test(n){if(n==null)return!0;const r=Xy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Il.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Xy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Il.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(xf.camelCase)}snakeCase(){return this.transformKeys(xf.snakeCase)}constantCase(){return this.transformKeys(t=>xf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}wm.prototype=LS.prototype;var pM=function(t){return mM(t)&&!gM(t)};function mM(e){return!!e&&typeof e=="object"}function gM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xM(e)}var yM=typeof Symbol=="function"&&Symbol.for,vM=yM?Symbol.for("react.element"):60103;function xM(e){return e.$$typeof===vM}function wM(e){return Array.isArray(e)?[]:{}}function Cu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?da(wM(e),e,t):e}function bM(e,t,n){return e.concat(t).map(function(r){return Cu(r,n)})}function SM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Cu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Cu(t[i],n):r[i]=da(e[i],t[i],n)}),r}function da(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bM,n.isMergeableObject=n.isMergeableObject||pM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):SM(e,t,n):Cu(t,n)}da.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return da(r,i,n)},{})};var mh=da,IS=typeof global=="object"&&global&&global.Object===Object&&global,TM=typeof self=="object"&&self&&self.Object===Object&&self,Ln=IS||TM||Function("return this")(),Hr=Ln.Symbol,$S=Object.prototype,EM=$S.hasOwnProperty,CM=$S.toString,ho=Hr?Hr.toStringTag:void 0;function kM(e){var t=EM.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var i=CM.call(e);return r&&(t?e[ho]=n:delete e[ho]),i}var _M=Object.prototype,PM=_M.toString;function AM(e){return PM.call(e)}var RM="[object Null]",OM="[object Undefined]",Zy=Hr?Hr.toStringTag:void 0;function Ui(e){return e==null?e===void 0?OM:RM:Zy&&Zy in Object(e)?kM(e):AM(e)}function VS(e,t){return function(n){return e(t(n))}}var bm=VS(Object.getPrototypeOf,Object);function Hi(e){return e!=null&&typeof e=="object"}var jM="[object Object]",NM=Function.prototype,MM=Object.prototype,BS=NM.toString,DM=MM.hasOwnProperty,FM=BS.call(Object);function Jy(e){if(!Hi(e)||Ui(e)!=jM)return!1;var t=bm(e);if(t===null)return!0;var n=DM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BS.call(n)==FM}function LM(){this.__data__=[],this.size=0}function zS(e,t){return e===t||e!==e&&t!==t}function ec(e,t){for(var n=e.length;n--;)if(zS(e[n][0],t))return n;return-1}var IM=Array.prototype,$M=IM.splice;function VM(e){var t=this.__data__,n=ec(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$M.call(t,n,1),--this.size,!0}function BM(e){var t=this.__data__,n=ec(t,e);return n<0?void 0:t[n][1]}function zM(e){return ec(this.__data__,e)>-1}function UM(e,t){var n=this.__data__,r=ec(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=LM;rr.prototype.delete=VM;rr.prototype.get=BM;rr.prototype.has=zM;rr.prototype.set=UM;function HM(){this.__data__=new rr,this.size=0}function WM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KM(e){return this.__data__.get(e)}function qM(e){return this.__data__.has(e)}function Oa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GM="[object AsyncFunction]",QM="[object Function]",YM="[object GeneratorFunction]",XM="[object Proxy]";function US(e){if(!Oa(e))return!1;var t=Ui(e);return t==QM||t==YM||t==GM||t==XM}var wf=Ln["__core-js_shared__"],ev=function(){var e=/[^.]+$/.exec(wf&&wf.keys&&wf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZM(e){return!!ev&&ev in e}var JM=Function.prototype,e3=JM.toString;function Wi(e){if(e!=null){try{return e3.call(e)}catch{}try{return e+""}catch{}}return""}var t3=/[\\^$.*+?()[\]{}|]/g,n3=/^\[object .+?Constructor\]$/,r3=Function.prototype,i3=Object.prototype,s3=r3.toString,o3=i3.hasOwnProperty,a3=RegExp("^"+s3.call(o3).replace(t3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l3(e){if(!Oa(e)||ZM(e))return!1;var t=US(e)?a3:n3;return t.test(Wi(e))}function u3(e,t){return e==null?void 0:e[t]}function Ki(e,t){var n=u3(e,t);return l3(n)?n:void 0}var ha=Ki(Ln,"Map"),pa=Ki(Object,"create");function c3(){this.__data__=pa?pa(null):{},this.size=0}function f3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var d3="__lodash_hash_undefined__",h3=Object.prototype,p3=h3.hasOwnProperty;function m3(e){var t=this.__data__;if(pa){var n=t[e];return n===d3?void 0:n}return p3.call(t,e)?t[e]:void 0}var g3=Object.prototype,y3=g3.hasOwnProperty;function v3(e){var t=this.__data__;return pa?t[e]!==void 0:y3.call(t,e)}var x3="__lodash_hash_undefined__";function w3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?x3:t,this}function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=c3;Ni.prototype.delete=f3;Ni.prototype.get=m3;Ni.prototype.has=v3;Ni.prototype.set=w3;function b3(){this.size=0,this.__data__={hash:new Ni,map:new(ha||rr),string:new Ni}}function S3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var n=e.__data__;return S3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function T3(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function E3(e){return tc(this,e).get(e)}function C3(e){return tc(this,e).has(e)}function k3(e,t){var n=tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=b3;Qr.prototype.delete=T3;Qr.prototype.get=E3;Qr.prototype.has=C3;Qr.prototype.set=k3;var _3=200;function P3(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!ha||r.length<_3-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function Js(e){var t=this.__data__=new rr(e);this.size=t.size}Js.prototype.clear=HM;Js.prototype.delete=WM;Js.prototype.get=KM;Js.prototype.has=qM;Js.prototype.set=P3;function A3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var tv=function(){try{var e=Ki(Object,"defineProperty");return e({},"",{}),e}catch{}}();function HS(e,t,n){t=="__proto__"&&tv?tv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var R3=Object.prototype,O3=R3.hasOwnProperty;function WS(e,t,n){var r=e[t];(!(O3.call(e,t)&&zS(r,n))||n===void 0&&!(t in e))&&HS(e,t,n)}function nc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?HS(n,a,l):WS(n,a,l)}return n}function j3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var N3="[object Arguments]";function nv(e){return Hi(e)&&Ui(e)==N3}var KS=Object.prototype,M3=KS.hasOwnProperty,D3=KS.propertyIsEnumerable,F3=nv(function(){return arguments}())?nv:function(e){return Hi(e)&&M3.call(e,"callee")&&!D3.call(e,"callee")},ja=Array.isArray;function L3(){return!1}var qS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,rv=qS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,I3=rv&&rv.exports===qS,iv=I3?Ln.Buffer:void 0,$3=iv?iv.isBuffer:void 0,GS=$3||L3,V3=9007199254740991,B3=/^(?:0|[1-9]\d*)$/;function z3(e,t){var n=typeof e;return t=t??V3,!!t&&(n=="number"||n!="symbol"&&B3.test(e))&&e>-1&&e%1==0&&e<t}var U3=9007199254740991;function QS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=U3}var H3="[object Arguments]",W3="[object Array]",K3="[object Boolean]",q3="[object Date]",G3="[object Error]",Q3="[object Function]",Y3="[object Map]",X3="[object Number]",Z3="[object Object]",J3="[object RegExp]",eD="[object Set]",tD="[object String]",nD="[object WeakMap]",rD="[object ArrayBuffer]",iD="[object DataView]",sD="[object Float32Array]",oD="[object Float64Array]",aD="[object Int8Array]",lD="[object Int16Array]",uD="[object Int32Array]",cD="[object Uint8Array]",fD="[object Uint8ClampedArray]",dD="[object Uint16Array]",hD="[object Uint32Array]",me={};me[sD]=me[oD]=me[aD]=me[lD]=me[uD]=me[cD]=me[fD]=me[dD]=me[hD]=!0;me[H3]=me[W3]=me[rD]=me[K3]=me[iD]=me[q3]=me[G3]=me[Q3]=me[Y3]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=me[nD]=!1;function pD(e){return Hi(e)&&QS(e.length)&&!!me[Ui(e)]}function Sm(e){return function(t){return e(t)}}var YS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Do=YS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,mD=Do&&Do.exports===YS,bf=mD&&IS.process,Hs=function(){try{var e=Do&&Do.require&&Do.require("util").types;return e||bf&&bf.binding&&bf.binding("util")}catch{}}(),sv=Hs&&Hs.isTypedArray,gD=sv?Sm(sv):pD,yD=Object.prototype,vD=yD.hasOwnProperty;function XS(e,t){var n=ja(e),r=!n&&F3(e),i=!n&&!r&&GS(e),s=!n&&!r&&!i&&gD(e),o=n||r||i||s,a=o?j3(e.length,String):[],l=a.length;for(var u in e)(t||vD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||z3(u,l)))&&a.push(u);return a}var xD=Object.prototype;function Tm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||xD;return e===n}var wD=VS(Object.keys,Object),bD=Object.prototype,SD=bD.hasOwnProperty;function TD(e){if(!Tm(e))return wD(e);var t=[];for(var n in Object(e))SD.call(e,n)&&n!="constructor"&&t.push(n);return t}function ZS(e){return e!=null&&QS(e.length)&&!US(e)}function Em(e){return ZS(e)?XS(e):TD(e)}function ED(e,t){return e&&nc(t,Em(t),e)}function CD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var kD=Object.prototype,_D=kD.hasOwnProperty;function PD(e){if(!Oa(e))return CD(e);var t=Tm(e),n=[];for(var r in e)r=="constructor"&&(t||!_D.call(e,r))||n.push(r);return n}function Cm(e){return ZS(e)?XS(e,!0):PD(e)}function AD(e,t){return e&&nc(t,Cm(t),e)}var JS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ov=JS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,RD=ov&&ov.exports===JS,av=RD?Ln.Buffer:void 0,lv=av?av.allocUnsafe:void 0;function OD(e,t){if(t)return e.slice();var n=e.length,r=lv?lv(n):new e.constructor(n);return e.copy(r),r}function eT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function jD(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function tT(){return[]}var ND=Object.prototype,MD=ND.propertyIsEnumerable,uv=Object.getOwnPropertySymbols,km=uv?function(e){return e==null?[]:(e=Object(e),jD(uv(e),function(t){return MD.call(e,t)}))}:tT;function DD(e,t){return nc(e,km(e),t)}function nT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var FD=Object.getOwnPropertySymbols,rT=FD?function(e){for(var t=[];e;)nT(t,km(e)),e=bm(e);return t}:tT;function LD(e,t){return nc(e,rT(e),t)}function iT(e,t,n){var r=t(e);return ja(e)?r:nT(r,n(e))}function ID(e){return iT(e,Em,km)}function $D(e){return iT(e,Cm,rT)}var gh=Ki(Ln,"DataView"),yh=Ki(Ln,"Promise"),vh=Ki(Ln,"Set"),xh=Ki(Ln,"WeakMap"),cv="[object Map]",VD="[object Object]",fv="[object Promise]",dv="[object Set]",hv="[object WeakMap]",pv="[object DataView]",BD=Wi(gh),zD=Wi(ha),UD=Wi(yh),HD=Wi(vh),WD=Wi(xh),zn=Ui;(gh&&zn(new gh(new ArrayBuffer(1)))!=pv||ha&&zn(new ha)!=cv||yh&&zn(yh.resolve())!=fv||vh&&zn(new vh)!=dv||xh&&zn(new xh)!=hv)&&(zn=function(e){var t=Ui(e),n=t==VD?e.constructor:void 0,r=n?Wi(n):"";if(r)switch(r){case BD:return pv;case zD:return cv;case UD:return fv;case HD:return dv;case WD:return hv}return t});var KD=Object.prototype,qD=KD.hasOwnProperty;function GD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&qD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var mv=Ln.Uint8Array;function _m(e){var t=new e.constructor(e.byteLength);return new mv(t).set(new mv(e)),t}function QD(e,t){var n=t?_m(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var YD=/\w*$/;function XD(e){var t=new e.constructor(e.source,YD.exec(e));return t.lastIndex=e.lastIndex,t}var gv=Hr?Hr.prototype:void 0,yv=gv?gv.valueOf:void 0;function ZD(e){return yv?Object(yv.call(e)):{}}function JD(e,t){var n=t?_m(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var eF="[object Boolean]",tF="[object Date]",nF="[object Map]",rF="[object Number]",iF="[object RegExp]",sF="[object Set]",oF="[object String]",aF="[object Symbol]",lF="[object ArrayBuffer]",uF="[object DataView]",cF="[object Float32Array]",fF="[object Float64Array]",dF="[object Int8Array]",hF="[object Int16Array]",pF="[object Int32Array]",mF="[object Uint8Array]",gF="[object Uint8ClampedArray]",yF="[object Uint16Array]",vF="[object Uint32Array]";function xF(e,t,n){var r=e.constructor;switch(t){case lF:return _m(e);case eF:case tF:return new r(+e);case uF:return QD(e,n);case cF:case fF:case dF:case hF:case pF:case mF:case gF:case yF:case vF:return JD(e,n);case nF:return new r;case rF:case oF:return new r(e);case iF:return XD(e);case sF:return new r;case aF:return ZD(e)}}var vv=Object.create,wF=function(){function e(){}return function(t){if(!Oa(t))return{};if(vv)return vv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function bF(e){return typeof e.constructor=="function"&&!Tm(e)?wF(bm(e)):{}}var SF="[object Map]";function TF(e){return Hi(e)&&zn(e)==SF}var xv=Hs&&Hs.isMap,EF=xv?Sm(xv):TF,CF="[object Set]";function kF(e){return Hi(e)&&zn(e)==CF}var wv=Hs&&Hs.isSet,_F=wv?Sm(wv):kF,PF=1,AF=2,RF=4,sT="[object Arguments]",OF="[object Array]",jF="[object Boolean]",NF="[object Date]",MF="[object Error]",oT="[object Function]",DF="[object GeneratorFunction]",FF="[object Map]",LF="[object Number]",aT="[object Object]",IF="[object RegExp]",$F="[object Set]",VF="[object String]",BF="[object Symbol]",zF="[object WeakMap]",UF="[object ArrayBuffer]",HF="[object DataView]",WF="[object Float32Array]",KF="[object Float64Array]",qF="[object Int8Array]",GF="[object Int16Array]",QF="[object Int32Array]",YF="[object Uint8Array]",XF="[object Uint8ClampedArray]",ZF="[object Uint16Array]",JF="[object Uint32Array]",fe={};fe[sT]=fe[OF]=fe[UF]=fe[HF]=fe[jF]=fe[NF]=fe[WF]=fe[KF]=fe[qF]=fe[GF]=fe[QF]=fe[FF]=fe[LF]=fe[aT]=fe[IF]=fe[$F]=fe[VF]=fe[BF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=!0;fe[MF]=fe[oT]=fe[zF]=!1;function Fo(e,t,n,r,i,s){var o,a=t&PF,l=t&AF,u=t&RF;if(o!==void 0)return o;if(!Oa(e))return e;var f=ja(e);if(f){if(o=GD(e),!a)return eT(e,o)}else{var c=zn(e),d=c==oT||c==DF;if(GS(e))return OD(e,a);if(c==aT||c==sT||d&&!i){if(o=l||d?{}:bF(e),!a)return l?LD(e,AD(o,e)):DD(e,ED(o,e))}else{if(!fe[c])return i?e:{};o=xF(e,c,a)}}s||(s=new Js);var h=s.get(e);if(h)return h;s.set(e,o),_F(e)?e.forEach(function(b){o.add(Fo(b,t,n,b,e,s))}):EF(e)&&e.forEach(function(b,p){o.set(p,Fo(b,t,n,p,e,s))});var m=u?l?$D:ID:l?Cm:Em,x=f?void 0:m(e);return A3(x||e,function(b,p){x&&(p=b,b=e[p]),WS(o,p,Fo(b,t,n,p,e,s))}),o}var e5=1,t5=4;function hl(e){return Fo(e,e5|t5)}var bv=Array.isArray,Sv=Object.keys,n5=Object.prototype.hasOwnProperty,r5=typeof Element<"u";function wh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=bv(e),r=bv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!wh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!=f)return!1;if(u&&f)return e.toString()==t.toString();var c=Sv(e);if(s=c.length,s!==Sv(t).length)return!1;for(i=s;i--!==0;)if(!n5.call(t,c[i]))return!1;if(r5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!wh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var i5=function(t,n){try{return wh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Ws(i5);var s5=4;function Tv(e){return Fo(e,s5)}function lT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var o5="[object Symbol]";function Pm(e){return typeof e=="symbol"||Hi(e)&&Ui(e)==o5}var a5="Expected a function";function Am(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(a5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Am.Cache||Qr),n}Am.Cache=Qr;var l5=500;function u5(e){var t=Am(e,function(r){return n.size===l5&&n.clear(),r}),n=t.cache;return t}var c5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f5=/\\(\\)?/g,d5=u5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(c5,function(n,r,i,s){t.push(i?s.replace(f5,"$1"):r||n)}),t}),h5=1/0;function p5(e){if(typeof e=="string"||Pm(e))return e;var t=e+"";return t=="0"&&1/e==-h5?"-0":t}var m5=1/0,Ev=Hr?Hr.prototype:void 0,Cv=Ev?Ev.toString:void 0;function uT(e){if(typeof e=="string")return e;if(ja(e))return lT(e,uT)+"";if(Pm(e))return Cv?Cv.call(e):"";var t=e+"";return t=="0"&&1/e==-m5?"-0":t}function g5(e){return e==null?"":uT(e)}function cT(e){return ja(e)?lT(e,p5):Pm(e)?[e]:eT(d5(g5(e)))}var fT={exports:{}},ue={};/** @license React v16.13.1
98
+ `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,f=v=>{i||(i=!0,n(v,o))},c=v=>{i||(i=!0,r(v,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let v=0;v<s.length;v++){const b=s[v];b(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&c(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,d,h)=>this.resolve(f)._validate(u,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{bt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new bt(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw bt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new bt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(bt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(bt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):hs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Qi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Qi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Qi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=RS(t).map(s=>new zi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Su(i,n):Su.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Qi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Qi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Qi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=QN(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const YN=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function XN(e){const t=hh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function hh(e){var t,n;const r=YN.exec(e);return r?{year:In(r[1]),month:In(r[2],1)-1,day:In(r[3],1),hour:In(r[4]),minute:In(r[5]),second:In(r[6]),millisecond:r[7]?In(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:In(r[10]),minuteOffset:In(r[11])}:null}function In(e,t=0){return Number(e)||t}let ZN=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,JN=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,eM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,tM="^\\d{4}-\\d{2}-\\d{2}",nM="\\d{2}:\\d{2}:\\d{2}",rM="(([+-]\\d{2}(:?\\d{2})?)|Z)",iM=new RegExp(`${tM}T${nM}(\\.\\d+)?${rM}$`),sM=e=>fi(e)||e===e.trim(),oM={}.toString();function Eu(){return new MS}class MS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===oM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=gt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=gt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=gt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||gt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=gt.email){return this.matches(ZN,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(JN,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(eM,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(iM,{name:"datetime",message:n||gt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||gt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=hh(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||gt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=hh(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=gt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:sM})}lowercase(t=gt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=gt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Eu.prototype=MS.prototype;let aM=new Date(""),lM=e=>Object.prototype.toString.call(e)==="[object Date]";class Ju extends Fn{constructor(){super({type:"date",check(t){return lM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=XN(t),isNaN(t)?Ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(zi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=dh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=dh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ju.INVALID_DATE=aM;Ju.prototype;function uM(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ti.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),zi.isRef(a)&&a.isSibling?s(a.path,o):vm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return LN.array(Array.from(r),n).reverse()}function Gy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function DS(e){return(t,n)=>Gy(e,t)-Gy(e,n)}const cM=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function $l(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=$l(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=$l(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map($l)}):"optional"in e?e.optional():e}const fM=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ti.getter(Ti.join(n),!0)(e);return!!(i&&r in i)};let Qy=e=>Object.prototype.toString.call(e)==="[object Object]";function Yy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const dM=DS([]);function xm(e){return new FS(e)}class FS extends Fn{constructor(t){super({type:"object",check(n){return Qy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=dM,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const c of a){let d=s[c],h=c in i;if(d){let m,v=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:v,context:n.context,parent:l});let b=d instanceof Fn?d.spec:void 0,p=b==null?void 0:b.strict;if(b!=null&&b.strip){f=f||c in i;continue}m=!n.__validating||!p?d.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Qy(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||zi.isRef(d)||f.push(d.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=uM(t,n),r._sortErrors=DS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return $l(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ti.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return fM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(cM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Il.exact,test(n){if(n==null)return!0;const r=Yy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Il.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Yy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Il.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(vf.camelCase)}snakeCase(){return this.transformKeys(vf.snakeCase)}constantCase(){return this.transformKeys(t=>vf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}xm.prototype=FS.prototype;var hM=function(t){return pM(t)&&!mM(t)};function pM(e){return!!e&&typeof e=="object"}function mM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||vM(e)}var gM=typeof Symbol=="function"&&Symbol.for,yM=gM?Symbol.for("react.element"):60103;function vM(e){return e.$$typeof===yM}function xM(e){return Array.isArray(e)?[]:{}}function Cu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?da(xM(e),e,t):e}function wM(e,t,n){return e.concat(t).map(function(r){return Cu(r,n)})}function bM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Cu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Cu(t[i],n):r[i]=da(e[i],t[i],n)}),r}function da(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||wM,n.isMergeableObject=n.isMergeableObject||hM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):bM(e,t,n):Cu(t,n)}da.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return da(r,i,n)},{})};var ph=da,LS=typeof global=="object"&&global&&global.Object===Object&&global,SM=typeof self=="object"&&self&&self.Object===Object&&self,Ln=LS||SM||Function("return this")(),Hr=Ln.Symbol,IS=Object.prototype,TM=IS.hasOwnProperty,EM=IS.toString,ho=Hr?Hr.toStringTag:void 0;function CM(e){var t=TM.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var i=EM.call(e);return r&&(t?e[ho]=n:delete e[ho]),i}var kM=Object.prototype,_M=kM.toString;function PM(e){return _M.call(e)}var AM="[object Null]",RM="[object Undefined]",Xy=Hr?Hr.toStringTag:void 0;function Ui(e){return e==null?e===void 0?RM:AM:Xy&&Xy in Object(e)?CM(e):PM(e)}function $S(e,t){return function(n){return e(t(n))}}var wm=$S(Object.getPrototypeOf,Object);function Hi(e){return e!=null&&typeof e=="object"}var OM="[object Object]",jM=Function.prototype,NM=Object.prototype,VS=jM.toString,MM=NM.hasOwnProperty,DM=VS.call(Object);function Zy(e){if(!Hi(e)||Ui(e)!=OM)return!1;var t=wm(e);if(t===null)return!0;var n=MM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&VS.call(n)==DM}function FM(){this.__data__=[],this.size=0}function BS(e,t){return e===t||e!==e&&t!==t}function ec(e,t){for(var n=e.length;n--;)if(BS(e[n][0],t))return n;return-1}var LM=Array.prototype,IM=LM.splice;function $M(e){var t=this.__data__,n=ec(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():IM.call(t,n,1),--this.size,!0}function VM(e){var t=this.__data__,n=ec(t,e);return n<0?void 0:t[n][1]}function BM(e){return ec(this.__data__,e)>-1}function zM(e,t){var n=this.__data__,r=ec(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=FM;rr.prototype.delete=$M;rr.prototype.get=VM;rr.prototype.has=BM;rr.prototype.set=zM;function UM(){this.__data__=new rr,this.size=0}function HM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function WM(e){return this.__data__.get(e)}function KM(e){return this.__data__.has(e)}function Oa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var qM="[object AsyncFunction]",GM="[object Function]",QM="[object GeneratorFunction]",YM="[object Proxy]";function zS(e){if(!Oa(e))return!1;var t=Ui(e);return t==GM||t==QM||t==qM||t==YM}var xf=Ln["__core-js_shared__"],Jy=function(){var e=/[^.]+$/.exec(xf&&xf.keys&&xf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function XM(e){return!!Jy&&Jy in e}var ZM=Function.prototype,JM=ZM.toString;function Wi(e){if(e!=null){try{return JM.call(e)}catch{}try{return e+""}catch{}}return""}var e3=/[\\^$.*+?()[\]{}|]/g,t3=/^\[object .+?Constructor\]$/,n3=Function.prototype,r3=Object.prototype,i3=n3.toString,s3=r3.hasOwnProperty,o3=RegExp("^"+i3.call(s3).replace(e3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a3(e){if(!Oa(e)||XM(e))return!1;var t=zS(e)?o3:t3;return t.test(Wi(e))}function l3(e,t){return e==null?void 0:e[t]}function Ki(e,t){var n=l3(e,t);return a3(n)?n:void 0}var ha=Ki(Ln,"Map"),pa=Ki(Object,"create");function u3(){this.__data__=pa?pa(null):{},this.size=0}function c3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var f3="__lodash_hash_undefined__",d3=Object.prototype,h3=d3.hasOwnProperty;function p3(e){var t=this.__data__;if(pa){var n=t[e];return n===f3?void 0:n}return h3.call(t,e)?t[e]:void 0}var m3=Object.prototype,g3=m3.hasOwnProperty;function y3(e){var t=this.__data__;return pa?t[e]!==void 0:g3.call(t,e)}var v3="__lodash_hash_undefined__";function x3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?v3:t,this}function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=u3;Ni.prototype.delete=c3;Ni.prototype.get=p3;Ni.prototype.has=y3;Ni.prototype.set=x3;function w3(){this.size=0,this.__data__={hash:new Ni,map:new(ha||rr),string:new Ni}}function b3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var n=e.__data__;return b3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function S3(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function T3(e){return tc(this,e).get(e)}function E3(e){return tc(this,e).has(e)}function C3(e,t){var n=tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=w3;Qr.prototype.delete=S3;Qr.prototype.get=T3;Qr.prototype.has=E3;Qr.prototype.set=C3;var k3=200;function _3(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!ha||r.length<k3-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function Js(e){var t=this.__data__=new rr(e);this.size=t.size}Js.prototype.clear=UM;Js.prototype.delete=HM;Js.prototype.get=WM;Js.prototype.has=KM;Js.prototype.set=_3;function P3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var ev=function(){try{var e=Ki(Object,"defineProperty");return e({},"",{}),e}catch{}}();function US(e,t,n){t=="__proto__"&&ev?ev(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var A3=Object.prototype,R3=A3.hasOwnProperty;function HS(e,t,n){var r=e[t];(!(R3.call(e,t)&&BS(r,n))||n===void 0&&!(t in e))&&US(e,t,n)}function nc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?US(n,a,l):HS(n,a,l)}return n}function O3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var j3="[object Arguments]";function tv(e){return Hi(e)&&Ui(e)==j3}var WS=Object.prototype,N3=WS.hasOwnProperty,M3=WS.propertyIsEnumerable,D3=tv(function(){return arguments}())?tv:function(e){return Hi(e)&&N3.call(e,"callee")&&!M3.call(e,"callee")},ja=Array.isArray;function F3(){return!1}var KS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,nv=KS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,L3=nv&&nv.exports===KS,rv=L3?Ln.Buffer:void 0,I3=rv?rv.isBuffer:void 0,qS=I3||F3,$3=9007199254740991,V3=/^(?:0|[1-9]\d*)$/;function B3(e,t){var n=typeof e;return t=t??$3,!!t&&(n=="number"||n!="symbol"&&V3.test(e))&&e>-1&&e%1==0&&e<t}var z3=9007199254740991;function GS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=z3}var U3="[object Arguments]",H3="[object Array]",W3="[object Boolean]",K3="[object Date]",q3="[object Error]",G3="[object Function]",Q3="[object Map]",Y3="[object Number]",X3="[object Object]",Z3="[object RegExp]",J3="[object Set]",eD="[object String]",tD="[object WeakMap]",nD="[object ArrayBuffer]",rD="[object DataView]",iD="[object Float32Array]",sD="[object Float64Array]",oD="[object Int8Array]",aD="[object Int16Array]",lD="[object Int32Array]",uD="[object Uint8Array]",cD="[object Uint8ClampedArray]",fD="[object Uint16Array]",dD="[object Uint32Array]",me={};me[iD]=me[sD]=me[oD]=me[aD]=me[lD]=me[uD]=me[cD]=me[fD]=me[dD]=!0;me[U3]=me[H3]=me[nD]=me[W3]=me[rD]=me[K3]=me[q3]=me[G3]=me[Q3]=me[Y3]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=!1;function hD(e){return Hi(e)&&GS(e.length)&&!!me[Ui(e)]}function bm(e){return function(t){return e(t)}}var QS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Do=QS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,pD=Do&&Do.exports===QS,wf=pD&&LS.process,Hs=function(){try{var e=Do&&Do.require&&Do.require("util").types;return e||wf&&wf.binding&&wf.binding("util")}catch{}}(),iv=Hs&&Hs.isTypedArray,mD=iv?bm(iv):hD,gD=Object.prototype,yD=gD.hasOwnProperty;function YS(e,t){var n=ja(e),r=!n&&D3(e),i=!n&&!r&&qS(e),s=!n&&!r&&!i&&mD(e),o=n||r||i||s,a=o?O3(e.length,String):[],l=a.length;for(var u in e)(t||yD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||B3(u,l)))&&a.push(u);return a}var vD=Object.prototype;function Sm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vD;return e===n}var xD=$S(Object.keys,Object),wD=Object.prototype,bD=wD.hasOwnProperty;function SD(e){if(!Sm(e))return xD(e);var t=[];for(var n in Object(e))bD.call(e,n)&&n!="constructor"&&t.push(n);return t}function XS(e){return e!=null&&GS(e.length)&&!zS(e)}function Tm(e){return XS(e)?YS(e):SD(e)}function TD(e,t){return e&&nc(t,Tm(t),e)}function ED(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var CD=Object.prototype,kD=CD.hasOwnProperty;function _D(e){if(!Oa(e))return ED(e);var t=Sm(e),n=[];for(var r in e)r=="constructor"&&(t||!kD.call(e,r))||n.push(r);return n}function Em(e){return XS(e)?YS(e,!0):_D(e)}function PD(e,t){return e&&nc(t,Em(t),e)}var ZS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,sv=ZS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,AD=sv&&sv.exports===ZS,ov=AD?Ln.Buffer:void 0,av=ov?ov.allocUnsafe:void 0;function RD(e,t){if(t)return e.slice();var n=e.length,r=av?av(n):new e.constructor(n);return e.copy(r),r}function JS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function OD(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function eT(){return[]}var jD=Object.prototype,ND=jD.propertyIsEnumerable,lv=Object.getOwnPropertySymbols,Cm=lv?function(e){return e==null?[]:(e=Object(e),OD(lv(e),function(t){return ND.call(e,t)}))}:eT;function MD(e,t){return nc(e,Cm(e),t)}function tT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var DD=Object.getOwnPropertySymbols,nT=DD?function(e){for(var t=[];e;)tT(t,Cm(e)),e=wm(e);return t}:eT;function FD(e,t){return nc(e,nT(e),t)}function rT(e,t,n){var r=t(e);return ja(e)?r:tT(r,n(e))}function LD(e){return rT(e,Tm,Cm)}function ID(e){return rT(e,Em,nT)}var mh=Ki(Ln,"DataView"),gh=Ki(Ln,"Promise"),yh=Ki(Ln,"Set"),vh=Ki(Ln,"WeakMap"),uv="[object Map]",$D="[object Object]",cv="[object Promise]",fv="[object Set]",dv="[object WeakMap]",hv="[object DataView]",VD=Wi(mh),BD=Wi(ha),zD=Wi(gh),UD=Wi(yh),HD=Wi(vh),zn=Ui;(mh&&zn(new mh(new ArrayBuffer(1)))!=hv||ha&&zn(new ha)!=uv||gh&&zn(gh.resolve())!=cv||yh&&zn(new yh)!=fv||vh&&zn(new vh)!=dv)&&(zn=function(e){var t=Ui(e),n=t==$D?e.constructor:void 0,r=n?Wi(n):"";if(r)switch(r){case VD:return hv;case BD:return uv;case zD:return cv;case UD:return fv;case HD:return dv}return t});var WD=Object.prototype,KD=WD.hasOwnProperty;function qD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&KD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var pv=Ln.Uint8Array;function km(e){var t=new e.constructor(e.byteLength);return new pv(t).set(new pv(e)),t}function GD(e,t){var n=t?km(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var QD=/\w*$/;function YD(e){var t=new e.constructor(e.source,QD.exec(e));return t.lastIndex=e.lastIndex,t}var mv=Hr?Hr.prototype:void 0,gv=mv?mv.valueOf:void 0;function XD(e){return gv?Object(gv.call(e)):{}}function ZD(e,t){var n=t?km(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var JD="[object Boolean]",eF="[object Date]",tF="[object Map]",nF="[object Number]",rF="[object RegExp]",iF="[object Set]",sF="[object String]",oF="[object Symbol]",aF="[object ArrayBuffer]",lF="[object DataView]",uF="[object Float32Array]",cF="[object Float64Array]",fF="[object Int8Array]",dF="[object Int16Array]",hF="[object Int32Array]",pF="[object Uint8Array]",mF="[object Uint8ClampedArray]",gF="[object Uint16Array]",yF="[object Uint32Array]";function vF(e,t,n){var r=e.constructor;switch(t){case aF:return km(e);case JD:case eF:return new r(+e);case lF:return GD(e,n);case uF:case cF:case fF:case dF:case hF:case pF:case mF:case gF:case yF:return ZD(e,n);case tF:return new r;case nF:case sF:return new r(e);case rF:return YD(e);case iF:return new r;case oF:return XD(e)}}var yv=Object.create,xF=function(){function e(){}return function(t){if(!Oa(t))return{};if(yv)return yv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wF(e){return typeof e.constructor=="function"&&!Sm(e)?xF(wm(e)):{}}var bF="[object Map]";function SF(e){return Hi(e)&&zn(e)==bF}var vv=Hs&&Hs.isMap,TF=vv?bm(vv):SF,EF="[object Set]";function CF(e){return Hi(e)&&zn(e)==EF}var xv=Hs&&Hs.isSet,kF=xv?bm(xv):CF,_F=1,PF=2,AF=4,iT="[object Arguments]",RF="[object Array]",OF="[object Boolean]",jF="[object Date]",NF="[object Error]",sT="[object Function]",MF="[object GeneratorFunction]",DF="[object Map]",FF="[object Number]",oT="[object Object]",LF="[object RegExp]",IF="[object Set]",$F="[object String]",VF="[object Symbol]",BF="[object WeakMap]",zF="[object ArrayBuffer]",UF="[object DataView]",HF="[object Float32Array]",WF="[object Float64Array]",KF="[object Int8Array]",qF="[object Int16Array]",GF="[object Int32Array]",QF="[object Uint8Array]",YF="[object Uint8ClampedArray]",XF="[object Uint16Array]",ZF="[object Uint32Array]",fe={};fe[iT]=fe[RF]=fe[zF]=fe[UF]=fe[OF]=fe[jF]=fe[HF]=fe[WF]=fe[KF]=fe[qF]=fe[GF]=fe[DF]=fe[FF]=fe[oT]=fe[LF]=fe[IF]=fe[$F]=fe[VF]=fe[QF]=fe[YF]=fe[XF]=fe[ZF]=!0;fe[NF]=fe[sT]=fe[BF]=!1;function Fo(e,t,n,r,i,s){var o,a=t&_F,l=t&PF,u=t&AF;if(o!==void 0)return o;if(!Oa(e))return e;var f=ja(e);if(f){if(o=qD(e),!a)return JS(e,o)}else{var c=zn(e),d=c==sT||c==MF;if(qS(e))return RD(e,a);if(c==oT||c==iT||d&&!i){if(o=l||d?{}:wF(e),!a)return l?FD(e,PD(o,e)):MD(e,TD(o,e))}else{if(!fe[c])return i?e:{};o=vF(e,c,a)}}s||(s=new Js);var h=s.get(e);if(h)return h;s.set(e,o),kF(e)?e.forEach(function(b){o.add(Fo(b,t,n,b,e,s))}):TF(e)&&e.forEach(function(b,p){o.set(p,Fo(b,t,n,p,e,s))});var m=u?l?ID:LD:l?Em:Tm,v=f?void 0:m(e);return P3(v||e,function(b,p){v&&(p=b,b=e[p]),HS(o,p,Fo(b,t,n,p,e,s))}),o}var JF=1,e5=4;function hl(e){return Fo(e,JF|e5)}var wv=Array.isArray,bv=Object.keys,t5=Object.prototype.hasOwnProperty,n5=typeof Element<"u";function xh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=wv(e),r=wv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!xh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!=f)return!1;if(u&&f)return e.toString()==t.toString();var c=bv(e);if(s=c.length,s!==bv(t).length)return!1;for(i=s;i--!==0;)if(!t5.call(t,c[i]))return!1;if(n5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!xh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var r5=function(t,n){try{return xh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Ws(r5);var i5=4;function Sv(e){return Fo(e,i5)}function aT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var s5="[object Symbol]";function _m(e){return typeof e=="symbol"||Hi(e)&&Ui(e)==s5}var o5="Expected a function";function Pm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(o5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Pm.Cache||Qr),n}Pm.Cache=Qr;var a5=500;function l5(e){var t=Pm(e,function(r){return n.size===a5&&n.clear(),r}),n=t.cache;return t}var u5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c5=/\\(\\)?/g,f5=l5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(u5,function(n,r,i,s){t.push(i?s.replace(c5,"$1"):r||n)}),t}),d5=1/0;function h5(e){if(typeof e=="string"||_m(e))return e;var t=e+"";return t=="0"&&1/e==-d5?"-0":t}var p5=1/0,Tv=Hr?Hr.prototype:void 0,Ev=Tv?Tv.toString:void 0;function lT(e){if(typeof e=="string")return e;if(ja(e))return aT(e,lT)+"";if(_m(e))return Ev?Ev.call(e):"";var t=e+"";return t=="0"&&1/e==-p5?"-0":t}function m5(e){return e==null?"":lT(e)}function uT(e){return ja(e)?aT(e,h5):_m(e)?[e]:JS(f5(m5(e)))}var cT={exports:{}},ue={};/** @license React v16.13.1
99
99
  * react-is.production.min.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var We=typeof Symbol=="function"&&Symbol.for,Rm=We?Symbol.for("react.element"):60103,Om=We?Symbol.for("react.portal"):60106,rc=We?Symbol.for("react.fragment"):60107,ic=We?Symbol.for("react.strict_mode"):60108,sc=We?Symbol.for("react.profiler"):60114,oc=We?Symbol.for("react.provider"):60109,ac=We?Symbol.for("react.context"):60110,jm=We?Symbol.for("react.async_mode"):60111,lc=We?Symbol.for("react.concurrent_mode"):60111,uc=We?Symbol.for("react.forward_ref"):60112,cc=We?Symbol.for("react.suspense"):60113,y5=We?Symbol.for("react.suspense_list"):60120,fc=We?Symbol.for("react.memo"):60115,dc=We?Symbol.for("react.lazy"):60116,v5=We?Symbol.for("react.block"):60121,x5=We?Symbol.for("react.fundamental"):60117,w5=We?Symbol.for("react.responder"):60118,b5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Rm:switch(e=e.type,e){case jm:case lc:case rc:case sc:case ic:case cc:return e;default:switch(e=e&&e.$$typeof,e){case ac:case uc:case dc:case fc:case oc:return e;default:return t}}case Om:return t}}}function dT(e){return Vt(e)===lc}ue.AsyncMode=jm;ue.ConcurrentMode=lc;ue.ContextConsumer=ac;ue.ContextProvider=oc;ue.Element=Rm;ue.ForwardRef=uc;ue.Fragment=rc;ue.Lazy=dc;ue.Memo=fc;ue.Portal=Om;ue.Profiler=sc;ue.StrictMode=ic;ue.Suspense=cc;ue.isAsyncMode=function(e){return dT(e)||Vt(e)===jm};ue.isConcurrentMode=dT;ue.isContextConsumer=function(e){return Vt(e)===ac};ue.isContextProvider=function(e){return Vt(e)===oc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rm};ue.isForwardRef=function(e){return Vt(e)===uc};ue.isFragment=function(e){return Vt(e)===rc};ue.isLazy=function(e){return Vt(e)===dc};ue.isMemo=function(e){return Vt(e)===fc};ue.isPortal=function(e){return Vt(e)===Om};ue.isProfiler=function(e){return Vt(e)===sc};ue.isStrictMode=function(e){return Vt(e)===ic};ue.isSuspense=function(e){return Vt(e)===cc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rc||e===lc||e===sc||e===ic||e===cc||e===y5||typeof e=="object"&&e!==null&&(e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===oc||e.$$typeof===ac||e.$$typeof===uc||e.$$typeof===x5||e.$$typeof===w5||e.$$typeof===b5||e.$$typeof===v5)};ue.typeOf=Vt;fT.exports=ue;var S5=fT.exports,hT=S5,T5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},pT={};pT[hT.ForwardRef]=T5;pT[hT.Memo]=E5;function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}function mT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hc=y.createContext(void 0);hc.displayName="FormikContext";hc.Provider;hc.Consumer;function C5(){var e=y.useContext(hc);return e}var on=function(t){return typeof t=="function"},pc=function(t){return t!==null&&typeof t=="object"},k5=function(t){return String(Math.floor(Number(t)))===t},Sf=function(t){return Object.prototype.toString.call(t)==="[object String]"},Tf=function(t){return pc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=cT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ei(e,t,n){for(var r=Tv(e),i=r,s=0,o=cT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(pc(l)||Array.isArray(l)))i=i[a]=Tv(l);else{var u=o[s+1];i=i[a]=k5(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function gT(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];pc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},gT(a,t,n,r[o])):r[o]=t}return r}function _5(e,t){switch(t.type){case"SET_VALUES":return ze({},e,{values:t.payload});case"SET_TOUCHED":return ze({},e,{touched:t.payload});case"SET_ERRORS":return ri(e.errors,t.payload)?e:ze({},e,{errors:t.payload});case"SET_STATUS":return ze({},e,{status:t.payload});case"SET_ISSUBMITTING":return ze({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ze({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ze({},e,{values:Ei(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ze({},e,{touched:Ei(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ze({},e,{errors:Ei(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ze({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ze({},e,{touched:gT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ze({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ze({},e,{isSubmitting:!1});default:return e}}var Jr={},pl={};function P5(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,f=e.onSubmit,c=mT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=ze({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},c),h=y.useRef(d.initialValues),m=y.useRef(d.initialErrors||Jr),x=y.useRef(d.initialTouched||pl),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var v=y.useState(0),E=v[1],S=y.useRef({values:hl(d.initialValues),errors:hl(d.initialErrors)||Jr,touched:hl(d.initialTouched)||pl,status:hl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=_5(M,_),M!==S.current&&E(function($){return $+1})},[]),P=y.useCallback(function(_,M){return new Promise(function($,z){var G=d.validate(_,M);G==null?$(Jr):Tf(G)?G.then(function(oe){$(oe||Jr)},function(oe){z(oe)}):$(G)})},[d.validate]),j=y.useCallback(function(_,M){var $=d.validationSchema,z=on($)?$(M):$,G=M&&z.validateAt?z.validateAt(M,_):R5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(_t){_t.name==="ValidationError"?oe(A5(_t)):_e(_t)})})},[d.validationSchema]),N=y.useCallback(function(_,M){return new Promise(function($){return $(g.current[_].validate(M))})},[]),I=y.useCallback(function(_){var M=Object.keys(g.current).filter(function(z){return on(g.current[z].validate)}),$=M.length>0?M.map(function(z){return N(z,Rt(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(G,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(G=Ei(G,M[_e],oe)),G},{})})},[N]),re=y.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(M){var $=M[0],z=M[1],G=M[2],oe=mh.all([$,z,G],{arrayMerge:O5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=Ut(function(_){return _===void 0&&(_=C.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(M){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:M})),M})});y.useEffect(function(){o&&p.current===!0&&ri(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=y.useCallback(function(_){var M=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:x.current?x.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,x.current=z,b.current=G;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:G,values:M,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(C.values,Ma);Tf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ri(h.current,d.initialValues)&&u&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[u,d.initialValues,xe,o,ie]),y.useEffect(function(){u&&p.current===!0&&!ri(m.current,d.initialErrors)&&(m.current=d.initialErrors||Jr,k({type:"SET_ERRORS",payload:d.initialErrors||Jr}))},[u,d.initialErrors]),y.useEffect(function(){u&&p.current===!0&&!ri(x.current,d.initialTouched)&&(x.current=d.initialTouched||pl,k({type:"SET_TOUCHED",payload:d.initialTouched||pl}))},[u,d.initialTouched]),y.useEffect(function(){u&&p.current===!0&&!ri(b.current,d.initialStatus)&&(b.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var Oe=Ut(function(_){if(g.current[_]&&on(g.current[_].validate)){var M=Rt(C.values,_),$=g.current[_].validate(M);return Tf($)?(k({type:"SET_ISVALIDATING",payload:!0}),$.then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:z}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:_,value:$}}),Promise.resolve($))}else if(d.validationSchema)return k({type:"SET_ISVALIDATING",payload:!0}),j(C.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:Rt(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=y.useCallback(function(_,M){var $=M.validate;g.current[_]={validate:$}},[]),ne=y.useCallback(function(_){delete g.current[_]},[]),O=Ut(function(_,M){k({type:"SET_TOUCHED",payload:_});var $=M===void 0?i:M;return $?ie(C.values):Promise.resolve()}),L=y.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Ut(function(_,M){var $=on(_)?_(C.values):_;k({type:"SET_VALUES",payload:$});var z=M===void 0?n:M;return z?ie($):Promise.resolve()}),V=y.useCallback(function(_,M){k({type:"SET_FIELD_ERROR",payload:{field:_,value:M}})},[]),H=Ut(function(_,M,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:M}});var z=$===void 0?n:$;return z?ie(Ei(C.values,_,M)):Promise.resolve()}),q=y.useCallback(function(_,M){var $=M,z=_,G;if(!Sf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,qi=oe.value,sr=oe.checked,$m=oe.outerHTML,La=oe.options,Ia=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(qi),isNaN(G)?"":G):/checkbox/.test(_e)?N5(Rt(C.values,$),sr,qi):La&&Ia?j5(La):qi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(Sf(_))return function(M){return q(M,_)};q(_)}),ye=Ut(function(_,M,$){M===void 0&&(M=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:M}});var z=$===void 0?i:$;return z?ie(C.values):Promise.resolve()}),J=y.useCallback(function(_,M){_.persist&&_.persist();var $=_.target,z=$.name,G=$.id,oe=$.outerHTML,_e=M||z||G;ye(_e,!0)},[ye]),Ve=Ut(function(_){if(Sf(_))return function(M){return J(M,_)};J(_)}),pt=y.useCallback(function(_){on(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),mt=y.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),ir=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),eo=Ut(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var M=_ instanceof Error,$=!M&&Object.keys(_).length===0;if($){var z;try{if(z=to(),z===void 0)return}catch(G){throw G}return Promise.resolve(z).then(function(G){return p.current&&k({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(p.current)throw k({type:"SUBMIT_FAILURE"}),G})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),M))throw _})}),Na=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),eo().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Ma={resetForm:xe,validateForm:ie,validateField:Oe,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:H,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,setFormikState:pt,submitForm:eo},to=Ut(function(){return f(C.values,Ma)}),wc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),Da=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(x.current,_),initialError:Rt(m.current,_)}},[C.errors,C.touched,C.values]),Yr=y.useCallback(function(_){return{setValue:function($,z){return H(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[H,ye,V]),Fa=y.useCallback(function(_){var M=pc(_),$=M?_.name:_,z=Rt(C.values,$),G={name:$,value:z,onChange:ce,onBlur:Ve};if(M){var oe=_.type,_e=_.value,_t=_.as,yn=_.multiple;oe==="checkbox"?_e===void 0?G.checked=!!z:(G.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),G.value=_e):oe==="radio"?(G.checked=z===_e,G.value=_e):_t==="select"&&yn&&(G.value=G.value||[],G.multiple=!0)}return G},[Ve,ce,C.values]),kt=y.useMemo(function(){return!ri(h.current,C.values)},[h.current,C.values]),bc=y.useMemo(function(){return typeof a<"u"?kt?C.errors&&Object.keys(C.errors).length===0:a!==!1&&on(a)?a(d):a:C.errors&&Object.keys(C.errors).length===0},[a,kt,C.errors,d]),Sc=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:x.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:wc,handleSubmit:Na,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,submitForm:eo,validateForm:ie,validateField:Oe,isValid:bc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:Fa,getFieldMeta:Da,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Sc}function A5(e){var t={};if(e.inner){if(e.inner.length===0)return Ei(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Rt(t,o.path)||(t=Ei(t,o.path,o.message))}}return t}function R5(e,t,n,r){n===void 0&&(n=!1);var i=bh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function bh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Jy(i)?bh(i):i!==""?i:void 0}):Jy(e[r])?t[r]=bh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function O5(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?mh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=mh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function j5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function N5(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var M5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Ut(e){var t=y.useRef(e);return M5(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var D5=y.forwardRef(function(e,t){var n=e.action,r=mT(e,["action"]),i=n??"#",s=C5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});D5.displayName="Form";const yT=({init:e,schema:t,action:n})=>P5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function F5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const L5=e=>{switch(e){case"success":return V5;case"info":return z5;case"warning":return B5;case"error":return U5;default:return null}},I5=Array(12).fill(0),$5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},I5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),V5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),B5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),U5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),H5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),W5=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Sh=1;class K5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Sh++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],R.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(G5(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:d,...h})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:c,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>o[0]==="reject"?f(o[1]):u(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Sh++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xt=new K5,q5=(e,t)=>{const n=(t==null?void 0:t.id)||Sh++;return xt.addToast({title:e,...t,id:n}),n},G5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Q5=q5,Y5=()=>xt.toasts,X5=()=>xt.getActiveToasts(),kv=Object.assign(Q5,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:Y5,getToasts:X5});F5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ml(e){return e.label!==void 0}const Z5=3,J5="24px",eL="16px",_v=4e3,tL=356,nL=14,rL=45,iL=200;function xn(...e){return e.filter(Boolean).join(" ")}function sL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const oL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:x,heights:b,index:p,toasts:g,expanded:v,removeToast:E,defaultRichColors:S,closeButton:C,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:N="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Oe,classNames:Q,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,H]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ve,pt]=R.useState(!1),[mt,ir]=R.useState(!1),[eo,Na]=R.useState(!1),[Ma,to]=R.useState(0),[wc,Da]=R.useState(0),Yr=R.useRef(c.duration||re||_v),Fa=R.useRef(null),kt=R.useRef(null),bc=p===0,Sc=p+1<=x,_=c.type,M=c.dismissible!==!1,$=c.className||"",z=c.descriptionClassName||"",G=R.useMemo(()=>b.findIndex(Y=>Y.toastId===c.id)||0,[b,c.id]),oe=R.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:C},[c.closeButton,C]),_e=R.useMemo(()=>c.duration||re||_v,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),qi=R.useRef(0),sr=R.useRef(null),[$m,La]=ie.split("-"),Ia=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),Vm=W5(),LT=c.invert||f,Tc=_==="loading";yn.current=R.useMemo(()=>G*xe+Ia,[G,Ia]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return Da(Be),m(Xe=>[{toastId:c.id,height:Be,position:c.position},...Xe]),()=>m(Xe=>Xe.filter(Pt=>Pt.toastId!==c.id))}},[m,c.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=kt.current,Be=Y.style.height;Y.style.height="auto";const Xe=Y.getBoundingClientRect().height;Y.style.height=Be,Da(Xe),m(Pt=>Pt.find(Ke=>Ke.toastId===c.id)?Pt.map(Ke=>Ke.toastId===c.id?{...Ke,height:Xe}:Ke):[{toastId:c.id,height:Xe,position:c.position},...Pt])},[q,c.title,c.description,m,c.id]);const or=R.useCallback(()=>{J(!0),to(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},iL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return v||h||Vm?(()=>{if(qi.current<_t.current){const Pt=new Date().getTime()-_t.current;Yr.current=Yr.current-Pt}qi.current=new Date().getTime()})():(()=>{Yr.current!==1/0&&(_t.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),or()},Yr.current))})(),()=>clearTimeout(Y)},[v,h,c,_,Vm,or]),R.useEffect(()=>{c.delete&&or()},[or,c.delete]);function IT(){var Y;if(ne!=null&&ne.loading){var Be;return R.createElement("div",{className:xn(Q==null?void 0:Q.loader,c==null||(Be=c.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement($5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Bm,zm;return R.createElement("li",{tabIndex:0,ref:kt,className:xn(N,$,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[_],c==null||(n=c.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Bm=c.richColors)!=null?Bm:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":eo,"data-removed":ye,"data-visible":Sc,"data-y-position":$m,"data-x-position":La,"data-index":p,"data-front":bc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":LT,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(v||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Ma:yn.current}px`,"--initial-height":Oe?"auto":`${wc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),sr.current=null},onPointerDown:Y=>{Tc||!M||(Fa.current=new Date,to(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(pt(!0),sr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Be,Xe;if(mt||!M)return;sr.current=null;const Pt=Number(((Y=kt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$a=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=Fa.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:$a,Va=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=rL||Va>.11){to(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":$a>0?"down":"up"),or(),ir(!0);return}else{var nn,rn;(nn=kt.current)==null||nn.style.setProperty("--swipe-amount-x","0px"),(rn=kt.current)==null||rn.style.setProperty("--swipe-amount-y","0px")}Na(!1),pt(!1),B(null)},onPointerMove:Y=>{var Be,Xe,Pt;if(!sr.current||!M||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;const Ke=Y.clientY-sr.current.y,Bt=Y.clientX-sr.current.x;var Va;const nn=(Va=e.swipeDirections)!=null?Va:sL(ie);!L&&(Math.abs(Bt)>1||Math.abs(Ke)>1)&&B(Math.abs(Bt)>Math.abs(Ke)?"x":"y");let rn={x:0,y:0};const Um=Xr=>1/(1.5+Math.abs(Xr)/20);if(L==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&Ke<0||nn.includes("bottom")&&Ke>0)rn.y=Ke;else{const Xr=Ke*Um(Ke);rn.y=Math.abs(Xr)<Math.abs(Ke)?Xr:Ke}}else if(L==="x"&&(nn.includes("left")||nn.includes("right")))if(nn.includes("left")&&Bt<0||nn.includes("right")&&Bt>0)rn.x=Bt;else{const Xr=Bt*Um(Bt);rn.x=Math.abs(Xr)<Math.abs(Bt)?Xr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Na(!0),(Xe=kt.current)==null||Xe.style.setProperty("--swipe-amount-x",`${rn.x}px`),(Pt=kt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${rn.y}px`)}},oe&&!c.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Tc,"data-close-button":!0,onClick:Tc||!M?()=>{}:()=>{or(),c.onDismiss==null||c.onDismiss.call(c,c)},className:xn(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(zm=ne==null?void 0:ne.close)!=null?zm:H5):null,_||c.icon||c.promise?R.createElement("div",{"data-icon":"",className:xn(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||IT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||L5(_):null):null,R.createElement("div",{"data-content":"",className:xn(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:xn(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:xn(I,z,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),R.isValidElement(c.cancel)?c.cancel:c.cancel&&ml(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{ml(c.cancel)&&M&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),or())},className:xn(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,R.isValidElement(c.action)?c.action:c.action&&ml(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{ml(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&or())},className:xn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Pv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function aL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?eL:J5;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const lL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:f,theme:c="light",richColors:d,duration:h,style:m,visibleToasts:x=Z5,toastOptions:b,dir:p=Pv(),gap:g=nL,icons:v,containerAriaLabel:E="Notifications"}=t,[S,C]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(V=>V.position).map(V=>V.position)))),[S,i]),[P,j]=R.useState([]),[N,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Oe]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{C(H=>{var q;return(q=H.find(ce=>ce.id===V.id))!=null&&q.delete||xt.dismiss(V.id),H.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>xt.subscribe(V=>{if(V.dismiss){const H=S.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{dk.flushSync(()=>{C(H=>{const q=H.findIndex(ce=>ce.id===V.id);return q!==-1?[...H.slice(0,q),{...H[q],...V},...H.slice(q+1)]:[V,...H]})})})}),[S]),R.useEffect(()=>{if(c!=="system"){Oe(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Oe("dark"):Oe("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{Oe(H?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Oe(q?"dark":"light")}catch(ce){console.error(ce)}})}},[c]),R.useEffect(()=>{S.length<=1&&I(!1)},[S]),R.useEffect(()=>{const V=H=>{var q;if(s.every(J=>H[J]||H.code===J)){var ye;I(!0),(ye=Q.current)==null||ye.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(q=Q.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[Q.current]),R.createElement("section",{ref:n,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,H)=>{var q;const[ce,ye]=V.split("-");return S.length?R.createElement("ol",{key:V,dir:p==="auto"?Pv():p,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":N&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${tL}px`,"--gap":`${g}px`,...m,...aL(u,f)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{re||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},S.filter(J=>!J.position&&H===0||J.position===V).map((J,Ve)=>{var pt,mt;return R.createElement(oL,{key:J.id,icons:v,index:Ve,toast:J,defaultRichColors:d,duration:(pt=b==null?void 0:b.duration)!=null?pt:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:x,closeButton:(mt=b==null?void 0:b.closeButton)!=null?mt:a,interacting:re,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:B,toasts:S.filter(ir=>ir.position==J.position),heights:P.filter(ir=>ir.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function uL(e){return Array.isArray(e)&&e[0].field!==void 0}const vT=(e,t)=>{var n;if(uL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||kv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||kv.error(e.error);return}};function cL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function Nm({id:e,text:t,className:n,required:r}){return t?w.jsxs("label",{htmlFor:e,className:Ne("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Ef={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function fL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:f,ariaInvalid:c,ariaLabel:d,autoFocus:h,...m}){const x=nr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(Nm,{id:e,text:t,required:a}),w.jsxs("div",{className:"flex items-center",children:[r&&w.jsx("span",{className:Ne("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Ef[i],{"border-red-500!":!!l}),children:r}),w.jsx("input",{id:e,className:Ne("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Ef[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":d,style:{color:x.getColor(K.InputText),backgroundColor:x.getColor(K.InputBackground),borderColor:x.getColor(K.InputBorder),borderRadius:x.getRadius()},...m}),n&&w.jsx("span",{className:Ne("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Ef[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const dL=(e,t)=>{document.cookie=`${e}=${t}`},xT=y.createContext({}),hL=()=>`${window.location.pathname}_$$_${document.title}`,pL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},mL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function gL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(mL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return w.jsx(xT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Mm(){return y.useContext(xT)}function yL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return w.jsxs("div",{className:r||"",children:[e&&w.jsx(Nm,{id:t,required:o,text:e}),w.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&w.jsx("p",{className:"1 texm text-r500",children:a})]})}const Av={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},vL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},xL={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},wL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function bL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:f="ring",reversed:c=!1,variant:d="blue",...h}){return w.jsxs("div",{children:[w.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${Av[f].label}`,children:[w.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[w.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${vL[d]} ${xL[u]} ${Av[f].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),w.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:w.jsx(De.Check,{className:wL[u]})})]}),w.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&w.jsx("small",{className:"text-xs text-red-500",children:a})]})}function SL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return w.jsxs("label",{htmlFor:e,className:Ne("relative flex cursor-pointer items-center rounded-md p-2 focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[w.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),w.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function TL({id:e,label:t,children:n,required:r,className:i}){return w.jsxs("fieldset",{id:e,className:i,children:[t&&w.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),w.jsx("div",{className:"flex flex-col gap-0 mt-1",children:n})]})}const Rv=Object.assign(SL,{Group:TL});function Dm({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:f,inputRef:c,autoFocus:d=!0,style:h,...m}){const x=nr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(Nm,{id:e,text:t,required:l}),w.jsx("textarea",{className:Ne("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":f,...m,ref:c,autoFocus:d,style:{...h,color:x.getColor(K.InputText),backgroundColor:x.getColor(K.InputBackground),borderColor:x.getColor(K.InputBorder),borderRadius:x.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function EL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,x,b,p,g,v,E;const i=nr(),{defaultValues:s}=tn(),o=Mm(),a=hN(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((S,C)=>{const k=C.remember?Ll(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:b.reduce((S,C)=>(S[C.name]="",S),{}),f=wm((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((S,C)=>(S[C.name]=C.required?Eu().required(C.label):Eu(),S),{})),c=yT({init:{...l},schema:f,action:async S=>{var P;const[C,k]=await a.mutateAsync({inputs:S,history:o.history,client_id:t,widget_id:n});if(xp(k)){o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&dL(j.name,S[j.name]);e==null||e();return}vT(C,{form:c})}}),d=!cL(u,c.values);return w.jsx("section",{className:"h-full overflow-y-auto px-6 py-5 bg-white",style:{backgroundColor:i.getColor(K.GreeterBackground)},children:w.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:S=>{S.preventDefault(),c.handleSubmit()},children:[(E=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(fL,{id:S.name,name:S.name,type:S.type,label:S.label,value:c.values[S.name],onChange:c.handleChange,onBlur:c.handleBlur,autoComplete:"off",placeholder:S.placeholder,error:c.errors[S.name],ariaInvalid:c.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return w.jsx(yL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,label:S.label,required:S.required,children:(C=S.options)==null?void 0:C.map(P=>w.jsx("option",{value:P,children:P},P))},S.name);if(S.type==="checkbox")return w.jsx(bL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,required:S.required,children:S.label},S.name);if(S.type==="radio")return w.jsx(Rv.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Rv,{onChange:j=>{j?c.setFieldValue(S.name,P):c.setFieldValue(S.name,"")},id:P,name:S.name,value:P===c.values[S.name],children:P},P))},S.name);if(S.type==="textarea")return w.jsx(Dm,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,placeholder:S.placeholder,error:c.errors[S.name],required:S.required,label:S.label},S.name)}),w.jsx(Gn,{textKey:K.GreeterButtonText,bgKey:K.GreeterButtonBackground,type:"submit",disabled:!d,className:"mt-3 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:"Sohbet Oluştur"})]})})}function CL({onClose:e}){return w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:w.jsx(De.X,{className:"size-5"})})}function kL({image_url:e,name:t,size:n="size-9"}){return e?w.jsx("img",{src:e,alt:t,className:Ne("rounded-md",n)}):w.jsx("div",{className:"flex items-center justify-center gap-1",children:w.jsx(De.Website,{className:Ne("text-slate-500",n)})})}function _L(){const e=Mm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return CS("popstate",t),null}function PL(){const e=Vi(),t=Mm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return CS("popstate",n),y.useEffect(()=>{if(!e)return;const r=pL(),i=hL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function AL({children:e}){const t=nr(),{widget:n}=tn();return n?w.jsx(ji,{children:w.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[w.jsx(Re.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(K.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function RL(){return _L(),null}const Cf=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function OL(){var c,d,h,m,x,b;const e=nr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=hm(),o=pm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{pN(t.client_id).then(([p,g])=>{xp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Cf(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=Cf(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=Cf(((b=(x=t.appearance)==null?void 0:x.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(AL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(CL,{onClose:a}),f&&w.jsx(Re.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:w.jsx(kL,{name:t.name,image_url:f,size:"size-20"})}),u&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:"calc(100% - 11rem)"},children:w.jsx(EL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function jL(){return w.jsxs(w.Fragment,{children:[w.jsx(_S,{border:!0,children:w.jsx(OL,{})}),w.jsx(RL,{})]})}const NL=[{path:"/",component:jL,name:"registration"}];var ii=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ii||{}),wT=(e=>(e.AdminJoin="admin_join",e))(wT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function ML({name:e,avatar:t,className:n="text-neutral-500"}){return w.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[w.jsx("div",{className:"min-w-max",children:w.jsxs("span",{children:[t&&w.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&w.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),w.jsx("div",{className:"flex flex-col",children:w.jsx("span",{className:Ne("line-clamp-1 font-medium",n),children:e})})]})}var DL=Object.defineProperty,FL=(e,t,n)=>t in e?DL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kf=(e,t,n)=>(FL(e,typeof t!="symbol"?t+"":t,n),n);let LL=class{constructor(){kf(this,"current",this.detect()),kf(this,"handoffState","pending"),kf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Vl=new LL;function IL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function mc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return IL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=mc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function bT(){let[e]=y.useState(mc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Vl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function ST(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let Kn=function(e){let t=ST(e);return R.useCallback((...n)=>t.current(...n),[t])};function Th(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,gc),r}var TT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(TT||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function ET(){let e=VL();return y.useCallback(t=>$L({mergeRefs:e,...t}),[e])}function $L({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??BL;let l=CT(t,e);if(s)return gl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return gl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return gc(f?0:1,{0(){return null},1(){return gl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return gl(l,n,r,o,a)}function gl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=_f(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let d=!1,h=[];for(let[m,x]of Object.entries(t))typeof x=="boolean"&&(d=!0),x===!0&&h.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(d){c["data-headlessui-state"]=h.join(" ");for(let m of h)c[`data-${m}`]=""}}if(s===y.Fragment&&(Object.keys(si(l)).length>0||Object.keys(si(c)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(si(l)).concat(Object.keys(si(c))).map(d=>` - ${d}`).join(`
105
+ */var We=typeof Symbol=="function"&&Symbol.for,Am=We?Symbol.for("react.element"):60103,Rm=We?Symbol.for("react.portal"):60106,rc=We?Symbol.for("react.fragment"):60107,ic=We?Symbol.for("react.strict_mode"):60108,sc=We?Symbol.for("react.profiler"):60114,oc=We?Symbol.for("react.provider"):60109,ac=We?Symbol.for("react.context"):60110,Om=We?Symbol.for("react.async_mode"):60111,lc=We?Symbol.for("react.concurrent_mode"):60111,uc=We?Symbol.for("react.forward_ref"):60112,cc=We?Symbol.for("react.suspense"):60113,g5=We?Symbol.for("react.suspense_list"):60120,fc=We?Symbol.for("react.memo"):60115,dc=We?Symbol.for("react.lazy"):60116,y5=We?Symbol.for("react.block"):60121,v5=We?Symbol.for("react.fundamental"):60117,x5=We?Symbol.for("react.responder"):60118,w5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Am:switch(e=e.type,e){case Om:case lc:case rc:case sc:case ic:case cc:return e;default:switch(e=e&&e.$$typeof,e){case ac:case uc:case dc:case fc:case oc:return e;default:return t}}case Rm:return t}}}function fT(e){return Vt(e)===lc}ue.AsyncMode=Om;ue.ConcurrentMode=lc;ue.ContextConsumer=ac;ue.ContextProvider=oc;ue.Element=Am;ue.ForwardRef=uc;ue.Fragment=rc;ue.Lazy=dc;ue.Memo=fc;ue.Portal=Rm;ue.Profiler=sc;ue.StrictMode=ic;ue.Suspense=cc;ue.isAsyncMode=function(e){return fT(e)||Vt(e)===Om};ue.isConcurrentMode=fT;ue.isContextConsumer=function(e){return Vt(e)===ac};ue.isContextProvider=function(e){return Vt(e)===oc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Am};ue.isForwardRef=function(e){return Vt(e)===uc};ue.isFragment=function(e){return Vt(e)===rc};ue.isLazy=function(e){return Vt(e)===dc};ue.isMemo=function(e){return Vt(e)===fc};ue.isPortal=function(e){return Vt(e)===Rm};ue.isProfiler=function(e){return Vt(e)===sc};ue.isStrictMode=function(e){return Vt(e)===ic};ue.isSuspense=function(e){return Vt(e)===cc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rc||e===lc||e===sc||e===ic||e===cc||e===g5||typeof e=="object"&&e!==null&&(e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===oc||e.$$typeof===ac||e.$$typeof===uc||e.$$typeof===v5||e.$$typeof===x5||e.$$typeof===w5||e.$$typeof===y5)};ue.typeOf=Vt;cT.exports=ue;var b5=cT.exports,dT=b5,S5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},T5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hT={};hT[dT.ForwardRef]=S5;hT[dT.Memo]=T5;function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}function pT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hc=y.createContext(void 0);hc.displayName="FormikContext";hc.Provider;hc.Consumer;function E5(){var e=y.useContext(hc);return e}var on=function(t){return typeof t=="function"},pc=function(t){return t!==null&&typeof t=="object"},C5=function(t){return String(Math.floor(Number(t)))===t},bf=function(t){return Object.prototype.toString.call(t)==="[object String]"},Sf=function(t){return pc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=uT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ei(e,t,n){for(var r=Sv(e),i=r,s=0,o=uT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(pc(l)||Array.isArray(l)))i=i[a]=Sv(l);else{var u=o[s+1];i=i[a]=C5(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function mT(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];pc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},mT(a,t,n,r[o])):r[o]=t}return r}function k5(e,t){switch(t.type){case"SET_VALUES":return ze({},e,{values:t.payload});case"SET_TOUCHED":return ze({},e,{touched:t.payload});case"SET_ERRORS":return ri(e.errors,t.payload)?e:ze({},e,{errors:t.payload});case"SET_STATUS":return ze({},e,{status:t.payload});case"SET_ISSUBMITTING":return ze({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ze({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ze({},e,{values:Ei(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ze({},e,{touched:Ei(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ze({},e,{errors:Ei(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ze({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ze({},e,{touched:mT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ze({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ze({},e,{isSubmitting:!1});default:return e}}var Jr={},pl={};function _5(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,f=e.onSubmit,c=pT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=ze({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},c),h=y.useRef(d.initialValues),m=y.useRef(d.initialErrors||Jr),v=y.useRef(d.initialTouched||pl),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var x=y.useState(0),E=x[1],S=y.useRef({values:hl(d.initialValues),errors:hl(d.initialErrors)||Jr,touched:hl(d.initialTouched)||pl,status:hl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=k5(M,_),M!==S.current&&E(function($){return $+1})},[]),P=y.useCallback(function(_,M){return new Promise(function($,z){var G=d.validate(_,M);G==null?$(Jr):Sf(G)?G.then(function(oe){$(oe||Jr)},function(oe){z(oe)}):$(G)})},[d.validate]),j=y.useCallback(function(_,M){var $=d.validationSchema,z=on($)?$(M):$,G=M&&z.validateAt?z.validateAt(M,_):A5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(_t){_t.name==="ValidationError"?oe(P5(_t)):_e(_t)})})},[d.validationSchema]),N=y.useCallback(function(_,M){return new Promise(function($){return $(g.current[_].validate(M))})},[]),I=y.useCallback(function(_){var M=Object.keys(g.current).filter(function(z){return on(g.current[z].validate)}),$=M.length>0?M.map(function(z){return N(z,Rt(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(G,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(G=Ei(G,M[_e],oe)),G},{})})},[N]),re=y.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(M){var $=M[0],z=M[1],G=M[2],oe=ph.all([$,z,G],{arrayMerge:R5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=Ut(function(_){return _===void 0&&(_=C.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(M){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:M})),M})});y.useEffect(function(){o&&p.current===!0&&ri(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=y.useCallback(function(_){var M=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:v.current?v.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,v.current=z,b.current=G;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:G,values:M,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(C.values,Ma);Sf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ri(h.current,d.initialValues)&&u&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[u,d.initialValues,xe,o,ie]),y.useEffect(function(){u&&p.current===!0&&!ri(m.current,d.initialErrors)&&(m.current=d.initialErrors||Jr,k({type:"SET_ERRORS",payload:d.initialErrors||Jr}))},[u,d.initialErrors]),y.useEffect(function(){u&&p.current===!0&&!ri(v.current,d.initialTouched)&&(v.current=d.initialTouched||pl,k({type:"SET_TOUCHED",payload:d.initialTouched||pl}))},[u,d.initialTouched]),y.useEffect(function(){u&&p.current===!0&&!ri(b.current,d.initialStatus)&&(b.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var Oe=Ut(function(_){if(g.current[_]&&on(g.current[_].validate)){var M=Rt(C.values,_),$=g.current[_].validate(M);return Sf($)?(k({type:"SET_ISVALIDATING",payload:!0}),$.then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:z}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:_,value:$}}),Promise.resolve($))}else if(d.validationSchema)return k({type:"SET_ISVALIDATING",payload:!0}),j(C.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:Rt(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=y.useCallback(function(_,M){var $=M.validate;g.current[_]={validate:$}},[]),ne=y.useCallback(function(_){delete g.current[_]},[]),O=Ut(function(_,M){k({type:"SET_TOUCHED",payload:_});var $=M===void 0?i:M;return $?ie(C.values):Promise.resolve()}),L=y.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Ut(function(_,M){var $=on(_)?_(C.values):_;k({type:"SET_VALUES",payload:$});var z=M===void 0?n:M;return z?ie($):Promise.resolve()}),V=y.useCallback(function(_,M){k({type:"SET_FIELD_ERROR",payload:{field:_,value:M}})},[]),H=Ut(function(_,M,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:M}});var z=$===void 0?n:$;return z?ie(Ei(C.values,_,M)):Promise.resolve()}),q=y.useCallback(function(_,M){var $=M,z=_,G;if(!bf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,qi=oe.value,sr=oe.checked,Im=oe.outerHTML,La=oe.options,Ia=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(qi),isNaN(G)?"":G):/checkbox/.test(_e)?j5(Rt(C.values,$),sr,qi):La&&Ia?O5(La):qi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(bf(_))return function(M){return q(M,_)};q(_)}),ye=Ut(function(_,M,$){M===void 0&&(M=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:M}});var z=$===void 0?i:$;return z?ie(C.values):Promise.resolve()}),J=y.useCallback(function(_,M){_.persist&&_.persist();var $=_.target,z=$.name,G=$.id,oe=$.outerHTML,_e=M||z||G;ye(_e,!0)},[ye]),Ve=Ut(function(_){if(bf(_))return function(M){return J(M,_)};J(_)}),pt=y.useCallback(function(_){on(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),mt=y.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),ir=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),eo=Ut(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var M=_ instanceof Error,$=!M&&Object.keys(_).length===0;if($){var z;try{if(z=to(),z===void 0)return}catch(G){throw G}return Promise.resolve(z).then(function(G){return p.current&&k({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(p.current)throw k({type:"SUBMIT_FAILURE"}),G})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),M))throw _})}),Na=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),eo().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Ma={resetForm:xe,validateForm:ie,validateField:Oe,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:H,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,setFormikState:pt,submitForm:eo},to=Ut(function(){return f(C.values,Ma)}),wc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),Da=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(v.current,_),initialError:Rt(m.current,_)}},[C.errors,C.touched,C.values]),Yr=y.useCallback(function(_){return{setValue:function($,z){return H(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[H,ye,V]),Fa=y.useCallback(function(_){var M=pc(_),$=M?_.name:_,z=Rt(C.values,$),G={name:$,value:z,onChange:ce,onBlur:Ve};if(M){var oe=_.type,_e=_.value,_t=_.as,yn=_.multiple;oe==="checkbox"?_e===void 0?G.checked=!!z:(G.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),G.value=_e):oe==="radio"?(G.checked=z===_e,G.value=_e):_t==="select"&&yn&&(G.value=G.value||[],G.multiple=!0)}return G},[Ve,ce,C.values]),kt=y.useMemo(function(){return!ri(h.current,C.values)},[h.current,C.values]),bc=y.useMemo(function(){return typeof a<"u"?kt?C.errors&&Object.keys(C.errors).length===0:a!==!1&&on(a)?a(d):a:C.errors&&Object.keys(C.errors).length===0},[a,kt,C.errors,d]),Sc=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:v.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:wc,handleSubmit:Na,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,submitForm:eo,validateForm:ie,validateField:Oe,isValid:bc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:Fa,getFieldMeta:Da,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Sc}function P5(e){var t={};if(e.inner){if(e.inner.length===0)return Ei(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Rt(t,o.path)||(t=Ei(t,o.path,o.message))}}return t}function A5(e,t,n,r){n===void 0&&(n=!1);var i=wh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function wh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Zy(i)?wh(i):i!==""?i:void 0}):Zy(e[r])?t[r]=wh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function R5(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?ph(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=ph(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function O5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function j5(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var N5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Ut(e){var t=y.useRef(e);return N5(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var M5=y.forwardRef(function(e,t){var n=e.action,r=pT(e,["action"]),i=n??"#",s=E5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});M5.displayName="Form";const gT=({init:e,schema:t,action:n})=>_5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function D5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const F5=e=>{switch(e){case"success":return $5;case"info":return B5;case"warning":return V5;case"error":return z5;default:return null}},L5=Array(12).fill(0),I5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},L5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),$5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),V5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),B5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),z5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),U5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),H5=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let bh=1;class W5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:bh++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],R.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(q5(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:d,...h})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:c,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>o[0]==="reject"?f(o[1]):u(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||bh++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xt=new W5,K5=(e,t)=>{const n=(t==null?void 0:t.id)||bh++;return xt.addToast({title:e,...t,id:n}),n},q5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",G5=K5,Q5=()=>xt.toasts,Y5=()=>xt.getActiveToasts(),Cv=Object.assign(G5,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:Q5,getToasts:Y5});D5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ml(e){return e.label!==void 0}const X5=3,Z5="24px",J5="16px",kv=4e3,eL=356,tL=14,nL=45,rL=200;function xn(...e){return e.filter(Boolean).join(" ")}function iL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const sL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:v,heights:b,index:p,toasts:g,expanded:x,removeToast:E,defaultRichColors:S,closeButton:C,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:N="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Oe,classNames:Q,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,H]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ve,pt]=R.useState(!1),[mt,ir]=R.useState(!1),[eo,Na]=R.useState(!1),[Ma,to]=R.useState(0),[wc,Da]=R.useState(0),Yr=R.useRef(c.duration||re||kv),Fa=R.useRef(null),kt=R.useRef(null),bc=p===0,Sc=p+1<=v,_=c.type,M=c.dismissible!==!1,$=c.className||"",z=c.descriptionClassName||"",G=R.useMemo(()=>b.findIndex(Y=>Y.toastId===c.id)||0,[b,c.id]),oe=R.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:C},[c.closeButton,C]),_e=R.useMemo(()=>c.duration||re||kv,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),qi=R.useRef(0),sr=R.useRef(null),[Im,La]=ie.split("-"),Ia=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),$m=H5(),DT=c.invert||f,Tc=_==="loading";yn.current=R.useMemo(()=>G*xe+Ia,[G,Ia]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return Da(Be),m(Xe=>[{toastId:c.id,height:Be,position:c.position},...Xe]),()=>m(Xe=>Xe.filter(Pt=>Pt.toastId!==c.id))}},[m,c.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=kt.current,Be=Y.style.height;Y.style.height="auto";const Xe=Y.getBoundingClientRect().height;Y.style.height=Be,Da(Xe),m(Pt=>Pt.find(Ke=>Ke.toastId===c.id)?Pt.map(Ke=>Ke.toastId===c.id?{...Ke,height:Xe}:Ke):[{toastId:c.id,height:Xe,position:c.position},...Pt])},[q,c.title,c.description,m,c.id]);const or=R.useCallback(()=>{J(!0),to(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},rL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return x||h||$m?(()=>{if(qi.current<_t.current){const Pt=new Date().getTime()-_t.current;Yr.current=Yr.current-Pt}qi.current=new Date().getTime()})():(()=>{Yr.current!==1/0&&(_t.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),or()},Yr.current))})(),()=>clearTimeout(Y)},[x,h,c,_,$m,or]),R.useEffect(()=>{c.delete&&or()},[or,c.delete]);function FT(){var Y;if(ne!=null&&ne.loading){var Be;return R.createElement("div",{className:xn(Q==null?void 0:Q.loader,c==null||(Be=c.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement(I5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Vm,Bm;return R.createElement("li",{tabIndex:0,ref:kt,className:xn(N,$,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[_],c==null||(n=c.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Vm=c.richColors)!=null?Vm:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":eo,"data-removed":ye,"data-visible":Sc,"data-y-position":Im,"data-x-position":La,"data-index":p,"data-front":bc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":DT,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(x||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Ma:yn.current}px`,"--initial-height":Oe?"auto":`${wc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),sr.current=null},onPointerDown:Y=>{Tc||!M||(Fa.current=new Date,to(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(pt(!0),sr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Be,Xe;if(mt||!M)return;sr.current=null;const Pt=Number(((Y=kt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$a=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=Fa.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:$a,Va=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=nL||Va>.11){to(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":$a>0?"down":"up"),or(),ir(!0);return}else{var nn,rn;(nn=kt.current)==null||nn.style.setProperty("--swipe-amount-x","0px"),(rn=kt.current)==null||rn.style.setProperty("--swipe-amount-y","0px")}Na(!1),pt(!1),B(null)},onPointerMove:Y=>{var Be,Xe,Pt;if(!sr.current||!M||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;const Ke=Y.clientY-sr.current.y,Bt=Y.clientX-sr.current.x;var Va;const nn=(Va=e.swipeDirections)!=null?Va:iL(ie);!L&&(Math.abs(Bt)>1||Math.abs(Ke)>1)&&B(Math.abs(Bt)>Math.abs(Ke)?"x":"y");let rn={x:0,y:0};const zm=Xr=>1/(1.5+Math.abs(Xr)/20);if(L==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&Ke<0||nn.includes("bottom")&&Ke>0)rn.y=Ke;else{const Xr=Ke*zm(Ke);rn.y=Math.abs(Xr)<Math.abs(Ke)?Xr:Ke}}else if(L==="x"&&(nn.includes("left")||nn.includes("right")))if(nn.includes("left")&&Bt<0||nn.includes("right")&&Bt>0)rn.x=Bt;else{const Xr=Bt*zm(Bt);rn.x=Math.abs(Xr)<Math.abs(Bt)?Xr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Na(!0),(Xe=kt.current)==null||Xe.style.setProperty("--swipe-amount-x",`${rn.x}px`),(Pt=kt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${rn.y}px`)}},oe&&!c.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Tc,"data-close-button":!0,onClick:Tc||!M?()=>{}:()=>{or(),c.onDismiss==null||c.onDismiss.call(c,c)},className:xn(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Bm=ne==null?void 0:ne.close)!=null?Bm:U5):null,_||c.icon||c.promise?R.createElement("div",{"data-icon":"",className:xn(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||FT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||F5(_):null):null,R.createElement("div",{"data-content":"",className:xn(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:xn(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:xn(I,z,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),R.isValidElement(c.cancel)?c.cancel:c.cancel&&ml(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{ml(c.cancel)&&M&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),or())},className:xn(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,R.isValidElement(c.action)?c.action:c.action&&ml(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{ml(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&or())},className:xn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function _v(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function oL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?J5:Z5;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const aL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:f,theme:c="light",richColors:d,duration:h,style:m,visibleToasts:v=X5,toastOptions:b,dir:p=_v(),gap:g=tL,icons:x,containerAriaLabel:E="Notifications"}=t,[S,C]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(V=>V.position).map(V=>V.position)))),[S,i]),[P,j]=R.useState([]),[N,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Oe]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{C(H=>{var q;return(q=H.find(ce=>ce.id===V.id))!=null&&q.delete||xt.dismiss(V.id),H.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>xt.subscribe(V=>{if(V.dismiss){const H=S.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{ck.flushSync(()=>{C(H=>{const q=H.findIndex(ce=>ce.id===V.id);return q!==-1?[...H.slice(0,q),{...H[q],...V},...H.slice(q+1)]:[V,...H]})})})}),[S]),R.useEffect(()=>{if(c!=="system"){Oe(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Oe("dark"):Oe("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{Oe(H?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Oe(q?"dark":"light")}catch(ce){console.error(ce)}})}},[c]),R.useEffect(()=>{S.length<=1&&I(!1)},[S]),R.useEffect(()=>{const V=H=>{var q;if(s.every(J=>H[J]||H.code===J)){var ye;I(!0),(ye=Q.current)==null||ye.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(q=Q.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[Q.current]),R.createElement("section",{ref:n,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,H)=>{var q;const[ce,ye]=V.split("-");return S.length?R.createElement("ol",{key:V,dir:p==="auto"?_v():p,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":N&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${eL}px`,"--gap":`${g}px`,...m,...oL(u,f)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{re||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},S.filter(J=>!J.position&&H===0||J.position===V).map((J,Ve)=>{var pt,mt;return R.createElement(sL,{key:J.id,icons:x,index:Ve,toast:J,defaultRichColors:d,duration:(pt=b==null?void 0:b.duration)!=null?pt:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:v,closeButton:(mt=b==null?void 0:b.closeButton)!=null?mt:a,interacting:re,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:B,toasts:S.filter(ir=>ir.position==J.position),heights:P.filter(ir=>ir.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function lL(e){return Array.isArray(e)&&e[0].field!==void 0}const yT=(e,t)=>{var n;if(lL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||Cv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||Cv.error(e.error);return}};function uL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function jm({id:e,text:t,className:n,required:r}){return t?w.jsxs("label",{htmlFor:e,className:Ne("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Tf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function cL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:f,ariaInvalid:c,ariaLabel:d,autoFocus:h,...m}){const v=nr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(jm,{id:e,text:t,required:a}),w.jsxs("div",{className:"flex items-center",children:[r&&w.jsx("span",{className:Ne("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Tf[i],{"border-red-500!":!!l}),children:r}),w.jsx("input",{id:e,className:Ne("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Tf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":d,style:{color:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.getRadius()},...m}),n&&w.jsx("span",{className:Ne("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Tf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const fL=(e,t)=>{document.cookie=`${e}=${t}`},vT=y.createContext({}),dL=()=>`${window.location.pathname}_$$_${document.title}`,hL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},pL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function mL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(pL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return w.jsx(vT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Nm(){return y.useContext(vT)}function gL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return w.jsxs("div",{className:r||"",children:[e&&w.jsx(jm,{id:t,required:o,text:e}),w.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&w.jsx("p",{className:"1 texm text-r500",children:a})]})}const Pv={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},yL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},vL={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},xL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function wL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:f="ring",reversed:c=!1,variant:d="blue",...h}){return w.jsxs("div",{children:[w.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${Pv[f].label}`,children:[w.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[w.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${yL[d]} ${vL[u]} ${Pv[f].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),w.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:w.jsx(De.Check,{className:xL[u]})})]}),w.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&w.jsx("small",{className:"text-xs text-red-500",children:a})]})}function bL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return w.jsxs("label",{htmlFor:e,className:Ne("relative flex cursor-pointer items-center rounded-md p-2 focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[w.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),w.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function SL({id:e,label:t,children:n,required:r,className:i}){return w.jsxs("fieldset",{id:e,className:i,children:[t&&w.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),w.jsx("div",{className:"flex flex-col gap-0 mt-1",children:n})]})}const Av=Object.assign(bL,{Group:SL});function Mm({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:f,inputRef:c,autoFocus:d=!0,style:h,...m}){const v=nr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(jm,{id:e,text:t,required:l}),w.jsx("textarea",{className:Ne("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":f,...m,ref:c,autoFocus:d,style:{...h,color:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function TL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,v,b,p,g,x,E;const i=nr(),{defaultValues:s}=tn(),o=Nm(),a=fN(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((S,C)=>{const k=C.remember?Ll(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:b.reduce((S,C)=>(S[C.name]="",S),{}),f=xm((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((S,C)=>(S[C.name]=C.required?Eu().required(C.label):Eu(),S),{})),c=gT({init:{...l},schema:f,action:async S=>{var P;const[C,k]=await a.mutateAsync({inputs:S,history:o.history,client_id:t,widget_id:n});if(vp(k)){o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&fL(j.name,S[j.name]);e==null||e();return}yT(C,{form:c})}}),d=!uL(u,c.values);return w.jsx("section",{className:"h-full overflow-y-auto px-6 py-5 bg-white",style:{backgroundColor:i.getColor(K.GreeterBackground)},children:w.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:S=>{S.preventDefault(),c.handleSubmit()},children:[(E=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(cL,{id:S.name,name:S.name,type:S.type,label:S.label,value:c.values[S.name],onChange:c.handleChange,onBlur:c.handleBlur,autoComplete:"off",placeholder:S.placeholder,error:c.errors[S.name],ariaInvalid:c.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return w.jsx(gL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,label:S.label,required:S.required,children:(C=S.options)==null?void 0:C.map(P=>w.jsx("option",{value:P,children:P},P))},S.name);if(S.type==="checkbox")return w.jsx(wL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,required:S.required,children:S.label},S.name);if(S.type==="radio")return w.jsx(Av.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Av,{onChange:j=>{j?c.setFieldValue(S.name,P):c.setFieldValue(S.name,"")},id:P,name:S.name,value:P===c.values[S.name],children:P},P))},S.name);if(S.type==="textarea")return w.jsx(Mm,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,placeholder:S.placeholder,error:c.errors[S.name],required:S.required,label:S.label},S.name)}),w.jsx(Gn,{textKey:K.GreeterButtonText,bgKey:K.GreeterButtonBackground,type:"submit",disabled:!d,className:"mt-3 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:"Sohbet Oluştur"})]})})}function EL({onClose:e}){return w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:w.jsx(De.X,{className:"size-5"})})}function CL({image_url:e,name:t,size:n="size-9"}){return e?w.jsx("img",{src:e,alt:t,className:Ne("rounded-md",n)}):w.jsx("div",{className:"flex items-center justify-center gap-1",children:w.jsx(De.Website,{className:Ne("text-slate-500",n)})})}function kL(){const e=Nm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return ES("popstate",t),null}function _L(){const e=Vi(),t=Nm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return ES("popstate",n),y.useEffect(()=>{if(!e)return;const r=hL(),i=dL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function PL({children:e}){const t=nr(),{widget:n}=tn();return n?w.jsx(ji,{children:w.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[w.jsx(Re.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(K.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function AL(){return kL(),null}const Ef=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function RL(){var c,d,h,m,v,b;const e=nr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=dm(),o=hm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{dN(t.client_id).then(([p,g])=>{vp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Ef(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=Ef(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=Ef(((b=(v=t.appearance)==null?void 0:v.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(PL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(EL,{onClose:a}),f&&w.jsx(Re.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:w.jsx(CL,{name:t.name,image_url:f,size:"size-20"})}),u&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:"calc(100% - 11rem)"},children:w.jsx(TL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function OL(){return w.jsxs(w.Fragment,{children:[w.jsx(kS,{border:!0,children:w.jsx(RL,{})}),w.jsx(AL,{})]})}const jL=[{path:"/",component:OL,name:"registration"}];var ii=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ii||{}),xT=(e=>(e.AdminJoin="admin_join",e))(xT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function NL({name:e,avatar:t,className:n="text-neutral-500"}){return w.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[w.jsx("div",{className:"min-w-max",children:w.jsxs("span",{children:[t&&w.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&w.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),w.jsx("div",{className:"flex flex-col",children:w.jsx("span",{className:Ne("line-clamp-1 font-medium",n),children:e})})]})}var ML=Object.defineProperty,DL=(e,t,n)=>t in e?ML(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cf=(e,t,n)=>(DL(e,typeof t!="symbol"?t+"":t,n),n);let FL=class{constructor(){Cf(this,"current",this.detect()),Cf(this,"handoffState","pending"),Cf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Vl=new FL;function LL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function mc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return LL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=mc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function wT(){let[e]=y.useState(mc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Vl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function bT(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let Kn=function(e){let t=bT(e);return R.useCallback((...n)=>t.current(...n),[t])};function Sh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,gc),r}var ST=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ST||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function TT(){let e=$L();return y.useCallback(t=>IL({mergeRefs:e,...t}),[e])}function IL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??VL;let l=ET(t,e);if(s)return gl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return gl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return gc(f?0:1,{0(){return null},1(){return gl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return gl(l,n,r,o,a)}function gl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=kf(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let d=!1,h=[];for(let[m,v]of Object.entries(t))typeof v=="boolean"&&(d=!0),v===!0&&h.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(d){c["data-headlessui-state"]=h.join(" ");for(let m of h)c[`data-${m}`]=""}}if(s===y.Fragment&&(Object.keys(si(l)).length>0||Object.keys(si(c)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(si(l)).concat(Object.keys(si(c))).map(d=>` - ${d}`).join(`
106
106
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
107
107
  `)].join(`
108
- `))}else{let d=f.props,h=d==null?void 0:d.className,m=typeof h=="function"?(...p)=>Th(h(...p),l.className):Th(h,l.className),x=m?{className:m}:{},b=CT(f.props,si(_f(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(zL(f),u.ref)},x))}return y.createElement(s,Object.assign({},_f(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function VL(){let e=y.useRef([]),t=y.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function BL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function CT(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Fm(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _f(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function zL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let UL=Symbol();function kT(...e){let t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]);let n=Kn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[UL]))?void 0:n}function HL(e=0){let[t,n]=y.useState(e),r=y.useCallback(l=>n(l),[t]),i=y.useCallback(l=>n(u=>u|l),[t]),s=y.useCallback(l=>(t&l)===l,[t]),o=y.useCallback(l=>n(u=>u&~l),[n]),a=y.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var WL={},Ov,jv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ov=process==null?void 0:WL)==null?void 0:Ov.NODE_ENV)==="test"&&typeof((jv=Element==null?void 0:Element.prototype)==null?void 0:jv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
- `)),[]});var KL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(KL||{});function qL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function GL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=HL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=bT();return $r(()=>{var d;if(e){if(n&&s(!0),!t){n&&a(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),QL(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){f.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;f.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function QL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=mc();return XL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(YL(e,r))})}),s.dispose}function YL(e,t){var n,r;let i=mc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function XL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Lm=y.createContext(null);Lm.displayName="OpenClosedContext";var di=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(di||{});function _T(){return y.useContext(Lm)}function ZL({value:e,children:t}){return R.createElement(Lm.Provider,{value:e},t)}function JL(){let e=typeof document>"u";return"useSyncExternalStore"in Pf?(t=>t.useSyncExternalStore)(Pf)(()=>()=>{},()=>!1,()=>!e):!1}function PT(){let e=JL(),[t,n]=y.useState(Vl.isHandoffComplete);return t&&Vl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Vl.handoff(),[]),e?!1:t}function e4(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function AT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:OT)!==y.Fragment||R.Children.count(e.children)===1}let yc=y.createContext(null);yc.displayName="TransitionContext";var t4=(e=>(e.Visible="visible",e.Hidden="hidden",e))(t4||{});function n4(){let e=y.useContext(yc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function r4(){let e=y.useContext(vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vc=y.createContext(null);vc.displayName="NestingContext";function xc(e){return"children"in e?xc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function RT(e,t){let n=ST(e),r=y.useRef([]),i=e4(),s=bT(),o=Kn((h,m=_r.Hidden)=>{let x=r.current.findIndex(({el:b})=>b===h);x!==-1&&(gc(m,{[_r.Unmount](){r.current.splice(x,1)},[_r.Hidden](){r.current[x].state="hidden"}}),s.microTask(()=>{var b;!xc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=Kn(h=>{let m=r.current.find(({el:x})=>x===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,_r.Unmount)}),l=y.useRef([]),u=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),c=Kn((h,m,x)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([b])=>b!==h)),t==null||t.chains.current[m].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[m].push([h,new Promise(b=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>b())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(m)):x(m)}),d=Kn((h,m,x)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>x(m))});return y.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:d,wait:u,chains:f}),[a,o,r,c,d,f,u])}let OT=y.Fragment,jT=TT.RenderStrategy;function i4(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:f,enterTo:c,entered:d,leave:h,leaveFrom:m,leaveTo:x,...b}=e,[p,g]=y.useState(null),v=y.useRef(null),E=AT(e),S=kT(...E?[v,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=n4(),[N,I]=y.useState(k?"visible":"hidden"),re=r4(),{register:ie,unregister:xe}=re;$r(()=>ie(v),[ie,v]),$r(()=>{if(C===_r.Hidden&&v.current){if(k&&N!=="visible"){I("visible");return}return gc(N,{hidden:()=>xe(v),visible:()=>ie(v)})}},[N,v,ie,xe,k,C]);let Oe=PT();$r(()=>{if(E&&Oe&&N==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=RT(()=>{O.current||(I("hidden"),xe(v))},re),B=Kn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(v,pt,mt=>{mt==="enter"?s==null||s():mt==="leave"&&(a==null||a())})}),V=Kn(Ve=>{let pt=Ve?"enter":"leave";O.current=!1,L.onStop(v,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!xc(L)&&(I("hidden"),xe(v))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=GL(H,p,k,{start:B,end:V}),ce=si({ref:S,className:((r=Th(b.className,ne&&u,ne&&f,q.enter&&u,q.enter&&q.closed&&f,q.enter&&!q.closed&&c,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&x,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...qL(q)}),ye=0;N==="visible"&&(ye|=di.Open),N==="hidden"&&(ye|=di.Closed),k&&N==="hidden"&&(ye|=di.Opening),!k&&N==="visible"&&(ye|=di.Closing);let J=ET();return R.createElement(vc.Provider,{value:L},R.createElement(ZL,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:OT,features:jT,visible:N==="visible",name:"Transition.Child"})))}function s4(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=AT(e),l=kT(...a?[o,t]:t===null?[]:[t]);PT();let u=_T();if(n===void 0&&u!==null&&(n=(u&di.Open)===di.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,c]=y.useState(n?"visible":"hidden"),d=RT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),x=y.useRef([n]);$r(()=>{h!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),m(!1))},[x,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?c("visible"):!xc(d)&&o.current!==null&&c("hidden")},[n,d]);let p={unmount:i},g=Kn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),v=Kn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=ET();return R.createElement(vc.Provider,{value:d},R.createElement(yc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(NT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:v})},theirProps:{},defaultTag:y.Fragment,features:jT,visible:f==="visible",name:"Transition"})))}function o4(e,t){let n=y.useContext(yc)!==null,r=_T()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(Eh,{ref:t,...e}):R.createElement(NT,{ref:t,...e}))}let Eh=Fm(s4),NT=Fm(i4),a4=Fm(o4),l4=Object.assign(Eh,{Child:a4,Root:Eh});const Im=y.createContext(void 0),Lo=({as:e="div",children:t,className:n})=>{const[r,i]=y.useState(!1),s=y.useCallback(()=>{i(a=>!a)},[]),o=y.useRef(null);return y.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),w.jsx(Im.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},u4=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Im),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return w.jsx("div",{children:e==="a"?w.jsx(l2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:u+(s?" show":""),children:t}):w.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},c4=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Im),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=y.useState("right-end");y.useEffect(()=>{r&&l(r)},[r]);const u=y.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const d=u.current;d.style.position="absolute",f==="rtl"?d.style.inset="0px auto auto 0px":d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto 0px 0px auto",d.style.margin="0px",d.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto auto 0px 0px",d.style.margin="0px",d.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.right="0px",d.style.transform="translate(0px, -20px)"}return{}};return w.jsx(l4,{as:R.Fragment,show:i,children:d=>w.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:c(),children:n})})};Lo.Trigger=u4;Lo.Content=c4;const f4={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function d4({onChatClose:e}){const[t,n]=y.useState(!1),r=Vi(),i=()=>{r==null||r.emit(Dn.ChatClose,{}),e()};return w.jsxs(w.Fragment,{children:[w.jsx(ji,{children:t&&w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 backdrop-blur-sm bg-slate-900/40 z-50 flex items-center justify-center p-4",children:w.jsxs(Re.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[w.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),w.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),w.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[w.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),w.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),w.jsxs(Lo,{className:"relative flex items-center h-full",children:[w.jsx(Lo.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:w.jsx(De.Menu,{className:"size-5 text-slate-600"})}),w.jsx(ji,{children:!t&&w.jsx(Re.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:w.jsxs(Lo.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[w.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),w.jsx("ul",{className:"py-2 px-2",children:w.jsx("li",{children:w.jsxs("button",{className:Ne("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",f4.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[w.jsx(De.X,{className:"w-4 h-4"}),w.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function h4({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return w.jsx(w.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return w.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return w.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const p4={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},Nv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function m4({messages:e,isTyping:t}){var u,f,c,d;const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!0),{widget:o}=tn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:x}=r.current,b=m-h<=x+10;s(b)}};return y.useEffect(()=>{(i||t)&&a()},[e,i,t]),w.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-3 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 142px)"},children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.greeting_message)&&w.jsx("div",{className:"flex w-full items-center justify-start",children:w.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(d=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:d.greeting_message})}),w.jsx(ji,{children:e.filter(h=>!!h.content&&h.content!==`
110
- `).map((h,m)=>w.jsxs(Re.div,{custom:m,initial:"hidden",animate:"visible",variants:p4,className:Ne("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&w.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),[et.Customer,et.User].includes(h.sender_type)&&w.jsxs(Re.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:Ne("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.sender_type===et.User?w.jsx(h4,{text:h.content}):h.content,h.created_at&&w.jsx("div",{className:Ne("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer,"text-blue-100":h.sender_type===et.User}),children:Nv(h.created_at)})]}),h.sender_type===et.Activity&&(h.content.split("_").length===3?w.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):w.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&w.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&Nv(h.created_at)})]},h.id||m))}),t&&w.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:w.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:w.jsxs("div",{className:"flex space-x-1",children:[w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&w.jsx("div",{className:"fixed bottom-[9rem] right-12",children:w.jsx(Gn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:w.jsx(De.ArrowDown,{className:"size-4"})})}),w.jsx("div",{ref:n})]})}function g4({onNewMessage:e}){const t=y.useRef(null),n=Vi(),[r,i]=y.useState(""),[s,o]=y.useState("3rem"),a=()=>{r.trim()&&(n==null||n.emit(Dn.MessageCreate,{content:r},u=>{i(""),e(u),t.current&&(t.current.style.height="3rem",o("3rem"))}))},l=u=>{n==null||n.emit(Dn.MessageTyping,{content:u})};return w.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl",onSubmit:u=>{u.preventDefault(),a(),u.currentTarget.reset()},children:[w.jsx("div",{className:"grow relative",children:w.jsx(Dm,{id:"message",inputRef:t,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:s,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:u=>{if(i(u.target.value),l(u.target.value),u.target.value.length>0&&u.currentTarget.scrollHeight>u.currentTarget.clientHeight){const f=`${u.currentTarget.scrollHeight}px`;u.currentTarget.style.height=f,o(f)}else u.currentTarget.style.height="3rem",o("3rem")},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),u.stopPropagation(),u.currentTarget.value="",a())}})}),w.jsx(Re.div,{whileTap:{scale:.95},className:"flex items-center justify-center",children:w.jsx(Gn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:!r.trim(),children:w.jsx(De.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}const MT="/favicon.png";function y4({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=nr(),u=pm();return w.jsxs(w.Fragment,{children:[w.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(K.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?w.jsx(ML,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):w.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(d4,{onChatClose:s}),u&&w.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:w.jsx(De.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),w.jsx(m4,{messages:r,isTyping:t||n.length>0}),w.jsx(g4,{onNewMessage:d=>{i(d)}}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:MT,alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function v4({rating:e,onChange:t}){return w.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return w.jsxs("div",{className:"relative w-10 h-10",children:[w.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),i&&w.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),w.jsxs("div",{className:"absolute inset-0 flex",children:[w.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),w.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function x4({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=gN();y.useEffect(()=>{if(r){const c=setInterval(()=>{o(d=>d<=1?(clearInterval(c),e(!0),0):d-1)},1e3);return()=>clearInterval(c)}},[r]);const l=wm({comment:Eu()}),u=yT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(xp(h)){i(!0);return}vT(d,{form:u})}}),f=()=>{e(!0)};return w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsx("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:w.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"})}),w.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?w.jsxs(Re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[w.jsx("div",{className:"text-green-500 mb-4",children:w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),w.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),w.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),w.jsx(Gn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):w.jsxs(Re.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[w.jsx("div",{className:"text-center mb-6",children:w.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),w.jsxs("div",{className:"mb-6",children:[w.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),w.jsx(v4,{rating:t,onChange:n}),t>0&&w.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]})]}),w.jsxs("form",{onSubmit:u.handleSubmit,className:"space-y-5",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),w.jsx(Dm,{id:"comment",onChange:u.handleChange,onBlur:u.handleBlur,value:u.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm"})]}),w.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[w.jsx(Gn,{type:"submit",disabled:t<1,className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),w.jsx(Gn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:MT,alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function w4({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function b4({children:e}){const t=Vi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function S4(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Vi(),i=hm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:ii.Closed});return}m()},m=b=>{b||t(!1),n(!1),o(null),l([]),d([]),fh(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Dn.ChatView,{},b=>{if(b===null){t(!1),n(!1),fh(e.client_id),l([]),d([]),i.push("registration");return}o(b),n(!0)})},[]);const x=y.useCallback(b=>{s&&![ii.Closed,ii.Deleted].includes(s.status)&&l([...a,b])},[a,s]);return y.useEffect(()=>{if(!r)return;const b=E=>{const S={content:E.content,created_at:E.created_at,files:E.files,id:E._id,sender_type:E.sender_type,answers:E.answers,reply_id:E.reply_id};if(c.length>0){d(C=>[...C,S]);return}E.is_shortcut?d([S]):x(S),f(!1)},p=E=>{o({...s,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(s==null?void 0:s.is_uploadable)??!1,status:(s==null?void 0:s.status)??ii.Open}),x({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:wT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},v=()=>{if(s){o({...s,status:ii.Closed});return}m()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,v),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,v)}},[x]),y.useEffect(()=>{!r||!s||r.emit(Dn.MessageList,{},b=>{l(b)})},[r,s]),y.useEffect(()=>{const b=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(b)},[u]),y.useEffect(()=>{if(!e||c.length===0)return;let b=0;e.writing_timeout&&(b=[...c[0].content].length/e.writing_timeout,b<0&&(b=0));const p=setTimeout(()=>{x(c[0]),d(c.slice(1))},b*1e3);return()=>clearTimeout(p)},[c,e]),s?w.jsxs(w.Fragment,{children:[w.jsx("div",{id:"chat-alert-portal"}),w.jsx(ji,{children:w.jsx(Re.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:s.status===ii.Closed?w.jsx(x4,{onOk:m}):w.jsx(y4,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:x,onChatClose:h})})})]}):null}function T4(){return PL(),null}function E4(){return w.jsxs(b4,{children:[w.jsx(_S,{defaultOpen:!0,children:w.jsx(w4,{children:w.jsx(S4,{})})}),w.jsx(T4,{})]})}const C4=[{path:"/chat",component:E4,name:"chat"}],DT=[...C4],FT=[...NL],k4=[...DT,...FT];function _4(){return w.jsx(Z_,{future:{v7_startTransition:!0},children:w.jsxs(e2,{children:[DT.map((e,t)=>w.jsx(Fd,{path:e.path,element:w.jsx(e.component,{})},t)),FT.map((e,t)=>w.jsx(Fd,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function P4({link_id:e,defaultValues:t}){const{setWidget:n,widget:r,setDefaultValues:i}=tn(),{data:s,isLoading:o}=o_(e);return y.useEffect(()=>{Array.isArray(s)&&l_(s[0])&&(n(s[0]),i(t))},[s]),o||!r?null:w.jsx(gL,{children:w.jsx(dN,{children:w.jsx(_4,{})})})}const A4=new zk;function R4({container:e,link_id:t,defaultValues:n}){rw(e).render(w.jsxs(qk,{client:A4,children:[w.jsx(P4,{link_id:t,defaultValues:n}),w.jsx(lL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=R4});export default O4();
108
+ `))}else{let d=f.props,h=d==null?void 0:d.className,m=typeof h=="function"?(...p)=>Sh(h(...p),l.className):Sh(h,l.className),v=m?{className:m}:{},b=ET(f.props,si(kf(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(BL(f),u.ref)},v))}return y.createElement(s,Object.assign({},kf(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function $L(){let e=y.useRef([]),t=y.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function VL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ET(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Dm(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function kf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function BL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let zL=Symbol();function CT(...e){let t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]);let n=Kn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[zL]))?void 0:n}function UL(e=0){let[t,n]=y.useState(e),r=y.useCallback(l=>n(l),[t]),i=y.useCallback(l=>n(u=>u|l),[t]),s=y.useCallback(l=>(t&l)===l,[t]),o=y.useCallback(l=>n(u=>u&~l),[n]),a=y.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var HL={},Rv,Ov;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Rv=process==null?void 0:HL)==null?void 0:Rv.NODE_ENV)==="test"&&typeof((Ov=Element==null?void 0:Element.prototype)==null?void 0:Ov.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
+ `)),[]});var WL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(WL||{});function KL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function qL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=UL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=wT();return $r(()=>{var d;if(e){if(n&&s(!0),!t){n&&a(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),GL(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){f.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;f.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function GL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=mc();return YL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(QL(e,r))})}),s.dispose}function QL(e,t){var n,r;let i=mc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function YL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Fm=y.createContext(null);Fm.displayName="OpenClosedContext";var di=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(di||{});function kT(){return y.useContext(Fm)}function XL({value:e,children:t}){return R.createElement(Fm.Provider,{value:e},t)}function ZL(){let e=typeof document>"u";return"useSyncExternalStore"in _f?(t=>t.useSyncExternalStore)(_f)(()=>()=>{},()=>!1,()=>!e):!1}function _T(){let e=ZL(),[t,n]=y.useState(Vl.isHandoffComplete);return t&&Vl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Vl.handoff(),[]),e?!1:t}function JL(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function PT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:RT)!==y.Fragment||R.Children.count(e.children)===1}let yc=y.createContext(null);yc.displayName="TransitionContext";var e4=(e=>(e.Visible="visible",e.Hidden="hidden",e))(e4||{});function t4(){let e=y.useContext(yc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function n4(){let e=y.useContext(vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vc=y.createContext(null);vc.displayName="NestingContext";function xc(e){return"children"in e?xc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function AT(e,t){let n=bT(e),r=y.useRef([]),i=JL(),s=wT(),o=Kn((h,m=_r.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===h);v!==-1&&(gc(m,{[_r.Unmount](){r.current.splice(v,1)},[_r.Hidden](){r.current[v].state="hidden"}}),s.microTask(()=>{var b;!xc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=Kn(h=>{let m=r.current.find(({el:v})=>v===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,_r.Unmount)}),l=y.useRef([]),u=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),c=Kn((h,m,v)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([b])=>b!==h)),t==null||t.chains.current[m].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[m].push([h,new Promise(b=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>b())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(m)):v(m)}),d=Kn((h,m,v)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>v(m))});return y.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:d,wait:u,chains:f}),[a,o,r,c,d,f,u])}let RT=y.Fragment,OT=ST.RenderStrategy;function r4(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:f,enterTo:c,entered:d,leave:h,leaveFrom:m,leaveTo:v,...b}=e,[p,g]=y.useState(null),x=y.useRef(null),E=PT(e),S=CT(...E?[x,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=t4(),[N,I]=y.useState(k?"visible":"hidden"),re=n4(),{register:ie,unregister:xe}=re;$r(()=>ie(x),[ie,x]),$r(()=>{if(C===_r.Hidden&&x.current){if(k&&N!=="visible"){I("visible");return}return gc(N,{hidden:()=>xe(x),visible:()=>ie(x)})}},[N,x,ie,xe,k,C]);let Oe=_T();$r(()=>{if(E&&Oe&&N==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=AT(()=>{O.current||(I("hidden"),xe(x))},re),B=Kn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(x,pt,mt=>{mt==="enter"?s==null||s():mt==="leave"&&(a==null||a())})}),V=Kn(Ve=>{let pt=Ve?"enter":"leave";O.current=!1,L.onStop(x,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!xc(L)&&(I("hidden"),xe(x))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=qL(H,p,k,{start:B,end:V}),ce=si({ref:S,className:((r=Sh(b.className,ne&&u,ne&&f,q.enter&&u,q.enter&&q.closed&&f,q.enter&&!q.closed&&c,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&v,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...KL(q)}),ye=0;N==="visible"&&(ye|=di.Open),N==="hidden"&&(ye|=di.Closed),k&&N==="hidden"&&(ye|=di.Opening),!k&&N==="visible"&&(ye|=di.Closing);let J=TT();return R.createElement(vc.Provider,{value:L},R.createElement(XL,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:RT,features:OT,visible:N==="visible",name:"Transition.Child"})))}function i4(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=PT(e),l=CT(...a?[o,t]:t===null?[]:[t]);_T();let u=kT();if(n===void 0&&u!==null&&(n=(u&di.Open)===di.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,c]=y.useState(n?"visible":"hidden"),d=AT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),v=y.useRef([n]);$r(()=>{h!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),m(!1))},[v,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?c("visible"):!xc(d)&&o.current!==null&&c("hidden")},[n,d]);let p={unmount:i},g=Kn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),x=Kn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=TT();return R.createElement(vc.Provider,{value:d},R.createElement(yc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(jT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:x})},theirProps:{},defaultTag:y.Fragment,features:OT,visible:f==="visible",name:"Transition"})))}function s4(e,t){let n=y.useContext(yc)!==null,r=kT()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(Th,{ref:t,...e}):R.createElement(jT,{ref:t,...e}))}let Th=Dm(i4),jT=Dm(r4),o4=Dm(s4),a4=Object.assign(Th,{Child:o4,Root:Th});const Lm=y.createContext(void 0),Lo=({as:e="div",children:t,className:n})=>{const[r,i]=y.useState(!1),s=y.useCallback(()=>{i(a=>!a)},[]),o=y.useRef(null);return y.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),w.jsx(Lm.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},l4=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Lm),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return w.jsx("div",{children:e==="a"?w.jsx(o2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:u+(s?" show":""),children:t}):w.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},u4=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Lm),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=y.useState("right-end");y.useEffect(()=>{r&&l(r)},[r]);const u=y.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const d=u.current;d.style.position="absolute",f==="rtl"?d.style.inset="0px auto auto 0px":d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto 0px 0px auto",d.style.margin="0px",d.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto auto 0px 0px",d.style.margin="0px",d.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.right="0px",d.style.transform="translate(0px, -20px)"}return{}};return w.jsx(a4,{as:R.Fragment,show:i,children:d=>w.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:c(),children:n})})};Lo.Trigger=l4;Lo.Content=u4;const c4={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function f4({onChatClose:e}){const[t,n]=y.useState(!1),r=Vi(),i=()=>{r==null||r.emit(Dn.ChatClose,{}),e()};return w.jsxs(w.Fragment,{children:[w.jsx(ji,{children:t&&w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 backdrop-blur-sm bg-slate-900/40 z-50 flex items-center justify-center p-4",children:w.jsxs(Re.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[w.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),w.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),w.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[w.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),w.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),w.jsxs(Lo,{className:"relative flex items-center h-full",children:[w.jsx(Lo.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:w.jsx(De.Menu,{className:"size-5 text-slate-600"})}),w.jsx(ji,{children:!t&&w.jsx(Re.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:w.jsxs(Lo.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[w.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),w.jsx("ul",{className:"py-2 px-2",children:w.jsx("li",{children:w.jsxs("button",{className:Ne("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",c4.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[w.jsx(De.X,{className:"w-4 h-4"}),w.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function d4({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return w.jsx(w.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return w.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return w.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const h4={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},jv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function p4({messages:e,isTyping:t}){var u,f,c,d;const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!0),{widget:o}=tn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:v}=r.current,b=m-h<=v+10;s(b)}};return y.useEffect(()=>{(i||t)&&a()},[e,i,t]),w.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-3 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 142px)"},children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.greeting_message)&&w.jsx("div",{className:"flex w-full items-center justify-start",children:w.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(d=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:d.greeting_message})}),w.jsx(ji,{children:e.filter(h=>!!h.content&&h.content!==`
110
+ `).map((h,m)=>w.jsxs(Re.div,{custom:m,initial:"hidden",animate:"visible",variants:h4,className:Ne("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&w.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),[et.Customer,et.User].includes(h.sender_type)&&w.jsxs(Re.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:Ne("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.sender_type===et.User?w.jsx(d4,{text:h.content}):h.content,h.created_at&&w.jsx("div",{className:Ne("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer,"text-blue-100":h.sender_type===et.User}),children:jv(h.created_at)})]}),h.sender_type===et.Activity&&(h.content.split("_").length===3?w.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):w.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&w.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&jv(h.created_at)})]},h.id||m))}),t&&w.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:w.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:w.jsxs("div",{className:"flex space-x-1",children:[w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&w.jsx("div",{className:"fixed bottom-[9rem] right-12",children:w.jsx(Gn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:w.jsx(De.ArrowDown,{className:"size-4"})})}),w.jsx("div",{ref:n})]})}function m4({onNewMessage:e}){const t=y.useRef(null),n=Vi(),[r,i]=y.useState(""),[s,o]=y.useState("3rem"),a=()=>{r.trim()&&(n==null||n.emit(Dn.MessageCreate,{content:r},u=>{i(""),e(u),t.current&&(t.current.style.height="3rem",o("3rem"))}))},l=u=>{n==null||n.emit(Dn.MessageTyping,{content:u})};return w.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl",onSubmit:u=>{u.preventDefault(),a(),u.currentTarget.reset()},children:[w.jsx("div",{className:"grow relative",children:w.jsx(Mm,{id:"message",inputRef:t,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:s,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:u=>{if(i(u.target.value),l(u.target.value),u.target.value.length>0&&u.currentTarget.scrollHeight>u.currentTarget.clientHeight){const f=`${u.currentTarget.scrollHeight}px`;u.currentTarget.style.height=f,o(f)}else u.currentTarget.style.height="3rem",o("3rem")},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),u.stopPropagation(),u.currentTarget.value="",a())}})}),w.jsx(Re.div,{whileTap:{scale:.95},className:"flex items-center justify-center",children:w.jsx(Gn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:!r.trim(),children:w.jsx(De.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}function g4({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=nr(),u=hm();return w.jsxs(w.Fragment,{children:[w.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(K.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?w.jsx(NL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):w.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(f4,{onChatClose:s}),u&&w.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:w.jsx(De.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),w.jsx(p4,{messages:r,isTyping:t||n.length>0}),w.jsx(m4,{onNewMessage:d=>{i(d)}}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function y4({rating:e,onChange:t}){return w.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return w.jsxs("div",{className:"relative w-10 h-10",children:[w.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),i&&w.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),w.jsxs("div",{className:"absolute inset-0 flex",children:[w.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),w.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function v4({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=pN();y.useEffect(()=>{if(r){const c=setInterval(()=>{o(d=>d<=1?(clearInterval(c),e(!0),0):d-1)},1e3);return()=>clearInterval(c)}},[r]);const l=xm({comment:Eu()}),u=gT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(vp(h)){i(!0);return}yT(d,{form:u})}}),f=()=>{e(!0)};return w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsx("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:w.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"})}),w.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?w.jsxs(Re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[w.jsx("div",{className:"text-green-500 mb-4",children:w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),w.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),w.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),w.jsx(Gn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):w.jsxs(Re.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[w.jsx("div",{className:"text-center mb-6",children:w.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),w.jsxs("div",{className:"mb-6",children:[w.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),w.jsx(y4,{rating:t,onChange:n}),t>0&&w.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]})]}),w.jsxs("form",{onSubmit:u.handleSubmit,className:"space-y-5",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),w.jsx(Mm,{id:"comment",onChange:u.handleChange,onBlur:u.handleBlur,value:u.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm"})]}),w.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[w.jsx(Gn,{type:"submit",disabled:t<1,className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),w.jsx(Gn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function x4({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function w4({children:e}){const t=Vi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function b4(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Vi(),i=dm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:ii.Closed});return}m()},m=b=>{b||t(!1),n(!1),o(null),l([]),d([]),ch(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Dn.ChatView,{},b=>{if(b===null){t(!1),n(!1),ch(e.client_id),l([]),d([]),i.push("registration");return}o(b),n(!0)})},[]);const v=y.useCallback(b=>{s&&![ii.Closed,ii.Deleted].includes(s.status)&&l([...a,b])},[a,s]);return y.useEffect(()=>{if(!r)return;const b=E=>{const S={content:E.content,created_at:E.created_at,files:E.files,id:E._id,sender_type:E.sender_type,answers:E.answers,reply_id:E.reply_id};if(c.length>0){d(C=>[...C,S]);return}E.is_shortcut?d([S]):v(S),f(!1)},p=E=>{o({...s,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(s==null?void 0:s.is_uploadable)??!1,status:(s==null?void 0:s.status)??ii.Open}),v({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:xT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},x=()=>{if(s){o({...s,status:ii.Closed});return}m()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,x),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,x)}},[v]),y.useEffect(()=>{!r||!s||r.emit(Dn.MessageList,{},b=>{l(b)})},[r,s]),y.useEffect(()=>{const b=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(b)},[u]),y.useEffect(()=>{if(!e||c.length===0)return;let b=0;e.writing_timeout&&(b=[...c[0].content].length/e.writing_timeout,b<0&&(b=0));const p=setTimeout(()=>{v(c[0]),d(c.slice(1))},b*1e3);return()=>clearTimeout(p)},[c,e]),s?w.jsxs(w.Fragment,{children:[w.jsx("div",{id:"chat-alert-portal"}),w.jsx(ji,{children:w.jsx(Re.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:s.status===ii.Closed?w.jsx(v4,{onOk:m}):w.jsx(g4,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:v,onChatClose:h})})})]}):null}function S4(){return _L(),null}function T4(){return w.jsxs(w4,{children:[w.jsx(kS,{defaultOpen:!0,children:w.jsx(x4,{children:w.jsx(b4,{})})}),w.jsx(S4,{})]})}const E4=[{path:"/chat",component:T4,name:"chat"}],NT=[...E4],MT=[...jL],C4=[...NT,...MT];function k4(){return w.jsx(Y_,{future:{v7_startTransition:!0},children:w.jsxs(Z_,{children:[NT.map((e,t)=>w.jsx(Dd,{path:e.path,element:w.jsx(e.component,{})},t)),MT.map((e,t)=>w.jsx(Dd,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function _4({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=tn(),{data:a,isLoading:l}=i_(e);return y.useEffect(()=>{Array.isArray(a)&&o_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:w.jsx(mL,{children:w.jsx(cN,{children:w.jsx(k4,{})})})}const P4=new Vk;function A4({container:e,link_id:t,defaultValues:n,soundPath:r}){nw(e).render(w.jsxs(Wk,{client:P4,children:[w.jsx(_4,{link_id:t,defaultValues:n,soundPath:r}),w.jsx(aL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=A4});export default R4();