@alfatech/livechat 2025.11.2-6.1 → 2025.12.1-5.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 _g=e=>{throw TypeError(e)};var Jk=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Jc=(e,t,n)=>t.has(e)||_g("Cannot "+n);var C=(e,t,n)=>(Jc(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?_g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(Jc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(Jc(e,t,"access private method"),n);var fl=(e,t,n,r)=>({set _(i){H(e,t,i,n)},get _(){return C(e,t,r)}});var gB=Jk((Ht,Wt)=>{function eT(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 Zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ux={exports:{}},rc={},Hx={exports:{}},le={};/**
1
+ var jg=e=>{throw TypeError(e)};var rT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var td=(e,t,n)=>t.has(e)||jg("Cannot "+n);var C=(e,t,n)=>(td(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?jg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(td(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ue=(e,t,n)=>(td(e,t,"access private method"),n);var ml=(e,t,n,r)=>({set _(i){q(e,t,i,n)},get _(){return C(e,t,r)}});var SB=rT((Ht,Wt)=>{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 ts(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wx={exports:{}},oc={},qx={exports:{}},ce={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var _g=e=>{throw TypeError(e)};var Jk=(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 Ga=Symbol.for("react.element"),tT=Symbol.for("react.portal"),nT=Symbol.for("react.fragment"),rT=Symbol.for("react.strict_mode"),iT=Symbol.for("react.profiler"),sT=Symbol.for("react.provider"),oT=Symbol.for("react.context"),aT=Symbol.for("react.forward_ref"),lT=Symbol.for("react.suspense"),uT=Symbol.for("react.memo"),cT=Symbol.for("react.lazy"),jg=Symbol.iterator;function dT(e){return e===null||typeof e!="object"?null:(e=jg&&e[jg]||e["@@iterator"],typeof e=="function"?e:null)}var Wx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qx=Object.assign,Gx={};function yo(e,t,n){this.props=e,this.context=t,this.refs=Gx,this.updater=n||Wx}yo.prototype.isReactComponent={};yo.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")};yo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qx(){}Qx.prototype=yo.prototype;function dh(e,t,n){this.props=e,this.context=t,this.refs=Gx,this.updater=n||Wx}var fh=dh.prototype=new Qx;fh.constructor=dh;qx(fh,yo.prototype);fh.isPureReactComponent=!0;var Rg=Array.isArray,Yx=Object.prototype.hasOwnProperty,ph={current:null},Kx={key:!0,ref:!0,__self:!0,__source:!0};function Xx(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)Yx.call(t,r)&&!Kx.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:Ga,type:e,key:s,ref:o,props:i,_owner:ph.current}}function fT(e,t){return{$$typeof:Ga,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ga}function pT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ag=/\/+/g;function ed(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pT(""+e.key):t.toString(36)}function Ul(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 Ga:case tT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ed(o,0):r,Rg(i)?(n="",e!=null&&(n=e.replace(Ag,"$&/")+"/"),Ul(i,t,n,"",function(u){return u})):i!=null&&(hh(i)&&(i=fT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Ag,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Rg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+ed(s,a);o+=Ul(s,t,n,l,i)}else if(l=dT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+ed(s,a++),o+=Ul(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 pl(e,t,n){if(e==null)return e;var r=[],i=0;return Ul(e,r,"","",function(s){return t.call(n,s,i++)}),r}function hT(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 St={current:null},Hl={transition:null},mT={ReactCurrentDispatcher:St,ReactCurrentBatchConfig:Hl,ReactCurrentOwner:ph};function Zx(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:pl,forEach:function(e,t,n){pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return pl(e,function(){t++}),t},toArray:function(e){return pl(e,function(t){return t})||[]},only:function(e){if(!hh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=yo;le.Fragment=nT;le.Profiler=iT;le.PureComponent=dh;le.StrictMode=rT;le.Suspense=lT;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mT;le.act=Zx;le.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=qx({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=ph.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Yx.call(t,l)&&!Kx.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:Ga,type:e.type,key:i,ref:s,props:r,_owner:o}};le.createContext=function(e){return e={$$typeof:oT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:sT,_context:e},e.Consumer=e};le.createElement=Xx;le.createFactory=function(e){var t=Xx.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:aT,render:e}};le.isValidElement=hh;le.lazy=function(e){return{$$typeof:cT,_payload:{_status:-1,_result:e},_init:hT}};le.memo=function(e,t){return{$$typeof:uT,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=Hl.transition;Hl.transition={};try{e()}finally{Hl.transition=t}};le.unstable_act=Zx;le.useCallback=function(e,t){return St.current.useCallback(e,t)};le.useContext=function(e){return St.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return St.current.useDeferredValue(e)};le.useEffect=function(e,t){return St.current.useEffect(e,t)};le.useId=function(){return St.current.useId()};le.useImperativeHandle=function(e,t,n){return St.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return St.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return St.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return St.current.useMemo(e,t)};le.useReducer=function(e,t,n){return St.current.useReducer(e,t,n)};le.useRef=function(e){return St.current.useRef(e)};le.useState=function(e){return St.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return St.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return St.current.useTransition()};le.version="18.3.1";Hx.exports=le;var v=Hx.exports;const L=Zi(v),of=eT({__proto__:null,default:L},[v]);/**
9
+ */var Xa=Symbol.for("react.element"),sT=Symbol.for("react.portal"),oT=Symbol.for("react.fragment"),aT=Symbol.for("react.strict_mode"),lT=Symbol.for("react.profiler"),uT=Symbol.for("react.provider"),cT=Symbol.for("react.context"),dT=Symbol.for("react.forward_ref"),fT=Symbol.for("react.suspense"),pT=Symbol.for("react.memo"),hT=Symbol.for("react.lazy"),Ag=Symbol.iterator;function mT(e){return e===null||typeof e!="object"?null:(e=Ag&&e[Ag]||e["@@iterator"],typeof e=="function"?e:null)}var Gx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qx=Object.assign,Yx={};function wo(e,t,n){this.props=e,this.context=t,this.refs=Yx,this.updater=n||Gx}wo.prototype.isReactComponent={};wo.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")};wo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Kx(){}Kx.prototype=wo.prototype;function fh(e,t,n){this.props=e,this.context=t,this.refs=Yx,this.updater=n||Gx}var ph=fh.prototype=new Kx;ph.constructor=fh;Qx(ph,wo.prototype);ph.isPureReactComponent=!0;var Rg=Array.isArray,Xx=Object.prototype.hasOwnProperty,hh={current:null},Zx={key:!0,ref:!0,__self:!0,__source:!0};function Jx(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)Xx.call(t,r)&&!Zx.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:hh.current}}function gT(e,t){return{$$typeof:Xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function mh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xa}function vT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pg=/\/+/g;function nd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vT(""+e.key):t.toString(36)}function ql(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 sT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+nd(o,0):r,Rg(i)?(n="",e!=null&&(n=e.replace(Pg,"$&/")+"/"),ql(i,t,n,"",function(u){return u})):i!=null&&(mh(i)&&(i=gT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Pg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Rg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+nd(s,a);o+=ql(s,t,n,l,i)}else if(l=mT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+nd(s,a++),o+=ql(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 gl(e,t,n){if(e==null)return e;var r=[],i=0;return ql(e,r,"","",function(s){return t.call(n,s,i++)}),r}function yT(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 Tt={current:null},Gl={transition:null},xT={ReactCurrentDispatcher:Tt,ReactCurrentBatchConfig:Gl,ReactCurrentOwner:hh};function e1(){throw Error("act(...) is not supported in production builds of React.")}ce.Children={map:gl,forEach:function(e,t,n){gl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gl(e,function(){t++}),t},toArray:function(e){return gl(e,function(t){return t})||[]},only:function(e){if(!mh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Component=wo;ce.Fragment=oT;ce.Profiler=lT;ce.PureComponent=fh;ce.StrictMode=aT;ce.Suspense=fT;ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xT;ce.act=e1;ce.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=Qx({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=hh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Xx.call(t,l)&&!Zx.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}};ce.createContext=function(e){return e={$$typeof:cT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:uT,_context:e},e.Consumer=e};ce.createElement=Jx;ce.createFactory=function(e){var t=Jx.bind(null,e);return t.type=e,t};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:dT,render:e}};ce.isValidElement=mh;ce.lazy=function(e){return{$$typeof:hT,_payload:{_status:-1,_result:e},_init:yT}};ce.memo=function(e,t){return{$$typeof:pT,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=Gl.transition;Gl.transition={};try{e()}finally{Gl.transition=t}};ce.unstable_act=e1;ce.useCallback=function(e,t){return Tt.current.useCallback(e,t)};ce.useContext=function(e){return Tt.current.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e){return Tt.current.useDeferredValue(e)};ce.useEffect=function(e,t){return Tt.current.useEffect(e,t)};ce.useId=function(){return Tt.current.useId()};ce.useImperativeHandle=function(e,t,n){return Tt.current.useImperativeHandle(e,t,n)};ce.useInsertionEffect=function(e,t){return Tt.current.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return Tt.current.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return Tt.current.useMemo(e,t)};ce.useReducer=function(e,t,n){return Tt.current.useReducer(e,t,n)};ce.useRef=function(e){return Tt.current.useRef(e)};ce.useState=function(e){return Tt.current.useState(e)};ce.useSyncExternalStore=function(e,t,n){return Tt.current.useSyncExternalStore(e,t,n)};ce.useTransition=function(){return Tt.current.useTransition()};ce.version="18.3.1";qx.exports=ce;var v=qx.exports;const $=ts(v),af=iT({__proto__:null,default:$},[v]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var _g=e=>{throw TypeError(e)};var Jk=(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 gT=v,vT=Symbol.for("react.element"),yT=Symbol.for("react.fragment"),xT=Object.prototype.hasOwnProperty,wT=gT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bT={key:!0,ref:!0,__self:!0,__source:!0};function Jx(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)xT.call(t,r)&&!bT.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:vT,type:e,key:s,ref:o,props:i,_owner:wT.current}}rc.Fragment=yT;rc.jsx=Jx;rc.jsxs=Jx;Ux.exports=rc;var g=Ux.exports,e1={exports:{}},Qt={},t1={exports:{}},n1={};/**
17
+ */var wT=v,bT=Symbol.for("react.element"),ST=Symbol.for("react.fragment"),CT=Object.prototype.hasOwnProperty,kT=wT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TT={key:!0,ref:!0,__self:!0,__source:!0};function t1(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)CT.call(t,r)&&!TT.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:bT,type:e,key:s,ref:o,props:i,_owner:kT.current}}oc.Fragment=ST;oc.jsx=t1;oc.jsxs=t1;Wx.exports=oc;var h=Wx.exports,n1={exports:{}},Qt={},r1={exports:{}},i1={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var _g=e=>{throw TypeError(e)};var Jk=(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){var I=_.length;_.push(O);e:for(;0<I;){var z=I-1>>>1,U=_[z];if(0<i(U,O))_[z]=O,_[I]=U,I=z;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var O=_[0],I=_.pop();if(I!==O){_[0]=I;e:for(var z=0,U=_.length,K=U>>>1;z<K;){var oe=2*(z+1)-1,xe=_[oe],re=oe+1,Fe=_[re];if(0>i(xe,I))re<U&&0>i(Fe,xe)?(_[z]=Fe,_[re]=I,z=re):(_[z]=xe,_[oe]=I,z=oe);else if(re<U&&0>i(Fe,I))_[z]=Fe,_[re]=I,z=re;else break e}}return O}function i(_,O){var I=_.sortIndex-O.sortIndex;return I!==0?I:_.id-O.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=[],d=1,c=null,f=3,p=!1,m=!1,h=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(_){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=_)r(u),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(u)}}function k(_){if(h=!1,b(_),!m)if(n(l)!==null)m=!0,J(T);else{var O=n(u);O!==null&&ne(k,O.startTime-_)}}function T(_,O){m=!1,h&&(h=!1,y(R),R=-1),p=!0;var I=f;try{for(b(O),c=n(l);c!==null&&(!(c.expirationTime>O)||_&&!A());){var z=c.callback;if(typeof z=="function"){c.callback=null,f=c.priorityLevel;var U=z(c.expirationTime<=O);O=e.unstable_now(),typeof U=="function"?c.callback=U:c===n(l)&&r(l),b(O)}else r(l);c=n(l)}if(c!==null)var K=!0;else{var oe=n(u);oe!==null&&ne(k,oe.startTime-O),K=!1}return K}finally{c=null,f=I,p=!1}}var E=!1,j=null,R=-1,M=5,N=-1;function A(){return!(e.unstable_now()-N<M)}function W(){if(j!==null){var _=e.unstable_now();N=_;var O=!0;try{O=j(!0,_)}finally{O?B():(E=!1,j=null)}}else E=!1}var B;if(typeof x=="function")B=function(){x(W)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,X=Q.port2;Q.port1.onmessage=W,B=function(){X.postMessage(null)}}else B=function(){w(W,0)};function J(_){j=_,E||(E=!0,B())}function ne(_,O){R=w(function(){_(e.unstable_now())},O)}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(_){_.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,J(T))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(_){switch(f){case 1:case 2:case 3:var O=3;break;default:O=f}var I=f;f=O;try{return _()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,O){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var I=f;f=_;try{return O()}finally{f=I}},e.unstable_scheduleCallback=function(_,O,I){var z=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?z+I:z):I=z,_){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=I+U,_={id:d++,callback:O,priorityLevel:_,startTime:I,expirationTime:U,sortIndex:-1},I>z?(_.sortIndex=I,t(u,_),n(l)===null&&_===n(u)&&(h?(y(R),R=-1):h=!0,ne(k,I-z))):(_.sortIndex=U,t(l,_),m||p||(m=!0,J(T))),_},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(_){var O=f;return function(){var I=f;f=O;try{return _.apply(this,arguments)}finally{f=I}}}})(n1);t1.exports=n1;var ST=t1.exports;/**
25
+ */(function(e){function t(O,M){var V=O.length;O.push(M);e:for(;0<V;){var U=V-1>>>1,I=O[U];if(0<i(I,M))O[U]=M,O[V]=I,V=U;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var M=O[0],V=O.pop();if(V!==M){O[0]=V;e:for(var U=0,I=O.length,F=I>>>1;U<F;){var W=2*(U+1)-1,se=O[W],z=W+1,ee=O[z];if(0>i(se,V))z<I&&0>i(ee,se)?(O[U]=ee,O[z]=V,U=z):(O[U]=se,O[W]=V,U=W);else if(z<I&&0>i(ee,V))O[U]=ee,O[z]=V,U=z;else break e}}return M}function i(O,M){var V=O.sortIndex-M.sortIndex;return V!==0?V:O.id-M.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=[],d=1,c=null,f=3,p=!1,m=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(O){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=O)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function k(O){if(g=!1,b(O),!m)if(n(l)!==null)m=!0,J(T);else{var M=n(u);M!==null&&oe(k,M.startTime-O)}}function T(O,M){m=!1,g&&(g=!1,y(R),R=-1),p=!0;var V=f;try{for(b(M),c=n(l);c!==null&&(!(c.expirationTime>M)||O&&!j());){var U=c.callback;if(typeof U=="function"){c.callback=null,f=c.priorityLevel;var I=U(c.expirationTime<=M);M=e.unstable_now(),typeof I=="function"?c.callback=I:c===n(l)&&r(l),b(M)}else r(l);c=n(l)}if(c!==null)var F=!0;else{var W=n(u);W!==null&&oe(k,W.startTime-M),F=!1}return F}finally{c=null,f=V,p=!1}}var E=!1,_=null,R=-1,D=5,N=-1;function j(){return!(e.unstable_now()-N<D)}function Y(){if(_!==null){var O=e.unstable_now();N=O;var M=!0;try{M=_(!0,O)}finally{M?G():(E=!1,_=null)}}else E=!1}var G;if(typeof w=="function")G=function(){w(Y)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ne=Z.port2;Z.port1.onmessage=Y,G=function(){ne.postMessage(null)}}else G=function(){x(Y,0)};function J(O){_=O,E||(E=!0,G())}function oe(O,M){R=x(function(){O(e.unstable_now())},M)}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||p||(m=!0,J(T))},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"):D=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var M=3;break;default:M=f}var V=f;f=M;try{return O()}finally{f=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,M){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var V=f;f=O;try{return M()}finally{f=V}},e.unstable_scheduleCallback=function(O,M,V){var U=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?U+V:U):V=U,O){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=V+I,O={id:d++,callback:M,priorityLevel:O,startTime:V,expirationTime:I,sortIndex:-1},V>U?(O.sortIndex=V,t(u,O),n(l)===null&&O===n(u)&&(g?(y(R),R=-1):g=!0,oe(k,V-U))):(O.sortIndex=I,t(l,O),m||p||(m=!0,J(T))),O},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(O){var M=f;return function(){var V=f;f=M;try{return O.apply(this,arguments)}finally{f=V}}}})(i1);r1.exports=i1;var ET=r1.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var _g=e=>{throw TypeError(e)};var Jk=(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 CT=v,Gt=ST;function $(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,da={};function Ji(e,t){ro(e,t),ro(e+"Capture",t)}function ro(e,t){for(da[e]=t,e=0;e<t.length;e++)r1.add(t[e])}var fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),af=Object.prototype.hasOwnProperty,kT=/^[: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]*$/,Pg={},Og={};function TT(e){return af.call(Og,e)?!0:af.call(Pg,e)?!1:kT.test(e)?Og[e]=!0:(Pg[e]=!0,!1)}function ET(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 _T(e,t,n,r){if(t===null||typeof t>"u"||ET(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 Ct(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 lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new Ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new Ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new Ct(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){lt[e]=new Ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var mh=/[\-:]([a-z])/g;function gh(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(mh,gh);lt[t]=new Ct(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(mh,gh);lt[t]=new Ct(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(mh,gh);lt[t]=new Ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function vh(e,t,n,r){var i=lt.hasOwnProperty(t)?lt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_T(t,n,i,r)&&(n=null),r||i===null?TT(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 vr=CT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hl=Symbol.for("react.element"),xs=Symbol.for("react.portal"),ws=Symbol.for("react.fragment"),yh=Symbol.for("react.strict_mode"),lf=Symbol.for("react.profiler"),i1=Symbol.for("react.provider"),s1=Symbol.for("react.context"),xh=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),cf=Symbol.for("react.suspense_list"),wh=Symbol.for("react.memo"),Er=Symbol.for("react.lazy"),o1=Symbol.for("react.offscreen"),Dg=Symbol.iterator;function Ro(e){return e===null||typeof e!="object"?null:(e=Dg&&e[Dg]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Object.assign,td;function Bo(e){if(td===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);td=t&&t[1]||""}return`
34
- `+td+e}var nd=!1;function rd(e,t){if(!e||nd)return"";nd=!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(`
33
+ */var _T=v,Gt=ET;function B(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 s1=new Set,ha={};function ns(e,t){so(e,t),so(e+"Capture",t)}function so(e,t){for(ha[e]=t,e=0;e<t.length;e++)s1.add(t[e])}var pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lf=Object.prototype.hasOwnProperty,jT=/^[: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]*$/,Og={},Dg={};function AT(e){return lf.call(Dg,e)?!0:lf.call(Og,e)?!1:jT.test(e)?Dg[e]=!0:(Og[e]=!0,!1)}function RT(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 PT(e,t,n,r){if(t===null||typeof t>"u"||RT(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 Et(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 ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ut[e]=new Et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ut[t]=new Et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ut[e]=new Et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ut[e]=new Et(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){ut[e]=new Et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ut[e]=new Et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ut[e]=new Et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ut[e]=new Et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ut[e]=new Et(e,5,!1,e.toLowerCase(),null,!1,!1)});var gh=/[\-:]([a-z])/g;function vh(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(gh,vh);ut[t]=new Et(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(gh,vh);ut[t]=new Et(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(gh,vh);ut[t]=new Et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ut[e]=new Et(e,1,!1,e.toLowerCase(),null,!1,!1)});ut.xlinkHref=new Et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ut[e]=new Et(e,1,!1,e.toLowerCase(),null,!0,!0)});function yh(e,t,n,r){var i=ut.hasOwnProperty(t)?ut[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(PT(t,n,i,r)&&(n=null),r||i===null?AT(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 yr=_T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vl=Symbol.for("react.element"),bs=Symbol.for("react.portal"),Ss=Symbol.for("react.fragment"),xh=Symbol.for("react.strict_mode"),uf=Symbol.for("react.profiler"),o1=Symbol.for("react.provider"),a1=Symbol.for("react.context"),wh=Symbol.for("react.forward_ref"),cf=Symbol.for("react.suspense"),df=Symbol.for("react.suspense_list"),bh=Symbol.for("react.memo"),jr=Symbol.for("react.lazy"),l1=Symbol.for("react.offscreen"),Ng=Symbol.iterator;function Po(e){return e===null||typeof e!="object"?null:(e=Ng&&e[Ng]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Object.assign,rd;function Vo(e){if(rd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rd=t&&t[1]||""}return`
34
+ `+rd+e}var id=!1;function sd(e,t){if(!e||id)return"";id=!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{nd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bo(e):""}function jT(e){switch(e.tag){case 5:return Bo(e.type);case 16:return Bo("Lazy");case 13:return Bo("Suspense");case 19:return Bo("SuspenseList");case 0:case 2:case 15:return e=rd(e.type,!1),e;case 11:return e=rd(e.type.render,!1),e;case 1:return e=rd(e.type,!0),e;default:return""}}function df(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 ws:return"Fragment";case xs:return"Portal";case lf:return"Profiler";case yh:return"StrictMode";case uf:return"Suspense";case cf: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 xh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wh:return t=e.displayName||null,t!==null?t:df(e.type)||"Memo";case Er:t=e._payload,e=e._init;try{return df(e(t))}catch{}}return null}function RT(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 df(t);case 8:return t===yh?"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 ni(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 AT(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 ml(e){e._valueTracker||(e._valueTracker=AT(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 hu(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 ff(e,t){var n=t.checked;return Oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ng(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ni(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&&vh(e,"checked",t,!1)}function pf(e,t){u1(e,t);var n=ni(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")?hf(e,t.type,n):t.hasOwnProperty("defaultValue")&&hf(e,t.type,ni(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mg(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 hf(e,t,n){(t!=="number"||hu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zo=Array.isArray;function Ls(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=""+ni(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 mf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Oe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(zo(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ni(n)}}function c1(e,t){var n=ni(t.value),r=ni(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 Lg(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 gf(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 gl,f1=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(gl=gl||document.createElement("div"),gl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={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},PT=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){PT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function p1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function h1(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 OT=Oe({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 vf(e,t){if(t){if(OT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function yf(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 xf=null;function bh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wf=null,Is=null,$s=null;function Ig(e){if(e=Ka(e)){if(typeof wf!="function")throw Error($(280));var t=e.stateNode;t&&(t=lc(t),wf(e.stateNode,e.type,t))}}function m1(e){Is?$s?$s.push(e):$s=[e]:Is=e}function g1(){if(Is){var e=Is,t=$s;if($s=Is=null,Ig(e),t)for(e=0;e<t.length;e++)Ig(t[e])}}function v1(e,t){return e(t)}function y1(){}var id=!1;function x1(e,t,n){if(id)return e(t,n);id=!0;try{return v1(e,t,n)}finally{id=!1,(Is!==null||$s!==null)&&(y1(),g1())}}function pa(e,t){var n=e.stateNode;if(n===null)return null;var r=lc(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($(231,t,typeof n));return n}var bf=!1;if(fr)try{var Ao={};Object.defineProperty(Ao,"passive",{get:function(){bf=!0}}),window.addEventListener("test",Ao,Ao),window.removeEventListener("test",Ao,Ao)}catch{bf=!1}function DT(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Yo=!1,mu=null,gu=!1,Sf=null,NT={onError:function(e){Yo=!0,mu=e}};function MT(e,t,n,r,i,s,o,a,l){Yo=!1,mu=null,DT.apply(NT,arguments)}function FT(e,t,n,r,i,s,o,a,l){if(MT.apply(this,arguments),Yo){if(Yo){var u=mu;Yo=!1,mu=null}else throw Error($(198));gu||(gu=!0,Sf=u)}}function es(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 $g(e){if(es(e)!==e)throw Error($(188))}function LT(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error($(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 $g(i),e;if(s===r)return $g(i),t;s=s.sibling}throw Error($(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($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function b1(e){return e=LT(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 C1=Gt.unstable_scheduleCallback,Bg=Gt.unstable_cancelCallback,IT=Gt.unstable_shouldYield,$T=Gt.unstable_requestPaint,Be=Gt.unstable_now,BT=Gt.unstable_getCurrentPriorityLevel,Sh=Gt.unstable_ImmediatePriority,k1=Gt.unstable_UserBlockingPriority,vu=Gt.unstable_NormalPriority,zT=Gt.unstable_LowPriority,T1=Gt.unstable_IdlePriority,ic=null,Un=null;function VT(e){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(ic,e,void 0,(e.current.flags&128)===128)}catch{}}var Tn=Math.clz32?Math.clz32:WT,UT=Math.log,HT=Math.LN2;function WT(e){return e>>>=0,e===0?32:31-(UT(e)/HT|0)|0}var vl=64,yl=4194304;function Vo(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 yu(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=Vo(a):(s&=o,s!==0&&(r=Vo(s)))}else o=n&~i,o!==0?r=Vo(o):s!==0&&(r=Vo(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-Tn(t),i=1<<n,r|=e[n],t&=~i;return r}function qT(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 GT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Tn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=qT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Cf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function E1(){var e=vl;return vl<<=1,!(vl&4194240)&&(vl=64),e}function sd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tn(t),e[t]=n}function QT(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-Tn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Ch(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ge=0;function _1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var j1,kh,R1,A1,P1,kf=!1,xl=[],Hr=null,Wr=null,qr=null,ha=new Map,ma=new Map,Rr=[],YT="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 zg(e,t){switch(e){case"focusin":case"focusout":Hr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":qr=null;break;case"pointerover":case"pointerout":ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ma.delete(t.pointerId)}}function Po(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=Ka(t),t!==null&&kh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function KT(e,t,n,r,i){switch(t){case"focusin":return Hr=Po(Hr,e,t,n,r,i),!0;case"dragenter":return Wr=Po(Wr,e,t,n,r,i),!0;case"mouseover":return qr=Po(qr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ha.set(s,Po(ha.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ma.set(s,Po(ma.get(s)||null,e,t,n,r,i)),!0}return!1}function O1(e){var t=Ti(e.target);if(t!==null){var n=es(t);if(n!==null){if(t=n.tag,t===13){if(t=w1(n),t!==null){e.blockedOn=t,P1(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 Wl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xf=r,n.target.dispatchEvent(r),xf=null}else return t=Ka(n),t!==null&&kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Vg(e,t,n){Wl(e)&&n.delete(t)}function XT(){kf=!1,Hr!==null&&Wl(Hr)&&(Hr=null),Wr!==null&&Wl(Wr)&&(Wr=null),qr!==null&&Wl(qr)&&(qr=null),ha.forEach(Vg),ma.forEach(Vg)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,kf||(kf=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,XT)))}function ga(e){function t(i){return Oo(i,e)}if(0<xl.length){Oo(xl[0],e);for(var n=1;n<xl.length;n++){var r=xl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Hr!==null&&Oo(Hr,e),Wr!==null&&Oo(Wr,e),qr!==null&&Oo(qr,e),ha.forEach(t),ma.forEach(t),n=0;n<Rr.length;n++)r=Rr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Rr.length&&(n=Rr[0],n.blockedOn===null);)O1(n),n.blockedOn===null&&Rr.shift()}var Bs=vr.ReactCurrentBatchConfig,xu=!0;function ZT(e,t,n,r){var i=ge,s=Bs.transition;Bs.transition=null;try{ge=1,Th(e,t,n,r)}finally{ge=i,Bs.transition=s}}function JT(e,t,n,r){var i=ge,s=Bs.transition;Bs.transition=null;try{ge=4,Th(e,t,n,r)}finally{ge=i,Bs.transition=s}}function Th(e,t,n,r){if(xu){var i=Tf(e,t,n,r);if(i===null)md(e,t,r,wu,n),zg(e,r);else if(KT(i,e,t,n,r))r.stopPropagation();else if(zg(e,r),t&4&&-1<YT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&j1(s),s=Tf(e,t,n,r),s===null&&md(e,t,r,wu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else md(e,t,r,null,n)}}var wu=null;function Tf(e,t,n,r){if(wu=null,e=bh(r),e=Ti(e),e!==null)if(t=es(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 wu=e,null}function D1(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(BT()){case Sh:return 1;case k1:return 4;case vu:case zT:return 16;case T1:return 536870912;default:return 16}default:return 16}}var Br=null,Eh=null,ql=null;function N1(){if(ql)return ql;var e,t=Eh,n=t.length,r,i="value"in Br?Br.value:Br.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 ql=i.slice(e,1<r?1-r:void 0)}function Gl(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 wl(){return!0}function Ug(){return!1}function Yt(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)?wl:Ug,this.isPropagationStopped=Ug,this}return Oe(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=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_h=Yt(xo),Ya=Oe({},xo,{view:0,detail:0}),eE=Yt(Ya),od,ad,Do,sc=Oe({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jh,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!==Do&&(Do&&e.type==="mousemove"?(od=e.screenX-Do.screenX,ad=e.screenY-Do.screenY):ad=od=0,Do=e),od)},movementY:function(e){return"movementY"in e?e.movementY:ad}}),Hg=Yt(sc),tE=Oe({},sc,{dataTransfer:0}),nE=Yt(tE),rE=Oe({},Ya,{relatedTarget:0}),ld=Yt(rE),iE=Oe({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),sE=Yt(iE),oE=Oe({},xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),aE=Yt(oE),lE=Oe({},xo,{data:0}),Wg=Yt(lE),uE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cE={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"},dE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dE[e])?!!t[e]:!1}function jh(){return fE}var pE=Oe({},Ya,{key:function(e){if(e.key){var t=uE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jh,charCode:function(e){return e.type==="keypress"?Gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hE=Yt(pE),mE=Oe({},sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qg=Yt(mE),gE=Oe({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jh}),vE=Yt(gE),yE=Oe({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),xE=Yt(yE),wE=Oe({},sc,{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}),bE=Yt(wE),SE=[9,13,27,32],Rh=fr&&"CompositionEvent"in window,Ko=null;fr&&"documentMode"in document&&(Ko=document.documentMode);var CE=fr&&"TextEvent"in window&&!Ko,M1=fr&&(!Rh||Ko&&8<Ko&&11>=Ko),Gg=" ",Qg=!1;function F1(e,t){switch(e){case"keyup":return SE.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 bs=!1;function kE(e,t){switch(e){case"compositionend":return L1(t);case"keypress":return t.which!==32?null:(Qg=!0,Gg);case"textInput":return e=t.data,e===Gg&&Qg?null:e;default:return null}}function TE(e,t){if(bs)return e==="compositionend"||!Rh&&F1(e,t)?(e=N1(),ql=Eh=Br=null,bs=!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 M1&&t.locale!=="ko"?null:t.data;default:return null}}var EE={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 Yg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!EE[e.type]:t==="textarea"}function I1(e,t,n,r){m1(r),t=bu(t,"onChange"),0<t.length&&(n=new _h("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xo=null,va=null;function _E(e){Y1(e,0)}function oc(e){var t=ks(e);if(l1(t))return e}function jE(e,t){if(e==="change")return t}var $1=!1;if(fr){var ud;if(fr){var cd="oninput"in document;if(!cd){var Kg=document.createElement("div");Kg.setAttribute("oninput","return;"),cd=typeof Kg.oninput=="function"}ud=cd}else ud=!1;$1=ud&&(!document.documentMode||9<document.documentMode)}function Xg(){Xo&&(Xo.detachEvent("onpropertychange",B1),va=Xo=null)}function B1(e){if(e.propertyName==="value"&&oc(va)){var t=[];I1(t,va,e,bh(e)),x1(_E,t)}}function RE(e,t,n){e==="focusin"?(Xg(),Xo=t,va=n,Xo.attachEvent("onpropertychange",B1)):e==="focusout"&&Xg()}function AE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oc(va)}function PE(e,t){if(e==="click")return oc(t)}function OE(e,t){if(e==="input"||e==="change")return oc(t)}function DE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _n=typeof Object.is=="function"?Object.is:DE;function ya(e,t){if(_n(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)||!_n(e[i],t[i]))return!1}return!0}function Zg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jg(e,t){var n=Zg(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=Zg(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 V1(){for(var e=window,t=hu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hu(e.document)}return t}function Ah(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 NE(e){var t=V1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z1(n.ownerDocument.documentElement,n)){if(r!==null&&Ah(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=Jg(n,s);var o=Jg(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 ME=fr&&"documentMode"in document&&11>=document.documentMode,Ss=null,Ef=null,Zo=null,_f=!1;function ev(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_f||Ss==null||Ss!==hu(r)||(r=Ss,"selectionStart"in r&&Ah(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}),Zo&&ya(Zo,r)||(Zo=r,r=bu(Ef,"onSelect"),0<r.length&&(t=new _h("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ss)))}function bl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cs={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},dd={},U1={};fr&&(U1=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function ac(e){if(dd[e])return dd[e];if(!Cs[e])return e;var t=Cs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in U1)return dd[e]=t[n];return e}var H1=ac("animationend"),W1=ac("animationiteration"),q1=ac("animationstart"),G1=ac("transitionend"),Q1=new Map,tv="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 ai(e,t){Q1.set(e,t),Ji(t,[e])}for(var fd=0;fd<tv.length;fd++){var pd=tv[fd],FE=pd.toLowerCase(),LE=pd[0].toUpperCase()+pd.slice(1);ai(FE,"on"+LE)}ai(H1,"onAnimationEnd");ai(W1,"onAnimationIteration");ai(q1,"onAnimationStart");ai("dblclick","onDoubleClick");ai("focusin","onFocus");ai("focusout","onBlur");ai(G1,"onTransitionEnd");ro("onMouseEnter",["mouseout","mouseover"]);ro("onMouseLeave",["mouseout","mouseover"]);ro("onPointerEnter",["pointerout","pointerover"]);ro("onPointerLeave",["pointerout","pointerover"]);Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),IE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function nv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,FT(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;nv(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;nv(i,a,u),s=l}}}if(gu)throw e=Sf,gu=!1,Sf=null,e}function ke(e,t){var n=t[Of];n===void 0&&(n=t[Of]=new Set);var r=e+"__bubble";n.has(r)||(K1(t,e,2,!1),n.add(r))}function hd(e,t,n){var r=0;t&&(r|=4),K1(n,e,r,t)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function xa(e){if(!e[Sl]){e[Sl]=!0,r1.forEach(function(n){n!=="selectionchange"&&(IE.has(n)||hd(n,!1,e),hd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sl]||(t[Sl]=!0,hd("selectionchange",!1,t))}}function K1(e,t,n,r){switch(D1(t)){case 1:var i=ZT;break;case 4:i=JT;break;default:i=Th}n=i.bind(null,t,n,e),i=void 0,!bf||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 md(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=Ti(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,d=bh(n),c=[];e:{var f=Q1.get(e);if(f!==void 0){var p=_h,m=e;switch(e){case"keypress":if(Gl(n)===0)break e;case"keydown":case"keyup":p=hE;break;case"focusin":m="focus",p=ld;break;case"focusout":m="blur",p=ld;break;case"beforeblur":case"afterblur":p=ld;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":p=Hg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=nE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=vE;break;case H1:case W1:case q1:p=sE;break;case G1:p=xE;break;case"scroll":p=eE;break;case"wheel":p=bE;break;case"copy":case"cut":case"paste":p=aE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=qg}var h=(t&4)!==0,w=!h&&e==="scroll",y=h?f!==null?f+"Capture":null:f;h=[];for(var x=u,b;x!==null;){b=x;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,y!==null&&(k=pa(x,y),k!=null&&h.push(wa(x,k,b)))),w)break;x=x.return}0<h.length&&(f=new p(f,m,null,n,d),c.push({event:f,listeners:h}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==xf&&(m=n.relatedTarget||n.fromElement)&&(Ti(m)||m[pr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?Ti(m):null,m!==null&&(w=es(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(h=Hg,k="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(h=qg,k="onPointerLeave",y="onPointerEnter",x="pointer"),w=p==null?f:ks(p),b=m==null?f:ks(m),f=new h(k,x+"leave",p,n,d),f.target=w,f.relatedTarget=b,k=null,Ti(d)===u&&(h=new h(y,x+"enter",m,n,d),h.target=b,h.relatedTarget=w,k=h),w=k,p&&m)t:{for(h=p,y=m,x=0,b=h;b;b=gs(b))x++;for(b=0,k=y;k;k=gs(k))b++;for(;0<x-b;)h=gs(h),x--;for(;0<b-x;)y=gs(y),b--;for(;x--;){if(h===y||y!==null&&h===y.alternate)break t;h=gs(h),y=gs(y)}h=null}else h=null;p!==null&&rv(c,f,p,h,!1),m!==null&&w!==null&&rv(c,w,m,h,!0)}}e:{if(f=u?ks(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=jE;else if(Yg(f))if($1)T=OE;else{T=AE;var E=RE}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=PE);if(T&&(T=T(e,u))){I1(c,T,n,d);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&hf(f,"number",f.value)}switch(E=u?ks(u):window,e){case"focusin":(Yg(E)||E.contentEditable==="true")&&(Ss=E,Ef=u,Zo=null);break;case"focusout":Zo=Ef=Ss=null;break;case"mousedown":_f=!0;break;case"contextmenu":case"mouseup":case"dragend":_f=!1,ev(c,n,d);break;case"selectionchange":if(ME)break;case"keydown":case"keyup":ev(c,n,d)}var j;if(Rh)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else bs?F1(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(M1&&n.locale!=="ko"&&(bs||R!=="onCompositionStart"?R==="onCompositionEnd"&&bs&&(j=N1()):(Br=d,Eh="value"in Br?Br.value:Br.textContent,bs=!0)),E=bu(u,R),0<E.length&&(R=new Wg(R,e,null,n,d),c.push({event:R,listeners:E}),j?R.data=j:(j=L1(n),j!==null&&(R.data=j)))),(j=CE?kE(e,n):TE(e,n))&&(u=bu(u,"onBeforeInput"),0<u.length&&(d=new Wg("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=j))}Y1(c,t)})}function wa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=pa(e,n),s!=null&&r.unshift(wa(e,s,i)),s=pa(e,t),s!=null&&r.push(wa(e,s,i))),e=e.return}return r}function gs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rv(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=pa(n,s),l!=null&&o.unshift(wa(n,l,a))):i||(l=pa(n,s),l!=null&&o.push(wa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $E=/\r\n?/g,BE=/\u0000|\uFFFD/g;function iv(e){return(typeof e=="string"?e:""+e).replace($E,`
38
- `).replace(BE,"")}function Cl(e,t,n){if(t=iv(t),iv(e)!==t&&n)throw Error($(425))}function Su(){}var jf=null,Rf=null;function Af(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 Pf=typeof setTimeout=="function"?setTimeout:void 0,zE=typeof clearTimeout=="function"?clearTimeout:void 0,sv=typeof Promise=="function"?Promise:void 0,VE=typeof queueMicrotask=="function"?queueMicrotask:typeof sv<"u"?function(e){return sv.resolve(null).then(e).catch(UE)}:Pf;function UE(e){setTimeout(function(){throw e})}function gd(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),ga(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ga(t)}function Gr(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 ov(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 wo=Math.random().toString(36).slice(2),zn="__reactFiber$"+wo,ba="__reactProps$"+wo,pr="__reactContainer$"+wo,Of="__reactEvents$"+wo,HE="__reactListeners$"+wo,WE="__reactHandles$"+wo;function Ti(e){var t=e[zn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pr]||n[zn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ov(e);e!==null;){if(n=e[zn])return n;e=ov(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[zn]||e[pr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ks(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function lc(e){return e[ba]||null}var Df=[],Ts=-1;function li(e){return{current:e}}function Ee(e){0>Ts||(e.current=Df[Ts],Df[Ts]=null,Ts--)}function Se(e,t){Ts++,Df[Ts]=e.current,e.current=t}var ri={},gt=li(ri),Mt=li(!1),Hi=ri;function io(e,t){var n=e.type.contextTypes;if(!n)return ri;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 Ft(e){return e=e.childContextTypes,e!=null}function Cu(){Ee(Mt),Ee(gt)}function av(e,t,n){if(gt.current!==ri)throw Error($(168));Se(gt,t),Se(Mt,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($(108,RT(e)||"Unknown",i));return Oe({},n,r)}function ku(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ri,Hi=gt.current,Se(gt,e),Se(Mt,Mt.current),!0}function lv(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=X1(e,t,Hi),r.__reactInternalMemoizedMergedChildContext=e,Ee(Mt),Ee(gt),Se(gt,e)):Ee(Mt),Se(Mt,n)}var ir=null,uc=!1,vd=!1;function Z1(e){ir===null?ir=[e]:ir.push(e)}function qE(e){uc=!0,Z1(e)}function ui(){if(!vd&&ir!==null){vd=!0;var e=0,t=ge;try{var n=ir;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ir=null,uc=!1}catch(i){throw ir!==null&&(ir=ir.slice(e+1)),C1(Sh,ui),i}finally{ge=t,vd=!1}}return null}var Es=[],_s=0,Tu=null,Eu=0,sn=[],on=0,Wi=null,ar=1,lr="";function xi(e,t){Es[_s++]=Eu,Es[_s++]=Tu,Tu=e,Eu=t}function J1(e,t,n){sn[on++]=ar,sn[on++]=lr,sn[on++]=Wi,Wi=e;var r=ar;e=lr;var i=32-Tn(r)-1;r&=~(1<<i),n+=1;var s=32-Tn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ar=1<<32-Tn(t)+i|n<<i|r,lr=s+e}else ar=1<<s|n<<i|r,lr=e}function Ph(e){e.return!==null&&(xi(e,1),J1(e,1,0))}function Oh(e){for(;e===Tu;)Tu=Es[--_s],Es[_s]=null,Eu=Es[--_s],Es[_s]=null;for(;e===Wi;)Wi=sn[--on],sn[on]=null,lr=sn[--on],sn[on]=null,ar=sn[--on],sn[on]=null}var qt=null,Ut=null,_e=!1,Cn=null;function ew(e,t){var n=ln(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 uv(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,qt=e,Ut=Gr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wi!==null?{id:ar,overflow:lr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Ut=null,!0):!1;default:return!1}}function Nf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mf(e){if(_e){var t=Ut;if(t){var n=t;if(!uv(e,t)){if(Nf(e))throw Error($(418));t=Gr(n.nextSibling);var r=qt;t&&uv(e,t)?ew(r,n):(e.flags=e.flags&-4097|2,_e=!1,qt=e)}}else{if(Nf(e))throw Error($(418));e.flags=e.flags&-4097|2,_e=!1,qt=e}}}function cv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qt=e}function kl(e){if(e!==qt)return!1;if(!_e)return cv(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Af(e.type,e.memoizedProps)),t&&(t=Ut)){if(Nf(e))throw tw(),Error($(418));for(;t;)ew(e,t),t=Gr(t.nextSibling)}if(cv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ut=Gr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ut=null}}else Ut=qt?Gr(e.stateNode.nextSibling):null;return!0}function tw(){for(var e=Ut;e;)e=Gr(e.nextSibling)}function so(){Ut=qt=null,_e=!1}function Dh(e){Cn===null?Cn=[e]:Cn.push(e)}var GE=vr.ReactCurrentBatchConfig;function No(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($(309));var r=n.stateNode}if(!r)throw Error($(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($(284));if(!n._owner)throw Error($(290,e))}return e}function Tl(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function dv(e){var t=e._init;return t(e._payload)}function nw(e){function t(y,x){if(e){var b=y.deletions;b===null?(y.deletions=[x],y.flags|=16):b.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=Xr(y,x),y.index=0,y.sibling=null,y}function s(y,x,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<x?(y.flags|=2,x):b):(y.flags|=2,x)):(y.flags|=1048576,x)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,x,b,k){return x===null||x.tag!==6?(x=kd(b,y.mode,k),x.return=y,x):(x=i(x,b),x.return=y,x)}function l(y,x,b,k){var T=b.type;return T===ws?d(y,x,b.props.children,k,b.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Er&&dv(T)===x.type)?(k=i(x,b.props),k.ref=No(y,x,b),k.return=y,k):(k=eu(b.type,b.key,b.props,null,y.mode,k),k.ref=No(y,x,b),k.return=y,k)}function u(y,x,b,k){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Td(b,y.mode,k),x.return=y,x):(x=i(x,b.children||[]),x.return=y,x)}function d(y,x,b,k,T){return x===null||x.tag!==7?(x=Bi(b,y.mode,k,T),x.return=y,x):(x=i(x,b),x.return=y,x)}function c(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=kd(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hl:return b=eu(x.type,x.key,x.props,null,y.mode,b),b.ref=No(y,null,x),b.return=y,b;case xs:return x=Td(x,y.mode,b),x.return=y,x;case Er:var k=x._init;return c(y,k(x._payload),b)}if(zo(x)||Ro(x))return x=Bi(x,y.mode,b,null),x.return=y,x;Tl(y,x)}return null}function f(y,x,b,k){var T=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:a(y,x,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:return b.key===T?l(y,x,b,k):null;case xs:return b.key===T?u(y,x,b,k):null;case Er:return T=b._init,f(y,x,T(b._payload),k)}if(zo(b)||Ro(b))return T!==null?null:d(y,x,b,k,null);Tl(y,b)}return null}function p(y,x,b,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return y=y.get(b)||null,a(x,y,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case hl:return y=y.get(k.key===null?b:k.key)||null,l(x,y,k,T);case xs:return y=y.get(k.key===null?b:k.key)||null,u(x,y,k,T);case Er:var E=k._init;return p(y,x,b,E(k._payload),T)}if(zo(k)||Ro(k))return y=y.get(b)||null,d(x,y,k,T,null);Tl(x,k)}return null}function m(y,x,b,k){for(var T=null,E=null,j=x,R=x=0,M=null;j!==null&&R<b.length;R++){j.index>R?(M=j,j=null):M=j.sibling;var N=f(y,j,b[R],k);if(N===null){j===null&&(j=M);break}e&&j&&N.alternate===null&&t(y,j),x=s(N,x,R),E===null?T=N:E.sibling=N,E=N,j=M}if(R===b.length)return n(y,j),_e&&xi(y,R),T;if(j===null){for(;R<b.length;R++)j=c(y,b[R],k),j!==null&&(x=s(j,x,R),E===null?T=j:E.sibling=j,E=j);return _e&&xi(y,R),T}for(j=r(y,j);R<b.length;R++)M=p(j,y,R,b[R],k),M!==null&&(e&&M.alternate!==null&&j.delete(M.key===null?R:M.key),x=s(M,x,R),E===null?T=M:E.sibling=M,E=M);return e&&j.forEach(function(A){return t(y,A)}),_e&&xi(y,R),T}function h(y,x,b,k){var T=Ro(b);if(typeof T!="function")throw Error($(150));if(b=T.call(b),b==null)throw Error($(151));for(var E=T=null,j=x,R=x=0,M=null,N=b.next();j!==null&&!N.done;R++,N=b.next()){j.index>R?(M=j,j=null):M=j.sibling;var A=f(y,j,N.value,k);if(A===null){j===null&&(j=M);break}e&&j&&A.alternate===null&&t(y,j),x=s(A,x,R),E===null?T=A:E.sibling=A,E=A,j=M}if(N.done)return n(y,j),_e&&xi(y,R),T;if(j===null){for(;!N.done;R++,N=b.next())N=c(y,N.value,k),N!==null&&(x=s(N,x,R),E===null?T=N:E.sibling=N,E=N);return _e&&xi(y,R),T}for(j=r(y,j);!N.done;R++,N=b.next())N=p(j,y,R,N.value,k),N!==null&&(e&&N.alternate!==null&&j.delete(N.key===null?R:N.key),x=s(N,x,R),E===null?T=N:E.sibling=N,E=N);return e&&j.forEach(function(W){return t(y,W)}),_e&&xi(y,R),T}function w(y,x,b,k){if(typeof b=="object"&&b!==null&&b.type===ws&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:e:{for(var T=b.key,E=x;E!==null;){if(E.key===T){if(T=b.type,T===ws){if(E.tag===7){n(y,E.sibling),x=i(E,b.props.children),x.return=y,y=x;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Er&&dv(T)===E.type){n(y,E.sibling),x=i(E,b.props),x.ref=No(y,E,b),x.return=y,y=x;break e}n(y,E);break}else t(y,E);E=E.sibling}b.type===ws?(x=Bi(b.props.children,y.mode,k,b.key),x.return=y,y=x):(k=eu(b.type,b.key,b.props,null,y.mode,k),k.ref=No(y,x,b),k.return=y,y=k)}return o(y);case xs:e:{for(E=b.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(y,x.sibling),x=i(x,b.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=Td(b,y.mode,k),x.return=y,y=x}return o(y);case Er:return E=b._init,w(y,x,E(b._payload),k)}if(zo(b))return m(y,x,b,k);if(Ro(b))return h(y,x,b,k);Tl(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(y,x.sibling),x=i(x,b),x.return=y,y=x):(n(y,x),x=kd(b,y.mode,k),x.return=y,y=x),o(y)):n(y,x)}return w}var oo=nw(!0),rw=nw(!1),_u=li(null),ju=null,js=null,Nh=null;function Mh(){Nh=js=ju=null}function Fh(e){var t=_u.current;Ee(_u),e._currentValue=t}function Ff(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 zs(e,t){ju=e,Nh=js=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function dn(e){var t=e._currentValue;if(Nh!==e)if(e={context:e,memoizedValue:t,next:null},js===null){if(ju===null)throw Error($(308));js=e,ju.dependencies={lanes:0,firstContext:e}}else js=js.next=e;return t}var Ei=null;function Lh(e){Ei===null?Ei=[e]:Ei.push(e)}function iw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Lh(t)):(n.next=i.next,i.next=n),t.interleaved=n,hr(e,r)}function hr(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 _r=!1;function Ih(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sw(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 cr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,hr(e,n)}return i=r.interleaved,i===null?(t.next=t,Lh(r)):(t.next=i.next,i.next=t),r.interleaved=t,hr(e,n)}function Ql(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,Ch(e,n)}}function fv(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 Ru(e,t,n,r){var i=e.updateQueue;_r=!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 d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,d=u=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,h=a;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m=="function"){c=m.call(p,c,f);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m=="function"?m.call(p,c,f):m,f==null)break e;c=Oe({},c,f);break e;case 2:_r=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,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);Gi|=o,e.lanes=o,e.memoizedState=c}}function pv(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($(191,i));i.call(r)}}}var Xa={},Hn=li(Xa),Sa=li(Xa),Ca=li(Xa);function _i(e){if(e===Xa)throw Error($(174));return e}function $h(e,t){switch(Se(Ca,t),Se(Sa,e),Se(Hn,Xa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gf(t,e)}Ee(Hn),Se(Hn,t)}function ao(){Ee(Hn),Ee(Sa),Ee(Ca)}function ow(e){_i(Ca.current);var t=_i(Hn.current),n=gf(t,e.type);t!==n&&(Se(Sa,e),Se(Hn,n))}function Bh(e){Sa.current===e&&(Ee(Hn),Ee(Sa))}var Re=li(0);function Au(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 yd=[];function zh(){for(var e=0;e<yd.length;e++)yd[e]._workInProgressVersionPrimary=null;yd.length=0}var Yl=vr.ReactCurrentDispatcher,xd=vr.ReactCurrentBatchConfig,qi=0,Pe=null,He=null,Xe=null,Pu=!1,Jo=!1,ka=0,QE=0;function ct(){throw Error($(321))}function Vh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_n(e[n],t[n]))return!1;return!0}function Uh(e,t,n,r,i,s){if(qi=s,Pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yl.current=e===null||e.memoizedState===null?ZE:JE,e=n(r,i),Jo){s=0;do{if(Jo=!1,ka=0,25<=s)throw Error($(301));s+=1,Xe=He=null,t.updateQueue=null,Yl.current=e_,e=n(r,i)}while(Jo)}if(Yl.current=Ou,t=He!==null&&He.next!==null,qi=0,Xe=He=Pe=null,Pu=!1,t)throw Error($(300));return e}function Hh(){var e=ka!==0;return ka=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?Pe.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function fn(){if(He===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Xe===null?Pe.memoizedState:Xe.next;if(t!==null)Xe=t,He=e;else{if(e===null)throw Error($(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Xe===null?Pe.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Ta(e,t){return typeof t=="function"?t(e):t}function wd(e){var t=fn(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=He,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 d=u.lane;if((qi&d)===d)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:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Pe.lanes|=d,Gi|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,_n(r,t.memoizedState)||(Ot=!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,Pe.lanes|=s,Gi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bd(e){var t=fn(),n=t.queue;if(n===null)throw Error($(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);_n(s,t.memoizedState)||(Ot=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function aw(){}function lw(e,t){var n=Pe,r=fn(),i=t(),s=!_n(r.memoizedState,i);if(s&&(r.memoizedState=i,Ot=!0),r=r.queue,Wh(dw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,Ea(9,cw.bind(null,n,r,i,t),void 0,null),Ze===null)throw Error($(349));qi&30||uw(n,t,i)}return i}function uw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cw(e,t,n,r){t.value=n,t.getSnapshot=r,fw(t)&&pw(e)}function dw(e,t,n){return n(function(){fw(t)&&pw(e)})}function fw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_n(e,n)}catch{return!0}}function pw(e){var t=hr(e,1);t!==null&&En(t,e,1,-1)}function hv(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=XE.bind(null,Pe,e),[t.memoizedState,e]}function Ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.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 hw(){return fn().memoizedState}function Kl(e,t,n,r){var i=Nn();Pe.flags|=e,i.memoizedState=Ea(1|t,n,void 0,r===void 0?null:r)}function cc(e,t,n,r){var i=fn();r=r===void 0?null:r;var s=void 0;if(He!==null){var o=He.memoizedState;if(s=o.destroy,r!==null&&Vh(r,o.deps)){i.memoizedState=Ea(t,n,s,r);return}}Pe.flags|=e,i.memoizedState=Ea(1|t,n,s,r)}function mv(e,t){return Kl(8390656,8,e,t)}function Wh(e,t){return cc(2048,8,e,t)}function mw(e,t){return cc(4,2,e,t)}function gw(e,t){return cc(4,4,e,t)}function vw(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 yw(e,t,n){return n=n!=null?n.concat([e]):null,cc(4,4,vw.bind(null,t,e),n)}function qh(){}function xw(e,t){var n=fn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ww(e,t){var n=fn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function bw(e,t,n){return qi&21?(_n(n,t)||(n=E1(),Pe.lanes|=n,Gi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ot=!0),e.memoizedState=n)}function YE(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=xd.transition;xd.transition={};try{e(!1),t()}finally{ge=n,xd.transition=r}}function Sw(){return fn().memoizedState}function KE(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cw(e))kw(t,n);else if(n=iw(e,t,n,r),n!==null){var i=bt();En(n,e,r,i),Tw(n,t,r)}}function XE(e,t,n){var r=Kr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cw(e))kw(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,_n(a,o)){var l=t.interleaved;l===null?(i.next=i,Lh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=iw(e,t,i,r),n!==null&&(i=bt(),En(n,e,r,i),Tw(n,t,r))}}function Cw(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function kw(e,t){Jo=Pu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ch(e,n)}}var Ou={readContext:dn,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},ZE={readContext:dn,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:dn,useEffect:mv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kl(4194308,4,vw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kl(4,2,e,t)},useMemo:function(e,t){var n=Nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nn();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=KE.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:hv,useDebugValue:qh,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=hv(!1),t=e[0];return e=YE.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,i=Nn();if(_e){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Ze===null)throw Error($(349));qi&30||uw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,mv(dw.bind(null,r,s,e),[e]),r.flags|=2048,Ea(9,cw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Nn(),t=Ze.identifierPrefix;if(_e){var n=lr,r=ar;n=(r&~(1<<32-Tn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ka++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=QE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},JE={readContext:dn,useCallback:xw,useContext:dn,useEffect:Wh,useImperativeHandle:yw,useInsertionEffect:mw,useLayoutEffect:gw,useMemo:ww,useReducer:wd,useRef:hw,useState:function(){return wd(Ta)},useDebugValue:qh,useDeferredValue:function(e){var t=fn();return bw(t,He.memoizedState,e)},useTransition:function(){var e=wd(Ta)[0],t=fn().memoizedState;return[e,t]},useMutableSource:aw,useSyncExternalStore:lw,useId:Sw,unstable_isNewReconciler:!1},e_={readContext:dn,useCallback:xw,useContext:dn,useEffect:Wh,useImperativeHandle:yw,useInsertionEffect:mw,useLayoutEffect:gw,useMemo:ww,useReducer:bd,useRef:hw,useState:function(){return bd(Ta)},useDebugValue:qh,useDeferredValue:function(e){var t=fn();return He===null?t.memoizedState=e:bw(t,He.memoizedState,e)},useTransition:function(){var e=bd(Ta)[0],t=fn().memoizedState;return[e,t]},useMutableSource:aw,useSyncExternalStore:lw,useId:Sw,unstable_isNewReconciler:!1};function xn(e,t){if(e&&e.defaultProps){t=Oe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Lf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dc={isMounted:function(e){return(e=e._reactInternals)?es(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bt(),i=Kr(e),s=cr(r,i);s.payload=t,n!=null&&(s.callback=n),t=Qr(e,s,i),t!==null&&(En(t,e,i,r),Ql(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bt(),i=Kr(e),s=cr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Qr(e,s,i),t!==null&&(En(t,e,i,r),Ql(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bt(),r=Kr(e),i=cr(n,r);i.tag=2,t!=null&&(i.callback=t),t=Qr(e,i,r),t!==null&&(En(t,e,r,n),Ql(t,e,r))}};function gv(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?!ya(n,r)||!ya(i,s):!0}function Ew(e,t,n){var r=!1,i=ri,s=t.contextType;return typeof s=="object"&&s!==null?s=dn(s):(i=Ft(t)?Hi:gt.current,r=t.contextTypes,s=(r=r!=null)?io(e,i):ri),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function vv(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&&dc.enqueueReplaceState(t,t.state,null)}function If(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ih(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=dn(s):(s=Ft(t)?Hi:gt.current,i.context=io(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Lf(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&&dc.enqueueReplaceState(i,i.state,null),Ru(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do n+=jT(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{id=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vo(e):""}function OT(e){switch(e.tag){case 5:return Vo(e.type);case 16:return Vo("Lazy");case 13:return Vo("Suspense");case 19:return Vo("SuspenseList");case 0:case 2:case 15:return e=sd(e.type,!1),e;case 11:return e=sd(e.type.render,!1),e;case 1:return e=sd(e.type,!0),e;default:return""}}function ff(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 Ss:return"Fragment";case bs:return"Portal";case uf:return"Profiler";case xh:return"StrictMode";case cf:return"Suspense";case df:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case a1:return(e.displayName||"Context")+".Consumer";case o1:return(e._context.displayName||"Context")+".Provider";case wh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bh:return t=e.displayName||null,t!==null?t:ff(e.type)||"Memo";case jr:t=e._payload,e=e._init;try{return ff(e(t))}catch{}}return null}function DT(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 ff(t);case 8:return t===xh?"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 ii(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function u1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function NT(e){var t=u1(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 yl(e){e._valueTracker||(e._valueTracker=NT(e))}function c1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=u1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vu(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 pf(e,t){var n=t.checked;return Me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Mg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ii(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 d1(e,t){t=t.checked,t!=null&&yh(e,"checked",t,!1)}function hf(e,t){d1(e,t);var n=ii(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")?mf(e,t.type,n):t.hasOwnProperty("defaultValue")&&mf(e,t.type,ii(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fg(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 mf(e,t,n){(t!=="number"||vu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Uo=Array.isArray;function $s(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=""+ii(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 gf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return Me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Lg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if(Uo(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ii(n)}}function f1(e,t){var n=ii(t.value),r=ii(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 Ig(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function p1(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 vf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?p1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xl,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(xl=xl||document.createElement("div"),xl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ma(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ko={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},MT=["Webkit","ms","Moz","O"];Object.keys(Ko).forEach(function(e){MT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ko[t]=Ko[e]})});function m1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ko.hasOwnProperty(e)&&Ko[e]?(""+t).trim():t+"px"}function g1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=m1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var FT=Me({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 yf(e,t){if(t){if(FT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function xf(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 wf=null;function Sh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bf=null,Bs=null,zs=null;function $g(e){if(e=el(e)){if(typeof bf!="function")throw Error(B(280));var t=e.stateNode;t&&(t=dc(t),bf(e.stateNode,e.type,t))}}function v1(e){Bs?zs?zs.push(e):zs=[e]:Bs=e}function y1(){if(Bs){var e=Bs,t=zs;if(zs=Bs=null,$g(e),t)for(e=0;e<t.length;e++)$g(t[e])}}function x1(e,t){return e(t)}function w1(){}var od=!1;function b1(e,t,n){if(od)return e(t,n);od=!0;try{return x1(e,t,n)}finally{od=!1,(Bs!==null||zs!==null)&&(w1(),y1())}}function ga(e,t){var n=e.stateNode;if(n===null)return null;var r=dc(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(B(231,t,typeof n));return n}var Sf=!1;if(pr)try{var Oo={};Object.defineProperty(Oo,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{Sf=!1}function LT(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Xo=!1,yu=null,xu=!1,Cf=null,IT={onError:function(e){Xo=!0,yu=e}};function $T(e,t,n,r,i,s,o,a,l){Xo=!1,yu=null,LT.apply(IT,arguments)}function BT(e,t,n,r,i,s,o,a,l){if($T.apply(this,arguments),Xo){if(Xo){var u=yu;Xo=!1,yu=null}else throw Error(B(198));xu||(xu=!0,Cf=u)}}function rs(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 S1(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 Bg(e){if(rs(e)!==e)throw Error(B(188))}function zT(e){var t=e.alternate;if(!t){if(t=rs(e),t===null)throw Error(B(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 Bg(i),e;if(s===r)return Bg(i),t;s=s.sibling}throw Error(B(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(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function C1(e){return e=zT(e),e!==null?k1(e):null}function k1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=k1(e);if(t!==null)return t;e=e.sibling}return null}var T1=Gt.unstable_scheduleCallback,zg=Gt.unstable_cancelCallback,VT=Gt.unstable_shouldYield,UT=Gt.unstable_requestPaint,Ve=Gt.unstable_now,HT=Gt.unstable_getCurrentPriorityLevel,Ch=Gt.unstable_ImmediatePriority,E1=Gt.unstable_UserBlockingPriority,wu=Gt.unstable_NormalPriority,WT=Gt.unstable_LowPriority,_1=Gt.unstable_IdlePriority,ac=null,Wn=null;function qT(e){if(Wn&&typeof Wn.onCommitFiberRoot=="function")try{Wn.onCommitFiberRoot(ac,e,void 0,(e.current.flags&128)===128)}catch{}}var En=Math.clz32?Math.clz32:YT,GT=Math.log,QT=Math.LN2;function YT(e){return e>>>=0,e===0?32:31-(GT(e)/QT|0)|0}var wl=64,bl=4194304;function Ho(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 bu(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=Ho(a):(s&=o,s!==0&&(r=Ho(s)))}else o=n&~i,o!==0?r=Ho(o):s!==0&&(r=Ho(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-En(t),i=1<<n,r|=e[n],t&=~i;return r}function KT(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 XT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-En(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=KT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function kf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function j1(){var e=wl;return wl<<=1,!(wl&4194240)&&(wl=64),e}function ad(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Za(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-En(t),e[t]=n}function ZT(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-En(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function kh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-En(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ye=0;function A1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var R1,Th,P1,O1,D1,Tf=!1,Sl=[],qr=null,Gr=null,Qr=null,va=new Map,ya=new Map,Pr=[],JT="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 Vg(e,t){switch(e){case"focusin":case"focusout":qr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":va.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ya.delete(t.pointerId)}}function Do(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=el(t),t!==null&&Th(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function eE(e,t,n,r,i){switch(t){case"focusin":return qr=Do(qr,e,t,n,r,i),!0;case"dragenter":return Gr=Do(Gr,e,t,n,r,i),!0;case"mouseover":return Qr=Do(Qr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return va.set(s,Do(va.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ya.set(s,Do(ya.get(s)||null,e,t,n,r,i)),!0}return!1}function N1(e){var t=ji(e.target);if(t!==null){var n=rs(t);if(n!==null){if(t=n.tag,t===13){if(t=S1(n),t!==null){e.blockedOn=t,D1(e.priority,function(){P1(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 Ql(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ef(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);wf=r,n.target.dispatchEvent(r),wf=null}else return t=el(n),t!==null&&Th(t),e.blockedOn=n,!1;t.shift()}return!0}function Ug(e,t,n){Ql(e)&&n.delete(t)}function tE(){Tf=!1,qr!==null&&Ql(qr)&&(qr=null),Gr!==null&&Ql(Gr)&&(Gr=null),Qr!==null&&Ql(Qr)&&(Qr=null),va.forEach(Ug),ya.forEach(Ug)}function No(e,t){e.blockedOn===t&&(e.blockedOn=null,Tf||(Tf=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,tE)))}function xa(e){function t(i){return No(i,e)}if(0<Sl.length){No(Sl[0],e);for(var n=1;n<Sl.length;n++){var r=Sl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(qr!==null&&No(qr,e),Gr!==null&&No(Gr,e),Qr!==null&&No(Qr,e),va.forEach(t),ya.forEach(t),n=0;n<Pr.length;n++)r=Pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pr.length&&(n=Pr[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&Pr.shift()}var Vs=yr.ReactCurrentBatchConfig,Su=!0;function nE(e,t,n,r){var i=ye,s=Vs.transition;Vs.transition=null;try{ye=1,Eh(e,t,n,r)}finally{ye=i,Vs.transition=s}}function rE(e,t,n,r){var i=ye,s=Vs.transition;Vs.transition=null;try{ye=4,Eh(e,t,n,r)}finally{ye=i,Vs.transition=s}}function Eh(e,t,n,r){if(Su){var i=Ef(e,t,n,r);if(i===null)vd(e,t,r,Cu,n),Vg(e,r);else if(eE(i,e,t,n,r))r.stopPropagation();else if(Vg(e,r),t&4&&-1<JT.indexOf(e)){for(;i!==null;){var s=el(i);if(s!==null&&R1(s),s=Ef(e,t,n,r),s===null&&vd(e,t,r,Cu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else vd(e,t,r,null,n)}}var Cu=null;function Ef(e,t,n,r){if(Cu=null,e=Sh(r),e=ji(e),e!==null)if(t=rs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=S1(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 Cu=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(HT()){case Ch:return 1;case E1:return 4;case wu:case WT:return 16;case _1:return 536870912;default:return 16}default:return 16}}var Vr=null,_h=null,Yl=null;function F1(){if(Yl)return Yl;var e,t=_h,n=t.length,r,i="value"in Vr?Vr.value:Vr.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 Yl=i.slice(e,1<r?1-r:void 0)}function Kl(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 Cl(){return!0}function Hg(){return!1}function Yt(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)?Cl:Hg,this.isPropagationStopped=Hg,this}return Me(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=Cl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jh=Yt(bo),Ja=Me({},bo,{view:0,detail:0}),iE=Yt(Ja),ld,ud,Mo,lc=Me({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ah,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!==Mo&&(Mo&&e.type==="mousemove"?(ld=e.screenX-Mo.screenX,ud=e.screenY-Mo.screenY):ud=ld=0,Mo=e),ld)},movementY:function(e){return"movementY"in e?e.movementY:ud}}),Wg=Yt(lc),sE=Me({},lc,{dataTransfer:0}),oE=Yt(sE),aE=Me({},Ja,{relatedTarget:0}),cd=Yt(aE),lE=Me({},bo,{animationName:0,elapsedTime:0,pseudoElement:0}),uE=Yt(lE),cE=Me({},bo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dE=Yt(cE),fE=Me({},bo,{data:0}),qg=Yt(fE),pE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hE={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"},mE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mE[e])?!!t[e]:!1}function Ah(){return gE}var vE=Me({},Ja,{key:function(e){if(e.key){var t=pE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Kl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ah,charCode:function(e){return e.type==="keypress"?Kl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Kl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yE=Yt(vE),xE=Me({},lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gg=Yt(xE),wE=Me({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ah}),bE=Yt(wE),SE=Me({},bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),CE=Yt(SE),kE=Me({},lc,{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}),TE=Yt(kE),EE=[9,13,27,32],Rh=pr&&"CompositionEvent"in window,Zo=null;pr&&"documentMode"in document&&(Zo=document.documentMode);var _E=pr&&"TextEvent"in window&&!Zo,L1=pr&&(!Rh||Zo&&8<Zo&&11>=Zo),Qg=" ",Yg=!1;function I1(e,t){switch(e){case"keyup":return EE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function jE(e,t){switch(e){case"compositionend":return $1(t);case"keypress":return t.which!==32?null:(Yg=!0,Qg);case"textInput":return e=t.data,e===Qg&&Yg?null:e;default:return null}}function AE(e,t){if(Cs)return e==="compositionend"||!Rh&&I1(e,t)?(e=F1(),Yl=_h=Vr=null,Cs=!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 L1&&t.locale!=="ko"?null:t.data;default:return null}}var RE={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 Kg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RE[e.type]:t==="textarea"}function B1(e,t,n,r){v1(r),t=ku(t,"onChange"),0<t.length&&(n=new jh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jo=null,wa=null;function PE(e){X1(e,0)}function uc(e){var t=Es(e);if(c1(t))return e}function OE(e,t){if(e==="change")return t}var z1=!1;if(pr){var dd;if(pr){var fd="oninput"in document;if(!fd){var Xg=document.createElement("div");Xg.setAttribute("oninput","return;"),fd=typeof Xg.oninput=="function"}dd=fd}else dd=!1;z1=dd&&(!document.documentMode||9<document.documentMode)}function Zg(){Jo&&(Jo.detachEvent("onpropertychange",V1),wa=Jo=null)}function V1(e){if(e.propertyName==="value"&&uc(wa)){var t=[];B1(t,wa,e,Sh(e)),b1(PE,t)}}function DE(e,t,n){e==="focusin"?(Zg(),Jo=t,wa=n,Jo.attachEvent("onpropertychange",V1)):e==="focusout"&&Zg()}function NE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uc(wa)}function ME(e,t){if(e==="click")return uc(t)}function FE(e,t){if(e==="input"||e==="change")return uc(t)}function LE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jn=typeof Object.is=="function"?Object.is:LE;function ba(e,t){if(jn(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(!lf.call(t,i)||!jn(e[i],t[i]))return!1}return!0}function Jg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ev(e,t){var n=Jg(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=Jg(n)}}function U1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?U1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function H1(){for(var e=window,t=vu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vu(e.document)}return t}function Ph(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 IE(e){var t=H1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&U1(n.ownerDocument.documentElement,n)){if(r!==null&&Ph(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=ev(n,s);var o=ev(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 $E=pr&&"documentMode"in document&&11>=document.documentMode,ks=null,_f=null,ea=null,jf=!1;function tv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jf||ks==null||ks!==vu(r)||(r=ks,"selectionStart"in r&&Ph(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}),ea&&ba(ea,r)||(ea=r,r=ku(_f,"onSelect"),0<r.length&&(t=new jh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ks)))}function kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ts={animationend:kl("Animation","AnimationEnd"),animationiteration:kl("Animation","AnimationIteration"),animationstart:kl("Animation","AnimationStart"),transitionend:kl("Transition","TransitionEnd")},pd={},W1={};pr&&(W1=document.createElement("div").style,"AnimationEvent"in window||(delete Ts.animationend.animation,delete Ts.animationiteration.animation,delete Ts.animationstart.animation),"TransitionEvent"in window||delete Ts.transitionend.transition);function cc(e){if(pd[e])return pd[e];if(!Ts[e])return e;var t=Ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in W1)return pd[e]=t[n];return e}var q1=cc("animationend"),G1=cc("animationiteration"),Q1=cc("animationstart"),Y1=cc("transitionend"),K1=new Map,nv="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 ci(e,t){K1.set(e,t),ns(t,[e])}for(var hd=0;hd<nv.length;hd++){var md=nv[hd],BE=md.toLowerCase(),zE=md[0].toUpperCase()+md.slice(1);ci(BE,"on"+zE)}ci(q1,"onAnimationEnd");ci(G1,"onAnimationIteration");ci(Q1,"onAnimationStart");ci("dblclick","onDoubleClick");ci("focusin","onFocus");ci("focusout","onBlur");ci(Y1,"onTransitionEnd");so("onMouseEnter",["mouseout","mouseover"]);so("onMouseLeave",["mouseout","mouseover"]);so("onPointerEnter",["pointerout","pointerover"]);so("onPointerLeave",["pointerout","pointerover"]);ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wo="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(" "),VE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wo));function rv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,BT(r,t,void 0,e),e.currentTarget=null}function X1(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;rv(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;rv(i,a,u),s=l}}}if(xu)throw e=Cf,xu=!1,Cf=null,e}function Te(e,t){var n=t[Df];n===void 0&&(n=t[Df]=new Set);var r=e+"__bubble";n.has(r)||(Z1(t,e,2,!1),n.add(r))}function gd(e,t,n){var r=0;t&&(r|=4),Z1(n,e,r,t)}var Tl="_reactListening"+Math.random().toString(36).slice(2);function Sa(e){if(!e[Tl]){e[Tl]=!0,s1.forEach(function(n){n!=="selectionchange"&&(VE.has(n)||gd(n,!1,e),gd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Tl]||(t[Tl]=!0,gd("selectionchange",!1,t))}}function Z1(e,t,n,r){switch(M1(t)){case 1:var i=nE;break;case 4:i=rE;break;default:i=Eh}n=i.bind(null,t,n,e),i=void 0,!Sf||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 vd(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=ji(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}b1(function(){var u=s,d=Sh(n),c=[];e:{var f=K1.get(e);if(f!==void 0){var p=jh,m=e;switch(e){case"keypress":if(Kl(n)===0)break e;case"keydown":case"keyup":p=yE;break;case"focusin":m="focus",p=cd;break;case"focusout":m="blur",p=cd;break;case"beforeblur":case"afterblur":p=cd;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":p=Wg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=oE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=bE;break;case q1:case G1:case Q1:p=uE;break;case Y1:p=CE;break;case"scroll":p=iE;break;case"wheel":p=TE;break;case"copy":case"cut":case"paste":p=dE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Gg}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var w=u,b;w!==null;){b=w;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,y!==null&&(k=ga(w,y),k!=null&&g.push(Ca(w,k,b)))),x)break;w=w.return}0<g.length&&(f=new p(f,m,null,n,d),c.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==wf&&(m=n.relatedTarget||n.fromElement)&&(ji(m)||m[hr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?ji(m):null,m!==null&&(x=rs(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=Wg,k="onMouseLeave",y="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(g=Gg,k="onPointerLeave",y="onPointerEnter",w="pointer"),x=p==null?f:Es(p),b=m==null?f:Es(m),f=new g(k,w+"leave",p,n,d),f.target=x,f.relatedTarget=b,k=null,ji(d)===u&&(g=new g(y,w+"enter",m,n,d),g.target=b,g.relatedTarget=x,k=g),x=k,p&&m)t:{for(g=p,y=m,w=0,b=g;b;b=xs(b))w++;for(b=0,k=y;k;k=xs(k))b++;for(;0<w-b;)g=xs(g),w--;for(;0<b-w;)y=xs(y),b--;for(;w--;){if(g===y||y!==null&&g===y.alternate)break t;g=xs(g),y=xs(y)}g=null}else g=null;p!==null&&iv(c,f,p,g,!1),m!==null&&x!==null&&iv(c,x,m,g,!0)}}e:{if(f=u?Es(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=OE;else if(Kg(f))if(z1)T=FE;else{T=NE;var E=DE}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=ME);if(T&&(T=T(e,u))){B1(c,T,n,d);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&mf(f,"number",f.value)}switch(E=u?Es(u):window,e){case"focusin":(Kg(E)||E.contentEditable==="true")&&(ks=E,_f=u,ea=null);break;case"focusout":ea=_f=ks=null;break;case"mousedown":jf=!0;break;case"contextmenu":case"mouseup":case"dragend":jf=!1,tv(c,n,d);break;case"selectionchange":if($E)break;case"keydown":case"keyup":tv(c,n,d)}var _;if(Rh)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Cs?I1(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(L1&&n.locale!=="ko"&&(Cs||R!=="onCompositionStart"?R==="onCompositionEnd"&&Cs&&(_=F1()):(Vr=d,_h="value"in Vr?Vr.value:Vr.textContent,Cs=!0)),E=ku(u,R),0<E.length&&(R=new qg(R,e,null,n,d),c.push({event:R,listeners:E}),_?R.data=_:(_=$1(n),_!==null&&(R.data=_)))),(_=_E?jE(e,n):AE(e,n))&&(u=ku(u,"onBeforeInput"),0<u.length&&(d=new qg("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=_))}X1(c,t)})}function Ca(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ku(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ga(e,n),s!=null&&r.unshift(Ca(e,s,i)),s=ga(e,t),s!=null&&r.push(Ca(e,s,i))),e=e.return}return r}function xs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function iv(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=ga(n,s),l!=null&&o.unshift(Ca(n,l,a))):i||(l=ga(n,s),l!=null&&o.push(Ca(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var UE=/\r\n?/g,HE=/\u0000|\uFFFD/g;function sv(e){return(typeof e=="string"?e:""+e).replace(UE,`
38
+ `).replace(HE,"")}function El(e,t,n){if(t=sv(t),sv(e)!==t&&n)throw Error(B(425))}function Tu(){}var Af=null,Rf=null;function Pf(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 Of=typeof setTimeout=="function"?setTimeout:void 0,WE=typeof clearTimeout=="function"?clearTimeout:void 0,ov=typeof Promise=="function"?Promise:void 0,qE=typeof queueMicrotask=="function"?queueMicrotask:typeof ov<"u"?function(e){return ov.resolve(null).then(e).catch(GE)}:Of;function GE(e){setTimeout(function(){throw e})}function yd(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),xa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);xa(t)}function Yr(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 av(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 So=Math.random().toString(36).slice(2),Vn="__reactFiber$"+So,ka="__reactProps$"+So,hr="__reactContainer$"+So,Df="__reactEvents$"+So,QE="__reactListeners$"+So,YE="__reactHandles$"+So;function ji(e){var t=e[Vn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hr]||n[Vn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=av(e);e!==null;){if(n=e[Vn])return n;e=av(e)}return t}e=n,n=e.parentNode}return null}function el(e){return e=e[Vn]||e[hr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function dc(e){return e[ka]||null}var Nf=[],_s=-1;function di(e){return{current:e}}function _e(e){0>_s||(e.current=Nf[_s],Nf[_s]=null,_s--)}function Ce(e,t){_s++,Nf[_s]=e.current,e.current=t}var si={},yt=di(si),Mt=di(!1),Gi=si;function oo(e,t){var n=e.type.contextTypes;if(!n)return si;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 Ft(e){return e=e.childContextTypes,e!=null}function Eu(){_e(Mt),_e(yt)}function lv(e,t,n){if(yt.current!==si)throw Error(B(168));Ce(yt,t),Ce(Mt,n)}function J1(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(B(108,DT(e)||"Unknown",i));return Me({},n,r)}function _u(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Gi=yt.current,Ce(yt,e),Ce(Mt,Mt.current),!0}function uv(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=J1(e,t,Gi),r.__reactInternalMemoizedMergedChildContext=e,_e(Mt),_e(yt),Ce(yt,e)):_e(Mt),Ce(Mt,n)}var sr=null,fc=!1,xd=!1;function ew(e){sr===null?sr=[e]:sr.push(e)}function KE(e){fc=!0,ew(e)}function fi(){if(!xd&&sr!==null){xd=!0;var e=0,t=ye;try{var n=sr;for(ye=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}sr=null,fc=!1}catch(i){throw sr!==null&&(sr=sr.slice(e+1)),T1(Ch,fi),i}finally{ye=t,xd=!1}}return null}var js=[],As=0,ju=null,Au=0,sn=[],on=0,Qi=null,lr=1,ur="";function Si(e,t){js[As++]=Au,js[As++]=ju,ju=e,Au=t}function tw(e,t,n){sn[on++]=lr,sn[on++]=ur,sn[on++]=Qi,Qi=e;var r=lr;e=ur;var i=32-En(r)-1;r&=~(1<<i),n+=1;var s=32-En(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,lr=1<<32-En(t)+i|n<<i|r,ur=s+e}else lr=1<<s|n<<i|r,ur=e}function Oh(e){e.return!==null&&(Si(e,1),tw(e,1,0))}function Dh(e){for(;e===ju;)ju=js[--As],js[As]=null,Au=js[--As],js[As]=null;for(;e===Qi;)Qi=sn[--on],sn[on]=null,ur=sn[--on],sn[on]=null,lr=sn[--on],sn[on]=null}var qt=null,Ut=null,je=!1,kn=null;function nw(e,t){var n=ln(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 cv(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,qt=e,Ut=Yr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Qi!==null?{id:lr,overflow:ur}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Ut=null,!0):!1;default:return!1}}function Mf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ff(e){if(je){var t=Ut;if(t){var n=t;if(!cv(e,t)){if(Mf(e))throw Error(B(418));t=Yr(n.nextSibling);var r=qt;t&&cv(e,t)?nw(r,n):(e.flags=e.flags&-4097|2,je=!1,qt=e)}}else{if(Mf(e))throw Error(B(418));e.flags=e.flags&-4097|2,je=!1,qt=e}}}function dv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qt=e}function _l(e){if(e!==qt)return!1;if(!je)return dv(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pf(e.type,e.memoizedProps)),t&&(t=Ut)){if(Mf(e))throw rw(),Error(B(418));for(;t;)nw(e,t),t=Yr(t.nextSibling)}if(dv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ut=Yr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ut=null}}else Ut=qt?Yr(e.stateNode.nextSibling):null;return!0}function rw(){for(var e=Ut;e;)e=Yr(e.nextSibling)}function ao(){Ut=qt=null,je=!1}function Nh(e){kn===null?kn=[e]:kn.push(e)}var XE=yr.ReactCurrentBatchConfig;function Fo(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(B(309));var r=n.stateNode}if(!r)throw Error(B(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(B(284));if(!n._owner)throw Error(B(290,e))}return e}function jl(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fv(e){var t=e._init;return t(e._payload)}function iw(e){function t(y,w){if(e){var b=y.deletions;b===null?(y.deletions=[w],y.flags|=16):b.push(w)}}function n(y,w){if(!e)return null;for(;w!==null;)t(y,w),w=w.sibling;return null}function r(y,w){for(y=new Map;w!==null;)w.key!==null?y.set(w.key,w):y.set(w.index,w),w=w.sibling;return y}function i(y,w){return y=Jr(y,w),y.index=0,y.sibling=null,y}function s(y,w,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<w?(y.flags|=2,w):b):(y.flags|=2,w)):(y.flags|=1048576,w)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,w,b,k){return w===null||w.tag!==6?(w=Ed(b,y.mode,k),w.return=y,w):(w=i(w,b),w.return=y,w)}function l(y,w,b,k){var T=b.type;return T===Ss?d(y,w,b.props.children,k,b.key):w!==null&&(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===jr&&fv(T)===w.type)?(k=i(w,b.props),k.ref=Fo(y,w,b),k.return=y,k):(k=ru(b.type,b.key,b.props,null,y.mode,k),k.ref=Fo(y,w,b),k.return=y,k)}function u(y,w,b,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=_d(b,y.mode,k),w.return=y,w):(w=i(w,b.children||[]),w.return=y,w)}function d(y,w,b,k,T){return w===null||w.tag!==7?(w=Ui(b,y.mode,k,T),w.return=y,w):(w=i(w,b),w.return=y,w)}function c(y,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Ed(""+w,y.mode,b),w.return=y,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case vl:return b=ru(w.type,w.key,w.props,null,y.mode,b),b.ref=Fo(y,null,w),b.return=y,b;case bs:return w=_d(w,y.mode,b),w.return=y,w;case jr:var k=w._init;return c(y,k(w._payload),b)}if(Uo(w)||Po(w))return w=Ui(w,y.mode,b,null),w.return=y,w;jl(y,w)}return null}function f(y,w,b,k){var T=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:a(y,w,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case vl:return b.key===T?l(y,w,b,k):null;case bs:return b.key===T?u(y,w,b,k):null;case jr:return T=b._init,f(y,w,T(b._payload),k)}if(Uo(b)||Po(b))return T!==null?null:d(y,w,b,k,null);jl(y,b)}return null}function p(y,w,b,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return y=y.get(b)||null,a(w,y,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case vl:return y=y.get(k.key===null?b:k.key)||null,l(w,y,k,T);case bs:return y=y.get(k.key===null?b:k.key)||null,u(w,y,k,T);case jr:var E=k._init;return p(y,w,b,E(k._payload),T)}if(Uo(k)||Po(k))return y=y.get(b)||null,d(w,y,k,T,null);jl(w,k)}return null}function m(y,w,b,k){for(var T=null,E=null,_=w,R=w=0,D=null;_!==null&&R<b.length;R++){_.index>R?(D=_,_=null):D=_.sibling;var N=f(y,_,b[R],k);if(N===null){_===null&&(_=D);break}e&&_&&N.alternate===null&&t(y,_),w=s(N,w,R),E===null?T=N:E.sibling=N,E=N,_=D}if(R===b.length)return n(y,_),je&&Si(y,R),T;if(_===null){for(;R<b.length;R++)_=c(y,b[R],k),_!==null&&(w=s(_,w,R),E===null?T=_:E.sibling=_,E=_);return je&&Si(y,R),T}for(_=r(y,_);R<b.length;R++)D=p(_,y,R,b[R],k),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?R:D.key),w=s(D,w,R),E===null?T=D:E.sibling=D,E=D);return e&&_.forEach(function(j){return t(y,j)}),je&&Si(y,R),T}function g(y,w,b,k){var T=Po(b);if(typeof T!="function")throw Error(B(150));if(b=T.call(b),b==null)throw Error(B(151));for(var E=T=null,_=w,R=w=0,D=null,N=b.next();_!==null&&!N.done;R++,N=b.next()){_.index>R?(D=_,_=null):D=_.sibling;var j=f(y,_,N.value,k);if(j===null){_===null&&(_=D);break}e&&_&&j.alternate===null&&t(y,_),w=s(j,w,R),E===null?T=j:E.sibling=j,E=j,_=D}if(N.done)return n(y,_),je&&Si(y,R),T;if(_===null){for(;!N.done;R++,N=b.next())N=c(y,N.value,k),N!==null&&(w=s(N,w,R),E===null?T=N:E.sibling=N,E=N);return je&&Si(y,R),T}for(_=r(y,_);!N.done;R++,N=b.next())N=p(_,y,R,N.value,k),N!==null&&(e&&N.alternate!==null&&_.delete(N.key===null?R:N.key),w=s(N,w,R),E===null?T=N:E.sibling=N,E=N);return e&&_.forEach(function(Y){return t(y,Y)}),je&&Si(y,R),T}function x(y,w,b,k){if(typeof b=="object"&&b!==null&&b.type===Ss&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case vl:e:{for(var T=b.key,E=w;E!==null;){if(E.key===T){if(T=b.type,T===Ss){if(E.tag===7){n(y,E.sibling),w=i(E,b.props.children),w.return=y,y=w;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===jr&&fv(T)===E.type){n(y,E.sibling),w=i(E,b.props),w.ref=Fo(y,E,b),w.return=y,y=w;break e}n(y,E);break}else t(y,E);E=E.sibling}b.type===Ss?(w=Ui(b.props.children,y.mode,k,b.key),w.return=y,y=w):(k=ru(b.type,b.key,b.props,null,y.mode,k),k.ref=Fo(y,w,b),k.return=y,y=k)}return o(y);case bs:e:{for(E=b.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){n(y,w.sibling),w=i(w,b.children||[]),w.return=y,y=w;break e}else{n(y,w);break}else t(y,w);w=w.sibling}w=_d(b,y.mode,k),w.return=y,y=w}return o(y);case jr:return E=b._init,x(y,w,E(b._payload),k)}if(Uo(b))return m(y,w,b,k);if(Po(b))return g(y,w,b,k);jl(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(n(y,w.sibling),w=i(w,b),w.return=y,y=w):(n(y,w),w=Ed(b,y.mode,k),w.return=y,y=w),o(y)):n(y,w)}return x}var lo=iw(!0),sw=iw(!1),Ru=di(null),Pu=null,Rs=null,Mh=null;function Fh(){Mh=Rs=Pu=null}function Lh(e){var t=Ru.current;_e(Ru),e._currentValue=t}function Lf(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 Us(e,t){Pu=e,Mh=Rs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Nt=!0),e.firstContext=null)}function fn(e){var t=e._currentValue;if(Mh!==e)if(e={context:e,memoizedValue:t,next:null},Rs===null){if(Pu===null)throw Error(B(308));Rs=e,Pu.dependencies={lanes:0,firstContext:e}}else Rs=Rs.next=e;return t}var Ai=null;function Ih(e){Ai===null?Ai=[e]:Ai.push(e)}function ow(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ih(t)):(n.next=i.next,i.next=n),t.interleaved=n,mr(e,r)}function mr(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 Ar=!1;function $h(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aw(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 dr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,me&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mr(e,n)}return i=r.interleaved,i===null?(t.next=t,Ih(r)):(t.next=i.next,i.next=t),r.interleaved=t,mr(e,n)}function Xl(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,kh(e,n)}}function pv(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 Ou(e,t,n,r){var i=e.updateQueue;Ar=!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 d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,d=u=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,g=a;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){c=m.call(p,c,f);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,c,f):m,f==null)break e;c=Me({},c,f);break e;case 2:Ar=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,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);Ki|=o,e.lanes=o,e.memoizedState=c}}function hv(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(B(191,i));i.call(r)}}}var tl={},qn=di(tl),Ta=di(tl),Ea=di(tl);function Ri(e){if(e===tl)throw Error(B(174));return e}function Bh(e,t){switch(Ce(Ea,t),Ce(Ta,e),Ce(qn,tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vf(t,e)}_e(qn),Ce(qn,t)}function uo(){_e(qn),_e(Ta),_e(Ea)}function lw(e){Ri(Ea.current);var t=Ri(qn.current),n=vf(t,e.type);t!==n&&(Ce(Ta,e),Ce(qn,n))}function zh(e){Ta.current===e&&(_e(qn),_e(Ta))}var Pe=di(0);function Du(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 wd=[];function Vh(){for(var e=0;e<wd.length;e++)wd[e]._workInProgressVersionPrimary=null;wd.length=0}var Zl=yr.ReactCurrentDispatcher,bd=yr.ReactCurrentBatchConfig,Yi=0,Ne=null,qe=null,Je=null,Nu=!1,ta=!1,_a=0,ZE=0;function dt(){throw Error(B(321))}function Uh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jn(e[n],t[n]))return!1;return!0}function Hh(e,t,n,r,i,s){if(Yi=s,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zl.current=e===null||e.memoizedState===null?n_:r_,e=n(r,i),ta){s=0;do{if(ta=!1,_a=0,25<=s)throw Error(B(301));s+=1,Je=qe=null,t.updateQueue=null,Zl.current=i_,e=n(r,i)}while(ta)}if(Zl.current=Mu,t=qe!==null&&qe.next!==null,Yi=0,Je=qe=Ne=null,Nu=!1,t)throw Error(B(300));return e}function Wh(){var e=_a!==0;return _a=0,e}function Mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?Ne.memoizedState=Je=e:Je=Je.next=e,Je}function pn(){if(qe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=Je===null?Ne.memoizedState:Je.next;if(t!==null)Je=t,qe=e;else{if(e===null)throw Error(B(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},Je===null?Ne.memoizedState=Je=e:Je=Je.next=e}return Je}function ja(e,t){return typeof t=="function"?t(e):t}function Sd(e){var t=pn(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=qe,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 d=u.lane;if((Yi&d)===d)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:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Ne.lanes|=d,Ki|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,jn(r,t.memoizedState)||(Nt=!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,Ne.lanes|=s,Ki|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Cd(e){var t=pn(),n=t.queue;if(n===null)throw Error(B(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);jn(s,t.memoizedState)||(Nt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function uw(){}function cw(e,t){var n=Ne,r=pn(),i=t(),s=!jn(r.memoizedState,i);if(s&&(r.memoizedState=i,Nt=!0),r=r.queue,qh(pw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Je!==null&&Je.memoizedState.tag&1){if(n.flags|=2048,Aa(9,fw.bind(null,n,r,i,t),void 0,null),et===null)throw Error(B(349));Yi&30||dw(n,t,i)}return i}function dw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fw(e,t,n,r){t.value=n,t.getSnapshot=r,hw(t)&&mw(e)}function pw(e,t,n){return n(function(){hw(t)&&mw(e)})}function hw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jn(e,n)}catch{return!0}}function mw(e){var t=mr(e,1);t!==null&&_n(t,e,1,-1)}function mv(e){var t=Mn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:e},t.queue=e,e=e.dispatch=t_.bind(null,Ne,e),[t.memoizedState,e]}function Aa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.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 gw(){return pn().memoizedState}function Jl(e,t,n,r){var i=Mn();Ne.flags|=e,i.memoizedState=Aa(1|t,n,void 0,r===void 0?null:r)}function pc(e,t,n,r){var i=pn();r=r===void 0?null:r;var s=void 0;if(qe!==null){var o=qe.memoizedState;if(s=o.destroy,r!==null&&Uh(r,o.deps)){i.memoizedState=Aa(t,n,s,r);return}}Ne.flags|=e,i.memoizedState=Aa(1|t,n,s,r)}function gv(e,t){return Jl(8390656,8,e,t)}function qh(e,t){return pc(2048,8,e,t)}function vw(e,t){return pc(4,2,e,t)}function yw(e,t){return pc(4,4,e,t)}function xw(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 ww(e,t,n){return n=n!=null?n.concat([e]):null,pc(4,4,xw.bind(null,t,e),n)}function Gh(){}function bw(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Uh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sw(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Uh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cw(e,t,n){return Yi&21?(jn(n,t)||(n=j1(),Ne.lanes|=n,Ki|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Nt=!0),e.memoizedState=n)}function JE(e,t){var n=ye;ye=n!==0&&4>n?n:4,e(!0);var r=bd.transition;bd.transition={};try{e(!1),t()}finally{ye=n,bd.transition=r}}function kw(){return pn().memoizedState}function e_(e,t,n){var r=Zr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tw(e))Ew(t,n);else if(n=ow(e,t,n,r),n!==null){var i=kt();_n(n,e,r,i),_w(n,t,r)}}function t_(e,t,n){var r=Zr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tw(e))Ew(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,jn(a,o)){var l=t.interleaved;l===null?(i.next=i,Ih(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=ow(e,t,i,r),n!==null&&(i=kt(),_n(n,e,r,i),_w(n,t,r))}}function Tw(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Ew(e,t){ta=Nu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _w(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kh(e,n)}}var Mu={readContext:fn,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},n_={readContext:fn,useCallback:function(e,t){return Mn().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:gv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Jl(4194308,4,xw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jl(4,2,e,t)},useMemo:function(e,t){var n=Mn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Mn();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=e_.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=Mn();return e={current:e},t.memoizedState=e},useState:mv,useDebugValue:Gh,useDeferredValue:function(e){return Mn().memoizedState=e},useTransition:function(){var e=mv(!1),t=e[0];return e=JE.bind(null,e[1]),Mn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,i=Mn();if(je){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),et===null)throw Error(B(349));Yi&30||dw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,gv(pw.bind(null,r,s,e),[e]),r.flags|=2048,Aa(9,fw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Mn(),t=et.identifierPrefix;if(je){var n=ur,r=lr;n=(r&~(1<<32-En(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_a++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ZE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},r_={readContext:fn,useCallback:bw,useContext:fn,useEffect:qh,useImperativeHandle:ww,useInsertionEffect:vw,useLayoutEffect:yw,useMemo:Sw,useReducer:Sd,useRef:gw,useState:function(){return Sd(ja)},useDebugValue:Gh,useDeferredValue:function(e){var t=pn();return Cw(t,qe.memoizedState,e)},useTransition:function(){var e=Sd(ja)[0],t=pn().memoizedState;return[e,t]},useMutableSource:uw,useSyncExternalStore:cw,useId:kw,unstable_isNewReconciler:!1},i_={readContext:fn,useCallback:bw,useContext:fn,useEffect:qh,useImperativeHandle:ww,useInsertionEffect:vw,useLayoutEffect:yw,useMemo:Sw,useReducer:Cd,useRef:gw,useState:function(){return Cd(ja)},useDebugValue:Gh,useDeferredValue:function(e){var t=pn();return qe===null?t.memoizedState=e:Cw(t,qe.memoizedState,e)},useTransition:function(){var e=Cd(ja)[0],t=pn().memoizedState;return[e,t]},useMutableSource:uw,useSyncExternalStore:cw,useId:kw,unstable_isNewReconciler:!1};function wn(e,t){if(e&&e.defaultProps){t=Me({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function If(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Me({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hc={isMounted:function(e){return(e=e._reactInternals)?rs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kt(),i=Zr(e),s=dr(r,i);s.payload=t,n!=null&&(s.callback=n),t=Kr(e,s,i),t!==null&&(_n(t,e,i,r),Xl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kt(),i=Zr(e),s=dr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Kr(e,s,i),t!==null&&(_n(t,e,i,r),Xl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kt(),r=Zr(e),i=dr(n,r);i.tag=2,t!=null&&(i.callback=t),t=Kr(e,i,r),t!==null&&(_n(t,e,r,n),Xl(t,e,r))}};function vv(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?!ba(n,r)||!ba(i,s):!0}function jw(e,t,n){var r=!1,i=si,s=t.contextType;return typeof s=="object"&&s!==null?s=fn(s):(i=Ft(t)?Gi:yt.current,r=t.contextTypes,s=(r=r!=null)?oo(e,i):si),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=hc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function yv(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&&hc.enqueueReplaceState(t,t.state,null)}function $f(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},$h(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=fn(s):(s=Ft(t)?Gi:yt.current,i.context=oo(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(If(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&&hc.enqueueReplaceState(i,i.state,null),Ou(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function co(e,t){try{var n="",r=t;do n+=OT(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 Sd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $f(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var t_=typeof WeakMap=="function"?WeakMap:Map;function _w(e,t,n){n=cr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nu||(Nu=!0,Yf=r),$f(e,t)},n}function jw(e,t,n){n=cr(-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(){$f(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$f(e,t),typeof r!="function"&&(Yr===null?Yr=new Set([this]):Yr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function yv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new t_;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=m_.bind(null,e,t,n),t.then(e,e))}function xv(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 wv(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=cr(-1,1),t.tag=2,Qr(n,t,1))),n.lanes|=1),e)}var n_=vr.ReactCurrentOwner,Ot=!1;function xt(e,t,n,r){t.child=e===null?rw(t,null,n,r):oo(t,e.child,n,r)}function bv(e,t,n,r,i){n=n.render;var s=t.ref;return zs(t,i),r=Uh(e,t,n,r,s,i),n=Hh(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mr(e,t,i)):(_e&&n&&Ph(t),t.flags|=1,xt(e,t,r,i),t.child)}function Sv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!em(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rw(e,t,s,r,i)):(e=eu(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:ya,n(o,r)&&e.ref===t.ref)return mr(e,t,i)}return t.flags|=1,e=Xr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ya(s,r)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ot=!0);else return t.lanes=e.lanes,mr(e,t,i)}return Bf(e,t,n,r,i)}function Aw(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},Se(As,Vt),Vt|=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,Se(As,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Se(As,Vt),Vt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Se(As,Vt),Vt|=r;return xt(e,t,i,n),t.child}function Pw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bf(e,t,n,r,i){var s=Ft(n)?Hi:gt.current;return s=io(t,s),zs(t,i),n=Uh(e,t,n,r,s,i),r=Hh(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mr(e,t,i)):(_e&&r&&Ph(t),t.flags|=1,xt(e,t,n,i),t.child)}function Cv(e,t,n,r,i){if(Ft(n)){var s=!0;ku(t)}else s=!1;if(zs(t,i),t.stateNode===null)Xl(e,t),Ew(t,n,r),If(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=dn(u):(u=Ft(n)?Hi:gt.current,u=io(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&vv(t,o,r,u),_r=!1;var f=t.memoizedState;o.state=f,Ru(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Mt.current||_r?(typeof d=="function"&&(Lf(t,n,d,r),l=t.memoizedState),(a=_r||gv(t,n,a,r,f,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,sw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:xn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=dn(l):(l=Ft(n)?Hi:gt.current,l=io(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&vv(t,o,r,l),_r=!1,f=t.memoizedState,o.state=f,Ru(t,r,o,i);var m=t.memoizedState;a!==c||f!==m||Mt.current||_r?(typeof p=="function"&&(Lf(t,n,p,r),m=t.memoizedState),(u=_r||gv(t,n,u,r,f,m,l)||!1)?(d||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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return zf(e,t,n,r,s,i)}function zf(e,t,n,r,i,s){Pw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&lv(t,n,!1),mr(e,t,s);r=t.stateNode,n_.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):xt(e,t,a,s),t.memoizedState=r.state,i&&lv(t,n,!0),t.child}function Ow(e){var t=e.stateNode;t.pendingContext?av(e,t.pendingContext,t.pendingContext!==t.context):t.context&&av(e,t.context,!1),$h(e,t.containerInfo)}function kv(e,t,n,r,i){return so(),Dh(i),t.flags|=256,xt(e,t,n,r),t.child}var Vf={dehydrated:null,treeContext:null,retryLane:0};function Uf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dw(e,t,n){var r=t.pendingProps,i=Re.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),Se(Re,i&1),e===null)return Mf(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=hc(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=Uf(n),t.memoizedState=Vf,e):Gh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return r_(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=Xr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Xr(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?Uf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Vf,r}return s=e.child,e=s.sibling,r=Xr(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 Gh(e,t){return t=hc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function El(e,t,n,r){return r!==null&&Dh(r),oo(t,e.child,null,n),e=Gh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function r_(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Sd(Error($(422))),El(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=hc({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&&oo(t,e.child,null,o),t.child.memoizedState=Uf(o),t.memoizedState=Vf,s);if(!(t.mode&1))return El(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error($(419)),r=Sd(s,r,void 0),El(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ot||a){if(r=Ze,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,hr(e,i),En(r,e,i,-1))}return Jh(),r=Sd(Error($(421))),El(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=g_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ut=Gr(i.nextSibling),qt=t,_e=!0,Cn=null,e!==null&&(sn[on++]=ar,sn[on++]=lr,sn[on++]=Wi,ar=e.id,lr=e.overflow,Wi=t),t=Gh(t,r.children),t.flags|=4096,t)}function Tv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ff(e.return,t,n)}function Cd(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 Nw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(xt(e,t,r.children,n),r=Re.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&&Tv(e,n,t);else if(e.tag===19)Tv(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(Se(Re,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&&Au(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cd(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&&Au(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cd(t,!0,n,null,s);break;case"together":Cd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Xr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function i_(e,t,n){switch(t.tag){case 3:Ow(t),so();break;case 5:ow(t);break;case 1:Ft(t.type)&&ku(t);break;case 4:$h(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Se(_u,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Se(Re,Re.current&1),t.flags|=128,null):n&t.child.childLanes?Dw(e,t,n):(Se(Re,Re.current&1),e=mr(e,t,n),e!==null?e.sibling:null);Se(Re,Re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Nw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Se(Re,Re.current),r)break;return null;case 22:case 23:return t.lanes=0,Aw(e,t,n)}return mr(e,t,n)}var Mw,Hf,Fw,Lw;Mw=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}};Hf=function(){};Fw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_i(Hn.current);var s=null;switch(n){case"input":i=ff(e,i),r=ff(e,r),s=[];break;case"select":i=Oe({},i,{value:void 0}),r=Oe({},r,{value:void 0}),s=[];break;case"textarea":i=mf(e,i),r=mf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Su)}vf(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"&&(da.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"&&(da.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ke("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)}};Lw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!_e)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 dt(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 s_(e,t,n){var r=t.pendingProps;switch(Oh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return Ft(t.type)&&Cu(),dt(t),null;case 3:return r=t.stateNode,ao(),Ee(Mt),Ee(gt),zh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(kl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Cn!==null&&(Zf(Cn),Cn=null))),Hf(e,t),dt(t),null;case 5:Bh(t);var i=_i(Ca.current);if(n=t.type,e!==null&&t.stateNode!=null)Fw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return dt(t),null}if(e=_i(Hn.current),kl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[zn]=t,r[ba]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":Ng(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Fg(r,s),ke("invalid",r)}vf(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&&Cl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Cl(r.textContent,a,e),i=["children",""+a]):da.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":ml(r),Mg(r,s,!0);break;case"textarea":ml(r),Lg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Su)}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[zn]=t,e[ba]=r,Mw(e,t,!1,!1),t.stateNode=e;e:{switch(o=yf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],e);i=r;break;case"source":ke("error",e),i=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),i=r;break;case"details":ke("toggle",e),i=r;break;case"input":Ng(e,r),i=ff(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Oe({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Fg(e,r),i=mf(e,r),ke("invalid",e);break;default:i=r}vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?h1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&f1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&fa(e,l):typeof l=="number"&&fa(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(da.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ke("scroll",e):l!=null&&vh(e,s,l,o))}switch(n){case"input":ml(e),Mg(e,r,!1);break;case"textarea":ml(e),Lg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ni(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ls(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ls(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Su)}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 dt(t),null;case 6:if(e&&t.stateNode!=null)Lw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=_i(Ca.current),_i(Hn.current),kl(t)){if(r=t.stateNode,n=t.memoizedProps,r[zn]=t,(s=r.nodeValue!==n)&&(e=qt,e!==null))switch(e.tag){case 3:Cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[zn]=t,t.stateNode=r}return dt(t),null;case 13:if(Ee(Re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&Ut!==null&&t.mode&1&&!(t.flags&128))tw(),so(),t.flags|=98560,s=!1;else if(s=kl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error($(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error($(317));s[zn]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dt(t),s=!1}else Cn!==null&&(Zf(Cn),Cn=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||Re.current&1?qe===0&&(qe=3):Jh())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return ao(),Hf(e,t),e===null&&xa(t.stateNode.containerInfo),dt(t),null;case 10:return Fh(t.type._context),dt(t),null;case 17:return Ft(t.type)&&Cu(),dt(t),null;case 19:if(Ee(Re),s=t.memoizedState,s===null)return dt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Mo(s,!1);else{if(qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Au(e),o!==null){for(t.flags|=128,Mo(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 Se(Re,Re.current&1|2),t.child}e=e.sibling}s.tail!==null&&Be()>uo&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Au(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!_e)return dt(t),null}else 2*Be()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Mo(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=Be(),t.sibling=null,n=Re.current,Se(Re,r?n&1|2:n&1),t):(dt(t),null);case 22:case 23:return Zh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function o_(e,t){switch(Oh(t),t.tag){case 1:return Ft(t.type)&&Cu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Ee(Mt),Ee(gt),zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bh(t),null;case 13:if(Ee(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Re),null;case 4:return ao(),null;case 10:return Fh(t.type._context),null;case 22:case 23:return Zh(),null;case 24:return null;default:return null}}var _l=!1,ht=!1,a_=typeof WeakSet=="function"?WeakSet:Set,q=null;function Rs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Wf(e,t,n){try{n()}catch(r){Me(e,t,r)}}var Ev=!1;function l_(e,t){if(jf=xu,e=V1(),Ah(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,d=0,c=e,f=null;t:for(;;){for(var p;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),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++d===r&&(l=o),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},xu=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;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 h=m.memoizedProps,w=m.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?h:xn(t.type,h),w);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(k){Me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return m=Ev,Ev=!1,m}function ea(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&&Wf(t,n,s)}i=i.next}while(i!==r)}}function fc(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 qf(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 Iw(e){var t=e.alternate;t!==null&&(e.alternate=null,Iw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zn],delete t[ba],delete t[Of],delete t[HE],delete t[WE])),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 $w(e){return e.tag===5||e.tag===3||e.tag===4}function _v(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$w(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 Gf(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=Su));else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}function Qf(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(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}var it=null,bn=!1;function Cr(e,t,n){for(n=n.child;n!==null;)Bw(e,t,n),n=n.sibling}function Bw(e,t,n){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(ic,n)}catch{}switch(n.tag){case 5:ht||Rs(n,t);case 6:var r=it,i=bn;it=null,Cr(e,t,n),it=r,bn=i,it!==null&&(bn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(bn?(e=it,n=n.stateNode,e.nodeType===8?gd(e.parentNode,n):e.nodeType===1&&gd(e,n),ga(e)):gd(it,n.stateNode));break;case 4:r=it,i=bn,it=n.stateNode.containerInfo,bn=!0,Cr(e,t,n),it=r,bn=i;break;case 0:case 11:case 14:case 15:if(!ht&&(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)&&Wf(n,t,o),i=i.next}while(i!==r)}Cr(e,t,n);break;case 1:if(!ht&&(Rs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Me(n,t,a)}Cr(e,t,n);break;case 21:Cr(e,t,n);break;case 22:n.mode&1?(ht=(r=ht)||n.memoizedState!==null,Cr(e,t,n),ht=r):Cr(e,t,n);break;default:Cr(e,t,n)}}function jv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a_),t.forEach(function(r){var i=v_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function gn(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:it=a.stateNode,bn=!1;break e;case 3:it=a.stateNode.containerInfo,bn=!0;break e;case 4:it=a.stateNode.containerInfo,bn=!0;break e}a=a.return}if(it===null)throw Error($(160));Bw(s,o,i),it=null,bn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Me(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zw(t,e),t=t.sibling}function zw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),Pn(e),r&4){try{ea(3,e,e.return),fc(3,e)}catch(h){Me(e,e.return,h)}try{ea(5,e,e.return)}catch(h){Me(e,e.return,h)}}break;case 1:gn(t,e),Pn(e),r&512&&n!==null&&Rs(n,n.return);break;case 5:if(gn(t,e),Pn(e),r&512&&n!==null&&Rs(n,n.return),e.flags&32){var i=e.stateNode;try{fa(i,"")}catch(h){Me(e,e.return,h)}}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),yf(a,o);var u=yf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?h1(i,c):d==="dangerouslySetInnerHTML"?f1(i,c):d==="children"?fa(i,c):vh(i,d,c,u)}switch(a){case"input":pf(i,s);break;case"textarea":c1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ls(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ls(i,!!s.multiple,s.defaultValue,!0):Ls(i,!!s.multiple,s.multiple?[]:"",!1))}i[ba]=s}catch(h){Me(e,e.return,h)}}break;case 6:if(gn(t,e),Pn(e),r&4){if(e.stateNode===null)throw Error($(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(h){Me(e,e.return,h)}}break;case 3:if(gn(t,e),Pn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ga(t.containerInfo)}catch(h){Me(e,e.return,h)}break;case 4:gn(t,e),Pn(e);break;case 13:gn(t,e),Pn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Kh=Be())),r&4&&jv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(ht=(u=ht)||d,gn(t,e),ht=u):gn(t,e),Pn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(q=e,d=e.child;d!==null;){for(c=q=d;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:Rs(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(h){Me(r,n,h)}}break;case 5:Rs(f,f.return);break;case 22:if(f.memoizedState!==null){Av(c);continue}}p!==null?(p.return=f,q=p):Av(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=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(h){Me(e,e.return,h)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(h){Me(e,e.return,h)}}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;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:gn(t,e),Pn(e),r&4&&jv(e);break;case 21:break;default:gn(t,e),Pn(e)}}function Pn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($w(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(fa(i,""),r.flags&=-33);var s=_v(e);Qf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=_v(e);Gf(e,a,o);break;default:throw Error($(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function u_(e,t,n){q=e,Vw(e)}function Vw(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var i=q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||_l;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ht;a=_l;var u=ht;if(_l=o,(ht=l)&&!u)for(q=i;q!==null;)o=q,l=o.child,o.tag===22&&o.memoizedState!==null?Pv(i):l!==null?(l.return=o,q=l):Pv(i);for(;s!==null;)q=s,Vw(s),s=s.sibling;q=i,_l=a,ht=u}Rv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,q=s):Rv(e)}}function Rv(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ht||fc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ht)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:xn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&pv(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}pv(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 d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&ga(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}ht||t.flags&512&&qf(t)}catch(f){Me(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function Av(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function Pv(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fc(4,t)}catch(l){Me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Me(t,i,l)}}var s=t.return;try{qf(t)}catch(l){Me(t,s,l)}break;case 5:var o=t.return;try{qf(t)}catch(l){Me(t,o,l)}}}catch(l){Me(t,t.return,l)}if(t===e){q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,q=a;break}q=t.return}}var c_=Math.ceil,Du=vr.ReactCurrentDispatcher,Qh=vr.ReactCurrentOwner,un=vr.ReactCurrentBatchConfig,pe=0,Ze=null,ze=null,ot=0,Vt=0,As=li(0),qe=0,_a=null,Gi=0,pc=0,Yh=0,ta=null,At=null,Kh=0,uo=1/0,rr=null,Nu=!1,Yf=null,Yr=null,jl=!1,zr=null,Mu=0,na=0,Kf=null,Zl=-1,Jl=0;function bt(){return pe&6?Be():Zl!==-1?Zl:Zl=Be()}function Kr(e){return e.mode&1?pe&2&&ot!==0?ot&-ot:GE.transition!==null?(Jl===0&&(Jl=E1()),Jl):(e=ge,e!==0||(e=window.event,e=e===void 0?16:D1(e.type)),e):1}function En(e,t,n,r){if(50<na)throw na=0,Kf=null,Error($(185));Qa(e,n,r),(!(pe&2)||e!==Ze)&&(e===Ze&&(!(pe&2)&&(pc|=n),qe===4&&Ar(e,ot)),Lt(e,r),n===1&&pe===0&&!(t.mode&1)&&(uo=Be()+500,uc&&ui()))}function Lt(e,t){var n=e.callbackNode;GT(e,t);var r=yu(e,e===Ze?ot:0);if(r===0)n!==null&&Bg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Bg(n),t===1)e.tag===0?qE(Ov.bind(null,e)):Z1(Ov.bind(null,e)),VE(function(){!(pe&6)&&ui()}),n=null;else{switch(_1(r)){case 1:n=Sh;break;case 4:n=k1;break;case 16:n=vu;break;case 536870912:n=T1;break;default:n=vu}n=Kw(n,Uw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uw(e,t){if(Zl=-1,Jl=0,pe&6)throw Error($(327));var n=e.callbackNode;if(Vs()&&e.callbackNode!==n)return null;var r=yu(e,e===Ze?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fu(e,r);else{t=r;var i=pe;pe|=2;var s=Ww();(Ze!==e||ot!==t)&&(rr=null,uo=Be()+500,$i(e,t));do try{p_();break}catch(a){Hw(e,a)}while(!0);Mh(),Du.current=s,pe=i,ze!==null?t=0:(Ze=null,ot=0,t=qe)}if(t!==0){if(t===2&&(i=Cf(e),i!==0&&(r=i,t=Xf(e,i))),t===1)throw n=_a,$i(e,0),Ar(e,r),Lt(e,Be()),n;if(t===6)Ar(e,r);else{if(i=e.current.alternate,!(r&30)&&!d_(i)&&(t=Fu(e,r),t===2&&(s=Cf(e),s!==0&&(r=s,t=Xf(e,s))),t===1))throw n=_a,$i(e,0),Ar(e,r),Lt(e,Be()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:wi(e,At,rr);break;case 3:if(Ar(e,r),(r&130023424)===r&&(t=Kh+500-Be(),10<t)){if(yu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){bt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Pf(wi.bind(null,e,At,rr),t);break}wi(e,At,rr);break;case 4:if(Ar(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Tn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*c_(r/1960))-r,10<r){e.timeoutHandle=Pf(wi.bind(null,e,At,rr),r);break}wi(e,At,rr);break;case 5:wi(e,At,rr);break;default:throw Error($(329))}}}return Lt(e,Be()),e.callbackNode===n?Uw.bind(null,e):null}function Xf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&($i(e,t).flags|=256),e=Fu(e,t),e!==2&&(t=At,At=n,t!==null&&Zf(t)),e}function Zf(e){At===null?At=e:At.push.apply(At,e)}function d_(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(!_n(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 Ar(e,t){for(t&=~Yh,t&=~pc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tn(t),r=1<<n;e[n]=-1,t&=~r}}function Ov(e){if(pe&6)throw Error($(327));Vs();var t=yu(e,0);if(!(t&1))return Lt(e,Be()),null;var n=Fu(e,t);if(e.tag!==0&&n===2){var r=Cf(e);r!==0&&(t=r,n=Xf(e,r))}if(n===1)throw n=_a,$i(e,0),Ar(e,t),Lt(e,Be()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wi(e,At,rr),Lt(e,Be()),null}function Xh(e,t){var n=pe;pe|=1;try{return e(t)}finally{pe=n,pe===0&&(uo=Be()+500,uc&&ui())}}function Qi(e){zr!==null&&zr.tag===0&&!(pe&6)&&Vs();var t=pe;pe|=1;var n=un.transition,r=ge;try{if(un.transition=null,ge=1,e)return e()}finally{ge=r,un.transition=n,pe=t,!(pe&6)&&ui()}}function Zh(){Vt=As.current,Ee(As)}function $i(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zE(n)),ze!==null)for(n=ze.return;n!==null;){var r=n;switch(Oh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Cu();break;case 3:ao(),Ee(Mt),Ee(gt),zh();break;case 5:Bh(r);break;case 4:ao();break;case 13:Ee(Re);break;case 19:Ee(Re);break;case 10:Fh(r.type._context);break;case 22:case 23:Zh()}n=n.return}if(Ze=e,ze=e=Xr(e.current,null),ot=Vt=t,qe=0,_a=null,Yh=pc=Gi=0,At=ta=null,Ei!==null){for(t=0;t<Ei.length;t++)if(n=Ei[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}Ei=null}return e}function Hw(e,t){do{var n=ze;try{if(Mh(),Yl.current=Ou,Pu){for(var r=Pe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Pu=!1}if(qi=0,Xe=He=Pe=null,Jo=!1,ka=0,Qh.current=null,n===null||n.return===null){qe=1,_a=t,ze=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=xv(o);if(p!==null){p.flags&=-257,wv(p,o,a,s,t),p.mode&1&&yv(s,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var h=new Set;h.add(l),t.updateQueue=h}else m.add(l);break e}else{if(!(t&1)){yv(s,u,t),Jh();break e}l=Error($(426))}}else if(_e&&a.mode&1){var w=xv(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),wv(w,o,a,s,t),Dh(lo(l,a));break e}}s=l=lo(l,a),qe!==4&&(qe=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=_w(s,l,t);fv(s,y);break e;case 1:a=l;var x=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yr===null||!Yr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=jw(s,a,t);fv(s,k);break e}}s=s.return}while(s!==null)}Gw(n)}catch(T){t=T,ze===n&&n!==null&&(ze=n=n.return);continue}break}while(!0)}function Ww(){var e=Du.current;return Du.current=Ou,e===null?Ou:e}function Jh(){(qe===0||qe===3||qe===2)&&(qe=4),Ze===null||!(Gi&268435455)&&!(pc&268435455)||Ar(Ze,ot)}function Fu(e,t){var n=pe;pe|=2;var r=Ww();(Ze!==e||ot!==t)&&(rr=null,$i(e,t));do try{f_();break}catch(i){Hw(e,i)}while(!0);if(Mh(),pe=n,Du.current=r,ze!==null)throw Error($(261));return Ze=null,ot=0,qe}function f_(){for(;ze!==null;)qw(ze)}function p_(){for(;ze!==null&&!IT();)qw(ze)}function qw(e){var t=Yw(e.alternate,e,Vt);e.memoizedProps=e.pendingProps,t===null?Gw(e):ze=t,Qh.current=null}function Gw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=o_(n,t),n!==null){n.flags&=32767,ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,ze=null;return}}else if(n=s_(n,t,Vt),n!==null){ze=n;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);qe===0&&(qe=5)}function wi(e,t,n){var r=ge,i=un.transition;try{un.transition=null,ge=1,h_(e,t,n,r)}finally{un.transition=i,ge=r}return null}function h_(e,t,n,r){do Vs();while(zr!==null);if(pe&6)throw Error($(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($(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(QT(e,s),e===Ze&&(ze=Ze=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||jl||(jl=!0,Kw(vu,function(){return Vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=un.transition,un.transition=null;var o=ge;ge=1;var a=pe;pe|=4,Qh.current=null,l_(e,n),zw(n,e),NE(Rf),xu=!!jf,Rf=jf=null,e.current=n,u_(n),$T(),pe=a,ge=o,un.transition=s}else e.current=n;if(jl&&(jl=!1,zr=e,Mu=i),s=e.pendingLanes,s===0&&(Yr=null),VT(n.stateNode),Lt(e,Be()),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(Nu)throw Nu=!1,e=Yf,Yf=null,e;return Mu&1&&e.tag!==0&&Vs(),s=e.pendingLanes,s&1?e===Kf?na++:(na=0,Kf=e):na=0,ui(),null}function Vs(){if(zr!==null){var e=_1(Mu),t=un.transition,n=ge;try{if(un.transition=null,ge=16>e?16:e,zr===null)var r=!1;else{if(e=zr,zr=null,Mu=0,pe&6)throw Error($(331));var i=pe;for(pe|=4,q=e.current;q!==null;){var s=q,o=s.child;if(q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(q=u;q!==null;){var d=q;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var c=d.child;if(c!==null)c.return=d,q=c;else for(;q!==null;){d=q;var f=d.sibling,p=d.return;if(Iw(d),d===u){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var m=s.alternate;if(m!==null){var h=m.child;if(h!==null){m.child=null;do{var w=h.sibling;h.sibling=null,h=w}while(h!==null)}}q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,q=o;else e:for(;q!==null;){if(s=q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,q=y;break e}q=s.return}}var x=e.current;for(q=x;q!==null;){o=q;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,q=b;else e:for(o=x;q!==null;){if(a=q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:fc(9,a)}}catch(T){Me(a,a.return,T)}if(a===o){q=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,q=k;break e}q=a.return}}if(pe=i,ui(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(ic,e)}catch{}r=!0}return r}finally{ge=n,un.transition=t}}return!1}function Dv(e,t,n){t=lo(n,t),t=_w(e,t,1),e=Qr(e,t,1),t=bt(),e!==null&&(Qa(e,1,t),Lt(e,t))}function Me(e,t,n){if(e.tag===3)Dv(e,e,n);else for(;t!==null;){if(t.tag===3){Dv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yr===null||!Yr.has(r))){e=lo(n,e),e=jw(t,e,1),t=Qr(t,e,1),e=bt(),t!==null&&(Qa(t,1,e),Lt(t,e));break}}t=t.return}}function m_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=bt(),e.pingedLanes|=e.suspendedLanes&n,Ze===e&&(ot&n)===n&&(qe===4||qe===3&&(ot&130023424)===ot&&500>Be()-Kh?$i(e,0):Yh|=n),Lt(e,t)}function Qw(e,t){t===0&&(e.mode&1?(t=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):t=1);var n=bt();e=hr(e,t),e!==null&&(Qa(e,t,n),Lt(e,n))}function g_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qw(e,n)}function v_(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($(314))}r!==null&&r.delete(t),Qw(e,n)}var Yw;Yw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ot=!1,i_(e,t,n);Ot=!!(e.flags&131072)}else Ot=!1,_e&&t.flags&1048576&&J1(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xl(e,t),e=t.pendingProps;var i=io(t,gt.current);zs(t,n),i=Uh(null,t,r,e,i,n);var s=Hh();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,Ft(r)?(s=!0,ku(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ih(t),i.updater=dc,t.stateNode=i,i._reactInternals=t,If(t,r,e,n),t=zf(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Ph(t),xt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=x_(r),e=xn(r,e),i){case 0:t=Bf(null,t,r,e,n);break e;case 1:t=Cv(null,t,r,e,n);break e;case 11:t=bv(null,t,r,e,n);break e;case 14:t=Sv(null,t,r,xn(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Bf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Cv(e,t,r,i,n);case 3:e:{if(Ow(t),e===null)throw Error($(387));r=t.pendingProps,s=t.memoizedState,i=s.element,sw(e,t),Ru(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=lo(Error($(423)),t),t=kv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error($(424)),t),t=kv(e,t,r,n,i);break e}else for(Ut=Gr(t.stateNode.containerInfo.firstChild),qt=t,_e=!0,Cn=null,n=rw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=mr(e,t,n);break e}xt(e,t,r,n)}t=t.child}return t;case 5:return ow(t),e===null&&Mf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Af(r,i)?o=null:s!==null&&Af(r,s)&&(t.flags|=32),Pw(e,t),xt(e,t,o,n),t.child;case 6:return e===null&&Mf(t),null;case 13:return Dw(e,t,n);case 4:return $h(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):xt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),bv(e,t,r,i,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(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,Se(_u,r._currentValue),r._currentValue=o,s!==null)if(_n(s.value,o)){if(s.children===i.children&&!Mt.current){t=mr(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=cr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ff(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($(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ff(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}xt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zs(t,n),i=dn(i),r=r(i),t.flags|=1,xt(e,t,r,n),t.child;case 14:return r=t.type,i=xn(r,t.pendingProps),i=xn(r.type,i),Sv(e,t,r,i,n);case 15:return Rw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Xl(e,t),t.tag=1,Ft(r)?(e=!0,ku(t)):e=!1,zs(t,n),Ew(t,r,i),If(t,r,i,n),zf(null,t,r,!0,e,n);case 19:return Nw(e,t,n);case 22:return Aw(e,t,n)}throw Error($(156,t.tag))};function Kw(e,t){return C1(e,t)}function y_(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 ln(e,t,n,r){return new y_(e,t,n,r)}function em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function x_(e){if(typeof e=="function")return em(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===wh)return 14}return 2}function Xr(e,t){var n=e.alternate;return n===null?(n=ln(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 eu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")em(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ws:return Bi(n.children,i,s,t);case yh:o=8,i|=8;break;case lf:return e=ln(12,n,t,i|2),e.elementType=lf,e.lanes=s,e;case uf:return e=ln(13,n,t,i),e.elementType=uf,e.lanes=s,e;case cf:return e=ln(19,n,t,i),e.elementType=cf,e.lanes=s,e;case o1:return hc(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 xh:o=11;break e;case wh:o=14;break e;case Er:o=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=ln(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Bi(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function hc(e,t,n,r){return e=ln(22,e,r,t),e.elementType=o1,e.lanes=n,e.stateNode={isHidden:!1},e}function kd(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Td(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function w_(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=sd(0),this.expirationTimes=sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tm(e,t,n,r,i,s,o,a,l){return e=new w_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ln(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ih(s),e}function b_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Xw(e){if(!e)return ri;e=e._reactInternals;e:{if(es(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(Ft(n))return X1(e,n,t)}return t}function Zw(e,t,n,r,i,s,o,a,l){return e=tm(n,r,!0,e,i,s,o,a,l),e.context=Xw(null),n=e.current,r=bt(),i=Kr(n),s=cr(r,i),s.callback=t??null,Qr(n,s,i),e.current.lanes=i,Qa(e,i,r),Lt(e,r),e}function mc(e,t,n,r){var i=t.current,s=bt(),o=Kr(i);return n=Xw(n),t.context===null?t.context=n:t.pendingContext=n,t=cr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Qr(i,t,o),e!==null&&(En(e,i,o,s),Ql(e,i,o)),o}function Lu(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 Nv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function nm(e,t){Nv(e,t),(e=e.alternate)&&Nv(e,t)}function S_(){return null}var Jw=typeof reportError=="function"?reportError:function(e){console.error(e)};function rm(e){this._internalRoot=e}gc.prototype.render=rm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));mc(e,t,null,null)};gc.prototype.unmount=rm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qi(function(){mc(null,e,null,null)}),t[pr]=null}};function gc(e){this._internalRoot=e}gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=A1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rr.length&&t!==0&&t<Rr[n].priority;n++);Rr.splice(n,0,e),n===0&&O1(e)}};function im(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mv(){}function C_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Lu(o);s.call(u)}}var o=Zw(t,r,e,0,null,!1,!1,"",Mv);return e._reactRootContainer=o,e[pr]=o.current,xa(e.nodeType===8?e.parentNode:e),Qi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Lu(l);a.call(u)}}var l=tm(e,0,!1,null,null,!1,!1,"",Mv);return e._reactRootContainer=l,e[pr]=l.current,xa(e.nodeType===8?e.parentNode:e),Qi(function(){mc(t,l,n,r)}),l}function yc(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=Lu(o);a.call(l)}}mc(t,o,e,i)}else o=C_(n,t,e,i,r);return Lu(o)}j1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(Ch(t,n|1),Lt(t,Be()),!(pe&6)&&(uo=Be()+500,ui()))}break;case 13:Qi(function(){var r=hr(e,1);if(r!==null){var i=bt();En(r,e,1,i)}}),nm(e,1)}};kh=function(e){if(e.tag===13){var t=hr(e,134217728);if(t!==null){var n=bt();En(t,e,134217728,n)}nm(e,134217728)}};R1=function(e){if(e.tag===13){var t=Kr(e),n=hr(e,t);if(n!==null){var r=bt();En(n,e,t,r)}nm(e,t)}};A1=function(){return ge};P1=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};wf=function(e,t,n){switch(t){case"input":if(pf(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=lc(r);if(!i)throw Error($(90));l1(r),pf(r,i)}}}break;case"textarea":c1(e,n);break;case"select":t=n.value,t!=null&&Ls(e,!!n.multiple,t,!1)}};v1=Xh;y1=Qi;var k_={usingClientEntryPoint:!1,Events:[Ka,ks,lc,m1,g1,Xh]},Fo={findFiberByHostInstance:Ti,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T_={bundleType:Fo.bundleType,version:Fo.version,rendererPackageName:Fo.rendererPackageName,rendererConfig:Fo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=b1(e),e===null?null:e.stateNode},findFiberByHostInstance:Fo.findFiberByHostInstance||S_,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 Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{ic=Rl.inject(T_),Un=Rl}catch{}}Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k_;Qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!im(t))throw Error($(200));return b_(e,t,null,n)};Qt.createRoot=function(e,t){if(!im(e))throw Error($(299));var n=!1,r="",i=Jw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=tm(e,1,!1,null,null,n,!1,r,i),e[pr]=t.current,xa(e.nodeType===8?e.parentNode:e),new rm(t)};Qt.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=b1(t),e=e===null?null:e.stateNode,e};Qt.flushSync=function(e){return Qi(e)};Qt.hydrate=function(e,t,n){if(!vc(t))throw Error($(200));return yc(null,e,t,!0,n)};Qt.hydrateRoot=function(e,t,n){if(!im(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Jw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Zw(t,null,e,1,n??null,i,!1,s,o),e[pr]=t.current,xa(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 gc(t)};Qt.render=function(e,t,n){if(!vc(t))throw Error($(200));return yc(null,e,t,!1,n)};Qt.unmountComponentAtNode=function(e){if(!vc(e))throw Error($(40));return e._reactRootContainer?(Qi(function(){yc(null,null,e,!1,function(){e._reactRootContainer=null,e[pr]=null})}),!0):!1};Qt.unstable_batchedUpdates=Xh;Qt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vc(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return yc(e,t,n,!1,r)};Qt.version="18.3.1-next-f1338f8080-20240426";function eb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eb)}catch(e){console.error(e)}}eb(),e1.exports=Qt;var tb=e1.exports;const E_=Zi(tb);var nb,Fv=tb;nb=Fv.createRoot,Fv.hydrateRoot;const __="@alfatech/livechat",j_="v2025.11.26.1",R_="module",A_="https://api-live.alfatek.dev",P_="wss://api-live.alfatek.dev",O_=["dist","README.md","component/chatier.js"],D_="dist/widget.js",N_={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},M_={"@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","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},F_={"@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"},rb={name:__,private:!1,version:j_,type:R_,apiURL:A_,wsURL:P_,files:O_,main:D_,scripts:N_,dependencies:M_,devDependencies:F_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},L_=rb.apiURL,I_=rb.wsURL,$_=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],B_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],z_={429:$_,404:B_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${L_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=z_[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 Za=e=>[200,201,204].includes(e),V_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=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(){}},Yi=typeof window>"u"||"Deno"in globalThis;function rn(){}function U_(e,t){return typeof e=="function"?e(t):e}function Jf(e){return typeof e=="number"&&e>=0&&e!==1/0}function ib(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Us(e,t){return typeof e=="function"?e(t):e}function kn(e,t){return typeof e=="function"?e(t):e}function Lv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==sm(o,t.options))return!1}else if(!ja(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 Iv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ki(t.options.mutationKey)!==Ki(s))return!1}else if(!ja(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function sm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ki)(e)}function Ki(e){return JSON.stringify(e,(t,n)=>ep(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ja(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ja(e[n],t[n])):!1}function sb(e,t){if(e===t)return e;const n=$v(e)&&$v(t);if(n||ep(e)&&ep(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 d=n?u:s[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=sb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Iu(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 $v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ep(e){if(!Bv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Bv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Bv(e){return Object.prototype.toString.call(e)==="[object Object]"}function H_(e){return new Promise(t=>{setTimeout(t,e)})}function tp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?sb(e,t):t}function W_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function q_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var om=Symbol();function ob(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===om?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Oi,Pr,Hs,Dx,G_=(Dx=class extends So{constructor(){super();Z(this,Oi);Z(this,Pr);Z(this,Hs);H(this,Hs,t=>{if(!Yi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Pr)||this.setEventListener(C(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Pr))==null||t.call(this),H(this,Pr,void 0))}setEventListener(t){var n;H(this,Hs,t),(n=C(this,Pr))==null||n.call(this),H(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,Oi)!==t&&(H(this,Oi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,Oi)=="boolean"?C(this,Oi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oi=new WeakMap,Pr=new WeakMap,Hs=new WeakMap,Dx),am=new G_,Ws,Or,qs,Nx,Q_=(Nx=class extends So{constructor(){super();Z(this,Ws,!0);Z(this,Or);Z(this,qs);H(this,qs,t=>{if(!Yi&&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(){C(this,Or)||this.setEventListener(C(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Or))==null||t.call(this),H(this,Or,void 0))}setEventListener(t){var n;H(this,qs,t),(n=C(this,Or))==null||n.call(this),H(this,Or,t(this.setOnline.bind(this)))}setOnline(t){C(this,Ws)!==t&&(H(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,Ws)}},Ws=new WeakMap,Or=new WeakMap,qs=new WeakMap,Nx),$u=new Q_;function np(){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 Y_(e){return Math.min(1e3*2**e,3e4)}function ab(e){return(e??"online")==="online"?$u.isOnline():!0}var lb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ed(e){return e instanceof lb}function ub(e){let t=!1,n=0,r=!1,i;const s=np(),o=h=>{var w;r||(f(new lb(h)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>am.isFocused()&&(e.networkMode==="always"||$u.isOnline())&&e.canRun(),d=()=>ab(e.networkMode)&&e.canRun(),c=h=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,h),i==null||i(),s.resolve(h))},f=h=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,h),i==null||i(),s.reject(h))},p=()=>new Promise(h=>{var w;i=y=>{(r||u())&&h(y)},(w=e.onPause)==null||w.call(e)}).then(()=>{var h;i=void 0,r||(h=e.onContinue)==null||h.call(e)}),m=()=>{if(r)return;let h;const w=n===0?e.initialPromise:void 0;try{h=w??e.fn()}catch(y){h=Promise.reject(y)}Promise.resolve(h).then(c).catch(y=>{var E;if(r)return;const x=e.retry??(Yi?0:3),b=e.retryDelay??Y_,k=typeof b=="function"?b(n,y):b,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!T){f(y);return}n++,(E=e.onFail)==null||E.call(e,n,y),H_(k).then(()=>u()?void 0:p()).then(()=>{t?f(y):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():p().then(m),s)}}function K_(){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 We=K_(),Di,Mx,cb=(Mx=class{constructor(){Z(this,Di)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jf(this.gcTime)&&H(this,Di,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yi?1/0:5*60*1e3))}clearGcTimeout(){C(this,Di)&&(clearTimeout(C(this,Di)),H(this,Di,void 0))}},Di=new WeakMap,Mx),Gs,Qs,nn,ft,Ua,Ni,wn,nr,Fx,X_=(Fx=class extends cb{constructor(t){super();Z(this,wn);Z(this,Gs);Z(this,Qs);Z(this,nn);Z(this,ft);Z(this,Ua);Z(this,Ni);H(this,Ni,!1),H(this,Ua,t.defaultOptions),this.setOptions(t.options),this.observers=[],H(this,nn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,H(this,Gs,Z_(this.options)),this.state=t.state??C(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,ft))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Ua),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,nn).remove(this)}setData(t,n){const r=tp(this.state.data,t,this.options);return se(this,wn,nr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,wn,nr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,ft))==null?void 0:r.promise;return(i=C(this,ft))==null||i.cancel(t),n?n.then(rn).catch(rn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Gs))}isActive(){return this.observers.some(t=>kn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===om||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||!ib(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,nn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,ft)&&(C(this,Ni)?C(this,ft).cancel({revert:!0}):C(this,ft).cancelRetry()),this.scheduleGc()),C(this,nn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,wn,nr).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,ft))return C(this,ft).continueRetry(),C(this,ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(H(this,Ni,!0),r.signal)})},s=()=>{const c=ob(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),H(this,Ni,!1),this.options.persister?this.options.persister(c,f,this):c(f)},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),H(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&se(this,wn,nr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,m,h;Ed(c)&&c.silent||se(this,wn,nr).call(this,{type:"error",error:c}),Ed(c)||((p=(f=C(this,nn).config).onError)==null||p.call(f,c,this),(h=(m=C(this,nn).config).onSettled)==null||h.call(m,this.state.data,c,this)),this.scheduleGc()};return H(this,ft,ub({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,m,h;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(w){a(w);return}(p=(f=C(this,nn).config).onSuccess)==null||p.call(f,c,this),(h=(m=C(this,nn).config).onSettled)==null||h.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{se(this,wn,nr).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{se(this,wn,nr).call(this,{type:"pause"})},onContinue:()=>{se(this,wn,nr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),C(this,ft).start()}},Gs=new WeakMap,Qs=new WeakMap,nn=new WeakMap,ft=new WeakMap,Ua=new WeakMap,Ni=new WeakMap,wn=new WeakSet,nr=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,...db(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 Ed(i)&&i.revert&&C(this,Qs)?{...C(this,Qs),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),We.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,nn).notify({query:this,type:"updated",action:t})})},Fx);function db(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ab(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Z_(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 Ln,Lx,J_=(Lx=class extends So{constructor(t={}){super();Z(this,Ln);this.config=t,H(this,Ln,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??sm(i,n);let o=this.get(s);return o||(o=new X_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,Ln).has(t.queryHash)||(C(this,Ln).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,Ln).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,Ln).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){We.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Ln).get(t)}getAll(){return[...C(this,Ln).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Lv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Lv(t,r)):n}notify(t){We.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){We.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){We.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ln=new WeakMap,Lx),In,vt,Mi,$n,kr,Ix,e2=(Ix=class extends cb{constructor(t){super();Z(this,$n);Z(this,In);Z(this,vt);Z(this,Mi);this.mutationId=t.mutationId,H(this,vt,t.mutationCache),H(this,In,[]),this.state=t.state||fb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,In).includes(t)||(C(this,In).push(t),this.clearGcTimeout(),C(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){H(this,In,C(this,In).filter(n=>n!==t)),this.scheduleGc(),C(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,In).length||(this.state.status==="pending"?this.scheduleGc():C(this,vt).remove(this))}continue(){var t;return((t=C(this,Mi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,p,m,h,w,y,x,b,k,T,E,j;H(this,Mi,ub({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{se(this,$n,kr).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{se(this,$n,kr).call(this,{type:"pause"})},onContinue:()=>{se(this,$n,kr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,vt).canRun(this)}));const n=this.state.status==="pending",r=!C(this,Mi).canStart();try{if(!n){se(this,$n,kr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=C(this,vt).config).onMutate)==null?void 0:s.call(i,t,this));const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));M!==this.state.context&&se(this,$n,kr).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const R=await C(this,Mi).start();return await((u=(l=C(this,vt).config).onSuccess)==null?void 0:u.call(l,R,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,R,t,this.state.context)),await((p=(f=C(this,vt).config).onSettled)==null?void 0:p.call(f,R,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,R,null,t,this.state.context)),se(this,$n,kr).call(this,{type:"success",data:R}),R}catch(R){try{throw await((y=(w=C(this,vt).config).onError)==null?void 0:y.call(w,R,t,this.state.context,this)),await((b=(x=this.options).onError)==null?void 0:b.call(x,R,t,this.state.context)),await((T=(k=C(this,vt).config).onSettled)==null?void 0:T.call(k,void 0,R,this.state.variables,this.state.context,this)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,R,t,this.state.context)),R}finally{se(this,$n,kr).call(this,{type:"error",error:R})}}finally{C(this,vt).runNext(this)}}},In=new WeakMap,vt=new WeakMap,Mi=new WeakMap,$n=new WeakSet,kr=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),We.batch(()=>{C(this,In).forEach(r=>{r.onMutationUpdate(t)}),C(this,vt).notify({mutation:this,type:"updated",action:t})})},Ix);function fb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zt,Ha,$x,t2=($x=class extends So{constructor(t={}){super();Z(this,zt);Z(this,Ha);this.config=t,H(this,zt,new Map),H(this,Ha,Date.now())}build(t,n,r){const i=new e2({mutationCache:this,mutationId:++fl(this,Ha)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Al(t),r=C(this,zt).get(n)??[];r.push(t),C(this,zt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Al(t);if(C(this,zt).has(n)){const i=(r=C(this,zt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?C(this,zt).delete(n):C(this,zt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=C(this,zt).get(Al(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=C(this,zt).get(Al(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){We.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...C(this,zt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Iv(n,r))}findAll(t={}){return this.getAll().filter(n=>Iv(t,n))}notify(t){We.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return We.batch(()=>Promise.all(t.map(n=>n.continue().catch(rn))))}},zt=new WeakMap,Ha=new WeakMap,$x);function Al(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function zv(e){return{onFetch:(t,n)=>{var d,c,f,p,m;const r=t.options,i=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let h=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},y=ob(t.options,t.fetchOptions),x=async(b,k,T)=>{if(h)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};w(E);const j=await y(E),{maxPages:R}=t.options,M=T?q_:W_;return{pages:M(b.pages,j,R),pageParams:M(b.pageParams,k,R)}};if(i&&s.length){const b=i==="backward",k=b?n2:Vv,T={pages:s,pageParams:o},E=k(r,T);a=await x(T,E,b)}else{const b=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:Vv(r,a);if(l>0&&k==null)break;a=await x(a,k),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var h,w;return(w=(h=t.options).persister)==null?void 0:w.call(h,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Vv(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 n2(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 De,Dr,Nr,Ys,Ks,Mr,Xs,Zs,Bx,r2=(Bx=class{constructor(e={}){Z(this,De);Z(this,Dr);Z(this,Nr);Z(this,Ys);Z(this,Ks);Z(this,Mr);Z(this,Xs);Z(this,Zs);H(this,De,e.queryCache||new J_),H(this,Dr,e.mutationCache||new t2),H(this,Nr,e.defaultOptions||{}),H(this,Ys,new Map),H(this,Ks,new Map),H(this,Mr,0)}mount(){fl(this,Mr)._++,C(this,Mr)===1&&(H(this,Xs,am.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,De).onFocus())})),H(this,Zs,$u.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,De).onOnline())})))}unmount(){var e,t;fl(this,Mr)._--,C(this,Mr)===0&&((e=C(this,Xs))==null||e.call(this),H(this,Xs,void 0),(t=C(this,Zs))==null||t.call(this),H(this,Zs,void 0))}isFetching(e){return C(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Dr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,De).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=C(this,De).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Us(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return C(this,De).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=C(this,De).get(r.queryHash),s=i==null?void 0:i.state.data,o=U_(t,s);if(o!==void 0)return C(this,De).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return We.batch(()=>C(this,De).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,De).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,De);We.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,De),r={type:"active",...e};return We.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=We.batch(()=>C(this,De).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(rn).catch(rn)}invalidateQueries(e,t={}){return We.batch(()=>{if(C(this,De).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=We.batch(()=>C(this,De).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(rn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(rn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,De).build(this,t);return n.isStaleByTime(Us(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rn).catch(rn)}fetchInfiniteQuery(e){return e.behavior=zv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rn).catch(rn)}ensureInfiniteQueryData(e){return e.behavior=zv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $u.isOnline()?C(this,Dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,De)}getMutationCache(){return C(this,Dr)}getDefaultOptions(){return C(this,Nr)}setDefaultOptions(e){H(this,Nr,e)}setQueryDefaults(e,t){C(this,Ys).set(Ki(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Ys).values()],n={};return t.forEach(r=>{ja(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Ks).set(Ki(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Ks).values()];let n={};return t.forEach(r=>{ja(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sm(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===om&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,De).clear(),C(this,Dr).clear()}},De=new WeakMap,Dr=new WeakMap,Nr=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Mr=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Bx),_t,ce,Wa,yt,Fi,Js,Fr,Bn,qa,eo,to,Li,Ii,Lr,no,me,Ho,rp,ip,sp,op,ap,lp,up,pb,zx,i2=(zx=class extends So{constructor(t,n){super();Z(this,me);Z(this,_t);Z(this,ce);Z(this,Wa);Z(this,yt);Z(this,Fi);Z(this,Js);Z(this,Fr);Z(this,Bn);Z(this,qa);Z(this,eo);Z(this,to);Z(this,Li);Z(this,Ii);Z(this,Lr);Z(this,no,new Set);this.options=n,H(this,_t,t),H(this,Bn,null),H(this,Fr,np()),this.options.experimental_prefetchInRender||C(this,Fr).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&&(C(this,ce).addObserver(this),Uv(C(this,ce),this.options)?se(this,me,Ho).call(this):this.updateResult(),se(this,me,op).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cp(C(this,ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cp(C(this,ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,me,ap).call(this),se(this,me,lp).call(this),C(this,ce).removeObserver(this)}setOptions(t,n){const r=this.options,i=C(this,ce);if(this.options=C(this,_t).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,C(this,ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,me,up).call(this),C(this,ce).setOptions(this.options),r._defaulted&&!Iu(this.options,r)&&C(this,_t).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,ce),observer:this});const s=this.hasListeners();s&&Hv(C(this,ce),i,this.options,r)&&se(this,me,Ho).call(this),this.updateResult(n),s&&(C(this,ce)!==i||kn(this.options.enabled,C(this,ce))!==kn(r.enabled,C(this,ce))||Us(this.options.staleTime,C(this,ce))!==Us(r.staleTime,C(this,ce)))&&se(this,me,rp).call(this);const o=se(this,me,ip).call(this);s&&(C(this,ce)!==i||kn(this.options.enabled,C(this,ce))!==kn(r.enabled,C(this,ce))||o!==C(this,Lr))&&se(this,me,sp).call(this,o)}getOptimisticResult(t){const n=C(this,_t).getQueryCache().build(C(this,_t),t),r=this.createResult(n,t);return o2(this,r)&&(H(this,yt,r),H(this,Js,this.options),H(this,Fi,C(this,ce).state)),r}getCurrentResult(){return C(this,yt)}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){C(this,no).add(t)}getCurrentQuery(){return C(this,ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,_t).defaultQueryOptions(t),r=C(this,_t).getQueryCache().build(C(this,_t),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,me,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,yt)))}createResult(t,n){var R;const r=C(this,ce),i=this.options,s=C(this,yt),o=C(this,Fi),a=C(this,Js),u=t!==r?t.state:C(this,Wa),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const M=this.hasListeners(),N=!M&&Uv(t,n),A=M&&Hv(t,r,n,i);(N||A)&&(c={...c,...db(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:w}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===C(this,qa))p=C(this,eo);else try{H(this,qa,n.select),p=n.select(c.data),p=tp(s==null?void 0:s.data,p,n),H(this,eo,p),H(this,Bn,null)}catch(M){H(this,Bn,M)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&w==="pending"){let M;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=s.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((R=C(this,to))==null?void 0:R.state.data,C(this,to)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),H(this,Bn,null)}catch(N){H(this,Bn,N)}M!==void 0&&(w="success",p=tp(s==null?void 0:s.data,M,n),f=!0)}C(this,Bn)&&(m=C(this,Bn),p=C(this,eo),h=Date.now(),w="error");const y=c.fetchStatus==="fetching",x=w==="pending",b=w==="error",k=x&&y,T=p!==void 0,j={status:w,fetchStatus:c.fetchStatus,isPending:x,isSuccess:w==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:h,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:y,isRefetching:y&&!x,isLoadingError:b&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&T,isStale:lm(t,n),refetch:this.refetch,promise:C(this,Fr)};if(this.options.experimental_prefetchInRender){const M=W=>{j.status==="error"?W.reject(j.error):j.data!==void 0&&W.resolve(j.data)},N=()=>{const W=H(this,Fr,j.promise=np());M(W)},A=C(this,Fr);switch(A.status){case"pending":t.queryHash===r.queryHash&&M(A);break;case"fulfilled":(j.status==="error"||j.data!==A.value)&&N();break;case"rejected":(j.status!=="error"||j.error!==A.reason)&&N();break}}return j}updateResult(t){const n=C(this,yt),r=this.createResult(C(this,ce),this.options);if(H(this,Fi,C(this,ce).state),H(this,Js,this.options),C(this,Fi).data!==void 0&&H(this,to,C(this,ce)),Iu(r,n))return;H(this,yt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!C(this,no).size)return!0;const l=new Set(a??C(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(C(this,yt)).some(u=>{const d=u;return C(this,yt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,me,pb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,me,op).call(this)}},_t=new WeakMap,ce=new WeakMap,Wa=new WeakMap,yt=new WeakMap,Fi=new WeakMap,Js=new WeakMap,Fr=new WeakMap,Bn=new WeakMap,qa=new WeakMap,eo=new WeakMap,to=new WeakMap,Li=new WeakMap,Ii=new WeakMap,Lr=new WeakMap,no=new WeakMap,me=new WeakSet,Ho=function(t){se(this,me,up).call(this);let n=C(this,ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(rn)),n},rp=function(){se(this,me,ap).call(this);const t=Us(this.options.staleTime,C(this,ce));if(Yi||C(this,yt).isStale||!Jf(t))return;const r=ib(C(this,yt).dataUpdatedAt,t)+1;H(this,Li,setTimeout(()=>{C(this,yt).isStale||this.updateResult()},r))},ip=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,ce)):this.options.refetchInterval)??!1},sp=function(t){se(this,me,lp).call(this),H(this,Lr,t),!(Yi||kn(this.options.enabled,C(this,ce))===!1||!Jf(C(this,Lr))||C(this,Lr)===0)&&H(this,Ii,setInterval(()=>{(this.options.refetchIntervalInBackground||am.isFocused())&&se(this,me,Ho).call(this)},C(this,Lr)))},op=function(){se(this,me,rp).call(this),se(this,me,sp).call(this,se(this,me,ip).call(this))},ap=function(){C(this,Li)&&(clearTimeout(C(this,Li)),H(this,Li,void 0))},lp=function(){C(this,Ii)&&(clearInterval(C(this,Ii)),H(this,Ii,void 0))},up=function(){const t=C(this,_t).getQueryCache().build(C(this,_t),this.options);if(t===C(this,ce))return;const n=C(this,ce);H(this,ce,t),H(this,Wa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pb=function(t){We.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,yt))}),C(this,_t).getQueryCache().notify({query:C(this,ce),type:"observerResultsUpdated"})})},zx);function s2(e,t){return kn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Uv(e,t){return s2(e,t)||e.state.data!==void 0&&cp(e,t,t.refetchOnMount)}function cp(e,t,n){if(kn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lm(e,t)}return!1}function Hv(e,t,n,r){return(e!==t||kn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lm(e,n)}function lm(e,t){return kn(t.enabled,e)!==!1&&e.isStaleByTime(Us(t.staleTime,e))}function o2(e,t){return!Iu(e.getCurrentResult(),t)}var Ir,$r,jt,or,dr,tu,dp,Vx,a2=(Vx=class extends So{constructor(t,n){super();Z(this,dr);Z(this,Ir);Z(this,$r);Z(this,jt);Z(this,or);H(this,Ir,t),this.setOptions(n),this.bindMethods(),se(this,dr,tu).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=C(this,Ir).defaultMutationOptions(t),Iu(this.options,n)||C(this,Ir).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,jt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ki(n.mutationKey)!==Ki(this.options.mutationKey)?this.reset():((r=C(this,jt))==null?void 0:r.state.status)==="pending"&&C(this,jt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=C(this,jt))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,dr,tu).call(this),se(this,dr,dp).call(this,t)}getCurrentResult(){return C(this,$r)}reset(){var t;(t=C(this,jt))==null||t.removeObserver(this),H(this,jt,void 0),se(this,dr,tu).call(this),se(this,dr,dp).call(this)}mutate(t,n){var r;return H(this,or,n),(r=C(this,jt))==null||r.removeObserver(this),H(this,jt,C(this,Ir).getMutationCache().build(C(this,Ir),this.options)),C(this,jt).addObserver(this),C(this,jt).execute(t)}},Ir=new WeakMap,$r=new WeakMap,jt=new WeakMap,or=new WeakMap,dr=new WeakSet,tu=function(){var n;const t=((n=C(this,jt))==null?void 0:n.state)??fb();H(this,$r,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},dp=function(t){We.batch(()=>{var n,r,i,s,o,a,l,u;if(C(this,or)&&this.hasListeners()){const d=C(this,$r).variables,c=C(this,$r).context;(t==null?void 0:t.type)==="success"?((r=(n=C(this,or)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=C(this,or)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=C(this,or)).onError)==null||a.call(o,t.error,d,c),(u=(l=C(this,or)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(C(this,$r))})})},Vx),hb=v.createContext(void 0),mb=e=>{const t=v.useContext(hb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(hb.Provider,{value:e,children:t})),gb=v.createContext(!1),u2=()=>v.useContext(gb);gb.Provider;function c2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var d2=v.createContext(c2()),f2=()=>v.useContext(d2);function vb(e,t){return typeof e=="function"?e(...t):!!e}function fp(){}var p2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},h2=e=>{v.useEffect(()=>{e.clearReset()},[e])},m2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vb(n,[e.error,r]),g2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},v2=(e,t)=>e.isLoading&&e.isFetching&&!t,y2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function x2(e,t,n){var d,c,f,p,m;const r=mb(),i=u2(),s=f2(),o=r.defaultQueryOptions(e);(c=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||c.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",g2(o),p2(o,s),h2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(h=>{const w=i?fp:l.subscribe(We.batchCalls(h));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),y2(o,u))throw Wv(o,l,s);if(m2({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,u),o.experimental_prefetchInRender&&!Yi&&v2(u,i)){const h=a?Wv(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;h==null||h.catch(fp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function w2(e,t){return x2(e,i2)}function um(e,t){const n=mb(),[r]=v.useState(()=>new a2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(We.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(fp)},[r]);if(i.error&&vb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const b2=(e,t)=>w2({queryKey:["widgets",e,t],queryFn:()=>S2(e,t),retry:!1,throwOnError:!1}),S2=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await bo(n);if(i===204)throw new Error("User is banned");return r};var S=(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.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(S||{}),Y=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Y||{});function C2(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 kd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var s_=typeof WeakMap=="function"?WeakMap:Map;function Aw(e,t,n){n=dr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lu||(Lu=!0,Kf=r),Bf(e,t)},n}function Rw(e,t,n){n=dr(-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(){Bf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Bf(e,t),typeof r!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function xv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new s_;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=x_.bind(null,e,t,n),t.then(e,e))}function wv(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 bv(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=dr(-1,1),t.tag=2,Kr(n,t,1))),n.lanes|=1),e)}var o_=yr.ReactCurrentOwner,Nt=!1;function bt(e,t,n,r){t.child=e===null?sw(t,null,n,r):lo(t,e.child,n,r)}function Sv(e,t,n,r,i){n=n.render;var s=t.ref;return Us(t,i),r=Hh(e,t,n,r,s,i),n=Wh(),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gr(e,t,i)):(je&&n&&Oh(t),t.flags|=1,bt(e,t,r,i),t.child)}function Cv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!tm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Pw(e,t,s,r,i)):(e=ru(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:ba,n(o,r)&&e.ref===t.ref)return gr(e,t,i)}return t.flags|=1,e=Jr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Pw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ba(s,r)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Nt=!0);else return t.lanes=e.lanes,gr(e,t,i)}return zf(e,t,n,r,i)}function Ow(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},Ce(Os,Vt),Vt|=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,Ce(Os,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ce(Os,Vt),Vt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Ce(Os,Vt),Vt|=r;return bt(e,t,i,n),t.child}function Dw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zf(e,t,n,r,i){var s=Ft(n)?Gi:yt.current;return s=oo(t,s),Us(t,i),n=Hh(e,t,n,r,s,i),r=Wh(),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gr(e,t,i)):(je&&r&&Oh(t),t.flags|=1,bt(e,t,n,i),t.child)}function kv(e,t,n,r,i){if(Ft(n)){var s=!0;_u(t)}else s=!1;if(Us(t,i),t.stateNode===null)eu(e,t),jw(t,n,r),$f(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=fn(u):(u=Ft(n)?Gi:yt.current,u=oo(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&yv(t,o,r,u),Ar=!1;var f=t.memoizedState;o.state=f,Ou(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Mt.current||Ar?(typeof d=="function"&&(If(t,n,d,r),l=t.memoizedState),(a=Ar||vv(t,n,a,r,f,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,aw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:wn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=fn(l):(l=Ft(n)?Gi:yt.current,l=oo(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&yv(t,o,r,l),Ar=!1,f=t.memoizedState,o.state=f,Ou(t,r,o,i);var m=t.memoizedState;a!==c||f!==m||Mt.current||Ar?(typeof p=="function"&&(If(t,n,p,r),m=t.memoizedState),(u=Ar||vv(t,n,u,r,f,m,l)||!1)?(d||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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Vf(e,t,n,r,s,i)}function Vf(e,t,n,r,i,s){Dw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&uv(t,n,!1),gr(e,t,s);r=t.stateNode,o_.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=lo(t,e.child,null,s),t.child=lo(t,null,a,s)):bt(e,t,a,s),t.memoizedState=r.state,i&&uv(t,n,!0),t.child}function Nw(e){var t=e.stateNode;t.pendingContext?lv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lv(e,t.context,!1),Bh(e,t.containerInfo)}function Tv(e,t,n,r,i){return ao(),Nh(i),t.flags|=256,bt(e,t,n,r),t.child}var Uf={dehydrated:null,treeContext:null,retryLane:0};function Hf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mw(e,t,n){var r=t.pendingProps,i=Pe.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),Ce(Pe,i&1),e===null)return Ff(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=vc(o,r,0,null),e=Ui(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Hf(n),t.memoizedState=Uf,e):Qh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return a_(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=Jr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Jr(a,s):(s=Ui(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?Hf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Uf,r}return s=e.child,e=s.sibling,r=Jr(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 Qh(e,t){return t=vc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Al(e,t,n,r){return r!==null&&Nh(r),lo(t,e.child,null,n),e=Qh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function a_(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=kd(Error(B(422))),Al(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=vc({mode:"visible",children:r.children},i,0,null),s=Ui(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&lo(t,e.child,null,o),t.child.memoizedState=Hf(o),t.memoizedState=Uf,s);if(!(t.mode&1))return Al(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(B(419)),r=kd(s,r,void 0),Al(e,t,o,r)}if(a=(o&e.childLanes)!==0,Nt||a){if(r=et,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,mr(e,i),_n(r,e,i,-1))}return em(),r=kd(Error(B(421))),Al(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=w_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ut=Yr(i.nextSibling),qt=t,je=!0,kn=null,e!==null&&(sn[on++]=lr,sn[on++]=ur,sn[on++]=Qi,lr=e.id,ur=e.overflow,Qi=t),t=Qh(t,r.children),t.flags|=4096,t)}function Ev(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lf(e.return,t,n)}function Td(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 Fw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(bt(e,t,r.children,n),r=Pe.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&&Ev(e,n,t);else if(e.tag===19)Ev(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(Ce(Pe,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&&Du(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Td(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&&Du(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Td(t,!0,n,null,s);break;case"together":Td(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function eu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ki|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=Jr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Jr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function l_(e,t,n){switch(t.tag){case 3:Nw(t),ao();break;case 5:lw(t);break;case 1:Ft(t.type)&&_u(t);break;case 4:Bh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ce(Ru,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?Mw(e,t,n):(Ce(Pe,Pe.current&1),e=gr(e,t,n),e!==null?e.sibling:null);Ce(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Fw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ce(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Ow(e,t,n)}return gr(e,t,n)}var Lw,Wf,Iw,$w;Lw=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}};Wf=function(){};Iw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ri(qn.current);var s=null;switch(n){case"input":i=pf(e,i),r=pf(e,r),s=[];break;case"select":i=Me({},i,{value:void 0}),r=Me({},r,{value:void 0}),s=[];break;case"textarea":i=gf(e,i),r=gf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tu)}yf(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"&&(ha.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"&&(ha.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Te("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)}};$w=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lo(e,t){if(!je)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 ft(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 u_(e,t,n){var r=t.pendingProps;switch(Dh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return Ft(t.type)&&Eu(),ft(t),null;case 3:return r=t.stateNode,uo(),_e(Mt),_e(yt),Vh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(_l(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(Jf(kn),kn=null))),Wf(e,t),ft(t),null;case 5:zh(t);var i=Ri(Ea.current);if(n=t.type,e!==null&&t.stateNode!=null)Iw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return ft(t),null}if(e=Ri(qn.current),_l(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Vn]=t,r[ka]=s,e=(t.mode&1)!==0,n){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(i=0;i<Wo.length;i++)Te(Wo[i],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":Mg(r,s),Te("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Te("invalid",r);break;case"textarea":Lg(r,s),Te("invalid",r)}yf(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&&El(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&El(r.textContent,a,e),i=["children",""+a]):ha.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Te("scroll",r)}switch(n){case"input":yl(r),Fg(r,s,!0);break;case"textarea":yl(r),Ig(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Tu)}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=p1(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[Vn]=t,e[ka]=r,Lw(e,t,!1,!1),t.stateNode=e;e:{switch(o=xf(n,r),n){case"dialog":Te("cancel",e),Te("close",e),i=r;break;case"iframe":case"object":case"embed":Te("load",e),i=r;break;case"video":case"audio":for(i=0;i<Wo.length;i++)Te(Wo[i],e);i=r;break;case"source":Te("error",e),i=r;break;case"img":case"image":case"link":Te("error",e),Te("load",e),i=r;break;case"details":Te("toggle",e),i=r;break;case"input":Mg(e,r),i=pf(e,r),Te("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Me({},r,{value:void 0}),Te("invalid",e);break;case"textarea":Lg(e,r),i=gf(e,r),Te("invalid",e);break;default:i=r}yf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?g1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ma(e,l):typeof l=="number"&&ma(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ha.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Te("scroll",e):l!=null&&yh(e,s,l,o))}switch(n){case"input":yl(e),Fg(e,r,!1);break;case"textarea":yl(e),Ig(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ii(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?$s(e,!!r.multiple,s,!1):r.defaultValue!=null&&$s(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Tu)}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 ft(t),null;case 6:if(e&&t.stateNode!=null)$w(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=Ri(Ea.current),Ri(qn.current),_l(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vn]=t,(s=r.nodeValue!==n)&&(e=qt,e!==null))switch(e.tag){case 3:El(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&El(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vn]=t,t.stateNode=r}return ft(t),null;case 13:if(_e(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&Ut!==null&&t.mode&1&&!(t.flags&128))rw(),ao(),t.flags|=98560,s=!1;else if(s=_l(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(B(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(B(317));s[Vn]=t}else ao(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ft(t),s=!1}else kn!==null&&(Jf(kn),kn=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||Pe.current&1?Qe===0&&(Qe=3):em())),t.updateQueue!==null&&(t.flags|=4),ft(t),null);case 4:return uo(),Wf(e,t),e===null&&Sa(t.stateNode.containerInfo),ft(t),null;case 10:return Lh(t.type._context),ft(t),null;case 17:return Ft(t.type)&&Eu(),ft(t),null;case 19:if(_e(Pe),s=t.memoizedState,s===null)return ft(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Lo(s,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Du(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 Ce(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ve()>fo&&(t.flags|=128,r=!0,Lo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Du(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&&!je)return ft(t),null}else 2*Ve()-s.renderingStartTime>fo&&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=Ve(),t.sibling=null,n=Pe.current,Ce(Pe,r?n&1|2:n&1),t):(ft(t),null);case 22:case 23:return Jh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function c_(e,t){switch(Dh(t),t.tag){case 1:return Ft(t.type)&&Eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uo(),_e(Mt),_e(yt),Vh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zh(t),null;case 13:if(_e(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));ao()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Pe),null;case 4:return uo(),null;case 10:return Lh(t.type._context),null;case 22:case 23:return Jh(),null;case 24:return null;default:return null}}var Rl=!1,mt=!1,d_=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ie(e,t,r)}else n.current=null}function qf(e,t,n){try{n()}catch(r){Ie(e,t,r)}}var _v=!1;function f_(e,t){if(Af=Su,e=H1(),Ph(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,d=0,c=e,f=null;t:for(;;){for(var p;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),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++d===r&&(l=o),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},Su=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;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 g=m.memoizedProps,x=m.memoizedState,y=t.stateNode,w=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:wn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(k){Ie(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return m=_v,_v=!1,m}function na(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&&qf(t,n,s)}i=i.next}while(i!==r)}}function mc(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 Gf(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 Bw(e){var t=e.alternate;t!==null&&(e.alternate=null,Bw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vn],delete t[ka],delete t[Df],delete t[QE],delete t[YE])),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 zw(e){return e.tag===5||e.tag===3||e.tag===4}function jv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zw(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 Qf(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=Tu));else if(r!==4&&(e=e.child,e!==null))for(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}function Yf(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(Yf(e,t,n),e=e.sibling;e!==null;)Yf(e,t,n),e=e.sibling}var st=null,Sn=!1;function Tr(e,t,n){for(n=n.child;n!==null;)Vw(e,t,n),n=n.sibling}function Vw(e,t,n){if(Wn&&typeof Wn.onCommitFiberUnmount=="function")try{Wn.onCommitFiberUnmount(ac,n)}catch{}switch(n.tag){case 5:mt||Ps(n,t);case 6:var r=st,i=Sn;st=null,Tr(e,t,n),st=r,Sn=i,st!==null&&(Sn?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(Sn?(e=st,n=n.stateNode,e.nodeType===8?yd(e.parentNode,n):e.nodeType===1&&yd(e,n),xa(e)):yd(st,n.stateNode));break;case 4:r=st,i=Sn,st=n.stateNode.containerInfo,Sn=!0,Tr(e,t,n),st=r,Sn=i;break;case 0:case 11:case 14:case 15:if(!mt&&(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)&&qf(n,t,o),i=i.next}while(i!==r)}Tr(e,t,n);break;case 1:if(!mt&&(Ps(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ie(n,t,a)}Tr(e,t,n);break;case 21:Tr(e,t,n);break;case 22:n.mode&1?(mt=(r=mt)||n.memoizedState!==null,Tr(e,t,n),mt=r):Tr(e,t,n);break;default:Tr(e,t,n)}}function Av(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new d_),t.forEach(function(r){var i=b_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vn(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:st=a.stateNode,Sn=!1;break e;case 3:st=a.stateNode.containerInfo,Sn=!0;break e;case 4:st=a.stateNode.containerInfo,Sn=!0;break e}a=a.return}if(st===null)throw Error(B(160));Vw(s,o,i),st=null,Sn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ie(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Uw(t,e),t=t.sibling}function Uw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vn(t,e),On(e),r&4){try{na(3,e,e.return),mc(3,e)}catch(g){Ie(e,e.return,g)}try{na(5,e,e.return)}catch(g){Ie(e,e.return,g)}}break;case 1:vn(t,e),On(e),r&512&&n!==null&&Ps(n,n.return);break;case 5:if(vn(t,e),On(e),r&512&&n!==null&&Ps(n,n.return),e.flags&32){var i=e.stateNode;try{ma(i,"")}catch(g){Ie(e,e.return,g)}}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&&d1(i,s),xf(a,o);var u=xf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?g1(i,c):d==="dangerouslySetInnerHTML"?h1(i,c):d==="children"?ma(i,c):yh(i,d,c,u)}switch(a){case"input":hf(i,s);break;case"textarea":f1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?$s(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?$s(i,!!s.multiple,s.defaultValue,!0):$s(i,!!s.multiple,s.multiple?[]:"",!1))}i[ka]=s}catch(g){Ie(e,e.return,g)}}break;case 6:if(vn(t,e),On(e),r&4){if(e.stateNode===null)throw Error(B(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(g){Ie(e,e.return,g)}}break;case 3:if(vn(t,e),On(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xa(t.containerInfo)}catch(g){Ie(e,e.return,g)}break;case 4:vn(t,e),On(e);break;case 13:vn(t,e),On(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Xh=Ve())),r&4&&Av(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mt=(u=mt)||d,vn(t,e),mt=u):vn(t,e),On(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Q=e,d=e.child;d!==null;){for(c=Q=d;Q!==null;){switch(f=Q,p=f.child,f.tag){case 0:case 11:case 14:case 15:na(4,f,f.return);break;case 1:Ps(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Ie(r,n,g)}}break;case 5:Ps(f,f.return);break;case 22:if(f.memoizedState!==null){Pv(c);continue}}p!==null?(p.return=f,Q=p):Pv(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=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=m1("display",o))}catch(g){Ie(e,e.return,g)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(g){Ie(e,e.return,g)}}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;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:vn(t,e),On(e),r&4&&Av(e);break;case 21:break;default:vn(t,e),On(e)}}function On(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(zw(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ma(i,""),r.flags&=-33);var s=jv(e);Yf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=jv(e);Qf(e,a,o);break;default:throw Error(B(161))}}catch(l){Ie(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function p_(e,t,n){Q=e,Hw(e)}function Hw(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var i=Q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Rl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||mt;a=Rl;var u=mt;if(Rl=o,(mt=l)&&!u)for(Q=i;Q!==null;)o=Q,l=o.child,o.tag===22&&o.memoizedState!==null?Ov(i):l!==null?(l.return=o,Q=l):Ov(i);for(;s!==null;)Q=s,Hw(s),s=s.sibling;Q=i,Rl=a,mt=u}Rv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Q=s):Rv(e)}}function Rv(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mt||mc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:wn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&hv(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}hv(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 d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&xa(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}mt||t.flags&512&&Gf(t)}catch(f){Ie(t,t.return,f)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Pv(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Ov(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mc(4,t)}catch(l){Ie(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ie(t,i,l)}}var s=t.return;try{Gf(t)}catch(l){Ie(t,s,l)}break;case 5:var o=t.return;try{Gf(t)}catch(l){Ie(t,o,l)}}}catch(l){Ie(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var h_=Math.ceil,Fu=yr.ReactCurrentDispatcher,Yh=yr.ReactCurrentOwner,un=yr.ReactCurrentBatchConfig,me=0,et=null,Ue=null,at=0,Vt=0,Os=di(0),Qe=0,Ra=null,Ki=0,gc=0,Kh=0,ra=null,Ot=null,Xh=0,fo=1/0,ir=null,Lu=!1,Kf=null,Xr=null,Pl=!1,Ur=null,Iu=0,ia=0,Xf=null,tu=-1,nu=0;function kt(){return me&6?Ve():tu!==-1?tu:tu=Ve()}function Zr(e){return e.mode&1?me&2&&at!==0?at&-at:XE.transition!==null?(nu===0&&(nu=j1()),nu):(e=ye,e!==0||(e=window.event,e=e===void 0?16:M1(e.type)),e):1}function _n(e,t,n,r){if(50<ia)throw ia=0,Xf=null,Error(B(185));Za(e,n,r),(!(me&2)||e!==et)&&(e===et&&(!(me&2)&&(gc|=n),Qe===4&&Or(e,at)),Lt(e,r),n===1&&me===0&&!(t.mode&1)&&(fo=Ve()+500,fc&&fi()))}function Lt(e,t){var n=e.callbackNode;XT(e,t);var r=bu(e,e===et?at:0);if(r===0)n!==null&&zg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zg(n),t===1)e.tag===0?KE(Dv.bind(null,e)):ew(Dv.bind(null,e)),qE(function(){!(me&6)&&fi()}),n=null;else{switch(A1(r)){case 1:n=Ch;break;case 4:n=E1;break;case 16:n=wu;break;case 536870912:n=_1;break;default:n=wu}n=Zw(n,Ww.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ww(e,t){if(tu=-1,nu=0,me&6)throw Error(B(327));var n=e.callbackNode;if(Hs()&&e.callbackNode!==n)return null;var r=bu(e,e===et?at:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=$u(e,r);else{t=r;var i=me;me|=2;var s=Gw();(et!==e||at!==t)&&(ir=null,fo=Ve()+500,Vi(e,t));do try{v_();break}catch(a){qw(e,a)}while(!0);Fh(),Fu.current=s,me=i,Ue!==null?t=0:(et=null,at=0,t=Qe)}if(t!==0){if(t===2&&(i=kf(e),i!==0&&(r=i,t=Zf(e,i))),t===1)throw n=Ra,Vi(e,0),Or(e,r),Lt(e,Ve()),n;if(t===6)Or(e,r);else{if(i=e.current.alternate,!(r&30)&&!m_(i)&&(t=$u(e,r),t===2&&(s=kf(e),s!==0&&(r=s,t=Zf(e,s))),t===1))throw n=Ra,Vi(e,0),Or(e,r),Lt(e,Ve()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:Ci(e,Ot,ir);break;case 3:if(Or(e,r),(r&130023424)===r&&(t=Xh+500-Ve(),10<t)){if(bu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){kt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Of(Ci.bind(null,e,Ot,ir),t);break}Ci(e,Ot,ir);break;case 4:if(Or(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-En(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*h_(r/1960))-r,10<r){e.timeoutHandle=Of(Ci.bind(null,e,Ot,ir),r);break}Ci(e,Ot,ir);break;case 5:Ci(e,Ot,ir);break;default:throw Error(B(329))}}}return Lt(e,Ve()),e.callbackNode===n?Ww.bind(null,e):null}function Zf(e,t){var n=ra;return e.current.memoizedState.isDehydrated&&(Vi(e,t).flags|=256),e=$u(e,t),e!==2&&(t=Ot,Ot=n,t!==null&&Jf(t)),e}function Jf(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function m_(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(!jn(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 Or(e,t){for(t&=~Kh,t&=~gc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-En(t),r=1<<n;e[n]=-1,t&=~r}}function Dv(e){if(me&6)throw Error(B(327));Hs();var t=bu(e,0);if(!(t&1))return Lt(e,Ve()),null;var n=$u(e,t);if(e.tag!==0&&n===2){var r=kf(e);r!==0&&(t=r,n=Zf(e,r))}if(n===1)throw n=Ra,Vi(e,0),Or(e,t),Lt(e,Ve()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ci(e,Ot,ir),Lt(e,Ve()),null}function Zh(e,t){var n=me;me|=1;try{return e(t)}finally{me=n,me===0&&(fo=Ve()+500,fc&&fi())}}function Xi(e){Ur!==null&&Ur.tag===0&&!(me&6)&&Hs();var t=me;me|=1;var n=un.transition,r=ye;try{if(un.transition=null,ye=1,e)return e()}finally{ye=r,un.transition=n,me=t,!(me&6)&&fi()}}function Jh(){Vt=Os.current,_e(Os)}function Vi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,WE(n)),Ue!==null)for(n=Ue.return;n!==null;){var r=n;switch(Dh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Eu();break;case 3:uo(),_e(Mt),_e(yt),Vh();break;case 5:zh(r);break;case 4:uo();break;case 13:_e(Pe);break;case 19:_e(Pe);break;case 10:Lh(r.type._context);break;case 22:case 23:Jh()}n=n.return}if(et=e,Ue=e=Jr(e.current,null),at=Vt=t,Qe=0,Ra=null,Kh=gc=Ki=0,Ot=ra=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 qw(e,t){do{var n=Ue;try{if(Fh(),Zl.current=Mu,Nu){for(var r=Ne.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Nu=!1}if(Yi=0,Je=qe=Ne=null,ta=!1,_a=0,Yh.current=null,n===null||n.return===null){Qe=1,Ra=t,Ue=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=at,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=wv(o);if(p!==null){p.flags&=-257,bv(p,o,a,s,t),p.mode&1&&xv(s,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if(!(t&1)){xv(s,u,t),em();break e}l=Error(B(426))}}else if(je&&a.mode&1){var x=wv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),bv(x,o,a,s,t),Nh(co(l,a));break e}}s=l=co(l,a),Qe!==4&&(Qe=2),ra===null?ra=[s]:ra.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Aw(s,l,t);pv(s,y);break e;case 1:a=l;var w=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xr===null||!Xr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=Rw(s,a,t);pv(s,k);break e}}s=s.return}while(s!==null)}Yw(n)}catch(T){t=T,Ue===n&&n!==null&&(Ue=n=n.return);continue}break}while(!0)}function Gw(){var e=Fu.current;return Fu.current=Mu,e===null?Mu:e}function em(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),et===null||!(Ki&268435455)&&!(gc&268435455)||Or(et,at)}function $u(e,t){var n=me;me|=2;var r=Gw();(et!==e||at!==t)&&(ir=null,Vi(e,t));do try{g_();break}catch(i){qw(e,i)}while(!0);if(Fh(),me=n,Fu.current=r,Ue!==null)throw Error(B(261));return et=null,at=0,Qe}function g_(){for(;Ue!==null;)Qw(Ue)}function v_(){for(;Ue!==null&&!VT();)Qw(Ue)}function Qw(e){var t=Xw(e.alternate,e,Vt);e.memoizedProps=e.pendingProps,t===null?Yw(e):Ue=t,Yh.current=null}function Yw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=c_(n,t),n!==null){n.flags&=32767,Ue=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Ue=null;return}}else if(n=u_(n,t,Vt),n!==null){Ue=n;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);Qe===0&&(Qe=5)}function Ci(e,t,n){var r=ye,i=un.transition;try{un.transition=null,ye=1,y_(e,t,n,r)}finally{un.transition=i,ye=r}return null}function y_(e,t,n,r){do Hs();while(Ur!==null);if(me&6)throw Error(B(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(B(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ZT(e,s),e===et&&(Ue=et=null,at=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Pl||(Pl=!0,Zw(wu,function(){return Hs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=un.transition,un.transition=null;var o=ye;ye=1;var a=me;me|=4,Yh.current=null,f_(e,n),Uw(n,e),IE(Rf),Su=!!Af,Rf=Af=null,e.current=n,p_(n),UT(),me=a,ye=o,un.transition=s}else e.current=n;if(Pl&&(Pl=!1,Ur=e,Iu=i),s=e.pendingLanes,s===0&&(Xr=null),qT(n.stateNode),Lt(e,Ve()),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(Lu)throw Lu=!1,e=Kf,Kf=null,e;return Iu&1&&e.tag!==0&&Hs(),s=e.pendingLanes,s&1?e===Xf?ia++:(ia=0,Xf=e):ia=0,fi(),null}function Hs(){if(Ur!==null){var e=A1(Iu),t=un.transition,n=ye;try{if(un.transition=null,ye=16>e?16:e,Ur===null)var r=!1;else{if(e=Ur,Ur=null,Iu=0,me&6)throw Error(B(331));var i=me;for(me|=4,Q=e.current;Q!==null;){var s=Q,o=s.child;if(Q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Q=u;Q!==null;){var d=Q;switch(d.tag){case 0:case 11:case 15:na(8,d,s)}var c=d.child;if(c!==null)c.return=d,Q=c;else for(;Q!==null;){d=Q;var f=d.sibling,p=d.return;if(Bw(d),d===u){Q=null;break}if(f!==null){f.return=p,Q=f;break}Q=p}}}var m=s.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}Q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Q=o;else e:for(;Q!==null;){if(s=Q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:na(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,Q=y;break e}Q=s.return}}var w=e.current;for(Q=w;Q!==null;){o=Q;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,Q=b;else e:for(o=w;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:mc(9,a)}}catch(T){Ie(a,a.return,T)}if(a===o){Q=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,Q=k;break e}Q=a.return}}if(me=i,fi(),Wn&&typeof Wn.onPostCommitFiberRoot=="function")try{Wn.onPostCommitFiberRoot(ac,e)}catch{}r=!0}return r}finally{ye=n,un.transition=t}}return!1}function Nv(e,t,n){t=co(n,t),t=Aw(e,t,1),e=Kr(e,t,1),t=kt(),e!==null&&(Za(e,1,t),Lt(e,t))}function Ie(e,t,n){if(e.tag===3)Nv(e,e,n);else for(;t!==null;){if(t.tag===3){Nv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xr===null||!Xr.has(r))){e=co(n,e),e=Rw(t,e,1),t=Kr(t,e,1),e=kt(),t!==null&&(Za(t,1,e),Lt(t,e));break}}t=t.return}}function x_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=kt(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(at&n)===n&&(Qe===4||Qe===3&&(at&130023424)===at&&500>Ve()-Xh?Vi(e,0):Kh|=n),Lt(e,t)}function Kw(e,t){t===0&&(e.mode&1?(t=bl,bl<<=1,!(bl&130023424)&&(bl=4194304)):t=1);var n=kt();e=mr(e,t),e!==null&&(Za(e,t,n),Lt(e,n))}function w_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kw(e,n)}function b_(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(B(314))}r!==null&&r.delete(t),Kw(e,n)}var Xw;Xw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Nt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Nt=!1,l_(e,t,n);Nt=!!(e.flags&131072)}else Nt=!1,je&&t.flags&1048576&&tw(t,Au,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;eu(e,t),e=t.pendingProps;var i=oo(t,yt.current);Us(t,n),i=Hh(null,t,r,e,i,n);var s=Wh();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,Ft(r)?(s=!0,_u(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$h(t),i.updater=hc,t.stateNode=i,i._reactInternals=t,$f(t,r,e,n),t=Vf(null,t,r,!0,s,n)):(t.tag=0,je&&s&&Oh(t),bt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(eu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=C_(r),e=wn(r,e),i){case 0:t=zf(null,t,r,e,n);break e;case 1:t=kv(null,t,r,e,n);break e;case 11:t=Sv(null,t,r,e,n);break e;case 14:t=Cv(null,t,r,wn(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),zf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),kv(e,t,r,i,n);case 3:e:{if(Nw(t),e===null)throw Error(B(387));r=t.pendingProps,s=t.memoizedState,i=s.element,aw(e,t),Ou(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=co(Error(B(423)),t),t=Tv(e,t,r,n,i);break e}else if(r!==i){i=co(Error(B(424)),t),t=Tv(e,t,r,n,i);break e}else for(Ut=Yr(t.stateNode.containerInfo.firstChild),qt=t,je=!0,kn=null,n=sw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ao(),r===i){t=gr(e,t,n);break e}bt(e,t,r,n)}t=t.child}return t;case 5:return lw(t),e===null&&Ff(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Pf(r,i)?o=null:s!==null&&Pf(r,s)&&(t.flags|=32),Dw(e,t),bt(e,t,o,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return Mw(e,t,n);case 4:return Bh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):bt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),Sv(e,t,r,i,n);case 7:return bt(e,t,t.pendingProps,n),t.child;case 8:return bt(e,t,t.pendingProps.children,n),t.child;case 12:return bt(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,Ce(Ru,r._currentValue),r._currentValue=o,s!==null)if(jn(s.value,o)){if(s.children===i.children&&!Mt.current){t=gr(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=dr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Lf(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(B(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Lf(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}bt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Us(t,n),i=fn(i),r=r(i),t.flags|=1,bt(e,t,r,n),t.child;case 14:return r=t.type,i=wn(r,t.pendingProps),i=wn(r.type,i),Cv(e,t,r,i,n);case 15:return Pw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),eu(e,t),t.tag=1,Ft(r)?(e=!0,_u(t)):e=!1,Us(t,n),jw(t,r,i),$f(t,r,i,n),Vf(null,t,r,!0,e,n);case 19:return Fw(e,t,n);case 22:return Ow(e,t,n)}throw Error(B(156,t.tag))};function Zw(e,t){return T1(e,t)}function S_(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 ln(e,t,n,r){return new S_(e,t,n,r)}function tm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function C_(e){if(typeof e=="function")return tm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wh)return 11;if(e===bh)return 14}return 2}function Jr(e,t){var n=e.alternate;return n===null?(n=ln(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 ru(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")tm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ss:return Ui(n.children,i,s,t);case xh:o=8,i|=8;break;case uf:return e=ln(12,n,t,i|2),e.elementType=uf,e.lanes=s,e;case cf:return e=ln(13,n,t,i),e.elementType=cf,e.lanes=s,e;case df:return e=ln(19,n,t,i),e.elementType=df,e.lanes=s,e;case l1:return vc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o1:o=10;break e;case a1:o=9;break e;case wh:o=11;break e;case bh:o=14;break e;case jr:o=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=ln(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ui(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function vc(e,t,n,r){return e=ln(22,e,r,t),e.elementType=l1,e.lanes=n,e.stateNode={isHidden:!1},e}function Ed(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function _d(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function k_(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=ad(0),this.expirationTimes=ad(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ad(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nm(e,t,n,r,i,s,o,a,l){return e=new k_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ln(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$h(s),e}function T_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Jw(e){if(!e)return si;e=e._reactInternals;e:{if(rs(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(Ft(n))return J1(e,n,t)}return t}function eb(e,t,n,r,i,s,o,a,l){return e=nm(n,r,!0,e,i,s,o,a,l),e.context=Jw(null),n=e.current,r=kt(),i=Zr(n),s=dr(r,i),s.callback=t??null,Kr(n,s,i),e.current.lanes=i,Za(e,i,r),Lt(e,r),e}function yc(e,t,n,r){var i=t.current,s=kt(),o=Zr(i);return n=Jw(n),t.context===null?t.context=n:t.pendingContext=n,t=dr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Kr(i,t,o),e!==null&&(_n(e,i,o,s),Xl(e,i,o)),o}function Bu(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 Mv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rm(e,t){Mv(e,t),(e=e.alternate)&&Mv(e,t)}function E_(){return null}var tb=typeof reportError=="function"?reportError:function(e){console.error(e)};function im(e){this._internalRoot=e}xc.prototype.render=im.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));yc(e,t,null,null)};xc.prototype.unmount=im.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xi(function(){yc(null,e,null,null)}),t[hr]=null}};function xc(e){this._internalRoot=e}xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pr.length&&t!==0&&t<Pr[n].priority;n++);Pr.splice(n,0,e),n===0&&N1(e)}};function sm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Fv(){}function __(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Bu(o);s.call(u)}}var o=eb(t,r,e,0,null,!1,!1,"",Fv);return e._reactRootContainer=o,e[hr]=o.current,Sa(e.nodeType===8?e.parentNode:e),Xi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Bu(l);a.call(u)}}var l=nm(e,0,!1,null,null,!1,!1,"",Fv);return e._reactRootContainer=l,e[hr]=l.current,Sa(e.nodeType===8?e.parentNode:e),Xi(function(){yc(t,l,n,r)}),l}function bc(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=Bu(o);a.call(l)}}yc(t,o,e,i)}else o=__(n,t,e,i,r);return Bu(o)}R1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ho(t.pendingLanes);n!==0&&(kh(t,n|1),Lt(t,Ve()),!(me&6)&&(fo=Ve()+500,fi()))}break;case 13:Xi(function(){var r=mr(e,1);if(r!==null){var i=kt();_n(r,e,1,i)}}),rm(e,1)}};Th=function(e){if(e.tag===13){var t=mr(e,134217728);if(t!==null){var n=kt();_n(t,e,134217728,n)}rm(e,134217728)}};P1=function(e){if(e.tag===13){var t=Zr(e),n=mr(e,t);if(n!==null){var r=kt();_n(n,e,t,r)}rm(e,t)}};O1=function(){return ye};D1=function(e,t){var n=ye;try{return ye=e,t()}finally{ye=n}};bf=function(e,t,n){switch(t){case"input":if(hf(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=dc(r);if(!i)throw Error(B(90));c1(r),hf(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&$s(e,!!n.multiple,t,!1)}};x1=Zh;w1=Xi;var j_={usingClientEntryPoint:!1,Events:[el,Es,dc,v1,y1,Zh]},Io={findFiberByHostInstance:ji,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},A_={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=C1(e),e===null?null:e.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||E_,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 Ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ol.isDisabled&&Ol.supportsFiber)try{ac=Ol.inject(A_),Wn=Ol}catch{}}Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j_;Qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sm(t))throw Error(B(200));return T_(e,t,null,n)};Qt.createRoot=function(e,t){if(!sm(e))throw Error(B(299));var n=!1,r="",i=tb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=nm(e,1,!1,null,null,n,!1,r,i),e[hr]=t.current,Sa(e.nodeType===8?e.parentNode:e),new im(t)};Qt.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(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=C1(t),e=e===null?null:e.stateNode,e};Qt.flushSync=function(e){return Xi(e)};Qt.hydrate=function(e,t,n){if(!wc(t))throw Error(B(200));return bc(null,e,t,!0,n)};Qt.hydrateRoot=function(e,t,n){if(!sm(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=tb;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=eb(t,null,e,1,n??null,i,!1,s,o),e[hr]=t.current,Sa(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 xc(t)};Qt.render=function(e,t,n){if(!wc(t))throw Error(B(200));return bc(null,e,t,!1,n)};Qt.unmountComponentAtNode=function(e){if(!wc(e))throw Error(B(40));return e._reactRootContainer?(Xi(function(){bc(null,null,e,!1,function(){e._reactRootContainer=null,e[hr]=null})}),!0):!1};Qt.unstable_batchedUpdates=Zh;Qt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!wc(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return bc(e,t,n,!1,r)};Qt.version="18.3.1-next-f1338f8080-20240426";function nb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nb)}catch(e){console.error(e)}}nb(),n1.exports=Qt;var rb=n1.exports;const R_=ts(rb);var ib,Lv=rb;ib=Lv.createRoot,Lv.hydrateRoot;const P_="@alfatech/livechat",O_="v2025.12.15.4",D_="module",N_="https://api-live.alfatek.dev",M_="wss://api-live.alfatek.dev",F_=["dist","README.md","component/chatier.js"],L_="dist/widget.js",I_={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},$_={"@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","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},B_={"@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"},sb={name:P_,private:!1,version:O_,type:D_,apiURL:N_,wsURL:M_,files:F_,main:L_,scripts:I_,dependencies:$_,devDependencies:B_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},z_=sb.apiURL,V_=sb.wsURL,U_=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],H_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],W_={429:U_,404:H_};async function xr(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${z_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=W_[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 oi=e=>[200,201,204].includes(e),q_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var Co=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(){}},Zi=typeof window>"u"||"Deno"in globalThis;function rn(){}function G_(e,t){return typeof e=="function"?e(t):e}function ep(e){return typeof e=="number"&&e>=0&&e!==1/0}function ob(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ws(e,t){return typeof e=="function"?e(t):e}function Tn(e,t){return typeof e=="function"?e(t):e}function Iv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==om(o,t.options))return!1}else if(!Pa(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 $v(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ji(t.options.mutationKey)!==Ji(s))return!1}else if(!Pa(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function om(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ji)(e)}function Ji(e){return JSON.stringify(e,(t,n)=>tp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Pa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Pa(e[n],t[n])):!1}function ab(e,t){if(e===t)return e;const n=Bv(e)&&Bv(t);if(n||tp(e)&&tp(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 d=n?u:s[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=ab(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function zu(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 Bv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tp(e){if(!zv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!zv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function Q_(e){return new Promise(t=>{setTimeout(t,e)})}function np(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ab(e,t):t}function Y_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function K_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var am=Symbol();function lb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===am?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Mi,Dr,qs,Mx,X_=(Mx=class extends Co{constructor(){super();te(this,Mi);te(this,Dr);te(this,qs);q(this,qs,t=>{if(!Zi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Dr)||this.setEventListener(C(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Dr))==null||t.call(this),q(this,Dr,void 0))}setEventListener(t){var n;q(this,qs,t),(n=C(this,Dr))==null||n.call(this),q(this,Dr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,Mi)!==t&&(q(this,Mi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,Mi)=="boolean"?C(this,Mi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Mi=new WeakMap,Dr=new WeakMap,qs=new WeakMap,Mx),lm=new X_,Gs,Nr,Qs,Fx,Z_=(Fx=class extends Co{constructor(){super();te(this,Gs,!0);te(this,Nr);te(this,Qs);q(this,Qs,t=>{if(!Zi&&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(){C(this,Nr)||this.setEventListener(C(this,Qs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Nr))==null||t.call(this),q(this,Nr,void 0))}setEventListener(t){var n;q(this,Qs,t),(n=C(this,Nr))==null||n.call(this),q(this,Nr,t(this.setOnline.bind(this)))}setOnline(t){C(this,Gs)!==t&&(q(this,Gs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,Gs)}},Gs=new WeakMap,Nr=new WeakMap,Qs=new WeakMap,Fx),Vu=new Z_;function rp(){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 J_(e){return Math.min(1e3*2**e,3e4)}function ub(e){return(e??"online")==="online"?Vu.isOnline():!0}var cb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jd(e){return e instanceof cb}function db(e){let t=!1,n=0,r=!1,i;const s=rp(),o=g=>{var x;r||(f(new cb(g)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>lm.isFocused()&&(e.networkMode==="always"||Vu.isOnline())&&e.canRun(),d=()=>ub(e.networkMode)&&e.canRun(),c=g=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,g),i==null||i(),s.resolve(g))},f=g=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,g),i==null||i(),s.reject(g))},p=()=>new Promise(g=>{var x;i=y=>{(r||u())&&g(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;i=void 0,r||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(r)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(c).catch(y=>{var E;if(r)return;const w=e.retry??(Zi?0:3),b=e.retryDelay??J_,k=typeof b=="function"?b(n,y):b,T=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,y);if(t||!T){f(y);return}n++,(E=e.onFail)==null||E.call(e,n,y),Q_(k).then(()=>u()?void 0:p()).then(()=>{t?f(y):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():p().then(m),s)}}function e2(){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 Ge=e2(),Fi,Lx,fb=(Lx=class{constructor(){te(this,Fi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ep(this.gcTime)&&q(this,Fi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zi?1/0:5*60*1e3))}clearGcTimeout(){C(this,Fi)&&(clearTimeout(C(this,Fi)),q(this,Fi,void 0))}},Fi=new WeakMap,Lx),Ys,Ks,nn,pt,Ga,Li,bn,rr,Ix,t2=(Ix=class extends fb{constructor(t){super();te(this,bn);te(this,Ys);te(this,Ks);te(this,nn);te(this,pt);te(this,Ga);te(this,Li);q(this,Li,!1),q(this,Ga,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,nn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Ys,n2(this.options)),this.state=t.state??C(this,Ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,pt))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Ga),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,nn).remove(this)}setData(t,n){const r=np(this.state.data,t,this.options);return ue(this,bn,rr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ue(this,bn,rr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,pt))==null?void 0:r.promise;return(i=C(this,pt))==null||i.cancel(t),n?n.then(rn).catch(rn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Ys))}isActive(){return this.observers.some(t=>Tn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===am||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||!ob(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,pt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,pt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,nn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,pt)&&(C(this,Li)?C(this,pt).cancel({revert:!0}):C(this,pt).cancelRetry()),this.scheduleGc()),C(this,nn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ue(this,bn,rr).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,pt))return C(this,pt).continueRetry(),C(this,pt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(q(this,Li,!0),r.signal)})},s=()=>{const c=lb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),q(this,Li,!1),this.options.persister?this.options.persister(c,f,this):c(f)},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),q(this,Ks,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ue(this,bn,rr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,m,g;jd(c)&&c.silent||ue(this,bn,rr).call(this,{type:"error",error:c}),jd(c)||((p=(f=C(this,nn).config).onError)==null||p.call(f,c,this),(g=(m=C(this,nn).config).onSettled)==null||g.call(m,this.state.data,c,this)),this.scheduleGc()};return q(this,pt,db({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,m,g;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(x){a(x);return}(p=(f=C(this,nn).config).onSuccess)==null||p.call(f,c,this),(g=(m=C(this,nn).config).onSettled)==null||g.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{ue(this,bn,rr).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{ue(this,bn,rr).call(this,{type:"pause"})},onContinue:()=>{ue(this,bn,rr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),C(this,pt).start()}},Ys=new WeakMap,Ks=new WeakMap,nn=new WeakMap,pt=new WeakMap,Ga=new WeakMap,Li=new WeakMap,bn=new WeakSet,rr=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,...pb(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 jd(i)&&i.revert&&C(this,Ks)?{...C(this,Ks),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),Ge.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,nn).notify({query:this,type:"updated",action:t})})},Ix);function pb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ub(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function n2(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 In,$x,r2=($x=class extends Co{constructor(t={}){super();te(this,In);this.config=t,q(this,In,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??om(i,n);let o=this.get(s);return o||(o=new t2({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,In).has(t.queryHash)||(C(this,In).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,In).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,In).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,In).get(t)}getAll(){return[...C(this,In).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Iv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Iv(t,r)):n}notify(t){Ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},In=new WeakMap,$x),$n,xt,Ii,Bn,Er,Bx,i2=(Bx=class extends fb{constructor(t){super();te(this,Bn);te(this,$n);te(this,xt);te(this,Ii);this.mutationId=t.mutationId,q(this,xt,t.mutationCache),q(this,$n,[]),this.state=t.state||hb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,$n).includes(t)||(C(this,$n).push(t),this.clearGcTimeout(),C(this,xt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,$n,C(this,$n).filter(n=>n!==t)),this.scheduleGc(),C(this,xt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,$n).length||(this.state.status==="pending"?this.scheduleGc():C(this,xt).remove(this))}continue(){var t;return((t=C(this,Ii))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,p,m,g,x,y,w,b,k,T,E,_;q(this,Ii,db({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,D)=>{ue(this,Bn,Er).call(this,{type:"failed",failureCount:R,error:D})},onPause:()=>{ue(this,Bn,Er).call(this,{type:"pause"})},onContinue:()=>{ue(this,Bn,Er).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,xt).canRun(this)}));const n=this.state.status==="pending",r=!C(this,Ii).canStart();try{if(!n){ue(this,Bn,Er).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=C(this,xt).config).onMutate)==null?void 0:s.call(i,t,this));const D=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));D!==this.state.context&&ue(this,Bn,Er).call(this,{type:"pending",context:D,variables:t,isPaused:r})}const R=await C(this,Ii).start();return await((u=(l=C(this,xt).config).onSuccess)==null?void 0:u.call(l,R,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,R,t,this.state.context)),await((p=(f=C(this,xt).config).onSettled)==null?void 0:p.call(f,R,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,R,null,t,this.state.context)),ue(this,Bn,Er).call(this,{type:"success",data:R}),R}catch(R){try{throw await((y=(x=C(this,xt).config).onError)==null?void 0:y.call(x,R,t,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,R,t,this.state.context)),await((T=(k=C(this,xt).config).onSettled)==null?void 0:T.call(k,void 0,R,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,R,t,this.state.context)),R}finally{ue(this,Bn,Er).call(this,{type:"error",error:R})}}finally{C(this,xt).runNext(this)}}},$n=new WeakMap,xt=new WeakMap,Ii=new WeakMap,Bn=new WeakSet,Er=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),Ge.batch(()=>{C(this,$n).forEach(r=>{r.onMutationUpdate(t)}),C(this,xt).notify({mutation:this,type:"updated",action:t})})},Bx);function hb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zt,Qa,zx,s2=(zx=class extends Co{constructor(t={}){super();te(this,zt);te(this,Qa);this.config=t,q(this,zt,new Map),q(this,Qa,Date.now())}build(t,n,r){const i=new i2({mutationCache:this,mutationId:++ml(this,Qa)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Dl(t),r=C(this,zt).get(n)??[];r.push(t),C(this,zt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Dl(t);if(C(this,zt).has(n)){const i=(r=C(this,zt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?C(this,zt).delete(n):C(this,zt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=C(this,zt).get(Dl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=C(this,zt).get(Dl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...C(this,zt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>$v(n,r))}findAll(t={}){return this.getAll().filter(n=>$v(t,n))}notify(t){Ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ge.batch(()=>Promise.all(t.map(n=>n.continue().catch(rn))))}},zt=new WeakMap,Qa=new WeakMap,zx);function Dl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Vv(e){return{onFetch:(t,n)=>{var d,c,f,p,m;const r=t.options,i=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=lb(t.options,t.fetchOptions),w=async(b,k,T)=>{if(g)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};x(E);const _=await y(E),{maxPages:R}=t.options,D=T?K_:Y_;return{pages:D(b.pages,_,R),pageParams:D(b.pageParams,k,R)}};if(i&&s.length){const b=i==="backward",k=b?o2:Uv,T={pages:s,pageParams:o},E=k(r,T);a=await w(T,E,b)}else{const b=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:Uv(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Uv(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 o2(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 Fe,Mr,Fr,Xs,Zs,Lr,Js,eo,Vx,a2=(Vx=class{constructor(e={}){te(this,Fe);te(this,Mr);te(this,Fr);te(this,Xs);te(this,Zs);te(this,Lr);te(this,Js);te(this,eo);q(this,Fe,e.queryCache||new r2),q(this,Mr,e.mutationCache||new s2),q(this,Fr,e.defaultOptions||{}),q(this,Xs,new Map),q(this,Zs,new Map),q(this,Lr,0)}mount(){ml(this,Lr)._++,C(this,Lr)===1&&(q(this,Js,lm.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Fe).onFocus())})),q(this,eo,Vu.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Fe).onOnline())})))}unmount(){var e,t;ml(this,Lr)._--,C(this,Lr)===0&&((e=C(this,Js))==null||e.call(this),q(this,Js,void 0),(t=C(this,eo))==null||t.call(this),q(this,eo,void 0))}isFetching(e){return C(this,Fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Mr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Fe).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=C(this,Fe).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Ws(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return C(this,Fe).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=C(this,Fe).get(r.queryHash),s=i==null?void 0:i.state.data,o=G_(t,s);if(o!==void 0)return C(this,Fe).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ge.batch(()=>C(this,Fe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Fe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,Fe);Ge.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,Fe),r={type:"active",...e};return Ge.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ge.batch(()=>C(this,Fe).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(rn).catch(rn)}invalidateQueries(e,t={}){return Ge.batch(()=>{if(C(this,Fe).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=Ge.batch(()=>C(this,Fe).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(rn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(rn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,Fe).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(rn).catch(rn)}fetchInfiniteQuery(e){return e.behavior=Vv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rn).catch(rn)}ensureInfiniteQueryData(e){return e.behavior=Vv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vu.isOnline()?C(this,Mr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Fe)}getMutationCache(){return C(this,Mr)}getDefaultOptions(){return C(this,Fr)}setDefaultOptions(e){q(this,Fr,e)}setQueryDefaults(e,t){C(this,Xs).set(Ji(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Xs).values()],n={};return t.forEach(r=>{Pa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Zs).set(Ji(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Zs).values()];let n={};return t.forEach(r=>{Pa(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Fr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=om(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===am&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Fr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Fe).clear(),C(this,Mr).clear()}},Fe=new WeakMap,Mr=new WeakMap,Fr=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Lr=new WeakMap,Js=new WeakMap,eo=new WeakMap,Vx),At,fe,Ya,wt,$i,to,Ir,zn,Ka,no,ro,Bi,zi,$r,io,ve,qo,ip,sp,op,ap,lp,up,cp,mb,Ux,l2=(Ux=class extends Co{constructor(t,n){super();te(this,ve);te(this,At);te(this,fe);te(this,Ya);te(this,wt);te(this,$i);te(this,to);te(this,Ir);te(this,zn);te(this,Ka);te(this,no);te(this,ro);te(this,Bi);te(this,zi);te(this,$r);te(this,io,new Set);this.options=n,q(this,At,t),q(this,zn,null),q(this,Ir,rp()),this.options.experimental_prefetchInRender||C(this,Ir).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&&(C(this,fe).addObserver(this),Hv(C(this,fe),this.options)?ue(this,ve,qo).call(this):this.updateResult(),ue(this,ve,ap).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dp(C(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dp(C(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ue(this,ve,lp).call(this),ue(this,ve,up).call(this),C(this,fe).removeObserver(this)}setOptions(t,n){const r=this.options,i=C(this,fe);if(this.options=C(this,At).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tn(this.options.enabled,C(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ue(this,ve,cp).call(this),C(this,fe).setOptions(this.options),r._defaulted&&!zu(this.options,r)&&C(this,At).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,fe),observer:this});const s=this.hasListeners();s&&Wv(C(this,fe),i,this.options,r)&&ue(this,ve,qo).call(this),this.updateResult(n),s&&(C(this,fe)!==i||Tn(this.options.enabled,C(this,fe))!==Tn(r.enabled,C(this,fe))||Ws(this.options.staleTime,C(this,fe))!==Ws(r.staleTime,C(this,fe)))&&ue(this,ve,ip).call(this);const o=ue(this,ve,sp).call(this);s&&(C(this,fe)!==i||Tn(this.options.enabled,C(this,fe))!==Tn(r.enabled,C(this,fe))||o!==C(this,$r))&&ue(this,ve,op).call(this,o)}getOptimisticResult(t){const n=C(this,At).getQueryCache().build(C(this,At),t),r=this.createResult(n,t);return c2(this,r)&&(q(this,wt,r),q(this,to,this.options),q(this,$i,C(this,fe).state)),r}getCurrentResult(){return C(this,wt)}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){C(this,io).add(t)}getCurrentQuery(){return C(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,At).defaultQueryOptions(t),r=C(this,At).getQueryCache().build(C(this,At),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ue(this,ve,qo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,wt)))}createResult(t,n){var R;const r=C(this,fe),i=this.options,s=C(this,wt),o=C(this,$i),a=C(this,to),u=t!==r?t.state:C(this,Ya),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const D=this.hasListeners(),N=!D&&Hv(t,n),j=D&&Wv(t,r,n,i);(N||j)&&(c={...c,...pb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:x}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===C(this,Ka))p=C(this,no);else try{q(this,Ka,n.select),p=n.select(c.data),p=np(s==null?void 0:s.data,p,n),q(this,no,p),q(this,zn,null)}catch(D){q(this,zn,D)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let D;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))D=s.data;else if(D=typeof n.placeholderData=="function"?n.placeholderData((R=C(this,ro))==null?void 0:R.state.data,C(this,ro)):n.placeholderData,n.select&&D!==void 0)try{D=n.select(D),q(this,zn,null)}catch(N){q(this,zn,N)}D!==void 0&&(x="success",p=np(s==null?void 0:s.data,D,n),f=!0)}C(this,zn)&&(m=C(this,zn),p=C(this,no),g=Date.now(),x="error");const y=c.fetchStatus==="fetching",w=x==="pending",b=x==="error",k=w&&y,T=p!==void 0,_={status:x,fetchStatus:c.fetchStatus,isPending:w,isSuccess:x==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:g,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:y,isRefetching:y&&!w,isLoadingError:b&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&T,isStale:um(t,n),refetch:this.refetch,promise:C(this,Ir)};if(this.options.experimental_prefetchInRender){const D=Y=>{_.status==="error"?Y.reject(_.error):_.data!==void 0&&Y.resolve(_.data)},N=()=>{const Y=q(this,Ir,_.promise=rp());D(Y)},j=C(this,Ir);switch(j.status){case"pending":t.queryHash===r.queryHash&&D(j);break;case"fulfilled":(_.status==="error"||_.data!==j.value)&&N();break;case"rejected":(_.status!=="error"||_.error!==j.reason)&&N();break}}return _}updateResult(t){const n=C(this,wt),r=this.createResult(C(this,fe),this.options);if(q(this,$i,C(this,fe).state),q(this,to,this.options),C(this,$i).data!==void 0&&q(this,ro,C(this,fe)),zu(r,n))return;q(this,wt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!C(this,io).size)return!0;const l=new Set(a??C(this,io));return this.options.throwOnError&&l.add("error"),Object.keys(C(this,wt)).some(u=>{const d=u;return C(this,wt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ue(this,ve,mb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ue(this,ve,ap).call(this)}},At=new WeakMap,fe=new WeakMap,Ya=new WeakMap,wt=new WeakMap,$i=new WeakMap,to=new WeakMap,Ir=new WeakMap,zn=new WeakMap,Ka=new WeakMap,no=new WeakMap,ro=new WeakMap,Bi=new WeakMap,zi=new WeakMap,$r=new WeakMap,io=new WeakMap,ve=new WeakSet,qo=function(t){ue(this,ve,cp).call(this);let n=C(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(rn)),n},ip=function(){ue(this,ve,lp).call(this);const t=Ws(this.options.staleTime,C(this,fe));if(Zi||C(this,wt).isStale||!ep(t))return;const r=ob(C(this,wt).dataUpdatedAt,t)+1;q(this,Bi,setTimeout(()=>{C(this,wt).isStale||this.updateResult()},r))},sp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,fe)):this.options.refetchInterval)??!1},op=function(t){ue(this,ve,up).call(this),q(this,$r,t),!(Zi||Tn(this.options.enabled,C(this,fe))===!1||!ep(C(this,$r))||C(this,$r)===0)&&q(this,zi,setInterval(()=>{(this.options.refetchIntervalInBackground||lm.isFocused())&&ue(this,ve,qo).call(this)},C(this,$r)))},ap=function(){ue(this,ve,ip).call(this),ue(this,ve,op).call(this,ue(this,ve,sp).call(this))},lp=function(){C(this,Bi)&&(clearTimeout(C(this,Bi)),q(this,Bi,void 0))},up=function(){C(this,zi)&&(clearInterval(C(this,zi)),q(this,zi,void 0))},cp=function(){const t=C(this,At).getQueryCache().build(C(this,At),this.options);if(t===C(this,fe))return;const n=C(this,fe);q(this,fe,t),q(this,Ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},mb=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,wt))}),C(this,At).getQueryCache().notify({query:C(this,fe),type:"observerResultsUpdated"})})},Ux);function u2(e,t){return Tn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Hv(e,t){return u2(e,t)||e.state.data!==void 0&&dp(e,t,t.refetchOnMount)}function dp(e,t,n){if(Tn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&um(e,t)}return!1}function Wv(e,t,n,r){return(e!==t||Tn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&um(e,n)}function um(e,t){return Tn(t.enabled,e)!==!1&&e.isStaleByTime(Ws(t.staleTime,e))}function c2(e,t){return!zu(e.getCurrentResult(),t)}var Br,zr,Rt,ar,fr,iu,fp,Hx,d2=(Hx=class extends Co{constructor(t,n){super();te(this,fr);te(this,Br);te(this,zr);te(this,Rt);te(this,ar);q(this,Br,t),this.setOptions(n),this.bindMethods(),ue(this,fr,iu).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=C(this,Br).defaultMutationOptions(t),zu(this.options,n)||C(this,Br).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Rt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ji(n.mutationKey)!==Ji(this.options.mutationKey)?this.reset():((r=C(this,Rt))==null?void 0:r.state.status)==="pending"&&C(this,Rt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=C(this,Rt))==null||t.removeObserver(this)}onMutationUpdate(t){ue(this,fr,iu).call(this),ue(this,fr,fp).call(this,t)}getCurrentResult(){return C(this,zr)}reset(){var t;(t=C(this,Rt))==null||t.removeObserver(this),q(this,Rt,void 0),ue(this,fr,iu).call(this),ue(this,fr,fp).call(this)}mutate(t,n){var r;return q(this,ar,n),(r=C(this,Rt))==null||r.removeObserver(this),q(this,Rt,C(this,Br).getMutationCache().build(C(this,Br),this.options)),C(this,Rt).addObserver(this),C(this,Rt).execute(t)}},Br=new WeakMap,zr=new WeakMap,Rt=new WeakMap,ar=new WeakMap,fr=new WeakSet,iu=function(){var n;const t=((n=C(this,Rt))==null?void 0:n.state)??hb();q(this,zr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},fp=function(t){Ge.batch(()=>{var n,r,i,s,o,a,l,u;if(C(this,ar)&&this.hasListeners()){const d=C(this,zr).variables,c=C(this,zr).context;(t==null?void 0:t.type)==="success"?((r=(n=C(this,ar)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=C(this,ar)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=C(this,ar)).onError)==null||a.call(o,t.error,d,c),(u=(l=C(this,ar)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(C(this,zr))})})},Hx),gb=v.createContext(void 0),vb=e=>{const t=v.useContext(gb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},f2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(gb.Provider,{value:e,children:t})),yb=v.createContext(!1),p2=()=>v.useContext(yb);yb.Provider;function h2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var m2=v.createContext(h2()),g2=()=>v.useContext(m2);function xb(e,t){return typeof e=="function"?e(...t):!!e}function pp(){}var v2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},y2=e=>{v.useEffect(()=>{e.clearReset()},[e])},x2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&xb(n,[e.error,r]),w2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},b2=(e,t)=>e.isLoading&&e.isFetching&&!t,S2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,qv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function C2(e,t,n){var d,c,f,p,m;const r=vb(),i=p2(),s=g2(),o=r.defaultQueryOptions(e);(c=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||c.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",w2(o),v2(o,s),y2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(g=>{const x=i?pp:l.subscribe(Ge.batchCalls(g));return l.updateResult(),x},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),S2(o,u))throw qv(o,l,s);if(x2({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,u),o.experimental_prefetchInRender&&!Zi&&b2(u,i)){const g=a?qv(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(pp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function wb(e,t){return C2(e,l2)}function cm(e,t){const n=vb(),[r]=v.useState(()=>new d2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(Ge.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(pp)},[r]);if(i.error&&xb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const k2=(e,t)=>wb({queryKey:["widgets",e,t],queryFn:()=>T2(e,t),retry:!1,throwOnError:!1}),T2=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await xr(n);if(i===204)throw new Error("User is banned");return r};var S=(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.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(S||{}),X=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(X||{});function E2(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 Bu(){return Bu=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},Bu.apply(this,arguments)}var Vr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vr||(Vr={}));function k2(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,m)=>d(p,typeof p=="string"?null:p.state,m===0?"default":void 0));let s=l(n??i.length-1),o=Vr.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function u(){return i[s]}function d(p,m,h){m===void 0&&(m=null);let w=E2(i?u().pathname:"/",p,m,h);return cm(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),w}function c(p){return typeof p=="string"?p:pp(p)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(p){return new URL(c(p),"http://localhost")},encodeLocation(p){let m=typeof p=="string"?ts(p):p;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(p,m){o=Vr.Push;let h=d(p,m);s+=1,i.splice(s,i.length,h),r&&a&&a({action:o,location:h,delta:1})},replace(p,m){o=Vr.Replace;let h=d(p,m);i[s]=h,r&&a&&a({action:o,location:h,delta:0})},go(p){o=Vr.Pop;let m=l(s+p),h=i[m];s=m,a&&a({action:o,location:h,delta:p})},listen(p){return a=p,()=>{a=null}}}}function Ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function T2(){return Math.random().toString(36).substr(2,8)}function E2(e,t,n,r){return n===void 0&&(n=null),Bu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ts(t):t,{state:n,key:t&&t.key||r||T2()})}function pp(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 ts(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 qv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(qv||(qv={}));function _2(e,t,n){return n===void 0&&(n="/"),j2(e,t,n,!1)}function j2(e,t,n,r){let i=typeof t=="string"?ts(t):t,s=dm(i.pathname||"/",n);if(s==null)return null;let o=yb(e);R2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=B2(s);a=I2(o[l],u,r)}return a}function yb(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("/")&&(Ge(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=Zr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ge(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),yb(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:F2(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of xb(s.path))i(s,o,l)}),t}function xb(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=xb(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 R2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:L2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const A2=/^:[\w-]+$/,P2=3,O2=2,D2=1,N2=10,M2=-2,Gv=e=>e==="*";function F2(e,t){let n=e.split("/"),r=n.length;return n.some(Gv)&&(r+=M2),t&&(r+=O2),n.filter(i=>!Gv(i)).reduce((i,s)=>i+(A2.test(s)?P2:s===""?D2:N2),r)}function L2(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 I2(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,d=s==="/"?t:t.slice(s.length)||"/",c=Qv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=Qv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Zr([s,c.pathname]),pathnameBase:H2(Zr([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=Zr([s,c.pathnameBase]))}return o}function Qv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=$2(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,d,c)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let h=a[c]||"";o=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}const m=a[c];return p&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function $2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),cm(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 B2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cm(!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 dm(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 z2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ts(e):e;return{pathname:n?n.startsWith("/")?n:V2(n,t):t,search:W2(r),hash:q2(i)}}function V2(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 _d(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 U2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wb(e,t){let n=U2(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function bb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ts(e):(i=Bu({},e),Ge(!i.pathname||!i.pathname.includes("?"),_d("?","pathname","search",i)),Ge(!i.pathname||!i.pathname.includes("#"),_d("#","pathname","hash",i)),Ge(!i.search||!i.search.includes("#"),_d("#","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 f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=z2(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Zr=e=>e.join("/").replace(/\/\/+/g,"/"),H2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),W2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,q2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function G2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Sb=["post","put","patch","delete"];new Set(Sb);const Q2=["get",...Sb];new Set(Q2);/**
49
+ */function Uu(){return Uu=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},Uu.apply(this,arguments)}var Hr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Hr||(Hr={}));function _2(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,m)=>d(p,typeof p=="string"?null:p.state,m===0?"default":void 0));let s=l(n??i.length-1),o=Hr.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function u(){return i[s]}function d(p,m,g){m===void 0&&(m=null);let x=A2(i?u().pathname:"/",p,m,g);return dm(x.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),x}function c(p){return typeof p=="string"?p:hp(p)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(p){return new URL(c(p),"http://localhost")},encodeLocation(p){let m=typeof p=="string"?is(p):p;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(p,m){o=Hr.Push;let g=d(p,m);s+=1,i.splice(s,i.length,g),r&&a&&a({action:o,location:g,delta:1})},replace(p,m){o=Hr.Replace;let g=d(p,m);i[s]=g,r&&a&&a({action:o,location:g,delta:0})},go(p){o=Hr.Pop;let m=l(s+p),g=i[m];s=m,a&&a({action:o,location:g,delta:p})},listen(p){return a=p,()=>{a=null}}}}function Ye(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function j2(){return Math.random().toString(36).substr(2,8)}function A2(e,t,n,r){return n===void 0&&(n=null),Uu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?is(t):t,{state:n,key:t&&t.key||r||j2()})}function hp(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 is(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 Gv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gv||(Gv={}));function R2(e,t,n){return n===void 0&&(n="/"),P2(e,t,n,!1)}function P2(e,t,n,r){let i=typeof t=="string"?is(t):t,s=fm(i.pathname||"/",n);if(s==null)return null;let o=bb(e);O2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=U2(s);a=z2(o[l],u,r)}return a}function bb(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("/")&&(Ye(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=ei([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ye(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),bb(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:$2(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Sb(s.path))i(s,o,l)}),t}function Sb(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=Sb(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 O2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:B2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const D2=/^:[\w-]+$/,N2=3,M2=2,F2=1,L2=10,I2=-2,Qv=e=>e==="*";function $2(e,t){let n=e.split("/"),r=n.length;return n.some(Qv)&&(r+=I2),t&&(r+=M2),n.filter(i=>!Qv(i)).reduce((i,s)=>i+(D2.test(s)?N2:s===""?F2:L2),r)}function B2(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 z2(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,d=s==="/"?t:t.slice(s.length)||"/",c=Yv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=Yv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:ei([s,c.pathname]),pathnameBase:G2(ei([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=ei([s,c.pathnameBase]))}return o}function Yv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=V2(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,d,c)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let g=a[c]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const m=a[c];return p&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function V2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),dm(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 U2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dm(!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 fm(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 H2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?is(e):e;return{pathname:n?n.startsWith("/")?n:W2(n,t):t,search:Q2(r),hash:Y2(i)}}function W2(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 Ad(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 q2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cb(e,t){let n=q2(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function kb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=is(e):(i=Uu({},e),Ye(!i.pathname||!i.pathname.includes("?"),Ad("?","pathname","search",i)),Ye(!i.pathname||!i.pathname.includes("#"),Ad("#","pathname","hash",i)),Ye(!i.search||!i.search.includes("#"),Ad("#","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 f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=H2(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const ei=e=>e.join("/").replace(/\/\/+/g,"/"),G2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Y2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function K2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tb=["post","put","patch","delete"];new Set(Tb);const X2=["get",...Tb];new Set(X2);/**
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 Ra(){return Ra=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},Ra.apply(this,arguments)}const fm=v.createContext(null),Y2=v.createContext(null),ns=v.createContext(null),xc=v.createContext(null),rs=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Cb=v.createContext(null);function K2(e,t){let{relative:n}=t===void 0?{}:t;Ja()||Ge(!1);let{basename:r,navigator:i}=v.useContext(ns),{hash:s,pathname:o,search:a}=Eb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Zr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ja(){return v.useContext(xc)!=null}function el(){return Ja()||Ge(!1),v.useContext(xc).location}function kb(e){v.useContext(ns).static||v.useLayoutEffect(e)}function Tb(){let{isDataRoute:e}=v.useContext(rs);return e?uj():X2()}function X2(){Ja()||Ge(!1);let e=v.useContext(fm),{basename:t,future:n,navigator:r}=v.useContext(ns),{matches:i}=v.useContext(rs),{pathname:s}=el(),o=JSON.stringify(wb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return kb(()=>{a.current=!0}),v.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=bb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Zr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function Eb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ns),{matches:i}=v.useContext(rs),{pathname:s}=el(),o=JSON.stringify(wb(i,r.v7_relativeSplatPath));return v.useMemo(()=>bb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Z2(e,t){return J2(e,t)}function J2(e,t,n,r){Ja()||Ge(!1);let{navigator:i}=v.useContext(ns),{matches:s}=v.useContext(rs),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=el(),d;if(t){var c;let w=typeof t=="string"?ts(t):t;l==="/"||(c=w.pathname)!=null&&c.startsWith(l)||Ge(!1),d=w}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=_2(e,{pathname:p}),h=ij(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Zr([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Zr([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&h?v.createElement(xc.Provider,{value:{location:Ra({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Vr.Pop}},h):h}function ej(){let e=lj(),t=G2(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const tj=v.createElement(ej,null);class nj extends v.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?v.createElement(rs.Provider,{value:this.props.routeContext},v.createElement(Cb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rj(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(fm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(rs.Provider,{value:t},r)}function ij(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 d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Ge(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:p}=n,m=c.route.loader&&f[c.route.id]===void 0&&(!p||p[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((d,c,f)=>{let p,m=!1,h=null,w=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,h=c.route.errorElement||tj,l&&(u<0&&f===0?(m=!0,w=null):u===f&&(m=!0,w=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),x=()=>{let b;return p?b=h:m?b=w:c.route.Component?b=v.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=d,v.createElement(rj,{match:c,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?v.createElement(nj,{location:n.location,revalidation:n.revalidation,component:h,error:p,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var _b=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_b||{}),zu=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}(zu||{});function sj(e){let t=v.useContext(fm);return t||Ge(!1),t}function oj(e){let t=v.useContext(Y2);return t||Ge(!1),t}function aj(e){let t=v.useContext(rs);return t||Ge(!1),t}function jb(e){let t=aj(),n=t.matches[t.matches.length-1];return n.route.id||Ge(!1),n.route.id}function lj(){var e;let t=v.useContext(Cb),n=oj(zu.UseRouteError),r=jb(zu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function uj(){let{router:e}=sj(_b.UseNavigateStable),t=jb(zu.UseNavigateStable),n=v.useRef(!1);return kb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ra({fromRouteId:t},s)))},[e,t])}const Yv={};function cj(e,t){Yv[t]||(Yv[t]=!0,console.warn(t))}const Kv=(e,t,n)=>cj(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function dj(e,t){e!=null&&e.v7_startTransition||Kv("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&&Kv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const fj="startTransition",Xv=of[fj];function pj(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=k2({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=v.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},c=v.useCallback(f=>{d&&Xv?Xv(()=>u(f)):u(f)},[u,d]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.useEffect(()=>dj(s),[s]),v.createElement(hj,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function hp(e){Ge(!1)}function hj(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Vr.Pop,navigator:s,static:o=!1,future:a}=e;Ja()&&Ge(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Ra({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=ts(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:m="default"}=r,h=v.useMemo(()=>{let w=dm(d,l);return w==null?null:{location:{pathname:w,search:c,hash:f,state:p,key:m},navigationType:i}},[l,d,c,f,p,m,i]);return h==null?null:v.createElement(ns.Provider,{value:u},v.createElement(xc.Provider,{children:n,value:h}))}function mj(e){let{children:t,location:n}=e;return Z2(mp(t),n)}new Promise(()=>{});function mp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,mp(r.props.children,s));return}r.type!==hp&&Ge(!1),!r.props.index||!r.props.children||Ge(!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=mp(r.props.children,s)),n.push(o)}),n}/**
58
+ */function Oa(){return Oa=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},Oa.apply(this,arguments)}const pm=v.createContext(null),Z2=v.createContext(null),ss=v.createContext(null),Sc=v.createContext(null),os=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Eb=v.createContext(null);function J2(e,t){let{relative:n}=t===void 0?{}:t;nl()||Ye(!1);let{basename:r,navigator:i}=v.useContext(ss),{hash:s,pathname:o,search:a}=Ab(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:ei([r,o])),i.createHref({pathname:l,search:a,hash:s})}function nl(){return v.useContext(Sc)!=null}function rl(){return nl()||Ye(!1),v.useContext(Sc).location}function _b(e){v.useContext(ss).static||v.useLayoutEffect(e)}function jb(){let{isDataRoute:e}=v.useContext(os);return e?fj():ej()}function ej(){nl()||Ye(!1);let e=v.useContext(pm),{basename:t,future:n,navigator:r}=v.useContext(ss),{matches:i}=v.useContext(os),{pathname:s}=rl(),o=JSON.stringify(Cb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return _b(()=>{a.current=!0}),v.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=kb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:ei([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function Ab(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ss),{matches:i}=v.useContext(os),{pathname:s}=rl(),o=JSON.stringify(Cb(i,r.v7_relativeSplatPath));return v.useMemo(()=>kb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function tj(e,t){return nj(e,t)}function nj(e,t,n,r){nl()||Ye(!1);let{navigator:i}=v.useContext(ss),{matches:s}=v.useContext(os),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=rl(),d;if(t){var c;let x=typeof t=="string"?is(t):t;l==="/"||(c=x.pathname)!=null&&c.startsWith(l)||Ye(!1),d=x}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=R2(e,{pathname:p}),g=aj(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:ei([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:ei([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&g?v.createElement(Sc.Provider,{value:{location:Oa({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Hr.Pop}},g):g}function rj(){let e=dj(),t=K2(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const ij=v.createElement(rj,null);class sj extends v.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?v.createElement(os.Provider,{value:this.props.routeContext},v.createElement(Eb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oj(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(pm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(os.Provider,{value:t},r)}function aj(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 d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Ye(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:p}=n,m=c.route.loader&&f[c.route.id]===void 0&&(!p||p[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((d,c,f)=>{let p,m=!1,g=null,x=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,g=c.route.errorElement||ij,l&&(u<0&&f===0?(m=!0,x=null):u===f&&(m=!0,x=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),w=()=>{let b;return p?b=g:m?b=x:c.route.Component?b=v.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=d,v.createElement(oj,{match:c,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?v.createElement(sj,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):w()},null)}var Rb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Rb||{}),Hu=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}(Hu||{});function lj(e){let t=v.useContext(pm);return t||Ye(!1),t}function uj(e){let t=v.useContext(Z2);return t||Ye(!1),t}function cj(e){let t=v.useContext(os);return t||Ye(!1),t}function Pb(e){let t=cj(),n=t.matches[t.matches.length-1];return n.route.id||Ye(!1),n.route.id}function dj(){var e;let t=v.useContext(Eb),n=uj(Hu.UseRouteError),r=Pb(Hu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function fj(){let{router:e}=lj(Rb.UseNavigateStable),t=Pb(Hu.UseNavigateStable),n=v.useRef(!1);return _b(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Oa({fromRouteId:t},s)))},[e,t])}const Kv={};function pj(e,t){Kv[t]||(Kv[t]=!0,console.warn(t))}const Xv=(e,t,n)=>pj(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function hj(e,t){e!=null&&e.v7_startTransition||Xv("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&&Xv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const mj="startTransition",Zv=af[mj];function gj(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=_2({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=v.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},c=v.useCallback(f=>{d&&Zv?Zv(()=>u(f)):u(f)},[u,d]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.useEffect(()=>hj(s),[s]),v.createElement(vj,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function mp(e){Ye(!1)}function vj(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Hr.Pop,navigator:s,static:o=!1,future:a}=e;nl()&&Ye(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Oa({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=is(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:m="default"}=r,g=v.useMemo(()=>{let x=fm(d,l);return x==null?null:{location:{pathname:x,search:c,hash:f,state:p,key:m},navigationType:i}},[l,d,c,f,p,m,i]);return g==null?null:v.createElement(ss.Provider,{value:u},v.createElement(Sc.Provider,{children:n,value:g}))}function yj(e){let{children:t,location:n}=e;return tj(gp(t),n)}new Promise(()=>{});function gp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,gp(r.props.children,s));return}r.type!==mp&&Ye(!1),!r.props.index||!r.props.children||Ye(!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=gp(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,19 @@ 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 gp(){return gp=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},gp.apply(this,arguments)}function gj(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 vj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yj(e,t){return e.button===0&&(!t||t==="_self")&&!vj(e)}const xj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wj="6";try{window.__reactRouterVersion=wj}catch{}const bj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cj=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=gj(t,xj),{basename:p}=v.useContext(ns),m,h=!1;if(typeof u=="string"&&Sj.test(u)&&(m=u,bj))try{let b=new URL(window.location.href),k=u.startsWith("//")?new URL(b.protocol+u):new URL(u),T=dm(k.pathname,p);k.origin===b.origin&&T!=null?u=T+k.search+k.hash:h=!0}catch{}let w=K2(u,{relative:i}),y=kj(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function x(b){r&&r(b),b.defaultPrevented||y(b)}return v.createElement("a",gp({},f,{href:m||w,onClick:h||s?r:x,ref:n,target:l}))});var Zv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Zv||(Zv={}));var Jv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Jv||(Jv={}));function kj(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Tb(),u=el(),d=Eb(e,{relative:o});return v.useCallback(c=>{if(yj(c,n)){c.preventDefault();let f=r!==void 0?r:pp(u)===pp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}var jr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(jr||{});const Rb=v.createContext({}),Tj={[Y.TooltipDefault]:"Bizimle sohbet edin!",[Y.TooltipActive]:"Yeni mesajlar var!",[Y.CloseButtonAria]:"Kapat",[Y.MessagePlaceholder]:"Mesajınızı yazın",[Y.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[Y.NewMessagesNotification]:"Yeni mesajlar var!",[Y.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[Y.ChatCloseWarning]:"Bu işlem geri alınamaz.",[Y.ChatSettings]:"Sohbet Ayarları",[Y.ChatEndConversation]:"Sohbeti Sonlandır",[Y.CancelAction]:"Vazgeç",[Y.CloseAction]:"Kapat",[Y.QuickActions]:"Hızlı işlemler",[Y.GreetingStartChat]:"Sohbete başla",[Y.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[Y.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[Y.RatingHeaderThanks]:"Teşekkürler!",[Y.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[Y.RatingRateConversation]:"Görüşmeyi puanlayın",[Y.RatingComment]:"Yorumunuz (İsteğe bağlı)",[Y.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[Y.RatingSubmit]:"Değerlendirmeyi Gönder",[Y.RatingNewConversation]:"Yeni Görüşme Başlat",[Y.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[Y.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[Y.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[Y.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[Y.RatingYourScore]:"Puanınız: {score}",[Y.PoweredBy]:"Powered by"},Ej={[S.Background]:"#ffffff",[S.Border]:"#e2e8f0",[S.TooltipText]:"#1e40af",[S.TooltipBackground]:"#dbeafe",[S.TooltipBorder]:"#3b82f6",[S.HeaderBackground]:"#2563eb",[S.HeaderBorder]:"#e2e8f0",[S.HeaderText]:"#ffffff",[S.FooterBackground]:"#f8fafc",[S.FooterBorder]:"#e2e8f0",[S.FooterText]:"#475569",[S.MessageAdminBackground]:"#f1f5f9",[S.MessageAdminText]:"#334155",[S.MessageVisitorBackground]:"#3b82f6",[S.MessageVisitorText]:"#ffffff",[S.GreeterBackground]:"#ffffff",[S.GreeterText]:"#334155",[S.GreeterBorder]:"#e2e8f0",[S.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[S.GreeterTopText]:"#ffffff",[S.GreeterButtonBackground]:"#4f46e5",[S.GreeterButtonText]:"#ffffff",[S.ButtonBackground]:"#4f46e5",[S.ButtonText]:"#ffffff",[S.InputBackground]:"#ffffff",[S.InputText]:"#1e293b",[S.InputBorder]:"#e2e8f0",[S.CloseButtonBackground]:"#f1f5f9",[S.CloseButtonText]:"#475569",[S.CloseButtonHover]:"#e2e8f0",[S.IconColor]:"#64748b",[S.IconBackground]:"transparent",[S.ErrorBackground]:"#fef2f2",[S.ErrorText]:"#dc2626",[S.ErrorBorder]:"#fca5a5",[S.SuccessBackground]:"#f0fdf4",[S.SuccessText]:"#16a34a",[S.SuccessBorder]:"#86efac",[S.WarningBackground]:"#fffbeb",[S.WarningText]:"#d97706",[S.WarningBorder]:"#fcd34d",[S.LinkColor]:"#2563eb",[S.LinkHoverColor]:"#1d4ed8",[S.DividerColor]:"#e2e8f0",[S.ShadowColor]:"rgba(0, 0, 0, 0.1)",[S.StarActiveColor]:"#3b82f6",[S.StarInactiveColor]:"#e2e8f0",[S.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[S.ChatCloseConfirmText]:"#dc2626",[S.RatingHeaderBackground]:"#4F46E5",[S.RatingHeaderText]:"#ffffff",[S.RatingSuccessBackground]:"#ffffff",[S.RatingSuccessText]:"#334155",[S.RatingRateConversationText]:"#1e293b"},_j={[jr.None]:"0px",[jr.Sm]:"var(--radius-xs)",[jr.Md]:"var(--radius-sm)",[jr.Lg]:"var(--radius-md)",[jr.Xl]:"var(--radius-lg)",[jr.Full]:"calc(infinity * 1px)"},jj=e=>{const t={...Tj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},Rj=e=>{const t={...Ej};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 Aj({children:e,widget:t}){const n=Rj(t),r=jj(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:jr.Md,s=l=>n[l],o=l=>r[l],a=()=>_j[i];return g.jsx(Rb.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const he=()=>v.useContext(Rb),tl=()=>he().getText;function $e({className:e="",style:t}){const n=he();return g.jsx("div",{className:`animate-pulse rounded ${e}`,style:{backgroundColor:n.getColor(S.MessageAdminBackground),opacity:.6,...t}})}function Pj(){const e=he();return g.jsxs("section",{className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[g.jsx("div",{className:"flex w-full items-center justify-start",children:g.jsx($e,{className:"h-12 w-3/5",style:{borderRadius:e.getRadius()}})}),g.jsx("div",{className:"flex w-full items-center justify-end",children:g.jsx($e,{className:"h-10 w-2/5",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.MessageVisitorBackground),opacity:.4}})}),g.jsx("div",{className:"flex w-full items-center justify-start",children:g.jsx($e,{className:"h-16 w-4/5",style:{borderRadius:e.getRadius()}})}),g.jsx("div",{className:"flex w-full items-center justify-end",children:g.jsx($e,{className:"h-8 w-1/3",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.MessageVisitorBackground),opacity:.4}})}),g.jsx("div",{className:"flex w-full items-center justify-start",children:g.jsx($e,{className:"h-10 w-1/2",style:{borderRadius:e.getRadius()}})})]})}function Oj(){const e=he();return g.jsxs("div",{className:"p-3 flex items-center gap-3",style:{backgroundColor:e.getColor(S.FooterBackground),borderRadius:e.getRadius()},children:[g.jsx("div",{className:"grow",children:g.jsx($e,{className:"h-12 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})}),g.jsx($e,{className:"h-12 w-12 rounded-full"})]})}function Dj(){const e=he();return g.jsxs("header",{className:"p-4 flex justify-between items-center z-10",style:{backgroundColor:e.getColor(S.HeaderBackground),borderBottom:`1px solid ${e.getColor(S.HeaderBorder)}`},children:[g.jsx($e,{className:"h-5 w-36"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx($e,{className:"h-5 w-5 rounded"}),g.jsx($e,{className:"h-5 w-5 rounded"})]})]})}function Ab(){const e=he();return g.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:e.getColor(S.GreeterBackground)},children:g.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[g.jsxs("div",{children:[g.jsx($e,{className:"h-4 w-20 mb-1"}),g.jsx($e,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})]}),g.jsxs("div",{children:[g.jsx($e,{className:"h-4 w-24 mb-1"}),g.jsx($e,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})]}),g.jsxs("div",{children:[g.jsx($e,{className:"h-4 w-16 mb-1"}),g.jsx($e,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})]}),g.jsx($e,{className:"h-11 w-full mt-2",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.GreeterButtonBackground),opacity:.5}})]})})}function Pb(){const e=he();return g.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(S.GreeterTopBackground)},children:[g.jsx($e,{className:"h-7 w-40"}),g.jsx($e,{className:"h-4 w-56"})]})}function Ob(){const e=he();return g.jsxs("div",{className:"h-full w-full flex flex-col overflow-hidden",style:{backgroundColor:e.getColor(S.Background)},children:[g.jsx(Dj,{}),g.jsx(Pj,{}),g.jsx(Oj,{}),g.jsxs("div",{className:"py-1.5 px-3 flex items-center justify-center gap-1",style:{borderTop:`1px solid ${e.getColor(S.FooterBorder)}`,backgroundColor:e.getColor(S.FooterBackground)},children:[g.jsx($e,{className:"h-3 w-20"}),g.jsx($e,{className:"h-3.5 w-3.5 rounded"})]})]})}function vp(){const e=he(),t=typeof window<"u"&&window.innerWidth<768;return g.jsxs("div",{className:`h-full w-full relative overflow-hidden ${t?"":"rounded-xl"}`,style:{backgroundColor:e.getColor(S.GreeterBackground)},children:[g.jsx(Pb,{}),g.jsx("div",{style:{height:t?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:g.jsx(Ab,{})})]})}var Wn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Wn||{});const jd=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},nu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},ra=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},Nj={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ey=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(m=>m(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(Nj?"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},Mj=e=>e?ey(e):ey;var Db={exports:{}},Nb={},Mb={exports:{}},Fb={};/**
67
+ */function vp(){return vp=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},vp.apply(this,arguments)}function xj(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 wj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bj(e,t){return e.button===0&&(!t||t==="_self")&&!wj(e)}const Sj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Cj="6";try{window.__reactRouterVersion=Cj}catch{}const kj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ej=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=xj(t,Sj),{basename:p}=v.useContext(ss),m,g=!1;if(typeof u=="string"&&Tj.test(u)&&(m=u,kj))try{let b=new URL(window.location.href),k=u.startsWith("//")?new URL(b.protocol+u):new URL(u),T=fm(k.pathname,p);k.origin===b.origin&&T!=null?u=T+k.search+k.hash:g=!0}catch{}let x=J2(u,{relative:i}),y=_j(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function w(b){r&&r(b),b.defaultPrevented||y(b)}return v.createElement("a",vp({},f,{href:m||x,onClick:g||s?r:w,ref:n,target:l}))});var Jv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Jv||(Jv={}));var ey;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ey||(ey={}));function _j(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=jb(),u=rl(),d=Ab(e,{relative:o});return v.useCallback(c=>{if(bj(c,n)){c.preventDefault();let f=r!==void 0?r:hp(u)===hp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}const jj={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"}},ty={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}};var Ob={exports:{}};/*!
68
+ Copyright (c) 2018 Jed Watson.
69
+ Licensed under the MIT License (MIT), see
70
+ http://jedwatson.github.io/classnames
71
+ */(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})()})(Ob);var Aj=Ob.exports;const we=ts(Aj),hm=v.createContext({});function Cc(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const mm=typeof window<"u",Db=mm?v.useLayoutEffect:v.useEffect,kc=v.createContext(null),gm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Rj extends v.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 Pj({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(gm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:d,right:c}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${c}`;i.current.dataset.motionPopId=r;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(`
72
+ [data-motion-pop-id="${r}"] {
73
+ position: absolute !important;
74
+ width: ${a}px !important;
75
+ height: ${l}px !important;
76
+ ${f}px !important;
77
+ top: ${u}px !important;
78
+ }
79
+ `),()=>{document.head.removeChild(p)}},[t]),h.jsx(Rj,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const Oj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Cc(Dj),u=v.useId();let d=!0,c=v.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(c={...c}),v.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=h.jsx(Pj,{isPresent:n,anchorX:a,children:e})),h.jsx(kc.Provider,{value:c,children:e})};function Dj(){return new Map}function Nb(e=!0){const t=v.useContext(kc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Nl=e=>e.key||"";function ny(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const yp=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Nb(o),d=v.useMemo(()=>ny(e),[e]),c=o&&!l?[]:d.map(Nl),f=v.useRef(!0),p=v.useRef(d),m=Cc(()=>new Map),[g,x]=v.useState(d),[y,w]=v.useState(d);Db(()=>{f.current=!1,p.current=d;for(let T=0;T<y.length;T++){const E=Nl(y[T]);c.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[y,c.length,c.join("-")]);const b=[];if(d!==g){let T=[...d];for(let E=0;E<y.length;E++){const _=y[E],R=Nl(_);c.includes(R)||(T.splice(E,0,_),b.push(_))}return s==="wait"&&b.length&&(T=b),w(ny(T)),x(d),null}const{forceRender:k}=v.useContext(hm);return h.jsx(h.Fragment,{children:y.map(T=>{const E=Nl(T),_=o&&!l?!1:d===y||c.includes(E),R=()=>{if(m.has(E))m.set(E,!0);else return;let D=!0;m.forEach(N=>{N||(D=!1)}),D&&(k==null||k(),w(p.current),o&&(u==null||u()),r&&r())};return h.jsx(Oj,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:R,anchorX:a,children:T},E)})})};function vm(e,t){e.indexOf(t)===-1&&e.push(t)}function ym(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let xp=()=>{};const wp={skipAnimations:!1,useManualTiming:!1};function xm(e){let t;return()=>(t===void 0&&(t=e()),t)}const cn=e=>e,Da=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class wm{constructor(){this.subscriptions=[]}add(t){return vm(this.subscriptions,t),()=>ym(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 Gn=e=>e*1e3,Qn=e=>e/1e3;function Mb(e,t){return t?e*(1e3/t):0}const Nj=xm(()=>window.ScrollTimeline!==void 0);class Mj{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(Nj()&&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 Fj extends Mj{then(t,n){return this.finished.finally(t).then(()=>{})}}const ry={value:null,addProjectionMetrics:null},bm=e=>Array.isArray(e)&&typeof e[0]=="number",Lj={};function Ij(e,t){const n=xm(e);return()=>Lj[t]??n()}const Na=Ij(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fb=(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)})`},Go=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Go([0,.65,.55,1]),circOut:Go([.55,0,1,.45]),backIn:Go([.31,.01,.66,-.59]),backOut:Go([.33,1.53,.69,.99])};function Lb(e,t){if(e)return typeof e=="function"&&Na()?Fb(e,t):bm(e)?Go(e):Array.isArray(e)?e.map(n=>Lb(n,t)||bp.easeOut):bp[e]}function $j(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const c=Lb(a,i);return Array.isArray(c)&&(d.easing=c),e.animate(d,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Sm(e){return typeof e=="function"&&"applyToOptions"in e}function Cm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Wu=2e4;function km(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wu;)t+=n,r=e.next(t);return t>=Wu?1/0:t}function Bj(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(km(r),Wu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Qn(i)}}function Ib(e){return!!(typeof e=="function"&&Na()||!e||typeof e=="string"&&(e in bp||Na())||bm(e)||Array.isArray(e)&&e.every(Ib))}function iy(e,t){e.timeline=t,e.onfinish=null}const Ml=["read","resolveKeyframes","update","preRender","render","postRender"];function zj(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)&&(d.schedule(c),e()),l++,c(a)}const d={schedule:(c,f=!1,p=!1)=>{const g=p&&i?n:r;return f&&o.add(c),g.has(c)||g.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&&ry.value&&ry.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const Vj=40;function $b(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ml.reduce((y,w)=>(y[w]=zj(s,t?w:void 0),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,p=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,Vj),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),d.process(i),c.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Ml.reduce((y,w)=>{const b=o[w];return y[w]=(k,T=!1,E=!1)=>(n||m(),b.schedule(k,T,E)),y},{}),cancel:y=>{for(let w=0;w<Ml.length;w++)o[Ml[w]].cancel(y)},state:i,steps:o}}const{schedule:Tm,cancel:TB}=$b(queueMicrotask,!1),{schedule:ke,cancel:ai,state:ot,steps:Rd}=$b(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0);let su;function Uj(){su=void 0}const Yn={now:()=>(su===void 0&&Yn.set(ot.isProcessing||wp.useManualTiming?ot.timestamp:performance.now()),su),set:e=>{su=e,queueMicrotask(Uj)}},xn={x:!1,y:!1};function Bb(){return xn.x||xn.y}function Hj(e){return e==="x"||e==="y"?xn[e]?null:(xn[e]=!0,()=>{xn[e]=!1}):xn.x||xn.y?null:(xn.x=xn.y=!0,()=>{xn.x=xn.y=!1})}function Wj(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 zb(e,t){const n=Wj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function sy(e){return!(e.pointerType==="touch"||Bb())}function qj(e,t,n={}){const[r,i,s]=zb(e,n),o=a=>{if(!sy(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{sy(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Vb=(e,t)=>t?e===t?!0:Vb(e,t.parentElement):!1,Em=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Gj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qj(e){return Gj.has(e.tagName)||e.tabIndex!==-1}const Qo=new WeakSet;function oy(e){return t=>{t.key==="Enter"&&e(t)}}function Pd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Yj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=oy(()=>{if(Qo.has(n))return;Pd(n,"down");const i=oy(()=>{Pd(n,"up")}),s=()=>Pd(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 ay(e){return Em(e)&&!Bb()}function Kj(e,t,n={}){const[r,i,s]=zb(e,n),o=a=>{const l=a.currentTarget;if(!ay(a)||Qo.has(l))return;Qo.add(l);const u=t(l,a),d=(p,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!ay(p)||!Qo.has(l))&&(Qo.delete(l),typeof u=="function"&&u(p,{success:m}))},c=p=>{d(p,l===window||l===document||n.useGlobalTarget||Vb(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>Yj(u,i)),!Qj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const ly=30,Xj=e=>!isNaN(parseFloat(e));class Zj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Yn.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=Yn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xj(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 wm);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.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=Yn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ly)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ly);return Mb(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 Ma(e,t){return new Zj(e,t)}const Ub=v.createContext({strict:!1}),uy={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"]},po={};for(const e in uy)po[e]={isEnabled:t=>uy[e].some(n=>!!t[n])};function Jj(e){for(const t in e)po[t]={...po[t],...e[t]}}const eA=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 qu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eA.has(e)}let Hb=e=>!qu(e);function tA(e){e&&(Hb=t=>t.startsWith("on")?!qu(t):e(t))}try{tA(require("@emotion/is-prop-valid").default)}catch{}function nA(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Hb(i)||n===!0&&qu(i)||!t&&!qu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function rA(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 Tc=v.createContext({});function Ec(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fa(e){return typeof e=="string"||Array.isArray(e)}const _m=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jm=["initial",..._m];function _c(e){return Ec(e.animate)||jm.some(t=>Fa(e[t]))}function Wb(e){return!!(_c(e)||e.variants)}function iA(e,t){if(_c(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fa(n)?n:void 0,animate:Fa(r)?r:void 0}}return e.inherit!==!1?t:{}}function sA(e){const{initial:t,animate:n}=iA(e,v.useContext(Tc));return v.useMemo(()=>({initial:t,animate:n}),[cy(t),cy(n)])}function cy(e){return Array.isArray(e)?e.join(" "):e}const oA=Symbol.for("motionComponentSymbol");function Ds(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function aA(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ds(n)&&(n.current=r))},[t])}const Am=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lA="framerAppearId",qb="data-"+Am(lA),Gb=v.createContext({});function uA(e,t,n,r,i){var g,x;const{visualElement:s}=v.useContext(Tc),o=v.useContext(Ub),a=v.useContext(kc),l=v.useContext(gm).reducedMotion,u=v.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 d=u.current,c=v.useContext(Gb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&cA(u.current,n,i,c);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[qb],m=v.useRef(!!p&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,p))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,p)));return Db(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Tm.render(d.render),m.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,p)}),m.current=!1))}),d}function cA(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Qb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ds(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function Qb(e){if(e)return e.options.allowProjection!==!1?e.projection:Qb(e.parent)}function dA({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Jj(e);function s(a,l){let u;const d={...v.useContext(gm),...a,layoutId:fA(a)},{isStatic:c}=d,f=sA(a),p=r(a,c);if(!c&&mm){pA();const m=hA(d);u=m.MeasureLayout,f.visualElement=uA(i,p,d,t,m.ProjectionNode)}return h.jsxs(Tc.Provider,{value:f,children:[u&&f.visualElement?h.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,aA(p,f.visualElement,l),p,c,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[oA]=i,o}function fA({layoutId:e}){const t=v.useContext(hm).id;return t&&e!==void 0?t+"-"+e:e}function pA(e,t){v.useContext(Ub).strict}function hA(e){const{drag:t,layout:n}=po;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 Yb=e=>t=>typeof t=="string"&&t.startsWith(e),Rm=Yb("--"),mA=Yb("var(--"),Pm=e=>mA(e)?gA.test(e.split("/*")[0].trim()):!1,gA=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,La={};function vA(e){for(const t in e)La[t]=e[t],Rm(t)&&(La[t].isCSSVariable=!0)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],as=new Set(ko);function Kb(e,{layout:t,layoutId:n}){return as.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!La[e]||e==="opacity")}const gt=e=>!!(e&&e.getVelocity),Xb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,vr=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ia={...To,transform:e=>vr(0,1,e)},Fl={...To,default:1},il=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_r=il("deg"),Kn=il("%"),ie=il("px"),yA=il("vh"),xA=il("vw"),dy={...Kn,parse:e=>Kn.parse(e)/100,transform:e=>Kn.transform(e*100)},wA={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie},bA={rotate:_r,rotateX:_r,rotateY:_r,rotateZ:_r,scale:Fl,scaleX:Fl,scaleY:Fl,scaleZ:Fl,skew:_r,skewX:_r,skewY:_r,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:Ia,originX:dy,originY:dy,originZ:ie},fy={...To,transform:Math.round},Om={...wA,...bA,zIndex:fy,size:ie,fillOpacity:Ia,strokeOpacity:Ia,numOctaves:fy},SA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CA=ko.length;function kA(e,t,n){let r="",i=!0;for(let s=0;s<CA;s++){const o=ko[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=Xb(a,Om[o]);if(!l){i=!1;const d=SA[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Dm(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(as.has(l)){o=!0;continue}else if(Rm(l)){i[l]=u;continue}else{const d=Xb(u,Om[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=kA(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${u} ${d}`}}const Nm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zb(e,t,n){for(const r in t)!gt(t[r])&&!Kb(r,n)&&(e[r]=t[r])}function TA({transformTemplate:e},t){return v.useMemo(()=>{const n=Nm();return Dm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function EA(e,t){const n=e.style||{},r={};return Zb(r,n,e),Object.assign(r,TA(e,t)),r}function _A(e,t){const n={},r=EA(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 jA=["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 Mm(e){return typeof e!="string"||e.includes("-")?!1:!!(jA.indexOf(e)>-1||/[A-Z]/u.test(e))}const AA={offset:"stroke-dashoffset",array:"stroke-dasharray"},RA={offset:"strokeDashoffset",array:"strokeDasharray"};function PA(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?AA:RA;e[s.offset]=ie.transform(-r);const o=ie.transform(t),a=ie.transform(n);e[s.array]=`${o} ${a}`}function py(e,t,n){return typeof e=="string"?e:ie.transform(t+n*e)}function OA(e,t,n){const r=py(t,e.x,e.width),i=py(n,e.y,e.height);return`${r} ${i}`}function Fm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Dm(e,u,c),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=OA(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&PA(f,o,a,l,!1)}const Jb=()=>({...Nm(),attrs:{}}),Lm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function DA(e,t,n,r){const i=v.useMemo(()=>{const s=Jb();return Fm(s,t,Lm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zb(s,e.style,e),i.style={...s,...i.style}}return i}function NA(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Mm(n)?DA:_A)(r,s,o,n),u=nA(r,typeof n=="string",e),d=n!==v.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=v.useMemo(()=>gt(c)?c.get():c,[c]);return v.createElement(n,{...d,children:f})}}function hy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Im(e,t,n,r){if(typeof t=="function"){const[i,s]=hy(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]=hy(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Sp=e=>Array.isArray(e),MA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),FA=e=>Sp(e)?e[e.length-1]||0:e;function ou(e){const t=gt(e)?e.get():e;return MA(t)?t.toValue():t}function LA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:IA(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const eS=e=>(t,n)=>{const r=v.useContext(Tc),i=v.useContext(kc),s=()=>LA(e,t,r,i);return n?s():Cc(s)};function IA(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=ou(s[f]);let{initial:o,animate:a}=e;const l=_c(e),u=Wb(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const c=d?a:o;if(c&&typeof c!="boolean"&&!Ec(c)){const f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){const m=Im(e,f[p]);if(m){const{transitionEnd:g,transition:x,...y}=m;for(const w in y){let b=y[w];if(Array.isArray(b)){const k=d?b.length-1:0;b=b[k]}b!==null&&(i[w]=b)}for(const w in g)i[w]=g[w]}}}return i}function $m(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(gt(r[o])||t.style&&gt(t.style[o])||Kb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const $A={useVisualState:eS({scrapeMotionValuesFromProps:$m,createRenderState:Nm})};function tS(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 nS(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 rS=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 iS(e,t,n,r){nS(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(rS.has(i)?i:Am(i),t.attrs[i])}function sS(e,t,n){const r=$m(e,t,n);for(const i in e)if(gt(e[i])||gt(t[i])){const s=ko.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const my=["x","y","width","height","cx","cy","r"],BA={useVisualState:eS({scrapeMotionValuesFromProps:sS,createRenderState:Jb,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(as.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<my.length;a++){const l=my[a];e[l]!==t[l]&&(o=!0)}o&&ke.read(()=>{tS(n,r),ke.render(()=>{Fm(r,i,Lm(n.tagName),e.transformTemplate),iS(n,r)})})}})};function zA(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Mm(r)?BA:$A,preloadedFeatures:e,useRender:NA(i),createVisualElement:t,Component:r};return dA(o)}}function $a(e,t,n){const r=e.getProps();return Im(r,t,n!==void 0?n:r.custom,e)}const oS=new Set(["width","height","top","left","right","bottom",...ko]);function VA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ma(n))}function UA(e,t){const n=$a(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=FA(s[o]);VA(e,o,a)}}function HA(e){return!!(gt(e)&&e.add)}function Cp(e,t){const n=e.getValue("willChange");if(HA(n))return n.add(t);if(!n&&wp.WillChange){const r=new wp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function aS(e){return e.props[qb]}const lS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,WA=1e-7,qA=12;function GA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=lS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>WA&&++a<qA);return o}function sl(e,t,n,r){if(e===t&&n===r)return cn;const i=s=>GA(s,0,1,e,n);return s=>s===0||s===1?s:lS(i(s),t,r)}const uS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cS=e=>t=>1-e(1-t),dS=sl(.33,1.53,.69,.99),Bm=cS(dS),fS=uS(Bm),pS=e=>(e*=2)<1?.5*Bm(e):.5*(2-Math.pow(2,-10*(e-1))),zm=e=>1-Math.sin(Math.acos(e)),hS=cS(zm),mS=uS(zm),gS=e=>/^0[^.\s]+$/u.test(e);function QA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gS(e):!0}const sa=e=>Math.round(e*1e5)/1e5,Vm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function YA(e){return e==null}const KA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Um=(e,t)=>n=>!!(typeof n=="string"&&KA.test(n)&&n.startsWith(e)||t&&!YA(n)&&Object.prototype.hasOwnProperty.call(n,t)),vS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Vm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},XA=e=>vr(0,255,e),Od={...To,transform:e=>Math.round(XA(e))},Pi={test:Um("rgb","red"),parse:vS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Od.transform(e)+", "+Od.transform(t)+", "+Od.transform(n)+", "+sa(Ia.transform(r))+")"};function ZA(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 kp={test:Um("#"),parse:ZA,transform:Pi.transform},Ns={test:Um("hsl","hue"),parse:vS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kn.transform(sa(t))+", "+Kn.transform(sa(n))+", "+sa(Ia.transform(r))+")"},ht={test:e=>Pi.test(e)||kp.test(e)||Ns.test(e),parse:e=>Pi.test(e)?Pi.parse(e):Ns.test(e)?Ns.parse(e):kp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pi.transform(e):Ns.transform(e)},JA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function eR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vm))==null?void 0:t.length)||0)+(((n=e.match(JA))==null?void 0:n.length)||0)>0}const yS="number",xS="color",tR="var",nR="var(",gy="${}",rR=/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 Ba(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(rR,l=>(ht.test(l)?(r.color.push(s),i.push(xS),n.push(ht.parse(l))):l.startsWith(nR)?(r.var.push(s),i.push(tR),n.push(l)):(r.number.push(s),i.push(yS),n.push(parseFloat(l))),++s,gy)).split(gy);return{values:n,split:a,indexes:r,types:i}}function wS(e){return Ba(e).values}function bS(e){const{split:t,types:n}=Ba(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===yS?s+=sa(i[o]):a===xS?s+=ht.transform(i[o]):s+=i[o]}return s}}const iR=e=>typeof e=="number"?0:e;function sR(e){const t=wS(e);return bS(e)(t.map(iR))}const li={test:eR,parse:wS,createTransformer:bS,getAnimatableNone:sR},oR=new Set(["brightness","contrast","saturate","opacity"]);function aR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vm)||[];if(!r)return e;const i=n.replace(r,"");let s=oR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const lR=/\b([a-z-]*)\(.*?\)/gu,Tp={...li,getAnimatableNone:e=>{const t=e.match(lR);return t?t.map(aR).join(" "):e}},uR={...Om,color:ht,backgroundColor:ht,outlineColor:ht,fill:ht,stroke:ht,borderColor:ht,borderTopColor:ht,borderRightColor:ht,borderBottomColor:ht,borderLeftColor:ht,filter:Tp,WebkitFilter:Tp},SS=e=>uR[e];function CS(e,t){let n=SS(e);return n!==Tp&&(n=li),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cR=new Set(["auto","none","0"]);function dR(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!cR.has(s)&&Ba(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=CS(n,i)}const Oi=e=>e*180/Math.PI,Ep=e=>{const t=Oi(Math.atan2(e[1],e[0]));return _p(t)},fR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ep,rotateZ:Ep,skewX:e=>Oi(Math.atan(e[1])),skewY:e=>Oi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_p=e=>(e=e%360,e<0&&(e+=360),e),vy=Ep,yy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),pR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yy,scaleY:xy,scale:e=>(yy(e)+xy(e))/2,rotateX:e=>_p(Oi(Math.atan2(e[6],e[5]))),rotateY:e=>_p(Oi(Math.atan2(-e[2],e[0]))),rotateZ:vy,rotate:vy,skewX:e=>Oi(Math.atan(e[4])),skewY:e=>Oi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wy(e){return e.includes("scale")?1:0}function jp(e,t){if(!e||e==="none")return wy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=pR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=fR,i=a}if(!i)return wy(t);const s=r[t],o=i[1].split(",").map(mR);return typeof s=="function"?s(o):o[s]}const hR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jp(n,t)};function mR(e){return parseFloat(e.trim())}const by=e=>e===To||e===ie,gR=new Set(["x","y","z"]),vR=ko.filter(e=>!gR.has(e));function yR(e){const t=[];return vR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ho={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})=>jp(t,"x"),y:(e,{transform:t})=>jp(t,"y")};ho.translateX=ho.x;ho.translateY=ho.y;const Hi=new Set;let Ap=!1,Rp=!1;function kS(){if(Rp){const e=Array.from(Hi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=yR(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)})}Rp=!1,Ap=!1,Hi.forEach(e=>e.complete()),Hi.clear()}function TS(){Hi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rp=!0)})}function xR(){TS(),kS()}class Hm{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?(Hi.add(this),Ap||(Ap=!0,ke.read(TS),ke.resolveKeyframes(kS))):(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),Hi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Hi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ES=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),wR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bR(e){const t=wR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function _S(e,t,n=1){const[r,i]=bR(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return ES(o)?parseFloat(o):o}return Pm(i)?_S(i,t,n+1):i}const jS=e=>t=>t.test(e),SR={test:e=>e==="auto",parse:e=>e},AS=[To,ie,Kn,_r,xA,yA,SR],Sy=e=>AS.find(jS(e));class RS extends Hm{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(),Pm(u))){const d=_S(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!oS.has(r)||t.length!==2)return;const[i,s]=t,o=Sy(i),a=Sy(s);if(o!==a)if(by(o)&&by(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++)QA(t[i])&&r.push(i);r.length&&dR(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=ho[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]=ho[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 Cy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(li.test(e)||e==="0")&&!e.startsWith("url("));function CR(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 kR(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=Cy(i,t),a=Cy(s,t);return!o||!a?!1:CR(e)||(n==="spring"||Sm(n))&&r}const TR=e=>e!==null;function jc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(TR),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const ER=40;class PS{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=Yn.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>ER?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&xR(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Yn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!kR(t,r,i,s))if(o)this.options.duration=0;else{l&&l(jc(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},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 Oe=(e,t,n)=>e+(t-e)*n;function Dd(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 _R({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=Dd(l,a,e+1/3),s=Dd(l,a,e),o=Dd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Gu(e,t){return n=>n>0?t:e}const Nd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},jR=[kp,Pi,Ns],AR=e=>jR.find(t=>t.test(e));function ky(e){const t=AR(e);if(!t)return!1;let n=t.parse(e);return t===Ns&&(n=_R(n)),n}const Ty=(e,t)=>{const n=ky(e),r=ky(t);if(!n||!r)return Gu(e,t);const i={...n};return s=>(i.red=Nd(n.red,r.red,s),i.green=Nd(n.green,r.green,s),i.blue=Nd(n.blue,r.blue,s),i.alpha=Oe(n.alpha,r.alpha,s),Pi.transform(i))},RR=(e,t)=>n=>t(e(n)),ol=(...e)=>e.reduce(RR),Pp=new Set(["none","hidden"]);function PR(e,t){return Pp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OR(e,t){return n=>Oe(e,t,n)}function Wm(e){return typeof e=="number"?OR:typeof e=="string"?Pm(e)?Gu:ht.test(e)?Ty:MR:Array.isArray(e)?OS:typeof e=="object"?ht.test(e)?Ty:DR:Gu}function OS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Wm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function DR(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Wm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function NR(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 MR=(e,t)=>{const n=li.createTransformer(t),r=Ba(e),i=Ba(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?Pp.has(e)&&!i.values.length||Pp.has(t)&&!r.values.length?PR(e,t):ol(OS(NR(r,i),i.values),n):Gu(e,t)};function DS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Oe(e,t,n):Wm(e)(e,t)}const FR=5;function NS(e,t,n){const r=Math.max(t-FR,0);return Mb(n-e(r),t-r)}const Le={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},Md=.001;function LR({duration:e=Le.duration,bounce:t=Le.bounce,velocity:n=Le.velocity,mass:r=Le.mass}){let i,s,o=1-t;o=vr(Le.minDamping,Le.maxDamping,o),e=vr(Le.minDuration,Le.maxDuration,Qn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,p=Op(u,o),m=Math.exp(-c);return Md-f/p*m},s=u=>{const c=u*o*e,f=c*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),g=Op(Math.pow(u,2),o);return(-i(u)+Md>0?-1:1)*((f-p)*m)/g}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Md+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=$R(i,s,a);if(e=Gn(e),isNaN(l))return{stiffness:Le.stiffness,damping:Le.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const IR=12;function $R(e,t,n){let r=n;for(let i=1;i<IR;i++)r=r-e(r)/t(r);return r}function Op(e,t){return e*Math.sqrt(1-t*t)}const BR=["duration","bounce"],zR=["stiffness","damping","mass"];function Ey(e,t){return t.some(n=>e[n]!==void 0)}function VR(e){let t={velocity:Le.velocity,stiffness:Le.stiffness,damping:Le.damping,mass:Le.mass,isResolvedFromDuration:!1,...e};if(!Ey(e,zR)&&Ey(e,BR))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*vr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Le.mass,stiffness:i,damping:s}}else{const n=LR(e);t={...t,...n,mass:Le.mass},t.isResolvedFromDuration=!0}return t}function Qu(e=Le.visualDuration,t=Le.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:d,duration:c,velocity:f,isResolvedFromDuration:p}=VR({...n,velocity:-Qn(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*d)),x=o-s,y=Qn(Math.sqrt(l/d)),w=Math.abs(x)<5;r||(r=w?Le.restSpeed.granular:Le.restSpeed.default),i||(i=w?Le.restDelta.granular:Le.restDelta.default);let b;if(g<1){const T=Op(y,g);b=E=>{const _=Math.exp(-g*y*E);return o-_*((m+g*y*x)/T*Math.sin(T*E)+x*Math.cos(T*E))}}else if(g===1)b=T=>o-Math.exp(-y*T)*(x+(m+y*x)*T);else{const T=y*Math.sqrt(g*g-1);b=E=>{const _=Math.exp(-g*y*E),R=Math.min(T*E,300);return o-_*((m+g*y*x)*Math.sinh(R)+T*x*Math.cosh(R))/T}}const k={calculatedDuration:p&&c||null,next:T=>{const E=b(T);if(p)a.done=T>=c;else{let _=0;g<1&&(_=T===0?Gn(m):NS(b,T,E));const R=Math.abs(_)<=r,D=Math.abs(o-E)<=i;a.done=R&&D}return a.value=a.done?o:E,a},toString:()=>{const T=Math.min(km(k),Wu),E=Fb(_=>k.next(T*_).value,T,30);return T+"ms "+E},toTransition:()=>{}};return k}Qu.applyToOptions=e=>{const t=Bj(e,100,Qu);return e.ease=Na()?t.ease:"easeOut",e.duration=Gn(t.duration),e.type="keyframes",e};function _y({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:d}){const c=e[0],f={done:!1,value:c},p=R=>a!==void 0&&R<a||l!==void 0&&R>l,m=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=c+g,y=o===void 0?x:o(x);y!==x&&(g=y-c);const w=R=>-g*Math.exp(-R/r),b=R=>y+w(R),k=R=>{const D=w(R),N=b(R);f.done=Math.abs(D)<=u,f.value=f.done?y:N};let T,E;const _=R=>{p(f.value)&&(T=R,E=Qu({keyframes:[f.value,m(f.value)],velocity:NS(b,R,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:R=>{let D=!1;return!E&&T===void 0&&(D=!0,k(R),_(R)),T!==void 0&&R>=T?E.next(R-T):(!D&&k(R),f)}}}const UR=sl(.42,0,1,1),HR=sl(0,0,.58,1),MS=sl(.42,0,.58,1),WR=e=>Array.isArray(e)&&typeof e[0]!="number",jy={linear:cn,easeIn:UR,easeInOut:MS,easeOut:HR,circIn:zm,circInOut:mS,circOut:hS,backIn:Bm,backInOut:fS,backOut:dS,anticipate:pS},Ay=e=>{if(bm(e)){xp(e.length===4);const[t,n,r,i]=e;return sl(t,n,r,i)}else if(typeof e=="string")return xp(jy[e]!==void 0),jy[e];return e};function qR(e,t,n){const r=[],i=n||DS,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]||cn:t;a=ol(l,a)}r.push(a)}return r}function GR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(xp(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=qR(t,r,i),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(d<e[c+1]);c++);const f=Da(e[c],e[c+1],d);return a[c](f)};return n?d=>u(vr(e[0],e[s-1],d)):u}function QR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Da(0,t,r);e.push(Oe(n,1,i))}}function YR(e){const t=[0];return QR(t,e.length-1),t}function KR(e,t){return e.map(n=>n*t)}function XR(e,t){return e.map(()=>t||MS).splice(0,e.length-1)}function Yu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=WR(r)?r.map(Ay):Ay(r),s={done:!1,value:t[0]},o=KR(n&&n.length===t.length?n:YR(t),e),a=GR(o,t,{ease:Array.isArray(i)?i:XR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const ZR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>ai(t),now:()=>ot.isProcessing?ot.timestamp:Yn.now()}},JR={decay:_y,inertia:_y,tween:Yu,keyframes:Yu,spring:Qu},eP=e=>e/100;class qm extends PS{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)||Hm,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=Sm(n)?n:JR[n]||Yu;let l,u;a!==Yu&&typeof t[0]!="number"&&(l=ol(eP,DS(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=km(d));const{calculatedDuration:c}=d,f=c+i,p=f*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:f,totalDuration:p}}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:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:g,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 y=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,k=s;if(p){const R=Math.min(this.currentTime,d)/c;let D=Math.floor(R),N=R%1;!N&&R>=1&&(N=1),N===1&&D--,D=Math.min(D,p+1),!!(D%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/c)):m==="mirror"&&(k=o)),b=vr(0,1,N)*c}const T=w?{done:!1,value:l[0]}:k.next(b);a&&(T.value=a(T.value));let{done:E}=T;!w&&u!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return _&&i!==void 0&&(T.value=jc(l,this.options,i)),x&&x(T.value),_&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Qn(t.calculatedDuration):0}get time(){return Qn(this.currentTime)}set time(t){t=Gn(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=Qn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZR,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 tP=new Set(["opacity","clipPath","filter","transform"]),nP=xm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ku=10,rP=2e4;function iP(e){return Sm(e.type)||e.type==="spring"||!Ib(e.ease)}function sP(e,t){const n=new qm({...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<rP;)r=n.sample(s),i.push(r.value),s+=Ku;return{times:void 0,keyframes:i,duration:s-Ku,ease:"linear"}}const FS={anticipate:pS,backInOut:fS,circInOut:mS};function oP(e){return e in FS}class Ry extends PS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new RS(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"&&Na()&&oP(s)&&(s=FS[s]),iP(this.options)){const{onComplete:c,onUpdate:f,motionValue:p,element:m,...g}=this.options,x=sP(t,g);t=x.keyframes,t.length===1&&(t[1]=t[0]),r=x.duration,i=x.times,s=x.ease,o="keyframes"}const d=$j(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(iy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(jc(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:d,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 Qn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Qn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Gn(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 cn;const{animation:r}=n;iy(r,t)}return cn}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:d,onComplete:c,element:f,...p}=this.options,m=new qm({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),g=Gn(this.time);u.setWithVelocity(m.sample(g-Ku).value,m.sample(g).value,Ku)}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 nP()&&r&&tP.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const aP={type:"spring",stiffness:500,damping:25,restSpeed:10},lP=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),uP={type:"keyframes",duration:.8},cP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dP=(e,{keyframes:t})=>t.length>2?uP:as.has(e)?e.startsWith("scale")?lP(t[1]):aP:cP;function fP({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Gm=(e,t,n,r={},i,s)=>o=>{const a=Cm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Gn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};fP(a)||(d={...d,...dP(e,d)}),d.duration&&(d.duration=Gn(d.duration)),d.repeatDelay&&(d.repeatDelay=Gn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let c=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(c=!0)),d.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const f=jc(d.keyframes,a);if(f!==void 0)return ke.update(()=>{d.onUpdate(f),d.onComplete()}),new Fj([])}return!s&&Ry.supports(d)?new Ry(d):new qm(d)};function pP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function LS(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 d in a){const c=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||u&&pP(u,d))continue;const p={delay:n,...Cm(s||{},d)};let m=!1;if(window.MotionHandoffAnimation){const x=aS(e);if(x){const y=window.MotionHandoffAnimation(x,d,ke);y!==null&&(p.startTime=y,m=!0)}}Cp(e,d),c.start(Gm(d,c,f,e.shouldReduceMotion&&oS.has(d)?{type:!1}:p,e,m));const g=c.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{ke.update(()=>{o&&UA(e,o)})}),l}function Dp(e,t,n={}){var l;const r=$a(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(LS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return hP(e,t,d+u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,d]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function hP(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(mP).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Dp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function mP(e,t){return e.sortNodePosition(t)}function gP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Dp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Dp(e,t,n);else{const i=typeof t=="function"?$a(e,t,n.custom):t;r=Promise.all(LS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function IS(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 vP=jm.length;function $S(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$S(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<vP;n++){const r=jm[n],i=e.props[r];(Fa(i)||i===!1)&&(t[r]=i)}return t}const yP=[..._m].reverse(),xP=_m.length;function wP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gP(e,n,r)))}function bP(e){let t=wP(e),n=Py(),r=!0;const i=l=>(u,d)=>{var f;const c=$a(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:p,transitionEnd:m,...g}=c;u={...u,...g,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=$S(e.parent)||{},c=[],f=new Set;let p={},m=1/0;for(let x=0;x<xP;x++){const y=yP[x],w=n[y],b=u[y]!==void 0?u[y]:d[y],k=Fa(b),T=y===l?w.isActive:null;T===!1&&(m=x);let E=b===d[y]&&b!==u[y]&&k;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...p},!w.isActive&&T===null||!b&&!w.prevProp||Ec(b)||typeof b=="boolean")continue;const _=SP(w.prevProp,b);let R=_||y===l&&w.isActive&&!E&&k||x>m&&k,D=!1;const N=Array.isArray(b)?b:[b];let j=N.reduce(i(y),{});T===!1&&(j={});const{prevResolvedValues:Y={}}=w,G={...Y,...j},Z=oe=>{R=!0,f.has(oe)&&(D=!0,f.delete(oe)),w.needsAnimating[oe]=!0;const O=e.getValue(oe);O&&(O.liveStyle=!1)};for(const oe in G){const O=j[oe],M=Y[oe];if(p.hasOwnProperty(oe))continue;let V=!1;Sp(O)&&Sp(M)?V=!IS(O,M):V=O!==M,V?O!=null?Z(oe):f.add(oe):O!==void 0&&f.has(oe)?Z(oe):w.protectedKeys[oe]=!0}w.prevProp=b,w.prevResolvedValues=j,w.isActive&&(p={...p,...j}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(E&&_)||D)&&c.push(...N.map(oe=>({animation:oe,options:{type:y}})))}if(f.size){const x={};if(typeof u.initial!="boolean"){const y=$a(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}f.forEach(y=>{const w=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=w??null}),c.push({animation:x})}let g=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Py(),r=!0}}}function SP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!IS(t,e):!1}function wi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Py(){return{animate:wi(!0),whileInView:wi(),whileHover:wi(),whileTap:wi(),whileDrag:wi(),whileFocus:wi(),exit:wi()}}class pi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class CP extends pi{constructor(t){super(t),t.animationState||(t.animationState=bP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ec(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 kP=0;class TP extends pi{constructor(){super(...arguments),this.id=kP++}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 EP={animation:{Feature:CP},exit:{Feature:TP}};function za(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function al(e){return{point:{x:e.pageX,y:e.pageY}}}const _P=e=>t=>Em(t)&&e(t,al(t));function oa(e,t,n,r){return za(e,t,_P(n),r)}function BS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function AP(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 zS=1e-4,RP=1-zS,PP=1+zS,VS=.01,OP=0-VS,DP=0+VS;function St(e){return e.max-e.min}function NP(e,t,n){return Math.abs(e-t)<=n}function Oy(e,t,n,r=.5){e.origin=r,e.originPoint=Oe(t.min,t.max,e.origin),e.scale=St(n)/St(t),e.translate=Oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=RP&&e.scale<=PP||isNaN(e.scale))&&(e.scale=1),(e.translate>=OP&&e.translate<=DP||isNaN(e.translate))&&(e.translate=0)}function aa(e,t,n,r){Oy(e.x,t.x,n.x,r?r.originX:void 0),Oy(e.y,t.y,n.y,r?r.originY:void 0)}function Dy(e,t,n){e.min=n.min+t.min,e.max=e.min+St(t)}function MP(e,t,n){Dy(e.x,t.x,n.x),Dy(e.y,t.y,n.y)}function Ny(e,t,n){e.min=t.min-n.min,e.max=e.min+St(t)}function la(e,t,n){Ny(e.x,t.x,n.x),Ny(e.y,t.y,n.y)}const My=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ms=()=>({x:My(),y:My()}),Fy=()=>({min:0,max:0}),Be=()=>({x:Fy(),y:Fy()});function tn(e){return[e("x"),e("y")]}function Fd(e){return e===void 0||e===1}function Np({scale:e,scaleX:t,scaleY:n}){return!Fd(e)||!Fd(t)||!Fd(n)}function ki(e){return Np(e)||US(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function US(e){return Ly(e.x)||Ly(e.y)}function Ly(e){return e&&e!=="0%"}function Xu(e,t,n){const r=e-n,i=t*r;return n+i}function Iy(e,t,n,r,i){return i!==void 0&&(e=Xu(e,i,r)),Xu(e,n,r)+t}function Mp(e,t=0,n=1,r,i){e.min=Iy(e.min,t,n,r,i),e.max=Iy(e.max,t,n,r,i)}function HS(e,{x:t,y:n}){Mp(e.x,t.translate,t.scale,t.originPoint),Mp(e.y,n.translate,n.scale,n.originPoint)}const $y=.999999999999,By=1.0000000000001;function FP(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&&Ls(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,HS(e,o)),r&&ki(s.latestValues)&&Ls(e,s.latestValues))}t.x<By&&t.x>$y&&(t.x=1),t.y<By&&t.y>$y&&(t.y=1)}function Fs(e,t){e.min=e.min+t,e.max=e.max+t}function zy(e,t,n,r,i=.5){const s=Oe(e.min,e.max,i);Mp(e,t,n,s,r)}function Ls(e,t){zy(e.x,t.x,t.scaleX,t.scale,t.originX),zy(e.y,t.y,t.scaleY,t.scale,t.originY)}function WS(e,t){return BS(AP(e.getBoundingClientRect(),t))}function LP(e,t,n){const r=WS(e,n),{scroll:i}=t;return i&&(Fs(r.x,i.offset.x),Fs(r.y,i.offset.y)),r}const qS=({current:e})=>e?e.ownerDocument.defaultView:null,Vy=(e,t)=>Math.abs(e-t);function IP(e,t){const n=Vy(e.x,t.x),r=Vy(e.y,t.y);return Math.sqrt(n**2+r**2)}class GS{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=Id(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=IP(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=c,{timestamp:g}=ot;this.history.push({...m,timestamp:g});const{onStart:x,onMove:y}=this.handlers;f||(x&&x(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Ld(f,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Id(c.type==="pointercancel"?this.lastMoveEventInfo:Ld(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,x),m&&m(c,x)},!Em(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=al(t),a=Ld(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=ot;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Id(a,this.history)),this.removeListeners=ol(oa(this.contextWindow,"pointermove",this.handlePointerMove),oa(this.contextWindow,"pointerup",this.handlePointerUp),oa(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ai(this.updatePoint)}}function Ld(e,t){return t?{point:t(e.point)}:e}function Uy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Id({point:e},t){return{point:e,delta:Uy(e,QS(t)),offset:Uy(e,$P(t)),velocity:BP(t,.1)}}function $P(e){return e[0]}function QS(e){return e[e.length-1]}function BP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=QS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Gn(t)));)n--;if(!r)return{x:0,y:0};const s=Qn(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 zP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Oe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Oe(n,e,r.max):Math.min(e,n)),e}function Hy(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 VP(e,{top:t,left:n,bottom:r,right:i}){return{x:Hy(e.x,n,i),y:Hy(e.y,t,r)}}function Wy(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 UP(e,t){return{x:Wy(e.x,t.x),y:Wy(e.y,t.y)}}function HP(e,t){let n=.5;const r=St(e),i=St(t);return i>r?n=Da(t.min,t.max-r,e.min):r>i&&(n=Da(e.min,e.max-i,t.min)),vr(0,1,n)}function WP(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 Fp=.35;function qP(e=Fp){return e===!1?e=0:e===!0&&(e=Fp),{x:qy(e,"left","right"),y:qy(e,"top","bottom")}}function qy(e,t,n){return{min:Gy(e,t),max:Gy(e,n)}}function Gy(e,t){return typeof e=="number"?e:e[t]||0}const GP=new WeakMap;class QP{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=Be(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(al(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Hj(f),!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),tn(x=>{let y=this.getAxisMotionValue(x).get()||0;if(Kn.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[x];b&&(y=St(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),m&&ke.postRender(()=>m(d,c)),Cp(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=c;if(p&&this.currentDirection===null){this.currentDirection=YP(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,x),this.updateAxis("y",c.point,x),this.visualElement.render(),g&&g(d,c)},a=(d,c)=>this.stop(d,c),l=()=>tn(d=>{var c;return this.getAnimationState(d)==="paused"&&((c=this.getAxisMotionValue(d).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new GS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:qS(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&&ke.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||!Ll(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=zP(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&&Ds(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=VP(r.layoutBox,t):this.constraints=!1,this.elastic=qP(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&tn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=WP(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ds(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=LP(r,i.root,this.visualElement.getTransformPagePoint());let o=UP(i.layout.layoutBox,s);if(n){const a=n(jP(o));this.hasMutatedConstraints=!!a,a&&(o=BS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=tn(d=>{if(!Ll(d,n,this.currentDirection))return;let c=l&&l[d]||{};o&&(c={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Cp(this.visualElement,t),r.start(Gm(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(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){tn(n=>{const{drag:r}=this.getProps();if(!Ll(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]-Oe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ds(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=HP({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(),tn(o=>{if(!Ll(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Oe(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;GP.set(this.visualElement,this);const t=this.visualElement.current,n=oa(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ds(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()),ke.read(r);const o=za(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(tn(d=>{const c=this.getAxisMotionValue(d);c&&(this.originPoint[d]+=l[d].translate,c.set(c.get()+l[d].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=Fp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ll(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class KP extends pi{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new QP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Qy=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class XP extends pi{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new GS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Qy(t),onStart:Qy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ke.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=oa(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 au={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $o={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const n=Yy(e,t.target.x),r=Yy(e,t.target.y);return`${n}% ${r}%`}},ZP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=li.parse(e);if(i.length>5)return r;const s=li.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=Oe(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 JP extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;vA(eO),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()})),au.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()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Tm.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 YS(e){const[t,n]=Nb(),r=v.useContext(hm);return h.jsx(JP,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(Gb),isPresent:t,safeToRemove:n})}const eO={borderRadius:{...$o,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$o,borderTopRightRadius:$o,borderBottomLeftRadius:$o,borderBottomRightRadius:$o,boxShadow:ZP};function tO(e,t,n){const r=gt(e)?e:Ma(e);return r.start(Gm("",r,t,n)),r.animation}function nO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const rO=(e,t)=>e.depth-t.depth;class iO{constructor(){this.children=[],this.isDirty=!1}add(t){vm(this.children,t),this.isDirty=!0}remove(t){ym(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rO),this.isDirty=!1,this.children.forEach(t)}}function sO(e,t){const n=Yn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ai(r),e(s-t))};return ke.read(r,!0),()=>ai(r)}const KS=["TopLeft","TopRight","BottomLeft","BottomRight"],oO=KS.length,Ky=e=>typeof e=="string"?parseFloat(e):e,Xy=e=>typeof e=="number"||ie.test(e);function aO(e,t,n,r,i,s){i?(e.opacity=Oe(0,n.opacity??1,lO(r)),e.opacityExit=Oe(t.opacity??1,0,uO(r))):s&&(e.opacity=Oe(t.opacity??1,n.opacity??1,r));for(let o=0;o<oO;o++){const a=`border${KS[o]}Radius`;let l=Zy(t,a),u=Zy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xy(l)===Xy(u)?(e[a]=Math.max(Oe(Ky(l),Ky(u),r),0),(Kn.test(u)||Kn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Oe(t.rotate||0,n.rotate||0,r))}function Zy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const lO=XS(0,.5,hS),uO=XS(.5,.95,cn);function XS(e,t,n){return r=>r<e?0:r>t?1:n(Da(e,t,r))}function Jy(e,t){e.min=t.min,e.max=t.max}function Jt(e,t){Jy(e.x,t.x),Jy(e.y,t.y)}function e0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function t0(e,t,n,r,i){return e-=t,e=Xu(e,1/n,r),i!==void 0&&(e=Xu(e,1/i,r)),e}function cO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Kn.test(t)&&(t=parseFloat(t),t=Oe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Oe(s.min,s.max,r);e===s&&(a-=t),e.min=t0(e.min,t,n,a,i),e.max=t0(e.max,t,n,a,i)}function n0(e,t,[n,r,i],s,o){cO(e,t[n],t[r],t[i],t.scale,s,o)}const dO=["x","scaleX","originX"],fO=["y","scaleY","originY"];function r0(e,t,n,r){n0(e.x,t,dO,n?n.x:void 0,r?r.x:void 0),n0(e.y,t,fO,n?n.y:void 0,r?r.y:void 0)}function i0(e){return e.translate===0&&e.scale===1}function ZS(e){return i0(e.x)&&i0(e.y)}function s0(e,t){return e.min===t.min&&e.max===t.max}function pO(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function o0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function JS(e,t){return o0(e.x,t.x)&&o0(e.y,t.y)}function a0(e){return St(e.x)/St(e.y)}function l0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hO{constructor(){this.members=[]}add(t){vm(this.members,t),t.scheduleRender()}remove(t){if(ym(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 mO(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:d,rotateX:c,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),c&&(r+=`rotateX(${c}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}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 $d=["","X","Y","Z"],gO={visibility:"hidden"},u0=1e3;let vO=0;function Bd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function eC(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=aS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&eC(r)}function tC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=vO++,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(wO),this.nodes.forEach(TO),this.nodes.forEach(EO),this.nodes.forEach(bO)},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 iO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new wm),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=nO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=sO(f,250),au.hasAnimatedSinceResize&&(au.hasAnimatedSinceResize=!1,this.nodes.forEach(d0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||PO,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=d.getProps(),w=!this.targetLayout||!JS(this.targetLayout,m),b=!f&&p;if(this.options.layoutRoot||this.resumeFrom||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,b);const k={...Cm(g,"layout"),onPlay:x,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||d0(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,ai(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(_O),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&&eC(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const c=this.path[d];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(c0);return}this.isUpdating||this.nodes.forEach(CO),this.isUpdating=!1,this.nodes.forEach(kO),this.nodes.forEach(yO),this.nodes.forEach(xO),this.clearAllSnapshots();const a=Yn.now();ot.delta=vr(0,1e3/60,a-ot.timestamp),ot.timestamp=a,ot.isProcessing=!0,Rd.update.process(ot),Rd.preRender.process(ot),Rd.render.process(ot),ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Tm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(SO),this.sharedNodes.forEach(jO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!St(this.snapshot.measuredBox.x)&&!St(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=Be(),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&&!ZS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||ki(this.latestValues)||d)&&(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)),OO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Be();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(DO))){const{scroll:d}=this.root;d&&(Fs(a.x,d.offset.x),Fs(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Be();if(Jt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:f}=d;d!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Jt(a,o),Fs(a.x,c.offset.x),Fs(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Be();Jt(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ls(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ki(d.latestValues)&&Ls(l,d.latestValues)}return ki(this.latestValues)&&Ls(l,this.latestValues),l}removeTransform(o){const a=Be();Jt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ki(u.latestValues))continue;Np(u.latestValues)&&u.updateSnapshot();const d=Be(),c=u.measurePageBox();Jt(d,c),r0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return ki(this.latestValues)&&r0(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!==ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:c}=this.options;if(!(!this.layout||!(d||c))){if(this.resolvedRelativeTargetAt=ot.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Be(),this.relativeTargetOrigin=Be(),la(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Be(),this.targetWithTransforms=Be()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),MP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jt(this.target,this.layout.layoutBox),HS(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Be(),this.relativeTargetOrigin=Be(),la(this.relativeTargetOrigin,this.target,p.target),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Np(this.parent.latestValues)||US(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===ot.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=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||d))return;Jt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;FP(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=Be());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(e0(this.prevProjectionDelta.x,this.projectionDelta.x),e0(this.prevProjectionDelta.y,this.projectionDelta.y)),aa(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!l0(this.projectionDelta.x,this.prevProjectionDelta.x)||!l0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=Ms(),this.projectionDelta=Ms(),this.projectionDeltaWithTransform=Ms()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Ms();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Be(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),y=!x||x.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(RO));this.animationProgress=0;let b;this.mixTargetDelta=k=>{const T=k/1e3;f0(c.x,o.x,T),f0(c.y,o.y,T),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(la(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),AO(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&pO(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Be()),Jt(b,this.relativeTarget)),g&&(this.animationValues=d,aO(d,u,this.latestValues,T,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(ai(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{au.hasAnimatedSinceResize=!0,this.currentAnimation=tO(0,u0,{...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(u0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&nC(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Be();const c=St(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=St(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Jt(a,l),Ls(a,d),aa(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new hO),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&&Bd("z",o,u,this.animationValues);for(let d=0;d<$d.length;d++)Bd(`rotate${$d[d]}`,o,u,this.animationValues),Bd(`skew${$d[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return gO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=ou(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 p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=ou(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=mO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:c,y:f}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in La){if(d[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:x}=La[p],y=a.transform==="none"?d[p]:m(d[p],u);if(g){const w=g.length;for(let b=0;b<w;b++)a[g[b]]=y}else x?this.options.visualElement.renderState.vars[p]=y:a[p]=y}return this.options.layoutId&&(a.pointerEvents=u===this?ou(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(c0),this.root.sharedNodes.clear()}}}function yO(e){e.updateLayout()}function xO(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"?tn(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=St(f);f.min=r[c].min,f.max=f.min+p}):nC(s,t.layoutBox,r)&&tn(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=St(r[c]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});const a=Ms();aa(a,r,t.layoutBox);const l=Ms();o?aa(l,e.applyTransform(i,!0),t.measuredBox):aa(l,r,t.layoutBox);const u=!ZS(a);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:p}=c;if(f&&p){const m=Be();la(m,t.layoutBox,f.layoutBox);const g=Be();la(g,r,p.layoutBox),JS(m,g)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function wO(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 bO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function SO(e){e.clearSnapshot()}function c0(e){e.clearMeasurements()}function CO(e){e.isLayoutDirty=!1}function kO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function d0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function TO(e){e.resolveTargetDelta()}function EO(e){e.calcProjection()}function _O(e){e.resetSkewAndRotation()}function jO(e){e.removeLeadSnapshot()}function f0(e,t,n){e.translate=Oe(t.translate,0,n),e.scale=Oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function p0(e,t,n,r){e.min=Oe(t.min,n.min,r),e.max=Oe(t.max,n.max,r)}function AO(e,t,n,r){p0(e.x,t.x,n.x,r),p0(e.y,t.y,n.y,r)}function RO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const PO={duration:.45,ease:[.4,0,.1,1]},h0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),m0=h0("applewebkit/")&&!h0("chrome/")?Math.round:cn;function g0(e){e.min=m0(e.min),e.max=m0(e.max)}function OO(e){g0(e.x),g0(e.y)}function nC(e,t,n){return e==="position"||e==="preserve-aspect"&&!NP(a0(t),a0(n),.2)}function DO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const NO=tC({attachResizeListener:(e,t)=>za(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zd={current:void 0},rC=tC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zd.current){const e=new NO({});e.mount(window),e.setOptions({layoutScroll:!0}),zd.current=e}return zd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MO={pan:{Feature:XP},drag:{Feature:KP,ProjectionNode:rC,MeasureLayout:YS}};function v0(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&&ke.postRender(()=>s(t,al(t)))}class FO extends pi{mount(){const{current:t}=this.node;t&&(this.unmount=qj(t,(n,r)=>(v0(this.node,r,"Start"),i=>v0(this.node,i,"End"))))}unmount(){}}class LO extends pi{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=ol(za(this.node.current,"focus",()=>this.onFocus()),za(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function y0(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&&ke.postRender(()=>s(t,al(t)))}class IO extends pi{mount(){const{current:t}=this.node;t&&(this.unmount=Kj(t,(n,r)=>(y0(this.node,r,"Start"),(i,{success:s})=>y0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lp=new WeakMap,Vd=new WeakMap,$O=e=>{const t=Lp.get(e.target);t&&t(e)},BO=e=>{e.forEach($O)};function zO({root:e,...t}){const n=e||document;Vd.has(n)||Vd.set(n,{});const r=Vd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(BO,{root:e,...t})),r[i]}function VO(e,t,n){const r=zO(t);return Lp.set(e,n),r.observe(e),()=>{Lp.delete(e),r.unobserve(e)}}const UO={some:0,all:1};class HO extends pi{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:UO[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:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return VO(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(WO(t,n))&&this.startObserver()}unmount(){}}function WO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const qO={inView:{Feature:HO},tap:{Feature:IO},focus:{Feature:LO},hover:{Feature:FO}},GO={layout:{ProjectionNode:rC,MeasureLayout:YS}},Ip={current:null},iC={current:!1};function QO(){if(iC.current=!0,!!mm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ip.current=e.matches;e.addListener(t),t()}else Ip.current=!1}const YO=[...AS,ht,li],KO=e=>YO.find(jS(e)),XO=new WeakMap;function ZO(e,t,n){for(const r in t){const i=t[r],s=n[r];if(gt(i))e.addValue(r,i);else if(gt(s))e.addValue(r,Ma(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,Ma(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const x0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class JO{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=Hm,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 p=Yn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=o;this.onUpdate=d,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=_c(n),this.isVariantNode=Wb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];l[p]!==void 0&&gt(m)&&m.set(l[p],!1)}}mount(t){this.current=t,XO.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)),iC.current||QO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ip.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ai(this.notifyUpdate),ai(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=as.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.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 po){const n=po[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):Be()}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<x0.length;r++){const i=x0[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=ZO(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=Ma(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"&&(ES(r)||gS(r))?r=parseFloat(r):!KO(r)&&li.test(n)&&(r=CS(t,n)),this.setBaseTarget(t,gt(r)?r.get():r)),gt(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=Im(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&&!gt(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 wm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class sC extends JO{constructor(){super(...arguments),this.KeyframeResolver=RS}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;gt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function e3(e){return window.getComputedStyle(e)}class t3 extends sC{constructor(){super(...arguments),this.type="html",this.renderInstance=nS}readValueFromInstance(t,n){if(as.has(n))return hR(t,n);{const r=e3(t),i=(Rm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return WS(t,n)}build(t,n,r){Dm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return $m(t,n,r)}}class n3 extends sC{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Be,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&tS(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(as.has(n)){const r=SS(n);return r&&r.default||0}return n=rS.has(n)?n:Am(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return sS(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&ke.postRender(this.updateDimensions)}build(t,n,r){Fm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){iS(t,n,r,i)}mount(t){this.isSVGTag=Lm(t.tagName),super.mount(t)}}const r3=(e,t)=>Mm(e)?new n3(t):new t3(t,{allowProjection:e!==v.Fragment}),i3=zA({...EP,...qO,...MO,...GO},r3),lt=rA(i3);class s3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const o3=()=>new s3;function a3(){return Cc(o3)}var Rr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Rr||{});const oC=v.createContext({}),l3={[X.TooltipDefault]:"Bizimle sohbet edin!",[X.TooltipActive]:"Yeni mesajlar var!",[X.CloseButtonAria]:"Kapat",[X.MessagePlaceholder]:"Mesajınızı yazın",[X.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[X.NewMessagesNotification]:"Yeni mesajlar var!",[X.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[X.ChatCloseWarning]:"Bu işlem geri alınamaz.",[X.ChatSettings]:"Sohbet Ayarları",[X.ChatEndConversation]:"Sohbeti Sonlandır",[X.CancelAction]:"Vazgeç",[X.CloseAction]:"Kapat",[X.QuickActions]:"Hızlı işlemler",[X.GreetingStartChat]:"Sohbete başla",[X.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[X.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[X.RatingHeaderThanks]:"Teşekkürler!",[X.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[X.RatingRateConversation]:"Görüşmeyi puanlayın",[X.RatingComment]:"Yorumunuz (İsteğe bağlı)",[X.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[X.RatingSubmit]:"Değerlendirmeyi Gönder",[X.RatingNewConversation]:"Yeni Görüşme Başlat",[X.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[X.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[X.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[X.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[X.RatingYourScore]:"Puanınız: {score}",[X.PoweredBy]:"Powered by"},u3={[S.Background]:"#ffffff",[S.Border]:"#e2e8f0",[S.TooltipText]:"#1e40af",[S.TooltipBackground]:"#dbeafe",[S.TooltipBorder]:"#3b82f6",[S.HeaderBackground]:"#2563eb",[S.HeaderBorder]:"#e2e8f0",[S.HeaderText]:"#ffffff",[S.FooterBackground]:"#f8fafc",[S.FooterBorder]:"#e2e8f0",[S.FooterText]:"#475569",[S.MessageAdminBackground]:"#f1f5f9",[S.MessageAdminText]:"#334155",[S.MessageVisitorBackground]:"#3b82f6",[S.MessageVisitorText]:"#ffffff",[S.GreeterBackground]:"#ffffff",[S.GreeterText]:"#334155",[S.GreeterBorder]:"#e2e8f0",[S.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[S.GreeterTopText]:"#ffffff",[S.GreeterButtonBackground]:"#4f46e5",[S.GreeterButtonText]:"#ffffff",[S.ButtonBackground]:"#4f46e5",[S.ButtonText]:"#ffffff",[S.InputBackground]:"#ffffff",[S.InputText]:"#1e293b",[S.InputBorder]:"#e2e8f0",[S.CloseButtonBackground]:"#f1f5f9",[S.CloseButtonText]:"#475569",[S.CloseButtonHover]:"#e2e8f0",[S.IconColor]:"#64748b",[S.IconBackground]:"transparent",[S.ErrorBackground]:"#fef2f2",[S.ErrorText]:"#dc2626",[S.ErrorBorder]:"#fca5a5",[S.SuccessBackground]:"#f0fdf4",[S.SuccessText]:"#16a34a",[S.SuccessBorder]:"#86efac",[S.WarningBackground]:"#fffbeb",[S.WarningText]:"#d97706",[S.WarningBorder]:"#fcd34d",[S.LinkColor]:"#2563eb",[S.LinkHoverColor]:"#1d4ed8",[S.DividerColor]:"#e2e8f0",[S.ShadowColor]:"rgba(0, 0, 0, 0.1)",[S.StarActiveColor]:"#3b82f6",[S.StarInactiveColor]:"#e2e8f0",[S.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[S.ChatCloseConfirmText]:"#dc2626",[S.RatingHeaderBackground]:"#4F46E5",[S.RatingHeaderText]:"#ffffff",[S.RatingSuccessBackground]:"#ffffff",[S.RatingSuccessText]:"#334155",[S.RatingRateConversationText]:"#1e293b"},c3={[Rr.None]:"0px",[Rr.Sm]:"var(--radius-xs)",[Rr.Md]:"var(--radius-sm)",[Rr.Lg]:"var(--radius-md)",[Rr.Xl]:"var(--radius-lg)",[Rr.Full]:"calc(infinity * 1px)"},d3=e=>{const t={...l3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},f3=e=>{const t={...u3};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 p3({children:e,widget:t}){const n=f3(t),r=d3(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Rr.Md,s=l=>n[l],o=l=>r[l],a=()=>c3[i];return h.jsx(oC.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const ge=()=>v.useContext(oC),ll=()=>ge().getText;function Ct({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:u=S.ButtonText,bgKey:d=S.ButtonBackground,animations:c={},withoutTheming:f,...p}){const m=ge();return h.jsx(lt.button,{type:t,className:we("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,ty[n]&&ty[n][r],jj[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:m.getColor(u),backgroundColor:m.getColor(d),...o?{}:{borderRadius:m.getRadius()}},...l},...c,...p,children:e})}function ae(){}ae.Home=function(t){return h.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:h.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"})})};ae.Chat=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.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"})});ae.Menu=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ae.MessageTyping=({className:e="size-5",...t})=>h.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:h.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"})});ae.Check=function(t){return h.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:h.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"})})};ae.Website=function(t){return h.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[h.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"}),h.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"}),h.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"})]})};ae.ArrowDown=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ae.ArrowLeft=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})});ae.XCircle=({className:e="e-5",...t})=>h.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:h.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"})});ae.X=({className:e="e-5",...t})=>h.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:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ae.PaperAirplane=({className:e="e-5",...t})=>h.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:h.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"})});ae.Spin=function(t){return h.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:h.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};ae.ExternalLink=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});ae.Phone=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});ae.Mail=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});ae.Star=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})});ae.Plus=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});ae.History=e=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});function ze({className:e="",style:t}){const n=ge();return h.jsx("div",{className:`animate-pulse rounded ${e}`,style:{backgroundColor:n.getColor(S.MessageAdminBackground),opacity:.6,...t}})}function h3(){const e=ge();return h.jsxs("section",{className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[h.jsx("div",{className:"flex w-full items-center justify-start",children:h.jsx(ze,{className:"h-12 w-3/5",style:{borderRadius:e.getRadius()}})}),h.jsx("div",{className:"flex w-full items-center justify-end",children:h.jsx(ze,{className:"h-10 w-2/5",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.MessageVisitorBackground),opacity:.4}})}),h.jsx("div",{className:"flex w-full items-center justify-start",children:h.jsx(ze,{className:"h-16 w-4/5",style:{borderRadius:e.getRadius()}})}),h.jsx("div",{className:"flex w-full items-center justify-end",children:h.jsx(ze,{className:"h-8 w-1/3",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.MessageVisitorBackground),opacity:.4}})}),h.jsx("div",{className:"flex w-full items-center justify-start",children:h.jsx(ze,{className:"h-10 w-1/2",style:{borderRadius:e.getRadius()}})})]})}function m3(){const e=ge();return h.jsxs("div",{className:"p-3 flex items-center gap-3",style:{backgroundColor:e.getColor(S.FooterBackground),borderRadius:e.getRadius()},children:[h.jsx("div",{className:"grow",children:h.jsx(ze,{className:"h-12 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})}),h.jsx(ze,{className:"h-12 w-12 rounded-full"})]})}function g3(){const e=ge();return h.jsxs("header",{className:"p-4 flex justify-between items-center z-10",style:{backgroundColor:e.getColor(S.HeaderBackground),borderBottom:`1px solid ${e.getColor(S.HeaderBorder)}`},children:[h.jsx(ze,{className:"h-5 w-36"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ze,{className:"h-5 w-5 rounded"}),h.jsx(ze,{className:"h-5 w-5 rounded"})]})]})}function aC(){const e=ge();return h.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:e.getColor(S.GreeterBackground)},children:h.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[h.jsxs("div",{children:[h.jsx(ze,{className:"h-4 w-20 mb-1"}),h.jsx(ze,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})]}),h.jsxs("div",{children:[h.jsx(ze,{className:"h-4 w-24 mb-1"}),h.jsx(ze,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})]}),h.jsxs("div",{children:[h.jsx(ze,{className:"h-4 w-16 mb-1"}),h.jsx(ze,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.InputBackground)}})]}),h.jsx(ze,{className:"h-11 w-full mt-2",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(S.GreeterButtonBackground),opacity:.5}})]})})}function lC(){const e=ge();return h.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(S.GreeterTopBackground)},children:[h.jsx(ze,{className:"h-7 w-40"}),h.jsx(ze,{className:"h-4 w-56"})]})}function uC(){const e=ge();return h.jsxs("div",{className:"h-full w-full flex flex-col overflow-hidden",style:{backgroundColor:e.getColor(S.Background)},children:[h.jsx(g3,{}),h.jsx(h3,{}),h.jsx(m3,{}),h.jsxs("div",{className:"py-1.5 px-3 flex items-center justify-center gap-1",style:{borderTop:`1px solid ${e.getColor(S.FooterBorder)}`,backgroundColor:e.getColor(S.FooterBackground)},children:[h.jsx(ze,{className:"h-3 w-20"}),h.jsx(ze,{className:"h-3.5 w-3.5 rounded"})]})]})}function $p(){const e=ge(),t=typeof window<"u"&&window.innerWidth<768;return h.jsxs("div",{className:`h-full w-full relative overflow-hidden ${t?"":"rounded-xl"}`,style:{backgroundColor:e.getColor(S.GreeterBackground)},children:[h.jsx(lC,{}),h.jsx("div",{style:{height:t?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:h.jsx(aC,{})})]})}function v3(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var dn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(dn||{});const ua=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},lu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},ca=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},Va=e=>{const t=`${e}:lc:device:id`;let n=localStorage.getItem(t);return n||(n=v3(),localStorage.setItem(t,n)),n},y3={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},w0=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(m=>m(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(y3?"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},x3=e=>e?w0(e):w0;var cC={exports:{}},dC={},fC={exports:{}},pC={};/**
68
80
  * @license React
69
81
  * use-sync-external-store-shim.production.min.js
70
82
  *
@@ -72,7 +84,7 @@ Error generating stack: `+s.message+`
72
84
  *
73
85
  * This source code is licensed under the MIT license found in the
74
86
  * LICENSE file in the root directory of this source tree.
75
- */var co=v;function Fj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lj=typeof Object.is=="function"?Object.is:Fj,Ij=co.useState,$j=co.useEffect,Bj=co.useLayoutEffect,zj=co.useDebugValue;function Vj(e,t){var n=t(),r=Ij({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Bj(function(){i.value=n,i.getSnapshot=t,Rd(i)&&s({inst:i})},[e,n,t]),$j(function(){return Rd(i)&&s({inst:i}),e(function(){Rd(i)&&s({inst:i})})},[e]),zj(n),n}function Rd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lj(e,n)}catch{return!0}}function Uj(e,t){return t()}var Hj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Uj:Vj;Fb.useSyncExternalStore=co.useSyncExternalStore!==void 0?co.useSyncExternalStore:Hj;Mb.exports=Fb;var Wj=Mb.exports;/**
87
+ */var mo=v;function w3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var b3=typeof Object.is=="function"?Object.is:w3,S3=mo.useState,C3=mo.useEffect,k3=mo.useLayoutEffect,T3=mo.useDebugValue;function E3(e,t){var n=t(),r=S3({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return k3(function(){i.value=n,i.getSnapshot=t,Ud(i)&&s({inst:i})},[e,n,t]),C3(function(){return Ud(i)&&s({inst:i}),e(function(){Ud(i)&&s({inst:i})})},[e]),T3(n),n}function Ud(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!b3(e,n)}catch{return!0}}function _3(e,t){return t()}var j3=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_3:E3;pC.useSyncExternalStore=mo.useSyncExternalStore!==void 0?mo.useSyncExternalStore:j3;fC.exports=pC;var A3=fC.exports;/**
76
88
  * @license React
77
89
  * use-sync-external-store-shim/with-selector.production.min.js
78
90
  *
@@ -80,60 +92,48 @@ Error generating stack: `+s.message+`
80
92
  *
81
93
  * This source code is licensed under the MIT license found in the
82
94
  * LICENSE file in the root directory of this source tree.
83
- */var wc=v,qj=Wj;function Gj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qj=typeof Object.is=="function"?Object.is:Gj,Yj=qj.useSyncExternalStore,Kj=wc.useRef,Xj=wc.useEffect,Zj=wc.useMemo,Jj=wc.useDebugValue;Nb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=Kj(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Zj(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var m=o.value;if(i(m,p))return c=m}return c=p}if(m=c,Qj(d,p))return m;var h=r(p);return i!==void 0&&i(m,h)?m:(d=p,c=h)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=Yj(e,s[0],s[1]);return Xj(function(){o.hasValue=!0,o.value=a},[a]),Jj(a),a};Db.exports=Nb;var eR=Db.exports;const tR=Zi(eR),Lb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:nR}=L,{useSyncExternalStoreWithSelector:rR}=tR;let ty=!1;const iR=e=>e;function sR(e,t=iR,n){(Lb?"production":void 0)!=="production"&&n&&!ty&&(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"),ty=!0);const r=rR(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return nR(r),r}const ny=e=>{(Lb?"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"?Mj(e):e,n=(r,i)=>sR(t,r,i);return Object.assign(n,t),n},oR=e=>e?ny(e):ny,kt=oR(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,anyAdmin:!0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},setAnyAdmin:t=>e({anyAdmin:t}),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})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t})})),aR=e=>({accessToken:localStorage.getItem(`${e}:${Wn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${Wn.CustomerRefreshToken}`)||""}),nl=()=>{const{widget:e}=kt();return e?aR(e.link_id):null},fo=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function lR(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const uR=()=>um({mutationFn:e=>bo(`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})})}),cR=(e,t)=>bo(`clients/${e}/chats`,{headers:t}),yp=(e,t)=>bo(`clients/${e}/chats`,{method:"DELETE",headers:t}),dR=(e,t,n)=>bo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":nu(Wn.DeviceId,"")||""}}),fR=()=>{const e=nl();return um({mutationFn:t=>dR(t.rating,t.comment,fo(e))})},pR=e=>{const t=nl();return um({mutationFn:n=>bo(`clients/${e}/chats/files`,{method:"POST",headers:fo(t),body:V_({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function hR(e){return e&&typeof e=="object"&&"file_urls"in e}function is(e){this._maxSize=e,this.clear()}is.prototype.clear=function(){this._size=0,this._values=Object.create(null)};is.prototype.get=function(e){return this._values[e]};is.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var mR=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Ib=/^\d+$/,gR=/^\d/,vR=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,yR=/^\s*(['"]?)(.*?)(\1)\s*$/,pm=512,ry=new is(pm),iy=new is(pm),sy=new is(pm),zi={Cache:is,split:xp,normalizePath:Ad,setter:function(e){var t=Ad(e);return iy.get(e)||iy.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=Ad(e);return sy.get(e)||sy.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+(hm(n)||Ib.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){xR(Array.isArray(e)?e:xp(e),t,n)}};function Ad(e){return ry.get(e)||ry.set(e,xp(e).map(function(t){return t.replace(yR,"$2")}))}function xp(e){return e.match(mR)||[""]}function xR(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(SR(i)&&(i='"'+i+'"'),a=hm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function hm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function wR(e){return e.match(gR)&&!e.match(Ib)}function bR(e){return vR.test(e)}function SR(e){return!hm(e)&&(wR(e)||bR(e))}const CR=/[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,bc=e=>e.match(CR)||[],Sc=e=>e[0].toUpperCase()+e.slice(1),mm=(e,t)=>bc(e).join(t).toLowerCase(),$b=e=>bc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),kR=e=>Sc($b(e)),TR=e=>mm(e,"_"),ER=e=>mm(e,"-"),_R=e=>Sc(mm(e," ")),jR=e=>bc(e).map(Sc).join(" ");var Pd={words:bc,upperFirst:Sc,camelCase:$b,pascalCase:kR,snakeCase:TR,kebabCase:ER,sentenceCase:_R,titleCase:jR},gm={exports:{}};gm.exports=function(e){return Bb(RR(e),e)};gm.exports.array=Bb;function Bb(e,t){var n=e.length,r=new Array(n),i={},s=n,o=AR(t),a=PR(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,d,c){if(c.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[d]){i[d]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),d=p.length){c.add(u);do{var m=p[--d];l(m,a.get(m),c)}while(d);c.delete(u)}r[--n]=u}}}function RR(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 AR(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 PR(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var OR=gm.exports;const DR=Zi(OR),NR=Object.prototype.toString,MR=Error.prototype.toString,FR=RegExp.prototype.toString,LR=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",IR=/^Symbol\((.*)\)(.*)$/;function $R(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function oy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return $R(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return LR.call(e).replace(IR,"Symbol($1)");const r=NR.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+MR.call(e)+"]":r==="RegExp"?FR.call(e):null}function Jr(e,t){let n=oy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=oy(this[r],t);return s!==null?s:i},2)}function zb(e){return e==null?[]:[].concat(e)}let Vb,Ub,Hb,BR=/\$\{\s*(\w+)\s*\}/g;Vb=Symbol.toStringTag;class ay{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[Vb]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],zb(t).forEach(s=>{if(Pt.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]}}Ub=Symbol.hasInstance;Hb=Symbol.toStringTag;class Pt 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(BR,(i,s)=>Jr(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 ay(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[Hb]="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,Pt)}static[Ub](t){return ay[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Mn={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 \`${Jr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Jr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Jr(n,!0)}\``+i}},Et={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"},zR={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"},wp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},VR={isValue:"${path} field must be ${value}"},ru={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},UR={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"},HR={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: \`${Jr(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: \`${Jr(n,!0)}\``}return Pt.formatError(Mn.notType,e)}};Object.assign(Object.create(null),{mixed:Mn,string:Et,number:zR,date:wp,object:ru,array:UR,boolean:VR,tuple:HR});const vm=e=>e&&e.__isYupSchema__;class Vu{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 Vu(t,(a,l)=>{var u;let d=o(...a)?i:s;return(u=d==null?void 0:d(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 Pl={context:"$",value:"."};class ss{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]===Pl.context,this.isValue=this.key[0]===Pl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Pl.context:this.isValue?Pl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&zi.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}}ss.prototype.__isYupRef=!0;const ji=e=>e==null;function vs(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:d,params:c,message:f,skipAbsent:p}=e;let{parent:m,context:h,abortEarly:w=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=i;function x(A){return ss.isRef(A)?A.getValue(n,m,h):A}function b(A={}){const W=Object.assign({value:n,originalValue:s,label:o.spec.label,path:A.path||r,spec:o.spec,disableStackTrace:A.disableStackTrace||y},c,A.params);for(const Q of Object.keys(W))W[Q]=x(W[Q]);const B=new Pt(Pt.formatError(A.message||f,W),n,W.path,A.type||u,W.disableStackTrace);return B.params=W,B}const k=w?a:l;let T={path:r,parent:m,type:u,from:i.from,createError:b,resolve:x,options:i,originalValue:s,schema:o};const E=A=>{Pt.isError(A)?k(A):A?l(null):k(b())},j=A=>{Pt.isError(A)?k(A):a(A)};if(p&&ji(n))return E(!0);let M;try{var N;if(M=d.call(T,n,T),typeof((N=M)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(E,j)}}catch(A){j(A);return}E(M)}return t.OPTIONS=e,t}function WR(e,t,n,r=n){let i,s,o;return t?(zi.forEach(t,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",f=u?parseInt(d,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&&f>=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[f],e=c?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[d])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[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Uu extends Set{describe(){const t=[];for(const n of this.values())t.push(ss.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 Uu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Ps(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]=Ps(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,Ps(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ps(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Ps(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Xn{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 Uu,this._blacklist=new Uu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Mn.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=Ps(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&&ji(s))return s;let o=Jr(t),a=Jr(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
+ */var Ac=v,R3=A3;function P3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var O3=typeof Object.is=="function"?Object.is:P3,D3=R3.useSyncExternalStore,N3=Ac.useRef,M3=Ac.useEffect,F3=Ac.useMemo,L3=Ac.useDebugValue;dC.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=N3(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=F3(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var m=o.value;if(i(m,p))return c=m}return c=p}if(m=c,O3(d,p))return m;var g=r(p);return i!==void 0&&i(m,g)?m:(d=p,c=g)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=D3(e,s[0],s[1]);return M3(function(){o.hasValue=!0,o.value=a},[a]),L3(a),a};cC.exports=dC;var I3=cC.exports;const $3=ts(I3),hC={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:B3}=$,{useSyncExternalStoreWithSelector:z3}=$3;let b0=!1;const V3=e=>e;function U3(e,t=V3,n){(hC?"production":void 0)!=="production"&&n&&!b0&&(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"),b0=!0);const r=z3(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return B3(r),r}const S0=e=>{(hC?"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"?x3(e):e,n=(r,i)=>U3(t,r,i);return Object.assign(n,t),n},H3=e=>e?S0(e):S0,De=H3(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,anyAdmin:!0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},setAnyAdmin:t=>e({anyAdmin:t}),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})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t}),historyChat:null,setHistoryChat:t=>e({historyChat:t}),historyMessages:null,setHistoryMessages:t=>e({historyMessages:t}),showHistoryOnRegistration:!1,setShowHistoryOnRegistration:t=>e({showHistoryOnRegistration:t})})),W3=e=>({accessToken:localStorage.getItem(`${e}:${dn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${dn.CustomerRefreshToken}`)||""}),ul=()=>{const{widget:e}=De();return e?W3(e.link_id):null},go=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function q3(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const mC=()=>cm({mutationFn:e=>xr(`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,device_id:e.device_id})})}),G3=(e,t)=>xr(`clients/${e}/chats`,{headers:t}),Bp=(e,t)=>xr(`clients/${e}/chats`,{method:"DELETE",headers:t}),Q3=(e,t,n)=>xr("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":lu(dn.DeviceId,"")||""}}),Y3=()=>{const e=ul();return cm({mutationFn:t=>Q3(t.rating,t.comment,go(e))})},K3=e=>{const t=ul();return cm({mutationFn:n=>xr(`clients/${e}/chats/files`,{method:"POST",headers:go(t),body:q_({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function X3(e){return e&&typeof e=="object"&&"file_urls"in e}const Z3=e=>xr("visitors/identify",{method:"POST",body:JSON.stringify(e)}),J3=(e,t)=>wb({queryKey:["visitors","history",e,t],queryFn:()=>xr(`visitors/history?widget_id=${e}&device_id=${t}`),enabled:!!e&&!!t}),eD=(e,t,n)=>xr(`visitors/chats/${e}/messages?widget_id=${t}&device_id=${n}`);function ls(e){this._maxSize=e,this.clear()}ls.prototype.clear=function(){this._size=0,this._values=Object.create(null)};ls.prototype.get=function(e){return this._values[e]};ls.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var tD=/[^.^\]^[]+|(?=\[\]|\.\.)/g,gC=/^\d+$/,nD=/^\d/,rD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,iD=/^\s*(['"]?)(.*?)(\1)\s*$/,Qm=512,C0=new ls(Qm),k0=new ls(Qm),T0=new ls(Qm),Wi={Cache:ls,split:zp,normalizePath:Hd,setter:function(e){var t=Hd(e);return k0.get(e)||k0.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=Hd(e);return T0.get(e)||T0.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+(Ym(n)||gC.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){sD(Array.isArray(e)?e:zp(e),t,n)}};function Hd(e){return C0.get(e)||C0.set(e,zp(e).map(function(t){return t.replace(iD,"$2")}))}function zp(e){return e.match(tD)||[""]}function sD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(lD(i)&&(i='"'+i+'"'),a=Ym(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Ym(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function oD(e){return e.match(nD)&&!e.match(gC)}function aD(e){return rD.test(e)}function lD(e){return!Ym(e)&&(oD(e)||aD(e))}const uD=/[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,Rc=e=>e.match(uD)||[],Pc=e=>e[0].toUpperCase()+e.slice(1),Km=(e,t)=>Rc(e).join(t).toLowerCase(),vC=e=>Rc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),cD=e=>Pc(vC(e)),dD=e=>Km(e,"_"),fD=e=>Km(e,"-"),pD=e=>Pc(Km(e," ")),hD=e=>Rc(e).map(Pc).join(" ");var Wd={words:Rc,upperFirst:Pc,camelCase:vC,pascalCase:cD,snakeCase:dD,kebabCase:fD,sentenceCase:pD,titleCase:hD},Xm={exports:{}};Xm.exports=function(e){return yC(mD(e),e)};Xm.exports.array=yC;function yC(e,t){var n=e.length,r=new Array(n),i={},s=n,o=gD(t),a=vD(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,d,c){if(c.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[d]){i[d]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),d=p.length){c.add(u);do{var m=p[--d];l(m,a.get(m),c)}while(d);c.delete(u)}r[--n]=u}}}function mD(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 gD(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 vD(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var yD=Xm.exports;const xD=ts(yD),wD=Object.prototype.toString,bD=Error.prototype.toString,SD=RegExp.prototype.toString,CD=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",kD=/^Symbol\((.*)\)(.*)$/;function TD(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function E0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return TD(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return CD.call(e).replace(kD,"Symbol($1)");const r=wD.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+bD.call(e)+"]":r==="RegExp"?SD.call(e):null}function ti(e,t){let n=E0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=E0(this[r],t);return s!==null?s:i},2)}function xC(e){return e==null?[]:[].concat(e)}let wC,bC,SC,ED=/\$\{\s*(\w+)\s*\}/g;wC=Symbol.toStringTag;class _0{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[wC]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],xC(t).forEach(s=>{if(Dt.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]}}bC=Symbol.hasInstance;SC=Symbol.toStringTag;class Dt 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(ED,(i,s)=>ti(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 _0(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[SC]="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,Dt)}static[bC](t){return _0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Fn={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 \`${ti(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ti(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ti(n,!0)}\``+i}},jt={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"},_D={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"},Vp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},jD={isValue:"${path} field must be ${value}"},uu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},AD={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"},RD={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: \`${ti(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: \`${ti(n,!0)}\``}return Dt.formatError(Fn.notType,e)}};Object.assign(Object.create(null),{mixed:Fn,string:jt,number:_D,date:Vp,object:uu,array:AD,boolean:jD,tuple:RD});const Zm=e=>e&&e.__isYupSchema__;class Zu{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 Zu(t,(a,l)=>{var u;let d=o(...a)?i:s;return(u=d==null?void 0:d(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(!Zm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Il={context:"$",value:"."};class us{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]===Il.context,this.isValue=this.key[0]===Il.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Il.context:this.isValue?Il.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Wi.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}}us.prototype.__isYupRef=!0;const Di=e=>e==null;function ws(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:d,params:c,message:f,skipAbsent:p}=e;let{parent:m,context:g,abortEarly:x=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=i;function w(j){return us.isRef(j)?j.getValue(n,m,g):j}function b(j={}){const Y=Object.assign({value:n,originalValue:s,label:o.spec.label,path:j.path||r,spec:o.spec,disableStackTrace:j.disableStackTrace||y},c,j.params);for(const Z of Object.keys(Y))Y[Z]=w(Y[Z]);const G=new Dt(Dt.formatError(j.message||f,Y),n,Y.path,j.type||u,Y.disableStackTrace);return G.params=Y,G}const k=x?a:l;let T={path:r,parent:m,type:u,from:i.from,createError:b,resolve:w,options:i,originalValue:s,schema:o};const E=j=>{Dt.isError(j)?k(j):j?l(null):k(b())},_=j=>{Dt.isError(j)?k(j):a(j)};if(p&&Di(n))return E(!0);let D;try{var N;if(D=d.call(T,n,T),typeof((N=D)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(D).then(E,_)}}catch(j){_(j);return}E(D)}return t.OPTIONS=e,t}function PD(e,t,n,r=n){let i,s,o;return t?(Wi.forEach(t,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",f=u?parseInt(d,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&&f>=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[f],e=c?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[d])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[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ju extends Set{describe(){const t=[];for(const n of this.values())t.push(us.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 Ju(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Is(e,t=new Map){if(Zm(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]=Is(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,Is(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Is(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Is(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Zn{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 Ju,this._blacklist=new Ju,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Fn.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=Is(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&&Di(s))return s;let o=ti(t),a=ti(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
84
96
 
85
97
  attempted value: ${o}
86
- `+(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 d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,d=>{if(d.length)return i(d,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,d=h=>{i||(i=!0,n(h,o))},c=h=>{i||(i=!0,r(h,o))},f=s.length,p=[];if(!f)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let h=0;h<s.length;h++){const w=s[h];w(m,d,function(x){x&&(Array.isArray(x)?p.push(...x):p.push(x)),--f<=0&&c(p)})}}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 d=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,f,p)=>this.resolve(d)._validate(u,d,f,p)}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)=>{Pt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Pt(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 Pt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Pt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Pt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Pt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ps(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=vs({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=vs({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Mn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Mn.notNull){return this.nullability(!1,t)}required(t=Mn.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=Mn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=vs(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=zb(t).map(s=>new ss(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Vu(i,n):Vu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=vs({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=Mn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=vs({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=Mn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=vs({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,d)=>d.findIndex(c=>c.name===l.name)===u)}}}Xn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Xn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=WR(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Xn.prototype[e]=Xn.prototype.oneOf;for(const e of["not","nope"])Xn.prototype[e]=Xn.prototype.notOneOf;const qR=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function GR(e){const t=bp(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 bp(e){var t,n;const r=qR.exec(e);return r?{year:tr(r[1]),month:tr(r[2],1)-1,day:tr(r[3],1),hour:tr(r[4]),minute:tr(r[5]),second:tr(r[6]),millisecond:r[7]?tr(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:tr(r[10]),minuteOffset:tr(r[11])}:null}function tr(e,t=0){return Number(e)||t}let QR=/^[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])?)*$/,YR=/^((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,KR=/^(?:[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,XR="^\\d{4}-\\d{2}-\\d{2}",ZR="\\d{2}:\\d{2}:\\d{2}",JR="(([+-]\\d{2}(:?\\d{2})?)|Z)",eA=new RegExp(`${XR}T${ZR}(\\.\\d+)?${JR}$`),tA=e=>ji(e)||e===e.trim(),nA={}.toString();function Hu(){return new Wb}class Wb extends Xn{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===nA?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Mn.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=Et.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=Et.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=Et.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||Et.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Et.email){return this.matches(QR,{name:"email",message:t,excludeEmptyString:!0})}url(t=Et.url){return this.matches(YR,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Et.uuid){return this.matches(KR,{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(eA,{name:"datetime",message:n||Et.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Et.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=bp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Et.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=bp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Et.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:tA})}lowercase(t=Et.lowercase){return this.transform(n=>ji(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ji(n)||n===n.toLowerCase()})}uppercase(t=Et.uppercase){return this.transform(n=>ji(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ji(n)||n===n.toUpperCase()})}}Hu.prototype=Wb.prototype;let rA=new Date(""),iA=e=>Object.prototype.toString.call(e)==="[object Date]";class Cc extends Xn{constructor(){super({type:"date",check(t){return iA(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=GR(t),isNaN(t)?Cc.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(ss.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=wp.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=wp.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)}})}}Cc.INVALID_DATE=rA;Cc.prototype;function sA(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=zi.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),ss.isRef(a)&&a.isSibling?s(a.path,o):vm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return DR.array(Array.from(r),n).reverse()}function ly(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 qb(e){return(t,n)=>ly(e,t)-ly(e,n)}const oA=(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 iu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=iu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=iu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(iu)}):"optional"in e?e.optional():e}const aA=(e,t)=>{const n=[...zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=zi.getter(zi.join(n),!0)(e);return!!(i&&r in i)};let uy=e=>Object.prototype.toString.call(e)==="[object Object]";function cy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const lA=qb([]);function ym(e){return new Gb(e)}class Gb extends Xn{constructor(t){super({type:"object",check(n){return uy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=lA,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}),d=!1;for(const c of a){let f=s[c],p=c in i;if(f){let m,h=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:h,context:n.context,parent:l});let w=f instanceof Xn?f.spec:void 0,y=w==null?void 0:w.strict;if(w!=null&&w.strip){d=d||c in i;continue}m=!n.__validating||!y?f.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else p&&!o&&(l[c]=i[c]);(p!==c in l||l[c]!==i[c])&&(d=!0)}return d?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||!uy(u)){i(l,u);return}o=o||u;let d=[];for(let c of this._nodes){let f=this.fields[c];!f||ss.isRef(f)||d.push(f.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,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=sA(t,n),r._sortErrors=qb(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 iu(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=zi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return aA(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(oA)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||ru.exact,test(n){if(n==null)return!0;const r=cy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=ru.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=cy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=ru.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(Pd.camelCase)}snakeCase(){return this.transformKeys(Pd.snakeCase)}constantCase(){return this.transformKeys(t=>Pd.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}}ym.prototype=Gb.prototype;var uA=function(t){return cA(t)&&!dA(t)};function cA(e){return!!e&&typeof e=="object"}function dA(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||hA(e)}var fA=typeof Symbol=="function"&&Symbol.for,pA=fA?Symbol.for("react.element"):60103;function hA(e){return e.$$typeof===pA}function mA(e){return Array.isArray(e)?[]:{}}function Wu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Aa(mA(e),e,t):e}function gA(e,t,n){return e.concat(t).map(function(r){return Wu(r,n)})}function vA(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Wu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Wu(t[i],n):r[i]=Aa(e[i],t[i],n)}),r}function Aa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||gA,n.isMergeableObject=n.isMergeableObject||uA;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):vA(e,t,n):Wu(t,n)}Aa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Aa(r,i,n)},{})};var Sp=Aa,Qb=typeof global=="object"&&global&&global.Object===Object&&global,yA=typeof self=="object"&&self&&self.Object===Object&&self,Jn=Qb||yA||Function("return this")(),ii=Jn.Symbol,Yb=Object.prototype,xA=Yb.hasOwnProperty,wA=Yb.toString,Lo=ii?ii.toStringTag:void 0;function bA(e){var t=xA.call(e,Lo),n=e[Lo];try{e[Lo]=void 0;var r=!0}catch{}var i=wA.call(e);return r&&(t?e[Lo]=n:delete e[Lo]),i}var SA=Object.prototype,CA=SA.toString;function kA(e){return CA.call(e)}var TA="[object Null]",EA="[object Undefined]",dy=ii?ii.toStringTag:void 0;function os(e){return e==null?e===void 0?EA:TA:dy&&dy in Object(e)?bA(e):kA(e)}function Kb(e,t){return function(n){return e(t(n))}}var xm=Kb(Object.getPrototypeOf,Object);function as(e){return e!=null&&typeof e=="object"}var _A="[object Object]",jA=Function.prototype,RA=Object.prototype,Xb=jA.toString,AA=RA.hasOwnProperty,PA=Xb.call(Object);function fy(e){if(!as(e)||os(e)!=_A)return!1;var t=xm(e);if(t===null)return!0;var n=AA.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Xb.call(n)==PA}function OA(){this.__data__=[],this.size=0}function Zb(e,t){return e===t||e!==e&&t!==t}function kc(e,t){for(var n=e.length;n--;)if(Zb(e[n][0],t))return n;return-1}var DA=Array.prototype,NA=DA.splice;function MA(e){var t=this.__data__,n=kc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():NA.call(t,n,1),--this.size,!0}function FA(e){var t=this.__data__,n=kc(t,e);return n<0?void 0:t[n][1]}function LA(e){return kc(this.__data__,e)>-1}function IA(e,t){var n=this.__data__,r=kc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yr(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])}}yr.prototype.clear=OA;yr.prototype.delete=MA;yr.prototype.get=FA;yr.prototype.has=LA;yr.prototype.set=IA;function $A(){this.__data__=new yr,this.size=0}function BA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function zA(e){return this.__data__.get(e)}function VA(e){return this.__data__.has(e)}function rl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var UA="[object AsyncFunction]",HA="[object Function]",WA="[object GeneratorFunction]",qA="[object Proxy]";function Jb(e){if(!rl(e))return!1;var t=os(e);return t==HA||t==WA||t==UA||t==qA}var Od=Jn["__core-js_shared__"],py=function(){var e=/[^.]+$/.exec(Od&&Od.keys&&Od.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function GA(e){return!!py&&py in e}var QA=Function.prototype,YA=QA.toString;function ls(e){if(e!=null){try{return YA.call(e)}catch{}try{return e+""}catch{}}return""}var KA=/[\\^$.*+?()[\]{}|]/g,XA=/^\[object .+?Constructor\]$/,ZA=Function.prototype,JA=Object.prototype,eP=ZA.toString,tP=JA.hasOwnProperty,nP=RegExp("^"+eP.call(tP).replace(KA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rP(e){if(!rl(e)||GA(e))return!1;var t=Jb(e)?nP:XA;return t.test(ls(e))}function iP(e,t){return e==null?void 0:e[t]}function us(e,t){var n=iP(e,t);return rP(n)?n:void 0}var Pa=us(Jn,"Map"),Oa=us(Object,"create");function sP(){this.__data__=Oa?Oa(null):{},this.size=0}function oP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var aP="__lodash_hash_undefined__",lP=Object.prototype,uP=lP.hasOwnProperty;function cP(e){var t=this.__data__;if(Oa){var n=t[e];return n===aP?void 0:n}return uP.call(t,e)?t[e]:void 0}var dP=Object.prototype,fP=dP.hasOwnProperty;function pP(e){var t=this.__data__;return Oa?t[e]!==void 0:fP.call(t,e)}var hP="__lodash_hash_undefined__";function mP(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oa&&t===void 0?hP:t,this}function Xi(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])}}Xi.prototype.clear=sP;Xi.prototype.delete=oP;Xi.prototype.get=cP;Xi.prototype.has=pP;Xi.prototype.set=mP;function gP(){this.size=0,this.__data__={hash:new Xi,map:new(Pa||yr),string:new Xi}}function vP(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 vP(t)?n[typeof t=="string"?"string":"hash"]:n.map}function yP(e){var t=Tc(this,e).delete(e);return this.size-=t?1:0,t}function xP(e){return Tc(this,e).get(e)}function wP(e){return Tc(this,e).has(e)}function bP(e,t){var n=Tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ci(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])}}ci.prototype.clear=gP;ci.prototype.delete=yP;ci.prototype.get=xP;ci.prototype.has=wP;ci.prototype.set=bP;var SP=200;function CP(e,t){var n=this.__data__;if(n instanceof yr){var r=n.__data__;if(!Pa||r.length<SP-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ci(r)}return n.set(e,t),this.size=n.size,this}function Co(e){var t=this.__data__=new yr(e);this.size=t.size}Co.prototype.clear=$A;Co.prototype.delete=BA;Co.prototype.get=zA;Co.prototype.has=VA;Co.prototype.set=CP;function kP(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var hy=function(){try{var e=us(Object,"defineProperty");return e({},"",{}),e}catch{}}();function eS(e,t,n){t=="__proto__"&&hy?hy(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var TP=Object.prototype,EP=TP.hasOwnProperty;function tS(e,t,n){var r=e[t];(!(EP.call(e,t)&&Zb(r,n))||n===void 0&&!(t in e))&&eS(e,t,n)}function Ec(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?eS(n,a,l):tS(n,a,l)}return n}function _P(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var jP="[object Arguments]";function my(e){return as(e)&&os(e)==jP}var nS=Object.prototype,RP=nS.hasOwnProperty,AP=nS.propertyIsEnumerable,PP=my(function(){return arguments}())?my:function(e){return as(e)&&RP.call(e,"callee")&&!AP.call(e,"callee")},il=Array.isArray;function OP(){return!1}var rS=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,gy=rS&&typeof Wt=="object"&&Wt&&!Wt.nodeType&&Wt,DP=gy&&gy.exports===rS,vy=DP?Jn.Buffer:void 0,NP=vy?vy.isBuffer:void 0,iS=NP||OP,MP=9007199254740991,FP=/^(?:0|[1-9]\d*)$/;function LP(e,t){var n=typeof e;return t=t??MP,!!t&&(n=="number"||n!="symbol"&&FP.test(e))&&e>-1&&e%1==0&&e<t}var IP=9007199254740991;function sS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=IP}var $P="[object Arguments]",BP="[object Array]",zP="[object Boolean]",VP="[object Date]",UP="[object Error]",HP="[object Function]",WP="[object Map]",qP="[object Number]",GP="[object Object]",QP="[object RegExp]",YP="[object Set]",KP="[object String]",XP="[object WeakMap]",ZP="[object ArrayBuffer]",JP="[object DataView]",eO="[object Float32Array]",tO="[object Float64Array]",nO="[object Int8Array]",rO="[object Int16Array]",iO="[object Int32Array]",sO="[object Uint8Array]",oO="[object Uint8ClampedArray]",aO="[object Uint16Array]",lO="[object Uint32Array]",Te={};Te[eO]=Te[tO]=Te[nO]=Te[rO]=Te[iO]=Te[sO]=Te[oO]=Te[aO]=Te[lO]=!0;Te[$P]=Te[BP]=Te[ZP]=Te[zP]=Te[JP]=Te[VP]=Te[UP]=Te[HP]=Te[WP]=Te[qP]=Te[GP]=Te[QP]=Te[YP]=Te[KP]=Te[XP]=!1;function uO(e){return as(e)&&sS(e.length)&&!!Te[os(e)]}function wm(e){return function(t){return e(t)}}var oS=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,ia=oS&&typeof Wt=="object"&&Wt&&!Wt.nodeType&&Wt,cO=ia&&ia.exports===oS,Dd=cO&&Qb.process,po=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Dd&&Dd.binding&&Dd.binding("util")}catch{}}(),yy=po&&po.isTypedArray,dO=yy?wm(yy):uO,fO=Object.prototype,pO=fO.hasOwnProperty;function aS(e,t){var n=il(e),r=!n&&PP(e),i=!n&&!r&&iS(e),s=!n&&!r&&!i&&dO(e),o=n||r||i||s,a=o?_P(e.length,String):[],l=a.length;for(var u in e)(t||pO.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||LP(u,l)))&&a.push(u);return a}var hO=Object.prototype;function bm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||hO;return e===n}var mO=Kb(Object.keys,Object),gO=Object.prototype,vO=gO.hasOwnProperty;function yO(e){if(!bm(e))return mO(e);var t=[];for(var n in Object(e))vO.call(e,n)&&n!="constructor"&&t.push(n);return t}function lS(e){return e!=null&&sS(e.length)&&!Jb(e)}function Sm(e){return lS(e)?aS(e):yO(e)}function xO(e,t){return e&&Ec(t,Sm(t),e)}function wO(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var bO=Object.prototype,SO=bO.hasOwnProperty;function CO(e){if(!rl(e))return wO(e);var t=bm(e),n=[];for(var r in e)r=="constructor"&&(t||!SO.call(e,r))||n.push(r);return n}function Cm(e){return lS(e)?aS(e,!0):CO(e)}function kO(e,t){return e&&Ec(t,Cm(t),e)}var uS=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,xy=uS&&typeof Wt=="object"&&Wt&&!Wt.nodeType&&Wt,TO=xy&&xy.exports===uS,wy=TO?Jn.Buffer:void 0,by=wy?wy.allocUnsafe:void 0;function EO(e,t){if(t)return e.slice();var n=e.length,r=by?by(n):new e.constructor(n);return e.copy(r),r}function cS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function _O(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 dS(){return[]}var jO=Object.prototype,RO=jO.propertyIsEnumerable,Sy=Object.getOwnPropertySymbols,km=Sy?function(e){return e==null?[]:(e=Object(e),_O(Sy(e),function(t){return RO.call(e,t)}))}:dS;function AO(e,t){return Ec(e,km(e),t)}function fS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var PO=Object.getOwnPropertySymbols,pS=PO?function(e){for(var t=[];e;)fS(t,km(e)),e=xm(e);return t}:dS;function OO(e,t){return Ec(e,pS(e),t)}function hS(e,t,n){var r=t(e);return il(e)?r:fS(r,n(e))}function DO(e){return hS(e,Sm,km)}function NO(e){return hS(e,Cm,pS)}var Cp=us(Jn,"DataView"),kp=us(Jn,"Promise"),Tp=us(Jn,"Set"),Ep=us(Jn,"WeakMap"),Cy="[object Map]",MO="[object Object]",ky="[object Promise]",Ty="[object Set]",Ey="[object WeakMap]",_y="[object DataView]",FO=ls(Cp),LO=ls(Pa),IO=ls(kp),$O=ls(Tp),BO=ls(Ep),sr=os;(Cp&&sr(new Cp(new ArrayBuffer(1)))!=_y||Pa&&sr(new Pa)!=Cy||kp&&sr(kp.resolve())!=ky||Tp&&sr(new Tp)!=Ty||Ep&&sr(new Ep)!=Ey)&&(sr=function(e){var t=os(e),n=t==MO?e.constructor:void 0,r=n?ls(n):"";if(r)switch(r){case FO:return _y;case LO:return Cy;case IO:return ky;case $O:return Ty;case BO:return Ey}return t});var zO=Object.prototype,VO=zO.hasOwnProperty;function UO(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&VO.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var jy=Jn.Uint8Array;function Tm(e){var t=new e.constructor(e.byteLength);return new jy(t).set(new jy(e)),t}function HO(e,t){var n=t?Tm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var WO=/\w*$/;function qO(e){var t=new e.constructor(e.source,WO.exec(e));return t.lastIndex=e.lastIndex,t}var Ry=ii?ii.prototype:void 0,Ay=Ry?Ry.valueOf:void 0;function GO(e){return Ay?Object(Ay.call(e)):{}}function QO(e,t){var n=t?Tm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var YO="[object Boolean]",KO="[object Date]",XO="[object Map]",ZO="[object Number]",JO="[object RegExp]",e3="[object Set]",t3="[object String]",n3="[object Symbol]",r3="[object ArrayBuffer]",i3="[object DataView]",s3="[object Float32Array]",o3="[object Float64Array]",a3="[object Int8Array]",l3="[object Int16Array]",u3="[object Int32Array]",c3="[object Uint8Array]",d3="[object Uint8ClampedArray]",f3="[object Uint16Array]",p3="[object Uint32Array]";function h3(e,t,n){var r=e.constructor;switch(t){case r3:return Tm(e);case YO:case KO:return new r(+e);case i3:return HO(e,n);case s3:case o3:case a3:case l3:case u3:case c3:case d3:case f3:case p3:return QO(e,n);case XO:return new r;case ZO:case t3:return new r(e);case JO:return qO(e);case e3:return new r;case n3:return GO(e)}}var Py=Object.create,m3=function(){function e(){}return function(t){if(!rl(t))return{};if(Py)return Py(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function g3(e){return typeof e.constructor=="function"&&!bm(e)?m3(xm(e)):{}}var v3="[object Map]";function y3(e){return as(e)&&sr(e)==v3}var Oy=po&&po.isMap,x3=Oy?wm(Oy):y3,w3="[object Set]";function b3(e){return as(e)&&sr(e)==w3}var Dy=po&&po.isSet,S3=Dy?wm(Dy):b3,C3=1,k3=2,T3=4,mS="[object Arguments]",E3="[object Array]",_3="[object Boolean]",j3="[object Date]",R3="[object Error]",gS="[object Function]",A3="[object GeneratorFunction]",P3="[object Map]",O3="[object Number]",vS="[object Object]",D3="[object RegExp]",N3="[object Set]",M3="[object String]",F3="[object Symbol]",L3="[object WeakMap]",I3="[object ArrayBuffer]",$3="[object DataView]",B3="[object Float32Array]",z3="[object Float64Array]",V3="[object Int8Array]",U3="[object Int16Array]",H3="[object Int32Array]",W3="[object Uint8Array]",q3="[object Uint8ClampedArray]",G3="[object Uint16Array]",Q3="[object Uint32Array]",be={};be[mS]=be[E3]=be[I3]=be[$3]=be[_3]=be[j3]=be[B3]=be[z3]=be[V3]=be[U3]=be[H3]=be[P3]=be[O3]=be[vS]=be[D3]=be[N3]=be[M3]=be[F3]=be[W3]=be[q3]=be[G3]=be[Q3]=!0;be[R3]=be[gS]=be[L3]=!1;function sa(e,t,n,r,i,s){var o,a=t&C3,l=t&k3,u=t&T3;if(o!==void 0)return o;if(!rl(e))return e;var d=il(e);if(d){if(o=UO(e),!a)return cS(e,o)}else{var c=sr(e),f=c==gS||c==A3;if(iS(e))return EO(e,a);if(c==vS||c==mS||f&&!i){if(o=l||f?{}:g3(e),!a)return l?OO(e,kO(o,e)):AO(e,xO(o,e))}else{if(!be[c])return i?e:{};o=h3(e,c,a)}}s||(s=new Co);var p=s.get(e);if(p)return p;s.set(e,o),S3(e)?e.forEach(function(w){o.add(sa(w,t,n,w,e,s))}):x3(e)&&e.forEach(function(w,y){o.set(y,sa(w,t,n,y,e,s))});var m=u?l?NO:DO:l?Cm:Sm,h=d?void 0:m(e);return kP(h||e,function(w,y){h&&(y=w,w=e[y]),tS(o,y,sa(w,t,n,y,e,s))}),o}var Y3=1,K3=4;function Ol(e){return sa(e,Y3|K3)}var Ny=Array.isArray,My=Object.keys,X3=Object.prototype.hasOwnProperty,Z3=typeof Element<"u";function _p(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Ny(e),r=Ny(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!_p(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,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var c=My(e);if(s=c.length,s!==My(t).length)return!1;for(i=s;i--!==0;)if(!X3.call(t,c[i]))return!1;if(Z3&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!_p(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var J3=function(t,n){try{return _p(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 bi=Zi(J3);var eD=4;function Fy(e){return sa(e,eD)}function yS(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 tD="[object Symbol]";function Em(e){return typeof e=="symbol"||as(e)&&os(e)==tD}var nD="Expected a function";function _m(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nD);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(_m.Cache||ci),n}_m.Cache=ci;var rD=500;function iD(e){var t=_m(e,function(r){return n.size===rD&&n.clear(),r}),n=t.cache;return t}var sD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oD=/\\(\\)?/g,aD=iD(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sD,function(n,r,i,s){t.push(i?s.replace(oD,"$1"):r||n)}),t}),lD=1/0;function uD(e){if(typeof e=="string"||Em(e))return e;var t=e+"";return t=="0"&&1/e==-lD?"-0":t}var cD=1/0,Ly=ii?ii.prototype:void 0,Iy=Ly?Ly.toString:void 0;function xS(e){if(typeof e=="string")return e;if(il(e))return yS(e,xS)+"";if(Em(e))return Iy?Iy.call(e):"";var t=e+"";return t=="0"&&1/e==-cD?"-0":t}function dD(e){return e==null?"":xS(e)}function wS(e){return il(e)?yS(e,uD):Em(e)?[e]:cS(aD(dD(e)))}var bS={exports:{}},ve={};/** @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 d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,d=>{if(d.length)return i(d,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,d=g=>{i||(i=!0,n(g,o))},c=g=>{i||(i=!0,r(g,o))},f=s.length,p=[];if(!f)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let g=0;g<s.length;g++){const x=s[g];x(m,d,function(w){w&&(Array.isArray(w)?p.push(...w):p.push(w)),--f<=0&&c(p)})}}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 d=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,f,p)=>this.resolve(d)._validate(u,d,f,p)}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)=>{Dt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Dt(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 Dt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Dt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Dt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Dt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Is(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=ws({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=ws({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Fn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Fn.notNull){return this.nullability(!1,t)}required(t=Fn.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=Fn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ws(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=xC(t).map(s=>new us(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Zu(i,n):Zu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ws({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=Fn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ws({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=Fn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ws({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,d)=>d.findIndex(c=>c.name===l.name)===u)}}}Zn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Zn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=PD(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Zn.prototype[e]=Zn.prototype.oneOf;for(const e of["not","nope"])Zn.prototype[e]=Zn.prototype.notOneOf;const OD=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function DD(e){const t=Up(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 Up(e){var t,n;const r=OD.exec(e);return r?{year:nr(r[1]),month:nr(r[2],1)-1,day:nr(r[3],1),hour:nr(r[4]),minute:nr(r[5]),second:nr(r[6]),millisecond:r[7]?nr(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:nr(r[10]),minuteOffset:nr(r[11])}:null}function nr(e,t=0){return Number(e)||t}let ND=/^[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])?)*$/,MD=/^((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,FD=/^(?:[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,LD="^\\d{4}-\\d{2}-\\d{2}",ID="\\d{2}:\\d{2}:\\d{2}",$D="(([+-]\\d{2}(:?\\d{2})?)|Z)",BD=new RegExp(`${LD}T${ID}(\\.\\d+)?${$D}$`),zD=e=>Di(e)||e===e.trim(),VD={}.toString();function ec(){return new CC}class CC extends Zn{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===VD?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Fn.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=jt.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=jt.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=jt.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||jt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=jt.email){return this.matches(ND,{name:"email",message:t,excludeEmptyString:!0})}url(t=jt.url){return this.matches(MD,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=jt.uuid){return this.matches(FD,{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(BD,{name:"datetime",message:n||jt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||jt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=Up(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||jt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=Up(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=jt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:zD})}lowercase(t=jt.lowercase){return this.transform(n=>Di(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Di(n)||n===n.toLowerCase()})}uppercase(t=jt.uppercase){return this.transform(n=>Di(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Di(n)||n===n.toUpperCase()})}}ec.prototype=CC.prototype;let UD=new Date(""),HD=e=>Object.prototype.toString.call(e)==="[object Date]";class Oc extends Zn{constructor(){super({type:"date",check(t){return HD(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=DD(t),isNaN(t)?Oc.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(us.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=Vp.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=Vp.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)}})}}Oc.INVALID_DATE=UD;Oc.prototype;function WD(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Wi.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),us.isRef(a)&&a.isSibling?s(a.path,o):Zm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return xD.array(Array.from(r),n).reverse()}function j0(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 kC(e){return(t,n)=>j0(e,t)-j0(e,n)}const qD=(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 cu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=cu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=cu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(cu)}):"optional"in e?e.optional():e}const GD=(e,t)=>{const n=[...Wi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Wi.getter(Wi.join(n),!0)(e);return!!(i&&r in i)};let A0=e=>Object.prototype.toString.call(e)==="[object Object]";function R0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const QD=kC([]);function Jm(e){return new TC(e)}class TC extends Zn{constructor(t){super({type:"object",check(n){return A0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=QD,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}),d=!1;for(const c of a){let f=s[c],p=c in i;if(f){let m,g=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:g,context:n.context,parent:l});let x=f instanceof Zn?f.spec:void 0,y=x==null?void 0:x.strict;if(x!=null&&x.strip){d=d||c in i;continue}m=!n.__validating||!y?f.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else p&&!o&&(l[c]=i[c]);(p!==c in l||l[c]!==i[c])&&(d=!0)}return d?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||!A0(u)){i(l,u);return}o=o||u;let d=[];for(let c of this._nodes){let f=this.fields[c];!f||us.isRef(f)||d.push(f.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,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=WD(t,n),r._sortErrors=kC(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 cu(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=Wi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return GD(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(qD)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||uu.exact,test(n){if(n==null)return!0;const r=R0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=uu.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=R0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=uu.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(Wd.camelCase)}snakeCase(){return this.transformKeys(Wd.snakeCase)}constantCase(){return this.transformKeys(t=>Wd.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}}Jm.prototype=TC.prototype;var YD=function(t){return KD(t)&&!XD(t)};function KD(e){return!!e&&typeof e=="object"}function XD(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||eN(e)}var ZD=typeof Symbol=="function"&&Symbol.for,JD=ZD?Symbol.for("react.element"):60103;function eN(e){return e.$$typeof===JD}function tN(e){return Array.isArray(e)?[]:{}}function tc(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ua(tN(e),e,t):e}function nN(e,t,n){return e.concat(t).map(function(r){return tc(r,n)})}function rN(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=tc(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=tc(t[i],n):r[i]=Ua(e[i],t[i],n)}),r}function Ua(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||nN,n.isMergeableObject=n.isMergeableObject||YD;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):rN(e,t,n):tc(t,n)}Ua.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ua(r,i,n)},{})};var Hp=Ua,EC=typeof global=="object"&&global&&global.Object===Object&&global,iN=typeof self=="object"&&self&&self.Object===Object&&self,er=EC||iN||Function("return this")(),ui=er.Symbol,_C=Object.prototype,sN=_C.hasOwnProperty,oN=_C.toString,Bo=ui?ui.toStringTag:void 0;function aN(e){var t=sN.call(e,Bo),n=e[Bo];try{e[Bo]=void 0;var r=!0}catch{}var i=oN.call(e);return r&&(t?e[Bo]=n:delete e[Bo]),i}var lN=Object.prototype,uN=lN.toString;function cN(e){return uN.call(e)}var dN="[object Null]",fN="[object Undefined]",P0=ui?ui.toStringTag:void 0;function cs(e){return e==null?e===void 0?fN:dN:P0&&P0 in Object(e)?aN(e):cN(e)}function jC(e,t){return function(n){return e(t(n))}}var eg=jC(Object.getPrototypeOf,Object);function ds(e){return e!=null&&typeof e=="object"}var pN="[object Object]",hN=Function.prototype,mN=Object.prototype,AC=hN.toString,gN=mN.hasOwnProperty,vN=AC.call(Object);function O0(e){if(!ds(e)||cs(e)!=pN)return!1;var t=eg(e);if(t===null)return!0;var n=gN.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&AC.call(n)==vN}function yN(){this.__data__=[],this.size=0}function RC(e,t){return e===t||e!==e&&t!==t}function Dc(e,t){for(var n=e.length;n--;)if(RC(e[n][0],t))return n;return-1}var xN=Array.prototype,wN=xN.splice;function bN(e){var t=this.__data__,n=Dc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():wN.call(t,n,1),--this.size,!0}function SN(e){var t=this.__data__,n=Dc(t,e);return n<0?void 0:t[n][1]}function CN(e){return Dc(this.__data__,e)>-1}function kN(e,t){var n=this.__data__,r=Dc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function wr(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])}}wr.prototype.clear=yN;wr.prototype.delete=bN;wr.prototype.get=SN;wr.prototype.has=CN;wr.prototype.set=kN;function TN(){this.__data__=new wr,this.size=0}function EN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function _N(e){return this.__data__.get(e)}function jN(e){return this.__data__.has(e)}function cl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var AN="[object AsyncFunction]",RN="[object Function]",PN="[object GeneratorFunction]",ON="[object Proxy]";function PC(e){if(!cl(e))return!1;var t=cs(e);return t==RN||t==PN||t==AN||t==ON}var qd=er["__core-js_shared__"],D0=function(){var e=/[^.]+$/.exec(qd&&qd.keys&&qd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function DN(e){return!!D0&&D0 in e}var NN=Function.prototype,MN=NN.toString;function fs(e){if(e!=null){try{return MN.call(e)}catch{}try{return e+""}catch{}}return""}var FN=/[\\^$.*+?()[\]{}|]/g,LN=/^\[object .+?Constructor\]$/,IN=Function.prototype,$N=Object.prototype,BN=IN.toString,zN=$N.hasOwnProperty,VN=RegExp("^"+BN.call(zN).replace(FN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function UN(e){if(!cl(e)||DN(e))return!1;var t=PC(e)?VN:LN;return t.test(fs(e))}function HN(e,t){return e==null?void 0:e[t]}function ps(e,t){var n=HN(e,t);return UN(n)?n:void 0}var Ha=ps(er,"Map"),Wa=ps(Object,"create");function WN(){this.__data__=Wa?Wa(null):{},this.size=0}function qN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var GN="__lodash_hash_undefined__",QN=Object.prototype,YN=QN.hasOwnProperty;function KN(e){var t=this.__data__;if(Wa){var n=t[e];return n===GN?void 0:n}return YN.call(t,e)?t[e]:void 0}var XN=Object.prototype,ZN=XN.hasOwnProperty;function JN(e){var t=this.__data__;return Wa?t[e]!==void 0:ZN.call(t,e)}var e5="__lodash_hash_undefined__";function t5(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Wa&&t===void 0?e5:t,this}function es(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])}}es.prototype.clear=WN;es.prototype.delete=qN;es.prototype.get=KN;es.prototype.has=JN;es.prototype.set=t5;function n5(){this.size=0,this.__data__={hash:new es,map:new(Ha||wr),string:new es}}function r5(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Nc(e,t){var n=e.__data__;return r5(t)?n[typeof t=="string"?"string":"hash"]:n.map}function i5(e){var t=Nc(this,e).delete(e);return this.size-=t?1:0,t}function s5(e){return Nc(this,e).get(e)}function o5(e){return Nc(this,e).has(e)}function a5(e,t){var n=Nc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function hi(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])}}hi.prototype.clear=n5;hi.prototype.delete=i5;hi.prototype.get=s5;hi.prototype.has=o5;hi.prototype.set=a5;var l5=200;function u5(e,t){var n=this.__data__;if(n instanceof wr){var r=n.__data__;if(!Ha||r.length<l5-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new hi(r)}return n.set(e,t),this.size=n.size,this}function Eo(e){var t=this.__data__=new wr(e);this.size=t.size}Eo.prototype.clear=TN;Eo.prototype.delete=EN;Eo.prototype.get=_N;Eo.prototype.has=jN;Eo.prototype.set=u5;function c5(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var N0=function(){try{var e=ps(Object,"defineProperty");return e({},"",{}),e}catch{}}();function OC(e,t,n){t=="__proto__"&&N0?N0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var d5=Object.prototype,f5=d5.hasOwnProperty;function DC(e,t,n){var r=e[t];(!(f5.call(e,t)&&RC(r,n))||n===void 0&&!(t in e))&&OC(e,t,n)}function Mc(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?OC(n,a,l):DC(n,a,l)}return n}function p5(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var h5="[object Arguments]";function M0(e){return ds(e)&&cs(e)==h5}var NC=Object.prototype,m5=NC.hasOwnProperty,g5=NC.propertyIsEnumerable,v5=M0(function(){return arguments}())?M0:function(e){return ds(e)&&m5.call(e,"callee")&&!g5.call(e,"callee")},dl=Array.isArray;function y5(){return!1}var MC=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,F0=MC&&typeof Wt=="object"&&Wt&&!Wt.nodeType&&Wt,x5=F0&&F0.exports===MC,L0=x5?er.Buffer:void 0,w5=L0?L0.isBuffer:void 0,FC=w5||y5,b5=9007199254740991,S5=/^(?:0|[1-9]\d*)$/;function C5(e,t){var n=typeof e;return t=t??b5,!!t&&(n=="number"||n!="symbol"&&S5.test(e))&&e>-1&&e%1==0&&e<t}var k5=9007199254740991;function LC(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k5}var T5="[object Arguments]",E5="[object Array]",_5="[object Boolean]",j5="[object Date]",A5="[object Error]",R5="[object Function]",P5="[object Map]",O5="[object Number]",D5="[object Object]",N5="[object RegExp]",M5="[object Set]",F5="[object String]",L5="[object WeakMap]",I5="[object ArrayBuffer]",$5="[object DataView]",B5="[object Float32Array]",z5="[object Float64Array]",V5="[object Int8Array]",U5="[object Int16Array]",H5="[object Int32Array]",W5="[object Uint8Array]",q5="[object Uint8ClampedArray]",G5="[object Uint16Array]",Q5="[object Uint32Array]",Ee={};Ee[B5]=Ee[z5]=Ee[V5]=Ee[U5]=Ee[H5]=Ee[W5]=Ee[q5]=Ee[G5]=Ee[Q5]=!0;Ee[T5]=Ee[E5]=Ee[I5]=Ee[_5]=Ee[$5]=Ee[j5]=Ee[A5]=Ee[R5]=Ee[P5]=Ee[O5]=Ee[D5]=Ee[N5]=Ee[M5]=Ee[F5]=Ee[L5]=!1;function Y5(e){return ds(e)&&LC(e.length)&&!!Ee[cs(e)]}function tg(e){return function(t){return e(t)}}var IC=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,da=IC&&typeof Wt=="object"&&Wt&&!Wt.nodeType&&Wt,K5=da&&da.exports===IC,Gd=K5&&EC.process,vo=function(){try{var e=da&&da.require&&da.require("util").types;return e||Gd&&Gd.binding&&Gd.binding("util")}catch{}}(),I0=vo&&vo.isTypedArray,X5=I0?tg(I0):Y5,Z5=Object.prototype,J5=Z5.hasOwnProperty;function $C(e,t){var n=dl(e),r=!n&&v5(e),i=!n&&!r&&FC(e),s=!n&&!r&&!i&&X5(e),o=n||r||i||s,a=o?p5(e.length,String):[],l=a.length;for(var u in e)(t||J5.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||C5(u,l)))&&a.push(u);return a}var eM=Object.prototype;function ng(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||eM;return e===n}var tM=jC(Object.keys,Object),nM=Object.prototype,rM=nM.hasOwnProperty;function iM(e){if(!ng(e))return tM(e);var t=[];for(var n in Object(e))rM.call(e,n)&&n!="constructor"&&t.push(n);return t}function BC(e){return e!=null&&LC(e.length)&&!PC(e)}function rg(e){return BC(e)?$C(e):iM(e)}function sM(e,t){return e&&Mc(t,rg(t),e)}function oM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var aM=Object.prototype,lM=aM.hasOwnProperty;function uM(e){if(!cl(e))return oM(e);var t=ng(e),n=[];for(var r in e)r=="constructor"&&(t||!lM.call(e,r))||n.push(r);return n}function ig(e){return BC(e)?$C(e,!0):uM(e)}function cM(e,t){return e&&Mc(t,ig(t),e)}var zC=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,$0=zC&&typeof Wt=="object"&&Wt&&!Wt.nodeType&&Wt,dM=$0&&$0.exports===zC,B0=dM?er.Buffer:void 0,z0=B0?B0.allocUnsafe:void 0;function fM(e,t){if(t)return e.slice();var n=e.length,r=z0?z0(n):new e.constructor(n);return e.copy(r),r}function VC(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function pM(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 UC(){return[]}var hM=Object.prototype,mM=hM.propertyIsEnumerable,V0=Object.getOwnPropertySymbols,sg=V0?function(e){return e==null?[]:(e=Object(e),pM(V0(e),function(t){return mM.call(e,t)}))}:UC;function gM(e,t){return Mc(e,sg(e),t)}function HC(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var vM=Object.getOwnPropertySymbols,WC=vM?function(e){for(var t=[];e;)HC(t,sg(e)),e=eg(e);return t}:UC;function yM(e,t){return Mc(e,WC(e),t)}function qC(e,t,n){var r=t(e);return dl(e)?r:HC(r,n(e))}function xM(e){return qC(e,rg,sg)}function wM(e){return qC(e,ig,WC)}var Wp=ps(er,"DataView"),qp=ps(er,"Promise"),Gp=ps(er,"Set"),Qp=ps(er,"WeakMap"),U0="[object Map]",bM="[object Object]",H0="[object Promise]",W0="[object Set]",q0="[object WeakMap]",G0="[object DataView]",SM=fs(Wp),CM=fs(Ha),kM=fs(qp),TM=fs(Gp),EM=fs(Qp),or=cs;(Wp&&or(new Wp(new ArrayBuffer(1)))!=G0||Ha&&or(new Ha)!=U0||qp&&or(qp.resolve())!=H0||Gp&&or(new Gp)!=W0||Qp&&or(new Qp)!=q0)&&(or=function(e){var t=cs(e),n=t==bM?e.constructor:void 0,r=n?fs(n):"";if(r)switch(r){case SM:return G0;case CM:return U0;case kM:return H0;case TM:return W0;case EM:return q0}return t});var _M=Object.prototype,jM=_M.hasOwnProperty;function AM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&jM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Q0=er.Uint8Array;function og(e){var t=new e.constructor(e.byteLength);return new Q0(t).set(new Q0(e)),t}function RM(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var PM=/\w*$/;function OM(e){var t=new e.constructor(e.source,PM.exec(e));return t.lastIndex=e.lastIndex,t}var Y0=ui?ui.prototype:void 0,K0=Y0?Y0.valueOf:void 0;function DM(e){return K0?Object(K0.call(e)):{}}function NM(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var MM="[object Boolean]",FM="[object Date]",LM="[object Map]",IM="[object Number]",$M="[object RegExp]",BM="[object Set]",zM="[object String]",VM="[object Symbol]",UM="[object ArrayBuffer]",HM="[object DataView]",WM="[object Float32Array]",qM="[object Float64Array]",GM="[object Int8Array]",QM="[object Int16Array]",YM="[object Int32Array]",KM="[object Uint8Array]",XM="[object Uint8ClampedArray]",ZM="[object Uint16Array]",JM="[object Uint32Array]";function eF(e,t,n){var r=e.constructor;switch(t){case UM:return og(e);case MM:case FM:return new r(+e);case HM:return RM(e,n);case WM:case qM:case GM:case QM:case YM:case KM:case XM:case ZM:case JM:return NM(e,n);case LM:return new r;case IM:case zM:return new r(e);case $M:return OM(e);case BM:return new r;case VM:return DM(e)}}var X0=Object.create,tF=function(){function e(){}return function(t){if(!cl(t))return{};if(X0)return X0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function nF(e){return typeof e.constructor=="function"&&!ng(e)?tF(eg(e)):{}}var rF="[object Map]";function iF(e){return ds(e)&&or(e)==rF}var Z0=vo&&vo.isMap,sF=Z0?tg(Z0):iF,oF="[object Set]";function aF(e){return ds(e)&&or(e)==oF}var J0=vo&&vo.isSet,lF=J0?tg(J0):aF,uF=1,cF=2,dF=4,GC="[object Arguments]",fF="[object Array]",pF="[object Boolean]",hF="[object Date]",mF="[object Error]",QC="[object Function]",gF="[object GeneratorFunction]",vF="[object Map]",yF="[object Number]",YC="[object Object]",xF="[object RegExp]",wF="[object Set]",bF="[object String]",SF="[object Symbol]",CF="[object WeakMap]",kF="[object ArrayBuffer]",TF="[object DataView]",EF="[object Float32Array]",_F="[object Float64Array]",jF="[object Int8Array]",AF="[object Int16Array]",RF="[object Int32Array]",PF="[object Uint8Array]",OF="[object Uint8ClampedArray]",DF="[object Uint16Array]",NF="[object Uint32Array]",Se={};Se[GC]=Se[fF]=Se[kF]=Se[TF]=Se[pF]=Se[hF]=Se[EF]=Se[_F]=Se[jF]=Se[AF]=Se[RF]=Se[vF]=Se[yF]=Se[YC]=Se[xF]=Se[wF]=Se[bF]=Se[SF]=Se[PF]=Se[OF]=Se[DF]=Se[NF]=!0;Se[mF]=Se[QC]=Se[CF]=!1;function fa(e,t,n,r,i,s){var o,a=t&uF,l=t&cF,u=t&dF;if(o!==void 0)return o;if(!cl(e))return e;var d=dl(e);if(d){if(o=AM(e),!a)return VC(e,o)}else{var c=or(e),f=c==QC||c==gF;if(FC(e))return fM(e,a);if(c==YC||c==GC||f&&!i){if(o=l||f?{}:nF(e),!a)return l?yM(e,cM(o,e)):gM(e,sM(o,e))}else{if(!Se[c])return i?e:{};o=eF(e,c,a)}}s||(s=new Eo);var p=s.get(e);if(p)return p;s.set(e,o),lF(e)?e.forEach(function(x){o.add(fa(x,t,n,x,e,s))}):sF(e)&&e.forEach(function(x,y){o.set(y,fa(x,t,n,y,e,s))});var m=u?l?wM:xM:l?ig:rg,g=d?void 0:m(e);return c5(g||e,function(x,y){g&&(y=x,x=e[y]),DC(o,y,fa(x,t,n,y,e,s))}),o}var MF=1,FF=4;function $l(e){return fa(e,MF|FF)}var ex=Array.isArray,tx=Object.keys,LF=Object.prototype.hasOwnProperty,IF=typeof Element<"u";function Yp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=ex(e),r=ex(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Yp(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,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var c=tx(e);if(s=c.length,s!==tx(t).length)return!1;for(i=s;i--!==0;)if(!LF.call(t,c[i]))return!1;if(IF&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Yp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var $F=function(t,n){try{return Yp(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 Ti=ts($F);var BF=4;function nx(e){return fa(e,BF)}function KC(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 zF="[object Symbol]";function ag(e){return typeof e=="symbol"||ds(e)&&cs(e)==zF}var VF="Expected a function";function lg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VF);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(lg.Cache||hi),n}lg.Cache=hi;var UF=500;function HF(e){var t=lg(e,function(r){return n.size===UF&&n.clear(),r}),n=t.cache;return t}var WF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qF=/\\(\\)?/g,GF=HF(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WF,function(n,r,i,s){t.push(i?s.replace(qF,"$1"):r||n)}),t}),QF=1/0;function YF(e){if(typeof e=="string"||ag(e))return e;var t=e+"";return t=="0"&&1/e==-QF?"-0":t}var KF=1/0,rx=ui?ui.prototype:void 0,ix=rx?rx.toString:void 0;function XC(e){if(typeof e=="string")return e;if(dl(e))return KC(e,XC)+"";if(ag(e))return ix?ix.call(e):"";var t=e+"";return t=="0"&&1/e==-KF?"-0":t}function XF(e){return e==null?"":XC(e)}function ZC(e){return dl(e)?KC(e,YF):ag(e)?[e]:VC(GF(XF(e)))}var JC={exports:{}},xe={};/** @license React v16.13.1
87
99
  * react-is.production.min.js
88
100
  *
89
101
  * Copyright (c) Facebook, Inc. and its affiliates.
90
102
  *
91
103
  * This source code is licensed under the MIT license found in the
92
104
  * LICENSE file in the root directory of this source tree.
93
- */var Je=typeof Symbol=="function"&&Symbol.for,jm=Je?Symbol.for("react.element"):60103,Rm=Je?Symbol.for("react.portal"):60106,_c=Je?Symbol.for("react.fragment"):60107,jc=Je?Symbol.for("react.strict_mode"):60108,Rc=Je?Symbol.for("react.profiler"):60114,Ac=Je?Symbol.for("react.provider"):60109,Pc=Je?Symbol.for("react.context"):60110,Am=Je?Symbol.for("react.async_mode"):60111,Oc=Je?Symbol.for("react.concurrent_mode"):60111,Dc=Je?Symbol.for("react.forward_ref"):60112,Nc=Je?Symbol.for("react.suspense"):60113,fD=Je?Symbol.for("react.suspense_list"):60120,Mc=Je?Symbol.for("react.memo"):60115,Fc=Je?Symbol.for("react.lazy"):60116,pD=Je?Symbol.for("react.block"):60121,hD=Je?Symbol.for("react.fundamental"):60117,mD=Je?Symbol.for("react.responder"):60118,gD=Je?Symbol.for("react.scope"):60119;function Kt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Am:case Oc:case _c:case Rc:case jc:case Nc:return e;default:switch(e=e&&e.$$typeof,e){case Pc:case Dc:case Fc:case Mc:case Ac:return e;default:return t}}case Rm:return t}}}function SS(e){return Kt(e)===Oc}ve.AsyncMode=Am;ve.ConcurrentMode=Oc;ve.ContextConsumer=Pc;ve.ContextProvider=Ac;ve.Element=jm;ve.ForwardRef=Dc;ve.Fragment=_c;ve.Lazy=Fc;ve.Memo=Mc;ve.Portal=Rm;ve.Profiler=Rc;ve.StrictMode=jc;ve.Suspense=Nc;ve.isAsyncMode=function(e){return SS(e)||Kt(e)===Am};ve.isConcurrentMode=SS;ve.isContextConsumer=function(e){return Kt(e)===Pc};ve.isContextProvider=function(e){return Kt(e)===Ac};ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};ve.isForwardRef=function(e){return Kt(e)===Dc};ve.isFragment=function(e){return Kt(e)===_c};ve.isLazy=function(e){return Kt(e)===Fc};ve.isMemo=function(e){return Kt(e)===Mc};ve.isPortal=function(e){return Kt(e)===Rm};ve.isProfiler=function(e){return Kt(e)===Rc};ve.isStrictMode=function(e){return Kt(e)===jc};ve.isSuspense=function(e){return Kt(e)===Nc};ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_c||e===Oc||e===Rc||e===jc||e===Nc||e===fD||typeof e=="object"&&e!==null&&(e.$$typeof===Fc||e.$$typeof===Mc||e.$$typeof===Ac||e.$$typeof===Pc||e.$$typeof===Dc||e.$$typeof===hD||e.$$typeof===mD||e.$$typeof===gD||e.$$typeof===pD)};ve.typeOf=Kt;bS.exports=ve;var vD=bS.exports,CS=vD,yD={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xD={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},kS={};kS[CS.ForwardRef]=yD;kS[CS.Memo]=xD;function Ke(){return Ke=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},Ke.apply(this,arguments)}function TS(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 Lc=v.createContext(void 0);Lc.displayName="FormikContext";Lc.Provider;Lc.Consumer;function wD(){var e=v.useContext(Lc);return e}var vn=function(t){return typeof t=="function"},Ic=function(t){return t!==null&&typeof t=="object"},bD=function(t){return String(Math.floor(Number(t)))===t},Nd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Md=function(t){return Ic(t)&&vn(t.then)};function Bt(e,t,n,r){r===void 0&&(r=0);for(var i=wS(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Vi(e,t,n){for(var r=Fy(e),i=r,s=0,o=wS(t);s<o.length-1;s++){var a=o[s],l=Bt(e,o.slice(0,s+1));if(l&&(Ic(l)||Array.isArray(l)))i=i[a]=Fy(l);else{var u=o[s+1];i=i[a]=bD(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 ES(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];Ic(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},ES(a,t,n,r[o])):r[o]=t}return r}function SD(e,t){switch(t.type){case"SET_VALUES":return Ke({},e,{values:t.payload});case"SET_TOUCHED":return Ke({},e,{touched:t.payload});case"SET_ERRORS":return bi(e.errors,t.payload)?e:Ke({},e,{errors:t.payload});case"SET_STATUS":return Ke({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ke({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ke({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ke({},e,{values:Vi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ke({},e,{touched:Vi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ke({},e,{errors:Vi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ke({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ke({},e,{touched:ES(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ke({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ke({},e,{isSubmitting:!1});default:return e}}var vi={},Dl={};function CD(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,d=e.onSubmit,c=TS(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Ke({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),p=v.useRef(f.initialValues),m=v.useRef(f.initialErrors||vi),h=v.useRef(f.initialTouched||Dl),w=v.useRef(f.initialStatus),y=v.useRef(!1),x=v.useRef({});v.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var b=v.useState(0),k=b[1],T=v.useRef({values:Ol(f.initialValues),errors:Ol(f.initialErrors)||vi,touched:Ol(f.initialTouched)||Dl,status:Ol(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=T.current,j=v.useCallback(function(P){var V=T.current;T.current=SD(V,P),V!==T.current&&k(function(D){return D+1})},[]),R=v.useCallback(function(P,V){return new Promise(function(D,F){var G=f.validate(P,V);G==null?D(vi):Md(G)?G.then(function(ee){D(ee||vi)},function(ee){F(ee)}):D(G)})},[f.validate]),M=v.useCallback(function(P,V){var D=f.validationSchema,F=vn(D)?D(V):D,G=V&&F.validateAt?F.validateAt(V,P):TD(P,F);return new Promise(function(ee,ue){G.then(function(){ee(vi)},function(Ue){Ue.name==="ValidationError"?ee(kD(Ue)):ue(Ue)})})},[f.validationSchema]),N=v.useCallback(function(P,V){return new Promise(function(D){return D(x.current[P].validate(V))})},[]),A=v.useCallback(function(P){var V=Object.keys(x.current).filter(function(F){return vn(x.current[F].validate)}),D=V.length>0?V.map(function(F){return N(F,Bt(P,F))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(D).then(function(F){return F.reduce(function(G,ee,ue){return ee==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ee&&(G=Vi(G,V[ue],ee)),G},{})})},[N]),W=v.useCallback(function(P){return Promise.all([A(P),f.validationSchema?M(P):{},f.validate?R(P):{}]).then(function(V){var D=V[0],F=V[1],G=V[2],ee=Sp.all([D,F,G],{arrayMerge:ED});return ee})},[f.validate,f.validationSchema,A,R,M]),B=Jt(function(P){return P===void 0&&(P=E.values),j({type:"SET_ISVALIDATING",payload:!0}),W(P).then(function(V){return y.current&&(j({type:"SET_ISVALIDATING",payload:!1}),j({type:"SET_ERRORS",payload:V})),V})});v.useEffect(function(){o&&y.current===!0&&bi(p.current,f.initialValues)&&B(p.current)},[o,B]);var Q=v.useCallback(function(P){var V=P&&P.values?P.values:p.current,D=P&&P.errors?P.errors:m.current?m.current:f.initialErrors||{},F=P&&P.touched?P.touched:h.current?h.current:f.initialTouched||{},G=P&&P.status?P.status:w.current?w.current:f.initialStatus;p.current=V,m.current=D,h.current=F,w.current=G;var ee=function(){j({type:"RESET_FORM",payload:{isSubmitting:!!P&&!!P.isSubmitting,errors:D,touched:F,status:G,values:V,isValidating:!!P&&!!P.isValidating,submitCount:P&&P.submitCount&&typeof P.submitCount=="number"?P.submitCount:0}})};if(f.onReset){var ue=f.onReset(E.values,pi);Md(ue)?ue.then(ee):ee()}else ee()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){y.current===!0&&!bi(p.current,f.initialValues)&&u&&(p.current=f.initialValues,Q(),o&&B(p.current))},[u,f.initialValues,Q,o,B]),v.useEffect(function(){u&&y.current===!0&&!bi(m.current,f.initialErrors)&&(m.current=f.initialErrors||vi,j({type:"SET_ERRORS",payload:f.initialErrors||vi}))},[u,f.initialErrors]),v.useEffect(function(){u&&y.current===!0&&!bi(h.current,f.initialTouched)&&(h.current=f.initialTouched||Dl,j({type:"SET_TOUCHED",payload:f.initialTouched||Dl}))},[u,f.initialTouched]),v.useEffect(function(){u&&y.current===!0&&!bi(w.current,f.initialStatus)&&(w.current=f.initialStatus,j({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var X=Jt(function(P){if(x.current[P]&&vn(x.current[P].validate)){var V=Bt(E.values,P),D=x.current[P].validate(V);return Md(D)?(j({type:"SET_ISVALIDATING",payload:!0}),D.then(function(F){return F}).then(function(F){j({type:"SET_FIELD_ERROR",payload:{field:P,value:F}}),j({type:"SET_ISVALIDATING",payload:!1})})):(j({type:"SET_FIELD_ERROR",payload:{field:P,value:D}}),Promise.resolve(D))}else if(f.validationSchema)return j({type:"SET_ISVALIDATING",payload:!0}),M(E.values,P).then(function(F){return F}).then(function(F){j({type:"SET_FIELD_ERROR",payload:{field:P,value:Bt(F,P)}}),j({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),J=v.useCallback(function(P,V){var D=V.validate;x.current[P]={validate:D}},[]),ne=v.useCallback(function(P){delete x.current[P]},[]),_=Jt(function(P,V){j({type:"SET_TOUCHED",payload:P});var D=V===void 0?i:V;return D?B(E.values):Promise.resolve()}),O=v.useCallback(function(P){j({type:"SET_ERRORS",payload:P})},[]),I=Jt(function(P,V){var D=vn(P)?P(E.values):P;j({type:"SET_VALUES",payload:D});var F=V===void 0?n:V;return F?B(D):Promise.resolve()}),z=v.useCallback(function(P,V){j({type:"SET_FIELD_ERROR",payload:{field:P,value:V}})},[]),U=Jt(function(P,V,D){j({type:"SET_FIELD_VALUE",payload:{field:P,value:V}});var F=D===void 0?n:D;return F?B(Vi(E.values,P,V)):Promise.resolve()}),K=v.useCallback(function(P,V){var D=V,F=P,G;if(!Nd(P)){P.persist&&P.persist();var ee=P.target?P.target:P.currentTarget,ue=ee.type,Ue=ee.name,nt=ee.id,Rn=ee.value,Xt=ee.checked,hs=ee.outerHTML,er=ee.options,Sr=ee.multiple;D=V||Ue||nt,F=/number|range/.test(ue)?(G=parseFloat(Rn),isNaN(G)?"":G):/checkbox/.test(ue)?jD(Bt(E.values,D),Xt,Rn):er&&Sr?_D(er):Rn}D&&U(D,F)},[U,E.values]),oe=Jt(function(P){if(Nd(P))return function(V){return K(V,P)};K(P)}),xe=Jt(function(P,V,D){V===void 0&&(V=!0),j({type:"SET_FIELD_TOUCHED",payload:{field:P,value:V}});var F=D===void 0?i:D;return F?B(E.values):Promise.resolve()}),re=v.useCallback(function(P,V){P.persist&&P.persist();var D=P.target,F=D.name,G=D.id,ee=D.outerHTML,ue=V||F||G;xe(ue,!0)},[xe]),Fe=Jt(function(P){if(Nd(P))return function(V){return re(V,P)};re(P)}),et=v.useCallback(function(P){vn(P)?j({type:"SET_FORMIK_STATE",payload:P}):j({type:"SET_FORMIK_STATE",payload:function(){return P}})},[]),tt=v.useCallback(function(P){j({type:"SET_STATUS",payload:P})},[]),It=v.useCallback(function(P){j({type:"SET_ISSUBMITTING",payload:P})},[]),jn=Jt(function(){return j({type:"SUBMIT_ATTEMPT"}),B().then(function(P){var V=P instanceof Error,D=!V&&Object.keys(P).length===0;if(D){var F;try{if(F=xr(),F===void 0)return}catch(G){throw G}return Promise.resolve(F).then(function(G){return y.current&&j({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(y.current)throw j({type:"SUBMIT_FAILURE"}),G})}else if(y.current&&(j({type:"SUBMIT_FAILURE"}),V))throw P})}),pn=Jt(function(P){P&&P.preventDefault&&vn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&vn(P.stopPropagation)&&P.stopPropagation(),jn().catch(function(V){console.warn("Warning: An unhandled error was caught from submitForm()",V)})}),pi={resetForm:Q,validateForm:B,validateField:X,setErrors:O,setFieldError:z,setFieldTouched:xe,setFieldValue:U,setStatus:tt,setSubmitting:It,setTouched:_,setValues:I,setFormikState:et,submitForm:jn},xr=Jt(function(){return d(E.values,pi)}),ps=Jt(function(P){P&&P.preventDefault&&vn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&vn(P.stopPropagation)&&P.stopPropagation(),Q()}),hi=v.useCallback(function(P){return{value:Bt(E.values,P),error:Bt(E.errors,P),touched:!!Bt(E.touched,P),initialValue:Bt(p.current,P),initialTouched:!!Bt(h.current,P),initialError:Bt(m.current,P)}},[E.errors,E.touched,E.values]),Tt=v.useCallback(function(P){return{setValue:function(D,F){return U(P,D,F)},setTouched:function(D,F){return xe(P,D,F)},setError:function(D){return z(P,D)}}},[U,xe,z]),wr=v.useCallback(function(P){var V=Ic(P),D=V?P.name:P,F=Bt(E.values,D),G={name:D,value:F,onChange:oe,onBlur:Fe};if(V){var ee=P.type,ue=P.value,Ue=P.as,nt=P.multiple;ee==="checkbox"?ue===void 0?G.checked=!!F:(G.checked=!!(Array.isArray(F)&&~F.indexOf(ue)),G.value=ue):ee==="radio"?(G.checked=F===ue,G.value=ue):Ue==="select"&&nt&&(G.value=G.value||[],G.multiple=!0)}return G},[Fe,oe,E.values]),Qe=v.useMemo(function(){return!bi(p.current,E.values)},[p.current,E.values]),br=v.useMemo(function(){return typeof a<"u"?Qe?E.errors&&Object.keys(E.errors).length===0:a!==!1&&vn(a)?a(f):a:E.errors&&Object.keys(E.errors).length===0},[a,Qe,E.errors,f]),_o=Ke({},E,{initialValues:p.current,initialErrors:m.current,initialTouched:h.current,initialStatus:w.current,handleBlur:Fe,handleChange:oe,handleReset:ps,handleSubmit:pn,resetForm:Q,setErrors:O,setFormikState:et,setFieldTouched:xe,setFieldValue:U,setFieldError:z,setStatus:tt,setSubmitting:It,setTouched:_,setValues:I,submitForm:jn,validateForm:B,validateField:X,isValid:br,dirty:Qe,unregisterField:ne,registerField:J,getFieldProps:wr,getFieldMeta:hi,getFieldHelpers:Tt,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return _o}function kD(e){var t={};if(e.inner){if(e.inner.length===0)return Vi(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;Bt(t,o.path)||(t=Vi(t,o.path,o.message))}}return t}function TD(e,t,n,r){n===void 0&&(n=!1);var i=jp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function jp(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||fy(i)?jp(i):i!==""?i:void 0}):fy(e[r])?t[r]=jp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function ED(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?Sp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Sp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function _D(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function jD(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 RD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Jt(e){var t=v.useRef(e);return RD(function(){t.current=e}),v.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 AD=v.forwardRef(function(e,t){var n=e.action,r=TS(e,["action"]),i=n??"#",s=wD(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ke({onSubmit:a,ref:t,onReset:o,action:i},r))});AD.displayName="Form";const _S=({init:e,schema:t,action:n})=>CD({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});var jS={exports:{}};/*!
94
- Copyright (c) 2018 Jed Watson.
95
- Licensed under the MIT License (MIT), see
96
- http://jedwatson.github.io/classnames
97
- */(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})()})(jS);var PD=jS.exports;const ye=Zi(PD);function OD(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 DD=e=>{switch(e){case"success":return FD;case"info":return ID;case"warning":return LD;case"error":return $D;default:return null}},ND=Array(12).fill(0),MD=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},ND.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),FD=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),LD=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),ID=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),$D=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),BD=L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),zD=()=>{const[e,t]=L.useState(document.hidden);return L.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Rp=1;class VD{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:Rp++,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],L.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(HD(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:f,...p})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:c,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));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)||Rp++;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 Rt=new VD,UD=(e,t)=>{const n=(t==null?void 0:t.id)||Rp++;return Rt.addToast({title:e,...t,id:n}),n},HD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WD=UD,qD=()=>Rt.toasts,GD=()=>Rt.getActiveToasts(),RS=Object.assign(WD,{success:Rt.success,info:Rt.info,warning:Rt.warning,error:Rt.error,custom:Rt.custom,message:Rt.message,promise:Rt.promise,dismiss:Rt.dismiss,loading:Rt.loading},{getHistory:qD,getToasts:GD});OD("[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 Nl(e){return e.label!==void 0}const QD=3,YD="24px",KD="16px",$y=4e3,XD=356,ZD=14,JD=45,eN=200;function On(...e){return e.filter(Boolean).join(" ")}function tN(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const nN=e=>{var t,n,r,i,s,o,a,l,u;const{invert:d,toast:c,unstyled:f,interacting:p,setHeights:m,visibleToasts:h,heights:w,index:y,toasts:x,expanded:b,removeToast:k,defaultRichColors:T,closeButton:E,style:j,cancelButtonStyle:R,actionButtonStyle:M,className:N="",descriptionClassName:A="",duration:W,position:B,gap:Q,expandByDefault:X,classNames:J,icons:ne,closeButtonAriaLabel:_="Close toast"}=e,[O,I]=L.useState(null),[z,U]=L.useState(null),[K,oe]=L.useState(!1),[xe,re]=L.useState(!1),[Fe,et]=L.useState(!1),[tt,It]=L.useState(!1),[jn,pn]=L.useState(!1),[pi,xr]=L.useState(0),[ps,hi]=L.useState(0),Tt=L.useRef(c.duration||W||$y),wr=L.useRef(null),Qe=L.useRef(null),br=y===0,_o=y+1<=h,P=c.type,V=c.dismissible!==!1,D=c.className||"",F=c.descriptionClassName||"",G=L.useMemo(()=>w.findIndex(ie=>ie.toastId===c.id)||0,[w,c.id]),ee=L.useMemo(()=>{var ie;return(ie=c.closeButton)!=null?ie:E},[c.closeButton,E]),ue=L.useMemo(()=>c.duration||W||$y,[c.duration,W]),Ue=L.useRef(0),nt=L.useRef(0),Rn=L.useRef(0),Xt=L.useRef(null),[hs,er]=B.split("-"),Sr=L.useMemo(()=>w.reduce((ie,Ye,ut)=>ut>=G?ie:ie+Ye.height,0),[w,G]),ms=zD(),jo=c.invert||d,mi=P==="loading";nt.current=L.useMemo(()=>G*Q+Sr,[G,Sr]),L.useEffect(()=>{Tt.current=ue},[ue]),L.useEffect(()=>{oe(!0)},[]),L.useEffect(()=>{const ie=Qe.current;if(ie){const Ye=ie.getBoundingClientRect().height;return hi(Ye),m(ut=>[{toastId:c.id,height:Ye,position:c.position},...ut]),()=>m(ut=>ut.filter($t=>$t.toastId!==c.id))}},[m,c.id]),L.useLayoutEffect(()=>{if(!K)return;const ie=Qe.current,Ye=ie.style.height;ie.style.height="auto";const ut=ie.getBoundingClientRect().height;ie.style.height=Ye,hi(ut),m($t=>$t.find(rt=>rt.toastId===c.id)?$t.map(rt=>rt.toastId===c.id?{...rt,height:ut}:rt):[{toastId:c.id,height:ut,position:c.position},...$t])},[K,c.title,c.description,m,c.id]);const An=L.useCallback(()=>{re(!0),xr(nt.current),m(ie=>ie.filter(Ye=>Ye.toastId!==c.id)),setTimeout(()=>{k(c)},eN)},[c,k,m,nt]);L.useEffect(()=>{if(c.promise&&P==="loading"||c.duration===1/0||c.type==="loading")return;let ie;return b||p||ms?(()=>{if(Rn.current<Ue.current){const $t=new Date().getTime()-Ue.current;Tt.current=Tt.current-$t}Rn.current=new Date().getTime()})():(()=>{Tt.current!==1/0&&(Ue.current=new Date().getTime(),ie=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),An()},Tt.current))})(),()=>clearTimeout(ie)},[b,p,c,P,ms,An]),L.useEffect(()=>{c.delete&&An()},[An,c.delete]);function Zk(){var ie;if(ne!=null&&ne.loading){var Ye;return L.createElement("div",{className:On(J==null?void 0:J.loader,c==null||(Ye=c.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":P==="loading"},ne.loading)}return L.createElement(MD,{className:On(J==null?void 0:J.loader,c==null||(ie=c.classNames)==null?void 0:ie.loader),visible:P==="loading"})}var kg,Tg;return L.createElement("li",{tabIndex:0,ref:Qe,className:On(N,D,J==null?void 0:J.toast,c==null||(t=c.classNames)==null?void 0:t.toast,J==null?void 0:J.default,J==null?void 0:J[P],c==null||(n=c.classNames)==null?void 0:n[P]),"data-sonner-toast":"","data-rich-colors":(kg=c.richColors)!=null?kg:T,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":K,"data-promise":!!c.promise,"data-swiped":jn,"data-removed":xe,"data-visible":_o,"data-y-position":hs,"data-x-position":er,"data-index":y,"data-front":br,"data-swiping":Fe,"data-dismissible":V,"data-type":P,"data-invert":jo,"data-swipe-out":tt,"data-swipe-direction":z,"data-expanded":!!(b||X&&K),style:{"--index":y,"--toasts-before":y,"--z-index":x.length-y,"--offset":`${xe?pi:nt.current}px`,"--initial-height":X?"auto":`${ps}px`,...j,...c.style},onDragEnd:()=>{et(!1),I(null),Xt.current=null},onPointerDown:ie=>{mi||!V||(wr.current=new Date,xr(nt.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(et(!0),Xt.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,Ye,ut;if(tt||!V)return;Xt.current=null;const $t=Number(((ie=Qe.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cl=Number(((Ye=Qe.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),rt=new Date().getTime()-((ut=wr.current)==null?void 0:ut.getTime()),Zt=O==="x"?$t:cl,dl=Math.abs(Zt)/rt;if(Math.abs(Zt)>=JD||dl>.11){xr(nt.current),c.onDismiss==null||c.onDismiss.call(c,c),U(O==="x"?$t>0?"right":"left":cl>0?"down":"up"),An(),It(!0);return}else{var hn,mn;(hn=Qe.current)==null||hn.style.setProperty("--swipe-amount-x","0px"),(mn=Qe.current)==null||mn.style.setProperty("--swipe-amount-y","0px")}pn(!1),et(!1),I(null)},onPointerMove:ie=>{var Ye,ut,$t;if(!Xt.current||!V||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const rt=ie.clientY-Xt.current.y,Zt=ie.clientX-Xt.current.x;var dl;const hn=(dl=e.swipeDirections)!=null?dl:tN(B);!O&&(Math.abs(Zt)>1||Math.abs(rt)>1)&&I(Math.abs(Zt)>Math.abs(rt)?"x":"y");let mn={x:0,y:0};const Eg=gi=>1/(1.5+Math.abs(gi)/20);if(O==="y"){if(hn.includes("top")||hn.includes("bottom"))if(hn.includes("top")&&rt<0||hn.includes("bottom")&&rt>0)mn.y=rt;else{const gi=rt*Eg(rt);mn.y=Math.abs(gi)<Math.abs(rt)?gi:rt}}else if(O==="x"&&(hn.includes("left")||hn.includes("right")))if(hn.includes("left")&&Zt<0||hn.includes("right")&&Zt>0)mn.x=Zt;else{const gi=Zt*Eg(Zt);mn.x=Math.abs(gi)<Math.abs(Zt)?gi:Zt}(Math.abs(mn.x)>0||Math.abs(mn.y)>0)&&pn(!0),(ut=Qe.current)==null||ut.style.setProperty("--swipe-amount-x",`${mn.x}px`),($t=Qe.current)==null||$t.style.setProperty("--swipe-amount-y",`${mn.y}px`)}},ee&&!c.jsx&&P!=="loading"?L.createElement("button",{"aria-label":_,"data-disabled":mi,"data-close-button":!0,onClick:mi||!V?()=>{}:()=>{An(),c.onDismiss==null||c.onDismiss.call(c,c)},className:On(J==null?void 0:J.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Tg=ne==null?void 0:ne.close)!=null?Tg:BD):null,P||c.icon||c.promise?L.createElement("div",{"data-icon":"",className:On(J==null?void 0:J.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Zk():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[P])||DD(P):null):null,L.createElement("div",{"data-content":"",className:On(J==null?void 0:J.content,c==null||(s=c.classNames)==null?void 0:s.content)},L.createElement("div",{"data-title":"",className:On(J==null?void 0:J.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?L.createElement("div",{"data-description":"",className:On(A,F,J==null?void 0:J.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),L.isValidElement(c.cancel)?c.cancel:c.cancel&&Nl(c.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||R,onClick:ie=>{Nl(c.cancel)&&V&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,ie),An())},className:On(J==null?void 0:J.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,L.isValidElement(c.action)?c.action:c.action&&Nl(c.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||M,onClick:ie=>{Nl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,ie),!ie.defaultPrevented&&An())},className:On(J==null?void 0:J.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function By(){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 rN(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?KD:YD;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=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 iN=L.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:d,theme:c="light",richColors:f,duration:p,style:m,visibleToasts:h=QD,toastOptions:w,dir:y=By(),gap:x=ZD,icons:b,containerAriaLabel:k="Notifications"}=t,[T,E]=L.useState([]),j=L.useMemo(()=>Array.from(new Set([i].concat(T.filter(z=>z.position).map(z=>z.position)))),[T,i]),[R,M]=L.useState([]),[N,A]=L.useState(!1),[W,B]=L.useState(!1),[Q,X]=L.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=L.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=L.useRef(null),O=L.useRef(!1),I=L.useCallback(z=>{E(U=>{var K;return(K=U.find(oe=>oe.id===z.id))!=null&&K.delete||Rt.dismiss(z.id),U.filter(({id:oe})=>oe!==z.id)})},[]);return L.useEffect(()=>Rt.subscribe(z=>{if(z.dismiss){const U=T.map(K=>K.id===z.id?{...K,delete:!0}:K);requestAnimationFrame(()=>{E(U)});return}setTimeout(()=>{E_.flushSync(()=>{E(U=>{const K=U.findIndex(oe=>oe.id===z.id);return K!==-1?[...U.slice(0,K),{...U[K],...z},...U.slice(K+1)]:[z,...U]})})})}),[T]),L.useEffect(()=>{if(c!=="system"){X(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:U})=>{X(U?"dark":"light")})}catch{z.addListener(({matches:K})=>{try{X(K?"dark":"light")}catch(oe){console.error(oe)}})}},[c]),L.useEffect(()=>{T.length<=1&&A(!1)},[T]),L.useEffect(()=>{const z=U=>{var K;if(s.every(re=>U[re]||U.code===re)){var xe;A(!0),(xe=J.current)==null||xe.focus()}U.code==="Escape"&&(document.activeElement===J.current||(K=J.current)!=null&&K.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),L.useEffect(()=>{if(J.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,O.current=!1)}},[J.current]),L.createElement("section",{ref:n,"aria-label":`${k} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((z,U)=>{var K;const[oe,xe]=z.split("-");return T.length?L.createElement("ol",{key:z,dir:y==="auto"?By():y,tabIndex:-1,ref:J,className:l,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":oe,"data-lifted":N&&T.length>1&&!o,"data-x-position":xe,style:{"--front-toast-height":`${((K=R[0])==null?void 0:K.height)||0}px`,"--width":`${XD}px`,"--gap":`${x}px`,...m,...rN(u,d)},onBlur:re=>{O.current&&!re.currentTarget.contains(re.relatedTarget)&&(O.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||O.current||(O.current=!0,_.current=re.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{W||A(!1)},onDragEnd:()=>A(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},T.filter(re=>!re.position&&U===0||re.position===z).map((re,Fe)=>{var et,tt;return L.createElement(nN,{key:re.id,icons:b,index:Fe,toast:re,defaultRichColors:f,duration:(et=w==null?void 0:w.duration)!=null?et:p,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:h,closeButton:(tt=w==null?void 0:w.closeButton)!=null?tt:a,interacting:W,position:z,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:I,toasts:T.filter(It=>It.position==re.position),heights:R.filter(It=>It.position==re.position),setHeights:M,expandByDefault:o,gap:x,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function Vn(e){return RS.custom(t=>g.jsx(sN,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Fd={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function sN(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return g.jsxs("div",{className:ye("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",Fd[s||"info"].bg),children:[g.jsx("div",{className:"flex flex-1 items-center",children:g.jsxs("div",{className:"w-full",children:[t&&g.jsx("p",{className:ye("text-sm font-medium",Fd[s||"info"].text),children:t}),g.jsx("p",{className:ye("text-sm",Fd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&g.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:g.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),RS.dismiss(i)},children:r.label})})]})}function oN(e){return Array.isArray(e)&&e[0].field!==void 0}const AS=(e,t)=>{var n;if(oN(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||Vn({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Vn({description:e.error,variant:"error"});return}},aN=[{code:429,text:"Çok fazla istek gönderdiniz. Lütfen biraz bekleyin"},{code:401,text:"Bu işlemi yapabilmek için giriş yapmalısınız"},{code:403,text:"Bu işlemi yapabilmek için yetkiniz yok"},{code:500,text:"Sunucu hatası oluştu"},{code:422,text:"Form doğrulaması başarısız oldu"},{code:413,text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],lN=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],uN=(e,t)=>{if(Za(t))return!1;if(e===null)return Vn({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=lN.find(s=>s.code===r);if(i)return Vn({description:i.text,variant:"error"}),!0}if(e.message)return Vn({description:e.message,variant:"error"}),!0}const n=aN.find(r=>r.code===t);return Vn({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0};function cN(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 Pm({id:e,text:t,className:n,required:r}){const i=he();return t?g.jsxs("label",{htmlFor:e,className:ye("mb-1 block text-sm font-medium",n),style:{color:i.getColor(S.InputText)},children:[t,r&&g.jsx("span",{className:"ml-1",style:{color:i.getColor(S.ErrorText)},children:"*"})]}):null}const Ld={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function dN({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:d,ariaInvalid:c,ariaLabel:f,autoFocus:p,...m}){const h=he();return g.jsxs("div",{className:ye({"mb-2":!o},d),children:[g.jsx(Pm,{id:e,text:t,required:a}),g.jsxs("div",{className:"flex items-center",children:[r&&g.jsx("span",{className:ye("inline-block border border-solid border-r-0 rounded-l-md",Ld[i]),style:{borderColor:l?h.getColor(S.ErrorBorder):h.getColor(S.InputBorder),backgroundColor:h.getColor(S.InputBackground),borderRadius:h.getRadius()},children:r}),g.jsx("input",{id:e,className:ye("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",Ld[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{fontSize:"16px",color:l?h.getColor(S.ErrorText):h.getColor(S.InputText),backgroundColor:h.getColor(S.InputBackground),borderColor:l?h.getColor(S.ErrorBorder):h.getColor(S.InputBorder),borderRadius:h.getRadius()},...m}),n&&g.jsx("span",{className:ye("inline-block border border-solid border-l-0 rounded-r-md",Ld[i]),style:{borderColor:l?h.getColor(S.ErrorBorder):h.getColor(S.InputBorder),backgroundColor:h.getColor(S.InputBackground),borderRadius:h.getRadius()},children:n})]}),!!l&&g.jsx("p",{className:"mt-1 text-xs",style:{color:h.getColor(S.ErrorText)},children:l})]})}const fN={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"}},zy={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}},Om=v.createContext({});function $c(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dm=typeof window<"u",PS=Dm?v.useLayoutEffect:v.useEffect,Bc=v.createContext(null),Nm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class pN extends v.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 hN({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(Nm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:d,right:c}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${c}`;i.current.dataset.motionPopId=r;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(`
98
- [data-motion-pop-id="${r}"] {
99
- position: absolute !important;
100
- width: ${a}px !important;
101
- height: ${l}px !important;
102
- ${f}px !important;
103
- top: ${u}px !important;
104
- }
105
- `),()=>{document.head.removeChild(p)}},[t]),g.jsx(pN,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const mN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=$c(gN),u=v.useId();let d=!0,c=v.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(c={...c}),v.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=g.jsx(hN,{isPresent:n,anchorX:a,children:e})),g.jsx(Bc.Provider,{value:c,children:e})};function gN(){return new Map}function OS(e=!0){const t=v.useContext(Bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Ml=e=>e.key||"";function Vy(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Ap=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=OS(o),d=v.useMemo(()=>Vy(e),[e]),c=o&&!l?[]:d.map(Ml),f=v.useRef(!0),p=v.useRef(d),m=$c(()=>new Map),[h,w]=v.useState(d),[y,x]=v.useState(d);PS(()=>{f.current=!1,p.current=d;for(let T=0;T<y.length;T++){const E=Ml(y[T]);c.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[y,c.length,c.join("-")]);const b=[];if(d!==h){let T=[...d];for(let E=0;E<y.length;E++){const j=y[E],R=Ml(j);c.includes(R)||(T.splice(E,0,j),b.push(j))}return s==="wait"&&b.length&&(T=b),x(Vy(T)),w(d),null}const{forceRender:k}=v.useContext(Om);return g.jsx(g.Fragment,{children:y.map(T=>{const E=Ml(T),j=o&&!l?!1:d===y||c.includes(E),R=()=>{if(m.has(E))m.set(E,!0);else return;let M=!0;m.forEach(N=>{N||(M=!1)}),M&&(k==null||k(),x(p.current),o&&(u==null||u()),r&&r())};return g.jsx(mN,{isPresent:j,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:j?void 0:R,anchorX:a,children:T},E)})})};function Mm(e,t){e.indexOf(t)===-1&&e.push(t)}function Fm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Pp=()=>{};const Op={skipAnimations:!1,useManualTiming:!1};function Lm(e){let t;return()=>(t===void 0&&(t=e()),t)}const cn=e=>e,Da=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Im{constructor(){this.subscriptions=[]}add(t){return Mm(this.subscriptions,t),()=>Fm(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 qn=e=>e*1e3,Gn=e=>e/1e3;function DS(e,t){return t?e*(1e3/t):0}const vN=Lm(()=>window.ScrollTimeline!==void 0);class yN{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(vN()&&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 xN extends yN{then(t,n){return this.finished.finally(t).then(()=>{})}}const Uy={value:null,addProjectionMetrics:null},$m=e=>Array.isArray(e)&&typeof e[0]=="number",wN={};function bN(e,t){const n=Lm(e);return()=>wN[t]??n()}const Na=bN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),NS=(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)})`},Wo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Dp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wo([0,.65,.55,1]),circOut:Wo([.55,0,1,.45]),backIn:Wo([.31,.01,.66,-.59]),backOut:Wo([.33,1.53,.69,.99])};function MS(e,t){if(e)return typeof e=="function"&&Na()?NS(e,t):$m(e)?Wo(e):Array.isArray(e)?e.map(n=>MS(n,t)||Dp.easeOut):Dp[e]}function SN(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const c=MS(a,i);return Array.isArray(c)&&(d.easing=c),e.animate(d,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Bm(e){return typeof e=="function"&&"applyToOptions"in e}function zm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const qu=2e4;function Vm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qu;)t+=n,r=e.next(t);return t>=qu?1/0:t}function CN(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vm(r),qu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Gn(i)}}function FS(e){return!!(typeof e=="function"&&Na()||!e||typeof e=="string"&&(e in Dp||Na())||$m(e)||Array.isArray(e)&&e.every(FS))}function Hy(e,t){e.timeline=t,e.onfinish=null}const Fl=["read","resolveKeyframes","update","preRender","render","postRender"];function kN(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)&&(d.schedule(c),e()),l++,c(a)}const d={schedule:(c,f=!1,p=!1)=>{const h=p&&i?n:r;return f&&o.add(c),h.has(c)||h.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&&Uy.value&&Uy.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const TN=40;function LS(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Fl.reduce((y,x)=>(y[x]=kN(s,t?x:void 0),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,p=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,TN),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),d.process(i),c.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Fl.reduce((y,x)=>{const b=o[x];return y[x]=(k,T=!1,E=!1)=>(n||m(),b.schedule(k,T,E)),y},{}),cancel:y=>{for(let x=0;x<Fl.length;x++)o[Fl[x]].cancel(y)},state:i,steps:o}}const{schedule:Um,cancel:xB}=LS(queueMicrotask,!1),{schedule:Ce,cancel:si,state:st,steps:Id}=LS(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0);let su;function EN(){su=void 0}const Qn={now:()=>(su===void 0&&Qn.set(st.isProcessing||Op.useManualTiming?st.timestamp:performance.now()),su),set:e=>{su=e,queueMicrotask(EN)}},yn={x:!1,y:!1};function IS(){return yn.x||yn.y}function _N(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}function jN(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 $S(e,t){const n=jN(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Wy(e){return!(e.pointerType==="touch"||IS())}function RN(e,t,n={}){const[r,i,s]=$S(e,n),o=a=>{if(!Wy(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{Wy(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const BS=(e,t)=>t?e===t?!0:BS(e,t.parentElement):!1,Hm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,AN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function PN(e){return AN.has(e.tagName)||e.tabIndex!==-1}const qo=new WeakSet;function qy(e){return t=>{t.key==="Enter"&&e(t)}}function $d(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ON=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=qy(()=>{if(qo.has(n))return;$d(n,"down");const i=qy(()=>{$d(n,"up")}),s=()=>$d(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 Gy(e){return Hm(e)&&!IS()}function DN(e,t,n={}){const[r,i,s]=$S(e,n),o=a=>{const l=a.currentTarget;if(!Gy(a)||qo.has(l))return;qo.add(l);const u=t(l,a),d=(p,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!Gy(p)||!qo.has(l))&&(qo.delete(l),typeof u=="function"&&u(p,{success:m}))},c=p=>{d(p,l===window||l===document||n.useGlobalTarget||BS(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>ON(u,i)),!PN(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const Qy=30,NN=e=>!isNaN(parseFloat(e));class MN{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Qn.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=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=NN(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 Im);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ce.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=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Qy);return DS(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 Ma(e,t){return new MN(e,t)}const zS=v.createContext({strict:!1}),Yy={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"]},ho={};for(const e in Yy)ho[e]={isEnabled:t=>Yy[e].some(n=>!!t[n])};function FN(e){for(const t in e)ho[t]={...ho[t],...e[t]}}const LN=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")||LN.has(e)}let VS=e=>!Gu(e);function IN(e){e&&(VS=t=>t.startsWith("on")?!Gu(t):e(t))}try{IN(require("@emotion/is-prop-valid").default)}catch{}function $N(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(VS(i)||n===!0&&Gu(i)||!t&&!Gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function BN(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 zc=v.createContext({});function Vc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fa(e){return typeof e=="string"||Array.isArray(e)}const Wm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qm=["initial",...Wm];function Uc(e){return Vc(e.animate)||qm.some(t=>Fa(e[t]))}function US(e){return!!(Uc(e)||e.variants)}function zN(e,t){if(Uc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fa(n)?n:void 0,animate:Fa(r)?r:void 0}}return e.inherit!==!1?t:{}}function VN(e){const{initial:t,animate:n}=zN(e,v.useContext(zc));return v.useMemo(()=>({initial:t,animate:n}),[Ky(t),Ky(n)])}function Ky(e){return Array.isArray(e)?e.join(" "):e}const UN=Symbol.for("motionComponentSymbol");function Os(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function HN(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Os(n)&&(n.current=r))},[t])}const Gm=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),WN="framerAppearId",HS="data-"+Gm(WN),WS=v.createContext({});function qN(e,t,n,r,i){var h,w;const{visualElement:s}=v.useContext(zc),o=v.useContext(zS),a=v.useContext(Bc),l=v.useContext(Nm).reducedMotion,u=v.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 d=u.current,c=v.useContext(WS);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&GN(u.current,n,i,c);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[HS],m=v.useRef(!!p&&!((h=window.MotionHandoffIsComplete)!=null&&h.call(window,p))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,p)));return PS(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Um.render(d.render),m.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,p)}),m.current=!1))}),d}function GN(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:qS(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Os(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function qS(e){if(e)return e.options.allowProjection!==!1?e.projection:qS(e.parent)}function QN({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&FN(e);function s(a,l){let u;const d={...v.useContext(Nm),...a,layoutId:YN(a)},{isStatic:c}=d,f=VN(a),p=r(a,c);if(!c&&Dm){KN();const m=XN(d);u=m.MeasureLayout,f.visualElement=qN(i,p,d,t,m.ProjectionNode)}return g.jsxs(zc.Provider,{value:f,children:[u&&f.visualElement?g.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,HN(p,f.visualElement,l),p,c,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[UN]=i,o}function YN({layoutId:e}){const t=v.useContext(Om).id;return t&&e!==void 0?t+"-"+e:e}function KN(e,t){v.useContext(zS).strict}function XN(e){const{drag:t,layout:n}=ho;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 GS=e=>t=>typeof t=="string"&&t.startsWith(e),Qm=GS("--"),ZN=GS("var(--"),Ym=e=>ZN(e)?JN.test(e.split("/*")[0].trim()):!1,JN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,La={};function eM(e){for(const t in e)La[t]=e[t],Qm(t)&&(La[t].isCSSVariable=!0)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cs=new Set(ko);function QS(e,{layout:t,layoutId:n}){return cs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!La[e]||e==="opacity")}const mt=e=>!!(e&&e.getVelocity),YS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,gr=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ia={...To,transform:e=>gr(0,1,e)},Ll={...To,default:1},sl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Tr=sl("deg"),Yn=sl("%"),te=sl("px"),tM=sl("vh"),nM=sl("vw"),Xy={...Yn,parse:e=>Yn.parse(e)/100,transform:e=>Yn.transform(e*100)},rM={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,radius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,backgroundPositionX:te,backgroundPositionY:te},iM={rotate:Tr,rotateX:Tr,rotateY:Tr,rotateZ:Tr,scale:Ll,scaleX:Ll,scaleY:Ll,scaleZ:Ll,skew:Tr,skewX:Tr,skewY:Tr,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:Ia,originX:Xy,originY:Xy,originZ:te},Zy={...To,transform:Math.round},Km={...rM,...iM,zIndex:Zy,size:te,fillOpacity:Ia,strokeOpacity:Ia,numOctaves:Zy},sM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},oM=ko.length;function aM(e,t,n){let r="",i=!0;for(let s=0;s<oM;s++){const o=ko[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=YS(a,Km[o]);if(!l){i=!1;const d=sM[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Xm(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(cs.has(l)){o=!0;continue}else if(Qm(l)){i[l]=u;continue}else{const d=YS(u,Km[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=aM(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${u} ${d}`}}const Zm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function KS(e,t,n){for(const r in t)!mt(t[r])&&!QS(r,n)&&(e[r]=t[r])}function lM({transformTemplate:e},t){return v.useMemo(()=>{const n=Zm();return Xm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function uM(e,t){const n=e.style||{},r={};return KS(r,n,e),Object.assign(r,lM(e,t)),r}function cM(e,t){const n={},r=uM(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 dM=["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 Jm(e){return typeof e!="string"||e.includes("-")?!1:!!(dM.indexOf(e)>-1||/[A-Z]/u.test(e))}const fM={offset:"stroke-dashoffset",array:"stroke-dasharray"},pM={offset:"strokeDashoffset",array:"strokeDasharray"};function hM(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?fM:pM;e[s.offset]=te.transform(-r);const o=te.transform(t),a=te.transform(n);e[s.array]=`${o} ${a}`}function Jy(e,t,n){return typeof e=="string"?e:te.transform(t+n*e)}function mM(e,t,n){const r=Jy(t,e.x,e.width),i=Jy(n,e.y,e.height);return`${r} ${i}`}function eg(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Xm(e,u,c),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=mM(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&hM(f,o,a,l,!1)}const XS=()=>({...Zm(),attrs:{}}),tg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gM(e,t,n,r){const i=v.useMemo(()=>{const s=XS();return eg(s,t,tg(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};KS(s,e.style,e),i.style={...s,...i.style}}return i}function vM(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Jm(n)?gM:cM)(r,s,o,n),u=$N(r,typeof n=="string",e),d=n!==v.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=v.useMemo(()=>mt(c)?c.get():c,[c]);return v.createElement(n,{...d,children:f})}}function e0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ng(e,t,n,r){if(typeof t=="function"){const[i,s]=e0(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]=e0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Np=e=>Array.isArray(e),yM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),xM=e=>Np(e)?e[e.length-1]||0:e;function ou(e){const t=mt(e)?e.get():e;return yM(t)?t.toValue():t}function wM({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:bM(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ZS=e=>(t,n)=>{const r=v.useContext(zc),i=v.useContext(Bc),s=()=>wM(e,t,r,i);return n?s():$c(s)};function bM(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=ou(s[f]);let{initial:o,animate:a}=e;const l=Uc(e),u=US(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const c=d?a:o;if(c&&typeof c!="boolean"&&!Vc(c)){const f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){const m=ng(e,f[p]);if(m){const{transitionEnd:h,transition:w,...y}=m;for(const x in y){let b=y[x];if(Array.isArray(b)){const k=d?b.length-1:0;b=b[k]}b!==null&&(i[x]=b)}for(const x in h)i[x]=h[x]}}}return i}function rg(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(mt(r[o])||t.style&&mt(t.style[o])||QS(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const SM={useVisualState:ZS({scrapeMotionValuesFromProps:rg,createRenderState:Zm})};function JS(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 eC(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 tC=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 nC(e,t,n,r){eC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(tC.has(i)?i:Gm(i),t.attrs[i])}function rC(e,t,n){const r=rg(e,t,n);for(const i in e)if(mt(e[i])||mt(t[i])){const s=ko.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const t0=["x","y","width","height","cx","cy","r"],CM={useVisualState:ZS({scrapeMotionValuesFromProps:rC,createRenderState:XS,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(cs.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<t0.length;a++){const l=t0[a];e[l]!==t[l]&&(o=!0)}o&&Ce.read(()=>{JS(n,r),Ce.render(()=>{eg(r,i,tg(n.tagName),e.transformTemplate),nC(n,r)})})}})};function kM(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Jm(r)?CM:SM,preloadedFeatures:e,useRender:vM(i),createVisualElement:t,Component:r};return QN(o)}}function $a(e,t,n){const r=e.getProps();return ng(r,t,n!==void 0?n:r.custom,e)}const iC=new Set(["width","height","top","left","right","bottom",...ko]);function TM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ma(n))}function EM(e,t){const n=$a(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=xM(s[o]);TM(e,o,a)}}function _M(e){return!!(mt(e)&&e.add)}function Mp(e,t){const n=e.getValue("willChange");if(_M(n))return n.add(t);if(!n&&Op.WillChange){const r=new Op.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function sC(e){return e.props[HS]}const oC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jM=1e-7,RM=12;function AM(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=oC(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>jM&&++a<RM);return o}function ol(e,t,n,r){if(e===t&&n===r)return cn;const i=s=>AM(s,0,1,e,n);return s=>s===0||s===1?s:oC(i(s),t,r)}const aC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lC=e=>t=>1-e(1-t),uC=ol(.33,1.53,.69,.99),ig=lC(uC),cC=aC(ig),dC=e=>(e*=2)<1?.5*ig(e):.5*(2-Math.pow(2,-10*(e-1))),sg=e=>1-Math.sin(Math.acos(e)),fC=lC(sg),pC=aC(sg),hC=e=>/^0[^.\s]+$/u.test(e);function PM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hC(e):!0}const oa=e=>Math.round(e*1e5)/1e5,og=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function OM(e){return e==null}const DM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ag=(e,t)=>n=>!!(typeof n=="string"&&DM.test(n)&&n.startsWith(e)||t&&!OM(n)&&Object.prototype.hasOwnProperty.call(n,t)),mC=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(og);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},NM=e=>gr(0,255,e),Bd={...To,transform:e=>Math.round(NM(e))},Ri={test:ag("rgb","red"),parse:mC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bd.transform(e)+", "+Bd.transform(t)+", "+Bd.transform(n)+", "+oa(Ia.transform(r))+")"};function MM(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 Fp={test:ag("#"),parse:MM,transform:Ri.transform},Ds={test:ag("hsl","hue"),parse:mC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yn.transform(oa(t))+", "+Yn.transform(oa(n))+", "+oa(Ia.transform(r))+")"},pt={test:e=>Ri.test(e)||Fp.test(e)||Ds.test(e),parse:e=>Ri.test(e)?Ri.parse(e):Ds.test(e)?Ds.parse(e):Fp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ri.transform(e):Ds.transform(e)},FM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function LM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(og))==null?void 0:t.length)||0)+(((n=e.match(FM))==null?void 0:n.length)||0)>0}const gC="number",vC="color",IM="var",$M="var(",n0="${}",BM=/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 Ba(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(BM,l=>(pt.test(l)?(r.color.push(s),i.push(vC),n.push(pt.parse(l))):l.startsWith($M)?(r.var.push(s),i.push(IM),n.push(l)):(r.number.push(s),i.push(gC),n.push(parseFloat(l))),++s,n0)).split(n0);return{values:n,split:a,indexes:r,types:i}}function yC(e){return Ba(e).values}function xC(e){const{split:t,types:n}=Ba(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===gC?s+=oa(i[o]):a===vC?s+=pt.transform(i[o]):s+=i[o]}return s}}const zM=e=>typeof e=="number"?0:e;function VM(e){const t=yC(e);return xC(e)(t.map(zM))}const oi={test:LM,parse:yC,createTransformer:xC,getAnimatableNone:VM},UM=new Set(["brightness","contrast","saturate","opacity"]);function HM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(og)||[];if(!r)return e;const i=n.replace(r,"");let s=UM.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const WM=/\b([a-z-]*)\(.*?\)/gu,Lp={...oi,getAnimatableNone:e=>{const t=e.match(WM);return t?t.map(HM).join(" "):e}},qM={...Km,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Lp,WebkitFilter:Lp},wC=e=>qM[e];function bC(e,t){let n=wC(e);return n!==Lp&&(n=oi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const GM=new Set(["auto","none","0"]);function QM(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!GM.has(s)&&Ba(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=bC(n,i)}const Ai=e=>e*180/Math.PI,Ip=e=>{const t=Ai(Math.atan2(e[1],e[0]));return $p(t)},YM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ip,rotateZ:Ip,skewX:e=>Ai(Math.atan(e[1])),skewY:e=>Ai(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$p=e=>(e=e%360,e<0&&(e+=360),e),r0=Ip,i0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),s0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),KM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:i0,scaleY:s0,scale:e=>(i0(e)+s0(e))/2,rotateX:e=>$p(Ai(Math.atan2(e[6],e[5]))),rotateY:e=>$p(Ai(Math.atan2(-e[2],e[0]))),rotateZ:r0,rotate:r0,skewX:e=>Ai(Math.atan(e[4])),skewY:e=>Ai(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function o0(e){return e.includes("scale")?1:0}function Bp(e,t){if(!e||e==="none")return o0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=KM,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=YM,i=a}if(!i)return o0(t);const s=r[t],o=i[1].split(",").map(ZM);return typeof s=="function"?s(o):o[s]}const XM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bp(n,t)};function ZM(e){return parseFloat(e.trim())}const a0=e=>e===To||e===te,JM=new Set(["x","y","z"]),eF=ko.filter(e=>!JM.has(e));function tF(e){const t=[];return eF.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mo={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})=>Bp(t,"x"),y:(e,{transform:t})=>Bp(t,"y")};mo.translateX=mo.x;mo.translateY=mo.y;const Ui=new Set;let zp=!1,Vp=!1;function SC(){if(Vp){const e=Array.from(Ui).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=tF(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)})}Vp=!1,zp=!1,Ui.forEach(e=>e.complete()),Ui.clear()}function CC(){Ui.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vp=!0)})}function nF(){CC(),SC()}class lg{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?(Ui.add(this),zp||(zp=!0,Ce.read(CC),Ce.resolveKeyframes(SC))):(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),Ui.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ui.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const kC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),rF=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iF(e){const t=rF.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function TC(e,t,n=1){const[r,i]=iF(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return kC(o)?parseFloat(o):o}return Ym(i)?TC(i,t,n+1):i}const EC=e=>t=>t.test(e),sF={test:e=>e==="auto",parse:e=>e},_C=[To,te,Yn,Tr,nM,tM,sF],l0=e=>_C.find(EC(e));class jC extends lg{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(),Ym(u))){const d=TC(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!iC.has(r)||t.length!==2)return;const[i,s]=t,o=l0(i),a=l0(s);if(o!==a)if(a0(o)&&a0(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++)PM(t[i])&&r.push(i);r.length&&QM(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=mo[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]=mo[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 u0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(oi.test(e)||e==="0")&&!e.startsWith("url("));function oF(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 aF(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=u0(i,t),a=u0(s,t);return!o||!a?!1:oF(e)||(n==="spring"||Bm(n))&&r}const lF=e=>e!==null;function Hc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(lF),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const uF=40;class RC{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=Qn.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>uF?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nF(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Qn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!aF(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Hc(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},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 Ae=(e,t,n)=>e+(t-e)*n;function zd(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 cF({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=zd(l,a,e+1/3),s=zd(l,a,e),o=zd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Qu(e,t){return n=>n>0?t:e}const Vd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},dF=[Fp,Ri,Ds],fF=e=>dF.find(t=>t.test(e));function c0(e){const t=fF(e);if(!t)return!1;let n=t.parse(e);return t===Ds&&(n=cF(n)),n}const d0=(e,t)=>{const n=c0(e),r=c0(t);if(!n||!r)return Qu(e,t);const i={...n};return s=>(i.red=Vd(n.red,r.red,s),i.green=Vd(n.green,r.green,s),i.blue=Vd(n.blue,r.blue,s),i.alpha=Ae(n.alpha,r.alpha,s),Ri.transform(i))},pF=(e,t)=>n=>t(e(n)),al=(...e)=>e.reduce(pF),Up=new Set(["none","hidden"]);function hF(e,t){return Up.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mF(e,t){return n=>Ae(e,t,n)}function ug(e){return typeof e=="number"?mF:typeof e=="string"?Ym(e)?Qu:pt.test(e)?d0:yF:Array.isArray(e)?AC:typeof e=="object"?pt.test(e)?d0:gF:Qu}function AC(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>ug(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function gF(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ug(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function vF(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 yF=(e,t)=>{const n=oi.createTransformer(t),r=Ba(e),i=Ba(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?Up.has(e)&&!i.values.length||Up.has(t)&&!r.values.length?hF(e,t):al(AC(vF(r,i),i.values),n):Qu(e,t)};function PC(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ae(e,t,n):ug(e)(e,t)}const xF=5;function OC(e,t,n){const r=Math.max(t-xF,0);return DS(n-e(r),t-r)}const Ne={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},Ud=.001;function wF({duration:e=Ne.duration,bounce:t=Ne.bounce,velocity:n=Ne.velocity,mass:r=Ne.mass}){let i,s,o=1-t;o=gr(Ne.minDamping,Ne.maxDamping,o),e=gr(Ne.minDuration,Ne.maxDuration,Gn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,p=Hp(u,o),m=Math.exp(-c);return Ud-f/p*m},s=u=>{const c=u*o*e,f=c*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),h=Hp(Math.pow(u,2),o);return(-i(u)+Ud>0?-1:1)*((f-p)*m)/h}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Ud+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=SF(i,s,a);if(e=qn(e),isNaN(l))return{stiffness:Ne.stiffness,damping:Ne.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const bF=12;function SF(e,t,n){let r=n;for(let i=1;i<bF;i++)r=r-e(r)/t(r);return r}function Hp(e,t){return e*Math.sqrt(1-t*t)}const CF=["duration","bounce"],kF=["stiffness","damping","mass"];function f0(e,t){return t.some(n=>e[n]!==void 0)}function TF(e){let t={velocity:Ne.velocity,stiffness:Ne.stiffness,damping:Ne.damping,mass:Ne.mass,isResolvedFromDuration:!1,...e};if(!f0(e,kF)&&f0(e,CF))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*gr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ne.mass,stiffness:i,damping:s}}else{const n=wF(e);t={...t,...n,mass:Ne.mass},t.isResolvedFromDuration=!0}return t}function Yu(e=Ne.visualDuration,t=Ne.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:d,duration:c,velocity:f,isResolvedFromDuration:p}=TF({...n,velocity:-Gn(n.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(l*d)),w=o-s,y=Gn(Math.sqrt(l/d)),x=Math.abs(w)<5;r||(r=x?Ne.restSpeed.granular:Ne.restSpeed.default),i||(i=x?Ne.restDelta.granular:Ne.restDelta.default);let b;if(h<1){const T=Hp(y,h);b=E=>{const j=Math.exp(-h*y*E);return o-j*((m+h*y*w)/T*Math.sin(T*E)+w*Math.cos(T*E))}}else if(h===1)b=T=>o-Math.exp(-y*T)*(w+(m+y*w)*T);else{const T=y*Math.sqrt(h*h-1);b=E=>{const j=Math.exp(-h*y*E),R=Math.min(T*E,300);return o-j*((m+h*y*w)*Math.sinh(R)+T*w*Math.cosh(R))/T}}const k={calculatedDuration:p&&c||null,next:T=>{const E=b(T);if(p)a.done=T>=c;else{let j=0;h<1&&(j=T===0?qn(m):OC(b,T,E));const R=Math.abs(j)<=r,M=Math.abs(o-E)<=i;a.done=R&&M}return a.value=a.done?o:E,a},toString:()=>{const T=Math.min(Vm(k),qu),E=NS(j=>k.next(T*j).value,T,30);return T+"ms "+E},toTransition:()=>{}};return k}Yu.applyToOptions=e=>{const t=CN(e,100,Yu);return e.ease=Na()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function p0({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:d}){const c=e[0],f={done:!1,value:c},p=R=>a!==void 0&&R<a||l!==void 0&&R>l,m=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let h=n*t;const w=c+h,y=o===void 0?w:o(w);y!==w&&(h=y-c);const x=R=>-h*Math.exp(-R/r),b=R=>y+x(R),k=R=>{const M=x(R),N=b(R);f.done=Math.abs(M)<=u,f.value=f.done?y:N};let T,E;const j=R=>{p(f.value)&&(T=R,E=Yu({keyframes:[f.value,m(f.value)],velocity:OC(b,R,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return j(0),{calculatedDuration:null,next:R=>{let M=!1;return!E&&T===void 0&&(M=!0,k(R),j(R)),T!==void 0&&R>=T?E.next(R-T):(!M&&k(R),f)}}}const EF=ol(.42,0,1,1),_F=ol(0,0,.58,1),DC=ol(.42,0,.58,1),jF=e=>Array.isArray(e)&&typeof e[0]!="number",h0={linear:cn,easeIn:EF,easeInOut:DC,easeOut:_F,circIn:sg,circInOut:pC,circOut:fC,backIn:ig,backInOut:cC,backOut:uC,anticipate:dC},m0=e=>{if($m(e)){Pp(e.length===4);const[t,n,r,i]=e;return ol(t,n,r,i)}else if(typeof e=="string")return Pp(h0[e]!==void 0),h0[e];return e};function RF(e,t,n){const r=[],i=n||PC,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]||cn:t;a=al(l,a)}r.push(a)}return r}function AF(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Pp(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=RF(t,r,i),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(d<e[c+1]);c++);const f=Da(e[c],e[c+1],d);return a[c](f)};return n?d=>u(gr(e[0],e[s-1],d)):u}function PF(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Da(0,t,r);e.push(Ae(n,1,i))}}function OF(e){const t=[0];return PF(t,e.length-1),t}function DF(e,t){return e.map(n=>n*t)}function NF(e,t){return e.map(()=>t||DC).splice(0,e.length-1)}function Ku({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=jF(r)?r.map(m0):m0(r),s={done:!1,value:t[0]},o=DF(n&&n.length===t.length?n:OF(t),e),a=AF(o,t,{ease:Array.isArray(i)?i:NF(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const MF=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ce.update(t,!0),stop:()=>si(t),now:()=>st.isProcessing?st.timestamp:Qn.now()}},FF={decay:p0,inertia:p0,tween:Ku,keyframes:Ku,spring:Yu},LF=e=>e/100;class cg extends RC{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)||lg,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=Bm(n)?n:FF[n]||Ku;let l,u;a!==Ku&&typeof t[0]!="number"&&(l=al(LF,PC(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Vm(d));const{calculatedDuration:c}=d,f=c+i,p=f*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:f,totalDuration:p}}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:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:h,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 y=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,k=s;if(p){const R=Math.min(this.currentTime,d)/c;let M=Math.floor(R),N=R%1;!N&&R>=1&&(N=1),N===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(m==="reverse"?(N=1-N,h&&(N-=h/c)):m==="mirror"&&(k=o)),b=gr(0,1,N)*c}const T=x?{done:!1,value:l[0]}:k.next(b);a&&(T.value=a(T.value));let{done:E}=T;!x&&u!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return j&&i!==void 0&&(T.value=Hc(l,this.options,i)),w&&w(T.value),j&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Gn(t.calculatedDuration):0}get time(){return Gn(this.currentTime)}set time(t){t=qn(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=Gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MF,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 IF=new Set(["opacity","clipPath","filter","transform"]),$F=Lm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Xu=10,BF=2e4;function zF(e){return Bm(e.type)||e.type==="spring"||!FS(e.ease)}function VF(e,t){const n=new cg({...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<BF;)r=n.sample(s),i.push(r.value),s+=Xu;return{times:void 0,keyframes:i,duration:s-Xu,ease:"linear"}}const NC={anticipate:dC,backInOut:cC,circInOut:pC};function UF(e){return e in NC}class g0 extends RC{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new jC(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"&&Na()&&UF(s)&&(s=NC[s]),zF(this.options)){const{onComplete:c,onUpdate:f,motionValue:p,element:m,...h}=this.options,w=VF(t,h);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const d=SN(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Hy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(Hc(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:d,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 Gn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Gn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(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 cn;const{animation:r}=n;Hy(r,t)}return cn}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:d,onComplete:c,element:f,...p}=this.options,m=new cg({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),h=qn(this.time);u.setWithVelocity(m.sample(h-Xu).value,m.sample(h).value,Xu)}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 $F()&&r&&IF.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const HF={type:"spring",stiffness:500,damping:25,restSpeed:10},WF=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qF={type:"keyframes",duration:.8},GF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},QF=(e,{keyframes:t})=>t.length>2?qF:cs.has(e)?e.startsWith("scale")?WF(t[1]):HF:GF;function YF({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const dg=(e,t,n,r={},i,s)=>o=>{const a=zm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};YF(a)||(d={...d,...QF(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let c=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(c=!0)),d.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const f=Hc(d.keyframes,a);if(f!==void 0)return Ce.update(()=>{d.onUpdate(f),d.onComplete()}),new xN([])}return!s&&g0.supports(d)?new g0(d):new cg(d)};function KF({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function MC(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 d in a){const c=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||u&&KF(u,d))continue;const p={delay:n,...zm(s||{},d)};let m=!1;if(window.MotionHandoffAnimation){const w=sC(e);if(w){const y=window.MotionHandoffAnimation(w,d,Ce);y!==null&&(p.startTime=y,m=!0)}}Mp(e,d),c.start(dg(d,c,f,e.shouldReduceMotion&&iC.has(d)?{type:!1}:p,e,m));const h=c.animation;h&&l.push(h)}return o&&Promise.all(l).then(()=>{Ce.update(()=>{o&&EM(e,o)})}),l}function Wp(e,t,n={}){var l;const r=$a(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(MC(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return XF(e,t,d+u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,d]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function XF(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(ZF).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Wp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function ZF(e,t){return e.sortNodePosition(t)}function JF(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Wp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Wp(e,t,n);else{const i=typeof t=="function"?$a(e,t,n.custom):t;r=Promise.all(MC(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function FC(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 e5=qm.length;function LC(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?LC(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<e5;n++){const r=qm[n],i=e.props[r];(Fa(i)||i===!1)&&(t[r]=i)}return t}const t5=[...Wm].reverse(),n5=Wm.length;function r5(e){return t=>Promise.all(t.map(({animation:n,options:r})=>JF(e,n,r)))}function i5(e){let t=r5(e),n=v0(),r=!0;const i=l=>(u,d)=>{var f;const c=$a(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:p,transitionEnd:m,...h}=c;u={...u,...h,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=LC(e.parent)||{},c=[],f=new Set;let p={},m=1/0;for(let w=0;w<n5;w++){const y=t5[w],x=n[y],b=u[y]!==void 0?u[y]:d[y],k=Fa(b),T=y===l?x.isActive:null;T===!1&&(m=w);let E=b===d[y]&&b!==u[y]&&k;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...p},!x.isActive&&T===null||!b&&!x.prevProp||Vc(b)||typeof b=="boolean")continue;const j=s5(x.prevProp,b);let R=j||y===l&&x.isActive&&!E&&k||w>m&&k,M=!1;const N=Array.isArray(b)?b:[b];let A=N.reduce(i(y),{});T===!1&&(A={});const{prevResolvedValues:W={}}=x,B={...W,...A},Q=ne=>{R=!0,f.has(ne)&&(M=!0,f.delete(ne)),x.needsAnimating[ne]=!0;const _=e.getValue(ne);_&&(_.liveStyle=!1)};for(const ne in B){const _=A[ne],O=W[ne];if(p.hasOwnProperty(ne))continue;let I=!1;Np(_)&&Np(O)?I=!FC(_,O):I=_!==O,I?_!=null?Q(ne):f.add(ne):_!==void 0&&f.has(ne)?Q(ne):x.protectedKeys[ne]=!0}x.prevProp=b,x.prevResolvedValues=A,x.isActive&&(p={...p,...A}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(E&&j)||M)&&c.push(...N.map(ne=>({animation:ne,options:{type:y}})))}if(f.size){const w={};if(typeof u.initial!="boolean"){const y=$a(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(w.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),w[y]=x??null}),c.push({animation:w})}let h=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=v0(),r=!0}}}function s5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FC(t,e):!1}function yi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function v0(){return{animate:yi(!0),whileInView:yi(),whileHover:yi(),whileTap:yi(),whileDrag:yi(),whileFocus:yi(),exit:yi()}}class di{constructor(t){this.isMounted=!1,this.node=t}update(){}}class o5 extends di{constructor(t){super(t),t.animationState||(t.animationState=i5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vc(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 a5=0;class l5 extends di{constructor(){super(...arguments),this.id=a5++}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 u5={animation:{Feature:o5},exit:{Feature:l5}};function za(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ll(e){return{point:{x:e.pageX,y:e.pageY}}}const c5=e=>t=>Hm(t)&&e(t,ll(t));function aa(e,t,n,r){return za(e,t,c5(n),r)}function IC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function d5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function f5(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 $C=1e-4,p5=1-$C,h5=1+$C,BC=.01,m5=0-BC,g5=0+BC;function wt(e){return e.max-e.min}function v5(e,t,n){return Math.abs(e-t)<=n}function y0(e,t,n,r=.5){e.origin=r,e.originPoint=Ae(t.min,t.max,e.origin),e.scale=wt(n)/wt(t),e.translate=Ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=p5&&e.scale<=h5||isNaN(e.scale))&&(e.scale=1),(e.translate>=m5&&e.translate<=g5||isNaN(e.translate))&&(e.translate=0)}function la(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+wt(t)}function y5(e,t,n){x0(e.x,t.x,n.x),x0(e.y,t.y,n.y)}function w0(e,t,n){e.min=t.min-n.min,e.max=e.min+wt(t)}function ua(e,t,n){w0(e.x,t.x,n.x),w0(e.y,t.y,n.y)}const b0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ns=()=>({x:b0(),y:b0()}),S0=()=>({min:0,max:0}),Ie=()=>({x:S0(),y:S0()});function tn(e){return[e("x"),e("y")]}function Hd(e){return e===void 0||e===1}function qp({scale:e,scaleX:t,scaleY:n}){return!Hd(e)||!Hd(t)||!Hd(n)}function Si(e){return qp(e)||zC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zC(e){return C0(e.x)||C0(e.y)}function C0(e){return e&&e!=="0%"}function Zu(e,t,n){const r=e-n,i=t*r;return n+i}function k0(e,t,n,r,i){return i!==void 0&&(e=Zu(e,i,r)),Zu(e,n,r)+t}function Gp(e,t=0,n=1,r,i){e.min=k0(e.min,t,n,r,i),e.max=k0(e.max,t,n,r,i)}function VC(e,{x:t,y:n}){Gp(e.x,t.translate,t.scale,t.originPoint),Gp(e.y,n.translate,n.scale,n.originPoint)}const T0=.999999999999,E0=1.0000000000001;function x5(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&&Fs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,VC(e,o)),r&&Si(s.latestValues)&&Fs(e,s.latestValues))}t.x<E0&&t.x>T0&&(t.x=1),t.y<E0&&t.y>T0&&(t.y=1)}function Ms(e,t){e.min=e.min+t,e.max=e.max+t}function _0(e,t,n,r,i=.5){const s=Ae(e.min,e.max,i);Gp(e,t,n,s,r)}function Fs(e,t){_0(e.x,t.x,t.scaleX,t.scale,t.originX),_0(e.y,t.y,t.scaleY,t.scale,t.originY)}function UC(e,t){return IC(f5(e.getBoundingClientRect(),t))}function w5(e,t,n){const r=UC(e,n),{scroll:i}=t;return i&&(Ms(r.x,i.offset.x),Ms(r.y,i.offset.y)),r}const HC=({current:e})=>e?e.ownerDocument.defaultView:null,j0=(e,t)=>Math.abs(e-t);function b5(e,t){const n=j0(e.x,t.x),r=j0(e.y,t.y);return Math.sqrt(n**2+r**2)}class WC{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=qd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=b5(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=c,{timestamp:h}=st;this.history.push({...m,timestamp:h});const{onStart:w,onMove:y}=this.handlers;f||(w&&w(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Wd(f,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=qd(c.type==="pointercancel"?this.lastMoveEventInfo:Wd(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,w),m&&m(c,w)},!Hm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=ll(t),a=Wd(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=st;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,qd(a,this.history)),this.removeListeners=al(aa(this.contextWindow,"pointermove",this.handlePointerMove),aa(this.contextWindow,"pointerup",this.handlePointerUp),aa(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),si(this.updatePoint)}}function Wd(e,t){return t?{point:t(e.point)}:e}function R0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qd({point:e},t){return{point:e,delta:R0(e,qC(t)),offset:R0(e,S5(t)),velocity:C5(t,.1)}}function S5(e){return e[0]}function qC(e){return e[e.length-1]}function C5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const s=Gn(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 k5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ae(n,e,r.max):Math.min(e,n)),e}function A0(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 T5(e,{top:t,left:n,bottom:r,right:i}){return{x:A0(e.x,n,i),y:A0(e.y,t,r)}}function P0(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 E5(e,t){return{x:P0(e.x,t.x),y:P0(e.y,t.y)}}function _5(e,t){let n=.5;const r=wt(e),i=wt(t);return i>r?n=Da(t.min,t.max-r,e.min):r>i&&(n=Da(e.min,e.max-i,t.min)),gr(0,1,n)}function j5(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 Qp=.35;function R5(e=Qp){return e===!1?e=0:e===!0&&(e=Qp),{x:O0(e,"left","right"),y:O0(e,"top","bottom")}}function O0(e,t,n){return{min:D0(e,t),max:D0(e,n)}}function D0(e,t){return typeof e=="number"?e:e[t]||0}const A5=new WeakMap;class P5{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=Ie(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ll(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_N(f),!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),tn(w=>{let y=this.getAxisMotionValue(w).get()||0;if(Yn.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[w];b&&(y=wt(b)*(parseFloat(y)/100))}}this.originPoint[w]=y}),m&&Ce.postRender(()=>m(d,c)),Mp(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=c;if(p&&this.currentDirection===null){this.currentDirection=O5(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,w),this.updateAxis("y",c.point,w),this.visualElement.render(),h&&h(d,c)},a=(d,c)=>this.stop(d,c),l=()=>tn(d=>{var c;return this.getAnimationState(d)==="paused"&&((c=this.getAxisMotionValue(d).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new WC(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:HC(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&&Ce.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||!Il(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=k5(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&&Os(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=T5(r.layoutBox,t):this.constraints=!1,this.elastic=R5(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&tn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=j5(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Os(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=w5(r,i.root,this.visualElement.getTransformPagePoint());let o=E5(i.layout.layoutBox,s);if(n){const a=n(d5(o));this.hasMutatedConstraints=!!a,a&&(o=IC(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=tn(d=>{if(!Il(d,n,this.currentDirection))return;let c=l&&l[d]||{};o&&(c={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Mp(this.visualElement,t),r.start(dg(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(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){tn(n=>{const{drag:r}=this.getProps();if(!Il(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]-Ae(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Os(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=_5({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(),tn(o=>{if(!Il(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ae(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;A5.set(this.visualElement,this);const t=this.visualElement.current,n=aa(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Os(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()),Ce.read(r);const o=za(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(tn(d=>{const c=this.getAxisMotionValue(d);c&&(this.originPoint[d]+=l[d].translate,c.set(c.get()+l[d].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=Qp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Il(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function O5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class D5 extends di{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new P5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const N0=e=>(t,n)=>{e&&Ce.postRender(()=>e(t,n))};class N5 extends di{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new WC(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HC(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:N0(t),onStart:N0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Ce.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=aa(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 au={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function M0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Io={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(te.test(e))e=parseFloat(e);else return e;const n=M0(e,t.target.x),r=M0(e,t.target.y);return`${n}% ${r}%`}},M5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=oi.parse(e);if(i.length>5)return r;const s=oi.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=Ae(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 F5 extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;eM(L5),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()})),au.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()||Ce.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Um.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 GC(e){const[t,n]=OS(),r=v.useContext(Om);return g.jsx(F5,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(WS),isPresent:t,safeToRemove:n})}const L5={borderRadius:{...Io,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Io,borderTopRightRadius:Io,borderBottomLeftRadius:Io,borderBottomRightRadius:Io,boxShadow:M5};function I5(e,t,n){const r=mt(e)?e:Ma(e);return r.start(dg("",r,t,n)),r.animation}function $5(e){return e instanceof SVGElement&&e.tagName!=="svg"}const B5=(e,t)=>e.depth-t.depth;class z5{constructor(){this.children=[],this.isDirty=!1}add(t){Mm(this.children,t),this.isDirty=!0}remove(t){Fm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(B5),this.isDirty=!1,this.children.forEach(t)}}function V5(e,t){const n=Qn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(si(r),e(s-t))};return Ce.read(r,!0),()=>si(r)}const QC=["TopLeft","TopRight","BottomLeft","BottomRight"],U5=QC.length,F0=e=>typeof e=="string"?parseFloat(e):e,L0=e=>typeof e=="number"||te.test(e);function H5(e,t,n,r,i,s){i?(e.opacity=Ae(0,n.opacity??1,W5(r)),e.opacityExit=Ae(t.opacity??1,0,q5(r))):s&&(e.opacity=Ae(t.opacity??1,n.opacity??1,r));for(let o=0;o<U5;o++){const a=`border${QC[o]}Radius`;let l=I0(t,a),u=I0(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||L0(l)===L0(u)?(e[a]=Math.max(Ae(F0(l),F0(u),r),0),(Yn.test(u)||Yn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Ae(t.rotate||0,n.rotate||0,r))}function I0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const W5=YC(0,.5,fC),q5=YC(.5,.95,cn);function YC(e,t,n){return r=>r<e?0:r>t?1:n(Da(e,t,r))}function $0(e,t){e.min=t.min,e.max=t.max}function en(e,t){$0(e.x,t.x),$0(e.y,t.y)}function B0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function z0(e,t,n,r,i){return e-=t,e=Zu(e,1/n,r),i!==void 0&&(e=Zu(e,1/i,r)),e}function G5(e,t=0,n=1,r=.5,i,s=e,o=e){if(Yn.test(t)&&(t=parseFloat(t),t=Ae(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ae(s.min,s.max,r);e===s&&(a-=t),e.min=z0(e.min,t,n,a,i),e.max=z0(e.max,t,n,a,i)}function V0(e,t,[n,r,i],s,o){G5(e,t[n],t[r],t[i],t.scale,s,o)}const Q5=["x","scaleX","originX"],Y5=["y","scaleY","originY"];function U0(e,t,n,r){V0(e.x,t,Q5,n?n.x:void 0,r?r.x:void 0),V0(e.y,t,Y5,n?n.y:void 0,r?r.y:void 0)}function H0(e){return e.translate===0&&e.scale===1}function KC(e){return H0(e.x)&&H0(e.y)}function W0(e,t){return e.min===t.min&&e.max===t.max}function K5(e,t){return W0(e.x,t.x)&&W0(e.y,t.y)}function q0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function XC(e,t){return q0(e.x,t.x)&&q0(e.y,t.y)}function G0(e){return wt(e.x)/wt(e.y)}function Q0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class X5{constructor(){this.members=[]}add(t){Mm(this.members,t),t.scheduleRender()}remove(t){if(Fm(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 Z5(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:d,rotateX:c,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),c&&(r+=`rotateX(${c}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}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 Gd=["","X","Y","Z"],J5={visibility:"hidden"},Y0=1e3;let e4=0;function Qd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ZC(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sC(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ZC(r)}function JC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=e4++,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(r4),this.nodes.forEach(l4),this.nodes.forEach(u4),this.nodes.forEach(i4)},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 z5)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Im),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=$5(o),this.instance=o;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=V5(f,250),au.hasAnimatedSinceResize&&(au.hasAnimatedSinceResize=!1,this.nodes.forEach(X0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||h4,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=d.getProps(),x=!this.targetLayout||!XC(this.targetLayout,m),b=!f&&p;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,b);const k={...zm(h,"layout"),onPlay:w,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||X0(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,si(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(c4),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&&ZC(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const c=this.path[d];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(K0);return}this.isUpdating||this.nodes.forEach(o4),this.isUpdating=!1,this.nodes.forEach(a4),this.nodes.forEach(t4),this.nodes.forEach(n4),this.clearAllSnapshots();const a=Qn.now();st.delta=gr(0,1e3/60,a-st.timestamp),st.timestamp=a,st.isProcessing=!0,Id.update.process(st),Id.preRender.process(st),Id.render.process(st),st.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Um.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(s4),this.sharedNodes.forEach(d4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wt(this.snapshot.measuredBox.x)&&!wt(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=Ie(),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&&!KC(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||Si(this.latestValues)||d)&&(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)),m4(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ie();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(g4))){const{scroll:d}=this.root;d&&(Ms(a.x,d.offset.x),Ms(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ie();if(en(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:f}=d;d!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&en(a,o),Ms(a.x,c.offset.x),Ms(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Ie();en(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Fs(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Si(d.latestValues)&&Fs(l,d.latestValues)}return Si(this.latestValues)&&Fs(l,this.latestValues),l}removeTransform(o){const a=Ie();en(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Si(u.latestValues))continue;qp(u.latestValues)&&u.updateSnapshot();const d=Ie(),c=u.measurePageBox();en(d,c),U0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Si(this.latestValues)&&U0(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!==st.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:c}=this.options;if(!(!this.layout||!(d||c))){if(this.resolvedRelativeTargetAt=st.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),ua(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ie(),this.targetWithTransforms=Ie()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),y5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):en(this.target,this.layout.layoutBox),VC(this.target,this.targetDelta)):en(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),ua(this.relativeTargetOrigin,this.target,p.target),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||qp(this.parent.latestValues)||zC(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===st.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=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||d))return;en(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;x5(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=Ie());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(B0(this.prevProjectionDelta.x,this.projectionDelta.x),B0(this.prevProjectionDelta.y,this.projectionDelta.y)),la(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!Q0(this.projectionDelta.x,this.prevProjectionDelta.x)||!Q0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=Ns(),this.projectionDelta=Ns(),this.projectionDeltaWithTransform=Ns()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Ns();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ie(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,w=this.getStack(),y=!w||w.members.length<=1,x=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(p4));this.animationProgress=0;let b;this.mixTargetDelta=k=>{const T=k/1e3;Z0(c.x,o.x,T),Z0(c.y,o.y,T),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ua(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f4(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&K5(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ie()),en(b,this.relativeTarget)),h&&(this.animationValues=d,H5(d,u,this.latestValues,T,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(si(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{au.hasAnimatedSinceResize=!0,this.currentAnimation=I5(0,Y0,{...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(Y0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&ek(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ie();const c=wt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=wt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}en(a,l),Fs(a,d),la(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new X5),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&&Qd("z",o,u,this.animationValues);for(let d=0;d<Gd.length;d++)Qd(`rotate${Gd[d]}`,o,u,this.animationValues),Qd(`skew${Gd[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return J5;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=ou(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 p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=ou(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Si(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=Z5(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:c,y:f}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in La){if(d[p]===void 0)continue;const{correct:m,applyTo:h,isCSSVariable:w}=La[p],y=a.transform==="none"?d[p]:m(d[p],u);if(h){const x=h.length;for(let b=0;b<x;b++)a[h[b]]=y}else w?this.options.visualElement.renderState.vars[p]=y:a[p]=y}return this.options.layoutId&&(a.pointerEvents=u===this?ou(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(K0),this.root.sharedNodes.clear()}}}function t4(e){e.updateLayout()}function n4(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"?tn(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=wt(f);f.min=r[c].min,f.max=f.min+p}):ek(s,t.layoutBox,r)&&tn(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=wt(r[c]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});const a=Ns();la(a,r,t.layoutBox);const l=Ns();o?la(l,e.applyTransform(i,!0),t.measuredBox):la(l,r,t.layoutBox);const u=!KC(a);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:p}=c;if(f&&p){const m=Ie();ua(m,t.layoutBox,f.layoutBox);const h=Ie();ua(h,r,p.layoutBox),XC(m,h)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function r4(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 i4(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function s4(e){e.clearSnapshot()}function K0(e){e.clearMeasurements()}function o4(e){e.isLayoutDirty=!1}function a4(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function X0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function l4(e){e.resolveTargetDelta()}function u4(e){e.calcProjection()}function c4(e){e.resetSkewAndRotation()}function d4(e){e.removeLeadSnapshot()}function Z0(e,t,n){e.translate=Ae(t.translate,0,n),e.scale=Ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function J0(e,t,n,r){e.min=Ae(t.min,n.min,r),e.max=Ae(t.max,n.max,r)}function f4(e,t,n,r){J0(e.x,t.x,n.x,r),J0(e.y,t.y,n.y,r)}function p4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const h4={duration:.45,ease:[.4,0,.1,1]},ex=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tx=ex("applewebkit/")&&!ex("chrome/")?Math.round:cn;function nx(e){e.min=tx(e.min),e.max=tx(e.max)}function m4(e){nx(e.x),nx(e.y)}function ek(e,t,n){return e==="position"||e==="preserve-aspect"&&!v5(G0(t),G0(n),.2)}function g4(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const v4=JC({attachResizeListener:(e,t)=>za(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Yd={current:void 0},tk=JC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Yd.current){const e=new v4({});e.mount(window),e.setOptions({layoutScroll:!0}),Yd.current=e}return Yd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),y4={pan:{Feature:N5},drag:{Feature:D5,ProjectionNode:tk,MeasureLayout:GC}};function rx(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&&Ce.postRender(()=>s(t,ll(t)))}class x4 extends di{mount(){const{current:t}=this.node;t&&(this.unmount=RN(t,(n,r)=>(rx(this.node,r,"Start"),i=>rx(this.node,i,"End"))))}unmount(){}}class w4 extends di{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=al(za(this.node.current,"focus",()=>this.onFocus()),za(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ix(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&&Ce.postRender(()=>s(t,ll(t)))}class b4 extends di{mount(){const{current:t}=this.node;t&&(this.unmount=DN(t,(n,r)=>(ix(this.node,r,"Start"),(i,{success:s})=>ix(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Yp=new WeakMap,Kd=new WeakMap,S4=e=>{const t=Yp.get(e.target);t&&t(e)},C4=e=>{e.forEach(S4)};function k4({root:e,...t}){const n=e||document;Kd.has(n)||Kd.set(n,{});const r=Kd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(C4,{root:e,...t})),r[i]}function T4(e,t,n){const r=k4(t);return Yp.set(e,n),r.observe(e),()=>{Yp.delete(e),r.unobserve(e)}}const E4={some:0,all:1};class _4 extends di{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:E4[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:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return T4(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(j4(t,n))&&this.startObserver()}unmount(){}}function j4({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const R4={inView:{Feature:_4},tap:{Feature:b4},focus:{Feature:w4},hover:{Feature:x4}},A4={layout:{ProjectionNode:tk,MeasureLayout:GC}},Kp={current:null},nk={current:!1};function P4(){if(nk.current=!0,!!Dm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kp.current=e.matches;e.addListener(t),t()}else Kp.current=!1}const O4=[..._C,pt,oi],D4=e=>O4.find(EC(e)),N4=new WeakMap;function M4(e,t,n){for(const r in t){const i=t[r],s=n[r];if(mt(i))e.addValue(r,i);else if(mt(s))e.addValue(r,Ma(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,Ma(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const sx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class F4{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=lg,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 p=Qn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Ce.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=o;this.onUpdate=d,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=Uc(n),this.isVariantNode=US(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];l[p]!==void 0&&mt(m)&&m.set(l[p],!1)}}mount(t){this.current=t,N4.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)),nk.current||P4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),si(this.notifyUpdate),si(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=cs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ce.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 ho){const n=ho[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):Ie()}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<sx.length;r++){const i=sx[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=M4(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=Ma(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"&&(kC(r)||hC(r))?r=parseFloat(r):!D4(r)&&oi.test(n)&&(r=bC(t,n)),this.setBaseTarget(t,mt(r)?r.get():r)),mt(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=ng(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&&!mt(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 Im),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class rk extends F4{constructor(){super(...arguments),this.KeyframeResolver=jC}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;mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function L4(e){return window.getComputedStyle(e)}class I4 extends rk{constructor(){super(...arguments),this.type="html",this.renderInstance=eC}readValueFromInstance(t,n){if(cs.has(n))return XM(t,n);{const r=L4(t),i=(Qm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return UC(t,n)}build(t,n,r){Xm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return rg(t,n,r)}}class $4 extends rk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ie,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&JS(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cs.has(n)){const r=wC(n);return r&&r.default||0}return n=tC.has(n)?n:Gm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return rC(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ce.postRender(this.updateDimensions)}build(t,n,r){eg(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){nC(t,n,r,i)}mount(t){this.isSVGTag=tg(t.tagName),super.mount(t)}}const B4=(e,t)=>Jm(e)?new $4(t):new I4(t,{allowProjection:e!==v.Fragment}),z4=kM({...u5,...R4,...y4,...A4},B4),at=BN(z4);class V4{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const U4=()=>new V4;function H4(){return $c(U4)}function Dt({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:u=S.ButtonText,bgKey:d=S.ButtonBackground,animations:c={},withoutTheming:f,...p}){const m=he();return g.jsx(at.button,{type:t,className:ye("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,zy[n]&&zy[n][r],fN[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:m.getColor(u),backgroundColor:m.getColor(d),...o?{}:{borderRadius:m.getRadius()}},...l},...c,...p,children:e})}const W4=(e,t)=>{const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/`},ik=v.createContext({}),q4=()=>`${window.location.pathname}_$$_${document.title}`,G4=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},Q4=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function Y4({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(Q4());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 g.jsx(ik.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function fg(){return v.useContext(ik)}const lu=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};function K4({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return g.jsxs("div",{className:r||"",children:[e&&g.jsx(Pm,{id:t,required:o,text:e}),g.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&&g.jsx("p",{className:"1 texm text-r500",children:a})]})}function ae(){}ae.Home=function(t){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:g.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"})})};ae.Chat=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.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"})});ae.Menu=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ae.MessageTyping=({className:e="size-5",...t})=>g.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:g.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"})});ae.Check=function(t){return g.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:g.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"})})};ae.Website=function(t){return g.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[g.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"}),g.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"}),g.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"})]})};ae.ArrowDown=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ae.XCircle=({className:e="e-5",...t})=>g.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:g.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"})});ae.X=({className:e="e-5",...t})=>g.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:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ae.PaperAirplane=({className:e="e-5",...t})=>g.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:g.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"})});ae.Spin=function(t){return g.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:g.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};ae.ExternalLink=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});ae.Phone=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});ae.Mail=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});ae.Star=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})});ae.Plus=e=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});const ox={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:""}},X4={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"},Z4={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"},J4={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 eL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:d="ring",reversed:c=!1,variant:f="blue",error:p,...m}){return g.jsxs("div",{children:[g.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${ox[d].label}`,children:[g.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[g.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 ${X4[f]} ${Z4[u]} ${ox[d].input}`,required:n,checked:i,value:r,onChange:h=>s==null?void 0:s(h.target.checked),onBlur:h=>o==null?void 0:o(h.target.checked),...m}),g.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:g.jsx(ae.Check,{className:J4[u]})})]}),g.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&&g.jsx("small",{className:"text-xs text-red-500",children:a}),p&&g.jsx("small",{className:"text-xs text-red-500",children:p})]})}function tL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return g.jsxs("label",{htmlFor:e,className:ye("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[g.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked: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}),g.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function nL({id:e,label:t,children:n,required:r,className:i,error:s}){return g.jsxs("fieldset",{id:e,className:i,children:[t&&g.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&g.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const ax=Object.assign(tL,{Group:nL});function pg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:d,inputRef:c,autoFocus:f=!0,style:p,...m}){const h=he();return g.jsxs("div",{className:ye({"mb-2":!s},i),children:[t&&g.jsx(Pm,{id:e,text:t,required:l}),g.jsx("textarea",{className:ye("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...m,ref:c,autoFocus:f,style:{...p,fontSize:"16px",color:u?h.getColor(S.ErrorText):h.getColor(S.InputText),backgroundColor:h.getColor(S.InputBackground),borderColor:u?h.getColor(S.ErrorBorder):h.getColor(S.InputBorder),borderRadius:h.getRadius()}}),!!u&&g.jsx("p",{className:"mt-1 text-xs",style:{color:h.getColor(S.ErrorText)},children:u})]})}function rL({onOk:e,clientId:t,widgetId:n,appearance:r}){var b,k,T,E,j,R,M,N;const i=he(),{defaultValues:s,widget:o,setIsHaveChat:a}=kt(),[l,u]=v.useState(!1),d=fg(),c=uR(),f=!!s&&"username"in s,p=(k=(b=r==null?void 0:r.body)==null?void 0:b.inputs)==null?void 0:k.reduce((A,W)=>{let B=W.remember?lu(W.name):s==null?void 0:s[W.name];return W.options&&B&&!W.options.includes(B)&&(B=void 0),W.name==="username"&&f&&(B=s.username),A[W.name]=B||"",A},{}),m=(E=(T=r==null?void 0:r.body)==null?void 0:T.inputs)==null?void 0:E.reduce((A,W)=>(A[W.name]="",A),{}),h=ym((R=(j=r==null?void 0:r.body)==null?void 0:j.inputs)==null?void 0:R.reduce((A,W)=>(A[W.name]=W.required?Hu().required(`${W.label} alanı zorunludur`):Hu(),A),{})),w=_S({init:{...p},schema:h,action:async A=>{var W;if(!l){u(!0);try{f&&(A.username=s.username),s!=null&&s.secret_data&&(A.secret_data=s.secret_data);for(const X in A)typeof A[X]=="string"&&(A[X]=A[X].trim());const[B,Q]=await c.mutateAsync({inputs:A,history:d.history,client_id:t,widget_id:n});if(Za(Q)){lR(B)&&(jd(Wn.CustomerToken,B.customer_token,(o==null?void 0:o.link_id)||""),jd(Wn.CustomerRefreshToken,B.customer_refresh_token,(o==null?void 0:o.link_id)||""),jd(Wn.DeviceId,B.device_id,(o==null?void 0:o.link_id)||"")),d.clearHistory();for(const X of((W=r==null?void 0:r.body)==null?void 0:W.inputs)||[])X.remember&&W4(X.name,A[X.name]);a(!0),e==null||e();return}AS(B,{form:w})}catch(B){console.error("Chat creation error:",B)}finally{u(!1)}}}}),y=!cN(m||{},(w==null?void 0:w.values)||{}),x=i.getColor(S.GreeterBackground);return g.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:x},children:g.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:A=>{A.preventDefault(),w.handleSubmit()},children:[(N=(M=r==null?void 0:r.body)==null?void 0:M.inputs)==null?void 0:N.map(A=>{var W,B;if(["text","email","phone"].includes(A.type))return g.jsx(dN,{id:A.name,name:A.name,type:A.type,label:A.label,value:w.values[A.name],onChange:w.handleChange,onBlur:w.handleBlur,disabled:A.name==="username"&&f,readOnly:A.name==="username"&&f,autoComplete:"off",placeholder:A.placeholder,error:w.errors[A.name],ariaInvalid:w.errors.name?!0:void 0,required:A.required,noMargin:!0},A.name);if(A.type==="select")return g.jsx(K4,{id:A.name,name:A.name,value:w.values[A.name],onChange:w.handleChange,label:A.label,error:w.errors[A.name],required:A.required,children:(W=A.options)==null?void 0:W.map(Q=>g.jsx("option",{value:Q,children:Q},Q))},A.name);if(A.type==="checkbox")return g.jsx(eL,{id:A.name,name:A.name,value:w.values[A.name],checked:w.values[A.name]==="true",onChange:w.handleChange,required:A.required,error:w.errors[A.name],children:A.label},A.name);if(A.type==="radio")return g.jsx(ax.Group,{id:A.name,label:A.label,required:A.required,error:w.errors[A.name],children:(B=A.options)==null?void 0:B.map(Q=>g.jsx(ax,{onChange:X=>{X?w.setFieldValue(A.name,Q):w.setFieldValue(A.name,"")},id:Q,name:A.name,value:Q===w.values[A.name],children:Q},Q))},A.name);if(A.type==="textarea")return g.jsx(pg,{id:A.name,name:A.name,value:w.values[A.name],onChange:w.handleChange,placeholder:A.placeholder,error:w.errors[A.name],required:A.required,label:A.label},A.name)}),g.jsx(Dt,{textKey:S.GreeterButtonText,bgKey:S.GreeterButtonBackground,type:"submit",disabled:!y||l,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:l?g.jsxs("div",{className:"flex items-center justify-center",children:[g.jsx("span",{className:"mr-2",children:"Yükleniyor"}),g.jsx("span",{className:"animate-pulse",children:"..."})]}):"Sohbet Oluştur"})]})})}function iL({onClose:e}){const t=he();return g.jsx(Dt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2 hover:opacity-80 transition-opacity",style:{backgroundColor:t.getColor(S.CloseButtonBackground),color:t.getColor(S.CloseButtonText)},withoutTheming:!0,children:g.jsx(ae.X,{className:"size-5",style:{color:t.getColor(S.CloseButtonText)}})})}function sL({image_url:e,name:t,size:n="size-9"}){const r=he();return e?g.jsx("img",{src:e,alt:t,className:ye("rounded-md",n)}):g.jsx("div",{className:"flex items-center justify-center gap-1",children:g.jsx(ae.Website,{className:ye(n),style:{color:r.getColor(S.IconColor)}})})}const Zn=Object.create(null);Zn.open="0";Zn.close="1";Zn.ping="2";Zn.pong="3";Zn.message="4";Zn.upgrade="5";Zn.noop="6";const uu=Object.create(null);Object.keys(Zn).forEach(e=>{uu[Zn[e]]=e});const Xp={type:"error",data:"parser error"},sk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ok=typeof ArrayBuffer=="function",ak=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hg=({type:e,data:t},n,r)=>sk&&t instanceof Blob?n?r(t):lx(t,r):ok&&(t instanceof ArrayBuffer||ak(t))?n?r(t):lx(new Blob([t]),r):r(Zn[e]+(t||"")),lx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function ux(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xd;function oL(e,t){if(sk&&e.data instanceof Blob)return e.data.arrayBuffer().then(ux).then(t);if(ok&&(e.data instanceof ArrayBuffer||ak(e.data)))return t(ux(e.data));hg(e,!1,n=>{Xd||(Xd=new TextEncoder),t(Xd.encode(n))})}const cx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<cx.length;e++)Go[cx.charCodeAt(e)]=e;const aL=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),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=Go[e.charCodeAt(r)],o=Go[e.charCodeAt(r+1)],a=Go[e.charCodeAt(r+2)],l=Go[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return u},lL=typeof ArrayBuffer=="function",mg=(e,t)=>{if(typeof e!="string")return{type:"message",data:lk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:uL(e.substring(1),t)}:uu[n]?e.length>1?{type:uu[n],data:e.substring(1)}:{type:uu[n]}:Xp},uL=(e,t)=>{if(lL){const n=aL(e);return lk(n,t)}else return{base64:!0,data:e}},lk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},uk="",cL=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{hg(s,!1,a=>{r[o]=a,++i===n&&t(r.join(uk))})})},dL=(e,t)=>{const n=e.split(uk),r=[];for(let i=0;i<n.length;i++){const s=mg(n[i],t);if(r.push(s),s.type==="error")break}return r};function fL(){return new TransformStream({transform(e,t){oL(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 Zd;function $l(e){return e.reduce((t,n)=>t+n.length,0)}function Bl(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 pL(e,t){Zd||(Zd=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($l(n)<1)break;const l=Bl(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($l(n)<2)break;const l=Bl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if($l(n)<8)break;const l=Bl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Xp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if($l(n)<i)break;const l=Bl(n,i);a.enqueue(mg(s?l:Zd.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Xp);break}}}})}const ck=4;function Ve(e){if(e)return hL(e)}function hL(e){for(var t in Ve.prototype)e[t]=Ve.prototype[t];return e}Ve.prototype.on=Ve.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ve.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ve.prototype.off=Ve.prototype.removeListener=Ve.prototype.removeAllListeners=Ve.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};Ve.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};Ve.prototype.emitReserved=Ve.prototype.emit;Ve.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ve.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),an=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mL="arraybuffer";function dk(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const gL=an.setTimeout,vL=an.clearTimeout;function qc(e,t){t.useNativeTimers?(e.setTimeoutFn=gL.bind(an),e.clearTimeoutFn=vL.bind(an)):(e.setTimeoutFn=an.setTimeout.bind(an),e.clearTimeoutFn=an.clearTimeout.bind(an))}const yL=1.33;function xL(e){return typeof e=="string"?wL(e):Math.ceil((e.byteLength||e.size)*yL)}function wL(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 fk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function bL(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function SL(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 CL extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class gg extends Ve{constructor(t){super(),this.writable=!1,qc(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 CL(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=mg(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=bL(t);return n.length?"?"+n:""}}class kL extends gg{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)};dL(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,cL(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]=fk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pk=!1;try{pk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const TL=pk;function EL(){}class _L extends kL{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 Kn extends Ve{constructor(t,n,r){super(),this.createRequest=t,qc(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=dk(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=Kn.requestsCount++,Kn.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=EL,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Kn.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()}}Kn.requestsCount=0;Kn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dx);else if(typeof addEventListener=="function"){const e="onpagehide"in an?"pagehide":"unload";addEventListener(e,dx,!1)}}function dx(){for(let e in Kn.requests)Kn.requests.hasOwnProperty(e)&&Kn.requests[e].abort()}const jL=function(){const e=hk({xdomain:!1});return e&&e.responseType!==null}();class RL extends _L{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=jL&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Kn(hk,this.uri(),t)}}function hk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||TL))return new XMLHttpRequest}catch{}if(!t)try{return new an[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const mk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class AL extends gg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=mk?{}:dk(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;hg(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Wc(()=>{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]=fk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Jd=an.WebSocket||an.MozWebSocket;class PL extends AL{createSocket(t,n,r){return mk?new Jd(t,n,r):n?new Jd(t,n):new Jd(t)}doWrite(t,n){this.ws.send(n)}}class OL extends gg{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=pL(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=fL();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&&Wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const DL={websocket:PL,webtransport:OL,polling:RL},NL=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ML=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zp(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=NL.exec(e||""),s={},o=14;for(;o--;)s[ML[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=FL(s,s.path),s.queryKey=LL(s,s.query),s}function FL(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 LL(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Jp=typeof addEventListener=="function"&&typeof removeEventListener=="function",cu=[];Jp&&addEventListener("offline",()=>{cu.forEach(e=>e())},!1);class ei extends Ve{constructor(t,n){if(super(),this.binaryType=mL,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=Zp(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=Zp(n.host).host);qc(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=SL(this.opts.query)),Jp&&(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"})},cu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=ck,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&&ei.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",ei.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+=xL(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,Wc(()=>{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(ei.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(),Jp&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=cu.indexOf(this._offlineEventListener);r!==-1&&cu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=ck;class IL extends ei{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;ei.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;ei.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=c=>{const f=new Error("probe error: "+c);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const d=()=>{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 $L=class extends IL{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=>DL[i]).filter(i=>!!i)),super(t,r)}};function BL(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=Zp(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 zL=typeof ArrayBuffer=="function",VL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,gk=Object.prototype.toString,UL=typeof Blob=="function"||typeof Blob<"u"&&gk.call(Blob)==="[object BlobConstructor]",HL=typeof File=="function"||typeof File<"u"&&gk.call(File)==="[object FileConstructor]";function vg(e){return zL&&(e instanceof ArrayBuffer||VL(e))||UL&&e instanceof Blob||HL&&e instanceof File}function du(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(du(e[n]))return!0;return!1}if(vg(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return du(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&du(e[n]))return!0;return!1}function WL(e){const t=[],n=e.data,r=e;return r.data=eh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function eh(e,t){if(!e)return e;if(vg(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]=eh(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]=eh(e[r],t));return n}return e}function qL(e,t){return e.data=th(e.data,t),delete e.attachments,e}function th(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]=th(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=th(e[n],t));return e}const GL=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],QL=5;var de;(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"})(de||(de={}));class YL{constructor(t){this.replacer=t}encode(t){return(t.type===de.EVENT||t.type===de.ACK)&&du(t)?this.encodeAsBinary({type:t.type===de.EVENT?de.BINARY_EVENT:de.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===de.BINARY_EVENT||t.type===de.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=WL(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function fx(e){return Object.prototype.toString.call(e)==="[object Object]"}class yg extends Ve{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===de.BINARY_EVENT;r||n.type===de.BINARY_ACK?(n.type=r?de.EVENT:de.ACK,this.reconstructor=new KL(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(vg(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(de[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===de.BINARY_EVENT||r.type===de.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(yg.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 de.CONNECT:return fx(n);case de.DISCONNECT:return n===void 0;case de.CONNECT_ERROR:return typeof n=="string"||fx(n);case de.EVENT:case de.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&GL.indexOf(n[0])===-1);case de.ACK:case de.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class KL{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=qL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const XL=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yg,Encoder:YL,get PacketType(){return de},protocol:QL},Symbol.toStringTag,{value:"Module"}));function Sn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const ZL=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vk extends Ve{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=[Sn(t,"open",this.onopen.bind(this)),Sn(t,"packet",this.onpacket.bind(this)),Sn(t,"error",this.onerror.bind(this)),Sn(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(ZL.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:de.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,c=n.pop();this._registerAckCallback(d,c),o.id=d}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:de.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 de.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 de.EVENT:case de.BINARY_EVENT:this.onevent(t);break;case de.ACK:case de.BINARY_ACK:this.onack(t);break;case de.DISCONNECT:this.ondisconnect();break;case de.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:de.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:de.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 Eo(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}Eo.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};Eo.prototype.reset=function(){this.attempts=0};Eo.prototype.setMin=function(e){this.ms=e};Eo.prototype.setMax=function(e){this.max=e};Eo.prototype.setJitter=function(e){this.jitter=e};class nh extends Ve{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,qc(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 Eo({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||XL;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 $L(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Sn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Sn(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(Sn(t,"ping",this.onping.bind(this)),Sn(t,"data",this.ondata.bind(this)),Sn(t,"error",this.onerror.bind(this)),Sn(t,"close",this.onclose.bind(this)),Sn(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){Wc(()=>{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 vk(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 $o={};function fu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=BL(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=$o[i]&&s in $o[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new nh(r,t):($o[i]||($o[i]=new nh(r,t)),l=$o[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(fu,{Manager:nh,Socket:vk,io:fu,connect:fu});const yk=v.createContext(null),fi=()=>{const e=v.useContext(yk);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},JL=({children:e})=>{const{widget:t,isHaveChat:n}=kt(),r=v.useRef(null),i=v.useRef(!1),[s,o]=v.useState(!1),a=v.useCallback(()=>{r.current&&(console.log("WS: Cleaning up existing socket."),r.current.removeAllListeners(),r.current.disconnect(),r.current=null),o(!1),i.current=!1},[]),l=v.useCallback(w=>{if(i.current||r.current&&r.current.connected){console.log("WS: Connect called but already connecting or connected.");return}if(!n){console.log("WS: Connect skipped - no active chat");return}const y=nu(Wn.CustomerToken,w)||lu("customer_token"),x=nu(Wn.CustomerRefreshToken,w)||lu("customer_refresh_token");if(!y||!x){console.log("WS: Connect skipped - missing required tokens");return}r.current&&a(),console.log("WS: Attempting to connect..."),i.current=!0;const b=fu(I_,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:y,device_id:nu(Wn.DeviceId,w)||lu("device_id"),customer_refresh_token:x}});b.removeAllListeners(),b.on("error",k=>{console.error("WS: Websocket error",k),i.current=!1}),b.on("connect_error",k=>{console.error("WS: Connect error",k),i.current=!1,o(!1),r.current=null}),b.on("disconnect",k=>{console.log("WS: Disconnected",k),o(!1),i.current=!1,r.current===b&&(r.current=null)}),b.on("connect",()=>{console.log("WS: Connected successfully"),r.current=b,o(!0),i.current=!1})},[a,n]);v.useEffect(()=>{const w=t==null?void 0:t.link_id;return w&&n?(console.log("WS: Auto-connecting due to linkId and isHaveChat"),l(w)):(console.log("WS: Auto-disconnect due to missing linkId or isHaveChat"),a()),()=>{console.log("WS: Cleanup on effect change"),a()}},[t==null?void 0:t.link_id,n]);const u=v.useCallback(()=>{const w=t==null?void 0:t.link_id;w?l(w):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,l]),d=v.useCallback(()=>{console.log("WS: Reconnecting..."),a();const w=t==null?void 0:t.link_id;w&&l(w)},[t==null?void 0:t.link_id,l,a]),c=v.useCallback(()=>{console.log("WS: Manual disconnect"),a()},[a]),f=v.useCallback((w,y)=>{var x;(x=r.current)==null||x.on(w,y)},[]),p=v.useCallback((w,y)=>{var x;(x=r.current)==null||x.off(w,y)},[]),m=v.useCallback((w,y,x)=>{r.current&&r.current.connected?r.current.emit(w,y,x):console.warn(`WS: Cannot emit event '${w}', socket not connected.`)},[]),h=v.useMemo(()=>({connected:s,connect:u,reconnect:d,disconnect:c,on:f,off:p,emit:m}),[s,u,d,c,f,p,m]);return g.jsx(yk.Provider,{value:h,children:e})},xg=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},ds=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},wg=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};var Nt=(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.MessageRead="message:read",e))(Nt||{}),fe=(e=>(e.Connect="connect",e.Disconnect="disconnect",e.MessageAgentCreate="message:agent:create",e.MessageUserCreate="message:user:create",e.MessageCustomerCreate="message:customer:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e.ChatUserShowButton="chat:user:show-button",e.ChatUserLeave="chat:user:leave",e.ChatUserJoin="chat:user:join",e))(fe||{});function eI(){const e=fg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return xg("popstate",t),null}function tI(){const e=fi(),t=fg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Nt.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return xg("popstate",n),v.useEffect(()=>{if(!e)return;const r=G4(),i=q4();r!==i&&(e.emit(Nt.PageChange,{page:i}),t.setPage(i))},[e]),null}function px({children:e}){const t=he(),{widget:n}=kt();if(!n)return null;const r=ds();return g.jsxs("div",{className:"h-full w-full relative overflow-hidden",children:[g.jsx("div",{style:{background:t.getColor(S.GreeterTopBackground)},className:`h-44 absolute top-0 left-0 w-full ${r?"":"rounded-t-xl"} flex flex-col items-center justify-center shadow-sm`}),e]})}const Gc=e=>{const t=Tb(),n=(r,i)=>{var o;const s=((o=aB.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}};function nI(){return eI(),null}const ef=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function rI(){var h,w,y,x,b,k;const e=he(),{widget:t,setOpen:n}=kt(),[r,i]=v.useState(!0),[s,o]=v.useState(!1),a=Gc(),l=ds(),u=wg(),d=nl();if(!t)return null;const c=()=>{n(!1)};v.useEffect(()=>{if(s){i(!1);return}if(!d||!d.accessToken){i(!1);return}cR(t.client_id,fo(d)).then(([T,E])=>{Za(E)?a.push("chat"):(ra(t.link_id||""),o(!0))}).catch(()=>{ra(t.link_id||""),o(!0)}).finally(()=>{i(!1)})},[s]);const f=ef(((w=(h=t.appearance)==null?void 0:h.head)==null?void 0:w.elements)||[],"text"),p=ef(((x=(y=t.appearance)==null?void 0:y.head)==null?void 0:x.elements)||[],"title"),m=ef(((k=(b=t.appearance)==null?void 0:b.head)==null?void 0:k.elements)||[],"logo");return r?g.jsxs(px,{children:[g.jsx(Pb,{}),g.jsx("div",{className:"overflow-y-auto",style:{height:l?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:g.jsx(Ab,{})})]}):g.jsxs(px,{children:[g.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(S.GreeterTopBackground)},children:[!u&&l&&g.jsx(iL,{onClose:c}),m&&g.jsx(sL,{name:t.name,image_url:m,size:"size-20"}),p&&g.jsx("div",{style:{color:e.getColor(S.GreeterTopText)},className:"text-xl font-bold",children:p}),f&&g.jsx("div",{style:{color:e.getColor(S.GreeterTopText)},className:"text-sm opacity-90",children:f})]}),g.jsx("div",{className:"overflow-y-auto",style:{height:l?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:g.jsx(rL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{a.push("chat")}})})]})}function iI(){return g.jsxs(g.Fragment,{children:[g.jsx(rI,{}),g.jsx(nI,{})]})}const sI=[{path:"/",component:iI,name:"registration"}];var ys=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ys||{}),Fn=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e))(Fn||{}),Le=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(Le||{});function oI({name:e,avatar:t,className:n="text-neutral-500",textColor:r}){return g.jsxs(at.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[g.jsx("div",{className:"min-w-max",children:g.jsxs("span",{children:[t&&g.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&g.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),g.jsx("div",{className:"flex flex-col",children:g.jsx("span",{className:ye("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e})})]})}var aI=Object.defineProperty,lI=(e,t,n)=>t in e?aI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tf=(e,t,n)=>(lI(e,typeof t!="symbol"?t+"":t,n),n);let uI=class{constructor(){tf(this,"current",this.detect()),tf(this,"handoffState","pending"),tf(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"}},pu=new uI;function cI(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Qc(){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 cI(()=>{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=Qc();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 xk(){let[e]=v.useState(Qc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let ti=(e,t)=>{pu.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function wk(e){let t=v.useRef(e);return ti(()=>{t.current=e},[e]),t}let ur=function(e){let t=wk(e);return L.useCallback((...n)=>t.current(...n),[t])};function rh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Yc(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,Yc),r}var bk=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(bk||{}),Ur=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ur||{});function Sk(){let e=fI();return v.useCallback(t=>dI({mergeRefs:e,...t}),[e])}function dI({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??pI;let l=Ck(t,e);if(s)return zl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return zl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Yc(d?0:1,{0(){return null},1(){return zl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return zl(l,n,r,o,a)}function zl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=nf(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=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 f=!1,p=[];for(let[m,h]of Object.entries(t))typeof h=="boolean"&&(f=!0),h===!0&&p.push(m.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let m of p)c[`data-${m}`]=""}}if(s===v.Fragment&&(Object.keys(Ci(l)).length>0||Object.keys(Ci(c)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Ci(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(Ci(l)).concat(Object.keys(Ci(c))).map(f=>` - ${f}`).join(`
105
+ */var tt=typeof Symbol=="function"&&Symbol.for,ug=tt?Symbol.for("react.element"):60103,cg=tt?Symbol.for("react.portal"):60106,Fc=tt?Symbol.for("react.fragment"):60107,Lc=tt?Symbol.for("react.strict_mode"):60108,Ic=tt?Symbol.for("react.profiler"):60114,$c=tt?Symbol.for("react.provider"):60109,Bc=tt?Symbol.for("react.context"):60110,dg=tt?Symbol.for("react.async_mode"):60111,zc=tt?Symbol.for("react.concurrent_mode"):60111,Vc=tt?Symbol.for("react.forward_ref"):60112,Uc=tt?Symbol.for("react.suspense"):60113,ZF=tt?Symbol.for("react.suspense_list"):60120,Hc=tt?Symbol.for("react.memo"):60115,Wc=tt?Symbol.for("react.lazy"):60116,JF=tt?Symbol.for("react.block"):60121,e4=tt?Symbol.for("react.fundamental"):60117,t4=tt?Symbol.for("react.responder"):60118,n4=tt?Symbol.for("react.scope"):60119;function Kt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ug:switch(e=e.type,e){case dg:case zc:case Fc:case Ic:case Lc:case Uc:return e;default:switch(e=e&&e.$$typeof,e){case Bc:case Vc:case Wc:case Hc:case $c:return e;default:return t}}case cg:return t}}}function ek(e){return Kt(e)===zc}xe.AsyncMode=dg;xe.ConcurrentMode=zc;xe.ContextConsumer=Bc;xe.ContextProvider=$c;xe.Element=ug;xe.ForwardRef=Vc;xe.Fragment=Fc;xe.Lazy=Wc;xe.Memo=Hc;xe.Portal=cg;xe.Profiler=Ic;xe.StrictMode=Lc;xe.Suspense=Uc;xe.isAsyncMode=function(e){return ek(e)||Kt(e)===dg};xe.isConcurrentMode=ek;xe.isContextConsumer=function(e){return Kt(e)===Bc};xe.isContextProvider=function(e){return Kt(e)===$c};xe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ug};xe.isForwardRef=function(e){return Kt(e)===Vc};xe.isFragment=function(e){return Kt(e)===Fc};xe.isLazy=function(e){return Kt(e)===Wc};xe.isMemo=function(e){return Kt(e)===Hc};xe.isPortal=function(e){return Kt(e)===cg};xe.isProfiler=function(e){return Kt(e)===Ic};xe.isStrictMode=function(e){return Kt(e)===Lc};xe.isSuspense=function(e){return Kt(e)===Uc};xe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fc||e===zc||e===Ic||e===Lc||e===Uc||e===ZF||typeof e=="object"&&e!==null&&(e.$$typeof===Wc||e.$$typeof===Hc||e.$$typeof===$c||e.$$typeof===Bc||e.$$typeof===Vc||e.$$typeof===e4||e.$$typeof===t4||e.$$typeof===n4||e.$$typeof===JF)};xe.typeOf=Kt;JC.exports=xe;var r4=JC.exports,tk=r4,i4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nk={};nk[tk.ForwardRef]=i4;nk[tk.Memo]=s4;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 rk(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 qc=v.createContext(void 0);qc.displayName="FormikContext";qc.Provider;qc.Consumer;function o4(){var e=v.useContext(qc);return e}var yn=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},a4=function(t){return String(Math.floor(Number(t)))===t},Qd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Yd=function(t){return Gc(t)&&yn(t.then)};function Bt(e,t,n,r){r===void 0&&(r=0);for(var i=ZC(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function qi(e,t,n){for(var r=nx(e),i=r,s=0,o=ZC(t);s<o.length-1;s++){var a=o[s],l=Bt(e,o.slice(0,s+1));if(l&&(Gc(l)||Array.isArray(l)))i=i[a]=nx(l);else{var u=o[s+1];i=i[a]=a4(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 ik(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];Gc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},ik(a,t,n,r[o])):r[o]=t}return r}function l4(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 Ti(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:qi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ze({},e,{touched:qi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ze({},e,{errors:qi(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:ik(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 bi={},Bl={};function u4(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,d=e.onSubmit,c=rk(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Ze({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),p=v.useRef(f.initialValues),m=v.useRef(f.initialErrors||bi),g=v.useRef(f.initialTouched||Bl),x=v.useRef(f.initialStatus),y=v.useRef(!1),w=v.useRef({});v.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var b=v.useState(0),k=b[1],T=v.useRef({values:$l(f.initialValues),errors:$l(f.initialErrors)||bi,touched:$l(f.initialTouched)||Bl,status:$l(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=T.current,_=v.useCallback(function(A){var H=T.current;T.current=l4(H,A),H!==T.current&&k(function(P){return P+1})},[]),R=v.useCallback(function(A,H){return new Promise(function(P,L){var K=f.validate(A,H);K==null?P(bi):Yd(K)?K.then(function(re){P(re||bi)},function(re){L(re)}):P(K)})},[f.validate]),D=v.useCallback(function(A,H){var P=f.validationSchema,L=yn(P)?P(H):P,K=H&&L.validateAt?L.validateAt(H,A):d4(A,L);return new Promise(function(re,de){K.then(function(){re(bi)},function(We){We.name==="ValidationError"?re(c4(We)):de(We)})})},[f.validationSchema]),N=v.useCallback(function(A,H){return new Promise(function(P){return P(w.current[A].validate(H))})},[]),j=v.useCallback(function(A){var H=Object.keys(w.current).filter(function(L){return yn(w.current[L].validate)}),P=H.length>0?H.map(function(L){return N(L,Bt(A,L))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(P).then(function(L){return L.reduce(function(K,re,de){return re==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||re&&(K=qi(K,H[de],re)),K},{})})},[N]),Y=v.useCallback(function(A){return Promise.all([j(A),f.validationSchema?D(A):{},f.validate?R(A):{}]).then(function(H){var P=H[0],L=H[1],K=H[2],re=Hp.all([P,L,K],{arrayMerge:f4});return re})},[f.validate,f.validationSchema,j,R,D]),G=en(function(A){return A===void 0&&(A=E.values),_({type:"SET_ISVALIDATING",payload:!0}),Y(A).then(function(H){return y.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:H})),H})});v.useEffect(function(){o&&y.current===!0&&Ti(p.current,f.initialValues)&&G(p.current)},[o,G]);var Z=v.useCallback(function(A){var H=A&&A.values?A.values:p.current,P=A&&A.errors?A.errors:m.current?m.current:f.initialErrors||{},L=A&&A.touched?A.touched:g.current?g.current:f.initialTouched||{},K=A&&A.status?A.status:x.current?x.current:f.initialStatus;p.current=H,m.current=P,g.current=L,x.current=K;var re=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!A&&!!A.isSubmitting,errors:P,touched:L,status:K,values:H,isValidating:!!A&&!!A.isValidating,submitCount:A&&A.submitCount&&typeof A.submitCount=="number"?A.submitCount:0}})};if(f.onReset){var de=f.onReset(E.values,gi);Yd(de)?de.then(re):re()}else re()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){y.current===!0&&!Ti(p.current,f.initialValues)&&u&&(p.current=f.initialValues,Z(),o&&G(p.current))},[u,f.initialValues,Z,o,G]),v.useEffect(function(){u&&y.current===!0&&!Ti(m.current,f.initialErrors)&&(m.current=f.initialErrors||bi,_({type:"SET_ERRORS",payload:f.initialErrors||bi}))},[u,f.initialErrors]),v.useEffect(function(){u&&y.current===!0&&!Ti(g.current,f.initialTouched)&&(g.current=f.initialTouched||Bl,_({type:"SET_TOUCHED",payload:f.initialTouched||Bl}))},[u,f.initialTouched]),v.useEffect(function(){u&&y.current===!0&&!Ti(x.current,f.initialStatus)&&(x.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var ne=en(function(A){if(w.current[A]&&yn(w.current[A].validate)){var H=Bt(E.values,A),P=w.current[A].validate(H);return Yd(P)?(_({type:"SET_ISVALIDATING",payload:!0}),P.then(function(L){return L}).then(function(L){_({type:"SET_FIELD_ERROR",payload:{field:A,value:L}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:A,value:P}}),Promise.resolve(P))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),D(E.values,A).then(function(L){return L}).then(function(L){_({type:"SET_FIELD_ERROR",payload:{field:A,value:Bt(L,A)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),J=v.useCallback(function(A,H){var P=H.validate;w.current[A]={validate:P}},[]),oe=v.useCallback(function(A){delete w.current[A]},[]),O=en(function(A,H){_({type:"SET_TOUCHED",payload:A});var P=H===void 0?i:H;return P?G(E.values):Promise.resolve()}),M=v.useCallback(function(A){_({type:"SET_ERRORS",payload:A})},[]),V=en(function(A,H){var P=yn(A)?A(E.values):A;_({type:"SET_VALUES",payload:P});var L=H===void 0?n:H;return L?G(P):Promise.resolve()}),U=v.useCallback(function(A,H){_({type:"SET_FIELD_ERROR",payload:{field:A,value:H}})},[]),I=en(function(A,H,P){_({type:"SET_FIELD_VALUE",payload:{field:A,value:H}});var L=P===void 0?n:P;return L?G(qi(E.values,A,H)):Promise.resolve()}),F=v.useCallback(function(A,H){var P=H,L=A,K;if(!Qd(A)){A.persist&&A.persist();var re=A.target?A.target:A.currentTarget,de=re.type,We=re.name,rt=re.id,Rn=re.value,Xt=re.checked,vs=re.outerHTML,tr=re.options,kr=re.multiple;P=H||We||rt,L=/number|range/.test(de)?(K=parseFloat(Rn),isNaN(K)?"":K):/checkbox/.test(de)?h4(Bt(E.values,P),Xt,Rn):tr&&kr?p4(tr):Rn}P&&I(P,L)},[I,E.values]),W=en(function(A){if(Qd(A))return function(H){return F(H,A)};F(A)}),se=en(function(A,H,P){H===void 0&&(H=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:A,value:H}});var L=P===void 0?i:P;return L?G(E.values):Promise.resolve()}),z=v.useCallback(function(A,H){A.persist&&A.persist();var P=A.target,L=P.name,K=P.id,re=P.outerHTML,de=H||L||K;se(de,!0)},[se]),ee=en(function(A){if(Qd(A))return function(H){return z(H,A)};z(A)}),Ae=v.useCallback(function(A){yn(A)?_({type:"SET_FORMIK_STATE",payload:A}):_({type:"SET_FORMIK_STATE",payload:function(){return A}})},[]),nt=v.useCallback(function(A){_({type:"SET_STATUS",payload:A})},[]),It=v.useCallback(function(A){_({type:"SET_ISSUBMITTING",payload:A})},[]),An=en(function(){return _({type:"SUBMIT_ATTEMPT"}),G().then(function(A){var H=A instanceof Error,P=!H&&Object.keys(A).length===0;if(P){var L;try{if(L=br(),L===void 0)return}catch(K){throw K}return Promise.resolve(L).then(function(K){return y.current&&_({type:"SUBMIT_SUCCESS"}),K}).catch(function(K){if(y.current)throw _({type:"SUBMIT_FAILURE"}),K})}else if(y.current&&(_({type:"SUBMIT_FAILURE"}),H))throw A})}),hn=en(function(A){A&&A.preventDefault&&yn(A.preventDefault)&&A.preventDefault(),A&&A.stopPropagation&&yn(A.stopPropagation)&&A.stopPropagation(),An().catch(function(H){console.warn("Warning: An unhandled error was caught from submitForm()",H)})}),gi={resetForm:Z,validateForm:G,validateField:ne,setErrors:M,setFieldError:U,setFieldTouched:se,setFieldValue:I,setStatus:nt,setSubmitting:It,setTouched:O,setValues:V,setFormikState:Ae,submitForm:An},br=en(function(){return d(E.values,gi)}),gs=en(function(A){A&&A.preventDefault&&yn(A.preventDefault)&&A.preventDefault(),A&&A.stopPropagation&&yn(A.stopPropagation)&&A.stopPropagation(),Z()}),vi=v.useCallback(function(A){return{value:Bt(E.values,A),error:Bt(E.errors,A),touched:!!Bt(E.touched,A),initialValue:Bt(p.current,A),initialTouched:!!Bt(g.current,A),initialError:Bt(m.current,A)}},[E.errors,E.touched,E.values]),_t=v.useCallback(function(A){return{setValue:function(P,L){return I(A,P,L)},setTouched:function(P,L){return se(A,P,L)},setError:function(P){return U(A,P)}}},[I,se,U]),Sr=v.useCallback(function(A){var H=Gc(A),P=H?A.name:A,L=Bt(E.values,P),K={name:P,value:L,onChange:W,onBlur:ee};if(H){var re=A.type,de=A.value,We=A.as,rt=A.multiple;re==="checkbox"?de===void 0?K.checked=!!L:(K.checked=!!(Array.isArray(L)&&~L.indexOf(de)),K.value=de):re==="radio"?(K.checked=L===de,K.value=de):We==="select"&&rt&&(K.value=K.value||[],K.multiple=!0)}return K},[ee,W,E.values]),Ke=v.useMemo(function(){return!Ti(p.current,E.values)},[p.current,E.values]),Cr=v.useMemo(function(){return typeof a<"u"?Ke?E.errors&&Object.keys(E.errors).length===0:a!==!1&&yn(a)?a(f):a:E.errors&&Object.keys(E.errors).length===0},[a,Ke,E.errors,f]),Ao=Ze({},E,{initialValues:p.current,initialErrors:m.current,initialTouched:g.current,initialStatus:x.current,handleBlur:ee,handleChange:W,handleReset:gs,handleSubmit:hn,resetForm:Z,setErrors:M,setFormikState:Ae,setFieldTouched:se,setFieldValue:I,setFieldError:U,setStatus:nt,setSubmitting:It,setTouched:O,setValues:V,submitForm:An,validateForm:G,validateField:ne,isValid:Cr,dirty:Ke,unregisterField:oe,registerField:J,getFieldProps:Sr,getFieldMeta:vi,getFieldHelpers:_t,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Ao}function c4(e){var t={};if(e.inner){if(e.inner.length===0)return qi(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;Bt(t,o.path)||(t=qi(t,o.path,o.message))}}return t}function d4(e,t,n,r){n===void 0&&(n=!1);var i=Kp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Kp(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||O0(i)?Kp(i):i!==""?i:void 0}):O0(e[r])?t[r]=Kp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function f4(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?Hp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Hp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function p4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function h4(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 m4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function en(e){var t=v.useRef(e);return m4(function(){t.current=e}),v.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 g4=v.forwardRef(function(e,t){var n=e.action,r=rk(e,["action"]),i=n??"#",s=o4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ze({onSubmit:a,ref:t,onReset:o,action:i},r))});g4.displayName="Form";const sk=({init:e,schema:t,action:n})=>u4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function v4(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 y4=e=>{switch(e){case"success":return b4;case"info":return C4;case"warning":return S4;case"error":return k4;default:return null}},x4=Array(12).fill(0),w4=({visible:e,className:t})=>$.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$.createElement("div",{className:"sonner-spinner"},x4.map((n,r)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),b4=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),S4=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.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"})),C4=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),k4=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),T4=$.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"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),E4=()=>{const[e,t]=$.useState(document.hidden);return $.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Xp=1;class _4{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:Xp++,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],$.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(A4(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:f,...p})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:c,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));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)||Xp++;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 Pt=new _4,j4=(e,t)=>{const n=(t==null?void 0:t.id)||Xp++;return Pt.addToast({title:e,...t,id:n}),n},A4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",R4=j4,P4=()=>Pt.toasts,O4=()=>Pt.getActiveToasts(),ok=Object.assign(R4,{success:Pt.success,info:Pt.info,warning:Pt.warning,error:Pt.error,custom:Pt.custom,message:Pt.message,promise:Pt.promise,dismiss:Pt.dismiss,loading:Pt.loading},{getHistory:P4,getToasts:O4});v4("[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 zl(e){return e.label!==void 0}const D4=3,N4="24px",M4="16px",sx=4e3,F4=356,L4=14,I4=45,$4=200;function Dn(...e){return e.filter(Boolean).join(" ")}function B4(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const z4=e=>{var t,n,r,i,s,o,a,l,u;const{invert:d,toast:c,unstyled:f,interacting:p,setHeights:m,visibleToasts:g,heights:x,index:y,toasts:w,expanded:b,removeToast:k,defaultRichColors:T,closeButton:E,style:_,cancelButtonStyle:R,actionButtonStyle:D,className:N="",descriptionClassName:j="",duration:Y,position:G,gap:Z,expandByDefault:ne,classNames:J,icons:oe,closeButtonAriaLabel:O="Close toast"}=e,[M,V]=$.useState(null),[U,I]=$.useState(null),[F,W]=$.useState(!1),[se,z]=$.useState(!1),[ee,Ae]=$.useState(!1),[nt,It]=$.useState(!1),[An,hn]=$.useState(!1),[gi,br]=$.useState(0),[gs,vi]=$.useState(0),_t=$.useRef(c.duration||Y||sx),Sr=$.useRef(null),Ke=$.useRef(null),Cr=y===0,Ao=y+1<=g,A=c.type,H=c.dismissible!==!1,P=c.className||"",L=c.descriptionClassName||"",K=$.useMemo(()=>x.findIndex(le=>le.toastId===c.id)||0,[x,c.id]),re=$.useMemo(()=>{var le;return(le=c.closeButton)!=null?le:E},[c.closeButton,E]),de=$.useMemo(()=>c.duration||Y||sx,[c.duration,Y]),We=$.useRef(0),rt=$.useRef(0),Rn=$.useRef(0),Xt=$.useRef(null),[vs,tr]=G.split("-"),kr=$.useMemo(()=>x.reduce((le,Xe,ct)=>ct>=K?le:le+Xe.height,0),[x,K]),ys=E4(),Ro=c.invert||d,yi=A==="loading";rt.current=$.useMemo(()=>K*Z+kr,[K,kr]),$.useEffect(()=>{_t.current=de},[de]),$.useEffect(()=>{W(!0)},[]),$.useEffect(()=>{const le=Ke.current;if(le){const Xe=le.getBoundingClientRect().height;return vi(Xe),m(ct=>[{toastId:c.id,height:Xe,position:c.position},...ct]),()=>m(ct=>ct.filter($t=>$t.toastId!==c.id))}},[m,c.id]),$.useLayoutEffect(()=>{if(!F)return;const le=Ke.current,Xe=le.style.height;le.style.height="auto";const ct=le.getBoundingClientRect().height;le.style.height=Xe,vi(ct),m($t=>$t.find(it=>it.toastId===c.id)?$t.map(it=>it.toastId===c.id?{...it,height:ct}:it):[{toastId:c.id,height:ct,position:c.position},...$t])},[F,c.title,c.description,m,c.id]);const Pn=$.useCallback(()=>{z(!0),br(rt.current),m(le=>le.filter(Xe=>Xe.toastId!==c.id)),setTimeout(()=>{k(c)},$4)},[c,k,m,rt]);$.useEffect(()=>{if(c.promise&&A==="loading"||c.duration===1/0||c.type==="loading")return;let le;return b||p||ys?(()=>{if(Rn.current<We.current){const $t=new Date().getTime()-We.current;_t.current=_t.current-$t}Rn.current=new Date().getTime()})():(()=>{_t.current!==1/0&&(We.current=new Date().getTime(),le=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Pn()},_t.current))})(),()=>clearTimeout(le)},[b,p,c,A,ys,Pn]),$.useEffect(()=>{c.delete&&Pn()},[Pn,c.delete]);function nT(){var le;if(oe!=null&&oe.loading){var Xe;return $.createElement("div",{className:Dn(J==null?void 0:J.loader,c==null||(Xe=c.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":A==="loading"},oe.loading)}return $.createElement(w4,{className:Dn(J==null?void 0:J.loader,c==null||(le=c.classNames)==null?void 0:le.loader),visible:A==="loading"})}var Tg,Eg;return $.createElement("li",{tabIndex:0,ref:Ke,className:Dn(N,P,J==null?void 0:J.toast,c==null||(t=c.classNames)==null?void 0:t.toast,J==null?void 0:J.default,J==null?void 0:J[A],c==null||(n=c.classNames)==null?void 0:n[A]),"data-sonner-toast":"","data-rich-colors":(Tg=c.richColors)!=null?Tg:T,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":F,"data-promise":!!c.promise,"data-swiped":An,"data-removed":se,"data-visible":Ao,"data-y-position":vs,"data-x-position":tr,"data-index":y,"data-front":Cr,"data-swiping":ee,"data-dismissible":H,"data-type":A,"data-invert":Ro,"data-swipe-out":nt,"data-swipe-direction":U,"data-expanded":!!(b||ne&&F),style:{"--index":y,"--toasts-before":y,"--z-index":w.length-y,"--offset":`${se?gi:rt.current}px`,"--initial-height":ne?"auto":`${gs}px`,..._,...c.style},onDragEnd:()=>{Ae(!1),V(null),Xt.current=null},onPointerDown:le=>{yi||!H||(Sr.current=new Date,br(rt.current),le.target.setPointerCapture(le.pointerId),le.target.tagName!=="BUTTON"&&(Ae(!0),Xt.current={x:le.clientX,y:le.clientY}))},onPointerUp:()=>{var le,Xe,ct;if(nt||!H)return;Xt.current=null;const $t=Number(((le=Ke.current)==null?void 0:le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pl=Number(((Xe=Ke.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),it=new Date().getTime()-((ct=Sr.current)==null?void 0:ct.getTime()),Zt=M==="x"?$t:pl,hl=Math.abs(Zt)/it;if(Math.abs(Zt)>=I4||hl>.11){br(rt.current),c.onDismiss==null||c.onDismiss.call(c,c),I(M==="x"?$t>0?"right":"left":pl>0?"down":"up"),Pn(),It(!0);return}else{var mn,gn;(mn=Ke.current)==null||mn.style.setProperty("--swipe-amount-x","0px"),(gn=Ke.current)==null||gn.style.setProperty("--swipe-amount-y","0px")}hn(!1),Ae(!1),V(null)},onPointerMove:le=>{var Xe,ct,$t;if(!Xt.current||!H||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;const it=le.clientY-Xt.current.y,Zt=le.clientX-Xt.current.x;var hl;const mn=(hl=e.swipeDirections)!=null?hl:B4(G);!M&&(Math.abs(Zt)>1||Math.abs(it)>1)&&V(Math.abs(Zt)>Math.abs(it)?"x":"y");let gn={x:0,y:0};const _g=xi=>1/(1.5+Math.abs(xi)/20);if(M==="y"){if(mn.includes("top")||mn.includes("bottom"))if(mn.includes("top")&&it<0||mn.includes("bottom")&&it>0)gn.y=it;else{const xi=it*_g(it);gn.y=Math.abs(xi)<Math.abs(it)?xi:it}}else if(M==="x"&&(mn.includes("left")||mn.includes("right")))if(mn.includes("left")&&Zt<0||mn.includes("right")&&Zt>0)gn.x=Zt;else{const xi=Zt*_g(Zt);gn.x=Math.abs(xi)<Math.abs(Zt)?xi:Zt}(Math.abs(gn.x)>0||Math.abs(gn.y)>0)&&hn(!0),(ct=Ke.current)==null||ct.style.setProperty("--swipe-amount-x",`${gn.x}px`),($t=Ke.current)==null||$t.style.setProperty("--swipe-amount-y",`${gn.y}px`)}},re&&!c.jsx&&A!=="loading"?$.createElement("button",{"aria-label":O,"data-disabled":yi,"data-close-button":!0,onClick:yi||!H?()=>{}:()=>{Pn(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Dn(J==null?void 0:J.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Eg=oe==null?void 0:oe.close)!=null?Eg:T4):null,A||c.icon||c.promise?$.createElement("div",{"data-icon":"",className:Dn(J==null?void 0:J.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||nT():null,c.type!=="loading"?c.icon||(oe==null?void 0:oe[A])||y4(A):null):null,$.createElement("div",{"data-content":"",className:Dn(J==null?void 0:J.content,c==null||(s=c.classNames)==null?void 0:s.content)},$.createElement("div",{"data-title":"",className:Dn(J==null?void 0:J.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?$.createElement("div",{"data-description":"",className:Dn(j,L,J==null?void 0:J.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),$.isValidElement(c.cancel)?c.cancel:c.cancel&&zl(c.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||R,onClick:le=>{zl(c.cancel)&&H&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,le),Pn())},className:Dn(J==null?void 0:J.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,$.isValidElement(c.action)?c.action:c.action&&zl(c.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||D,onClick:le=>{zl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,le),!le.defaultPrevented&&Pn())},className:Dn(J==null?void 0:J.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ox(){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 V4(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?M4:N4;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=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 U4=$.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:d,theme:c="light",richColors:f,duration:p,style:m,visibleToasts:g=D4,toastOptions:x,dir:y=ox(),gap:w=L4,icons:b,containerAriaLabel:k="Notifications"}=t,[T,E]=$.useState([]),_=$.useMemo(()=>Array.from(new Set([i].concat(T.filter(U=>U.position).map(U=>U.position)))),[T,i]),[R,D]=$.useState([]),[N,j]=$.useState(!1),[Y,G]=$.useState(!1),[Z,ne]=$.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=$.useRef(null),oe=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=$.useRef(null),M=$.useRef(!1),V=$.useCallback(U=>{E(I=>{var F;return(F=I.find(W=>W.id===U.id))!=null&&F.delete||Pt.dismiss(U.id),I.filter(({id:W})=>W!==U.id)})},[]);return $.useEffect(()=>Pt.subscribe(U=>{if(U.dismiss){const I=T.map(F=>F.id===U.id?{...F,delete:!0}:F);requestAnimationFrame(()=>{E(I)});return}setTimeout(()=>{R_.flushSync(()=>{E(I=>{const F=I.findIndex(W=>W.id===U.id);return F!==-1?[...I.slice(0,F),{...I[F],...U},...I.slice(F+1)]:[U,...I]})})})}),[T]),$.useEffect(()=>{if(c!=="system"){ne(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ne("dark"):ne("light")),typeof window>"u")return;const U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:I})=>{ne(I?"dark":"light")})}catch{U.addListener(({matches:F})=>{try{ne(F?"dark":"light")}catch(W){console.error(W)}})}},[c]),$.useEffect(()=>{T.length<=1&&j(!1)},[T]),$.useEffect(()=>{const U=I=>{var F;if(s.every(z=>I[z]||I.code===z)){var se;j(!0),(se=J.current)==null||se.focus()}I.code==="Escape"&&(document.activeElement===J.current||(F=J.current)!=null&&F.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),$.useEffect(()=>{if(J.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,M.current=!1)}},[J.current]),$.createElement("section",{ref:n,"aria-label":`${k} ${oe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((U,I)=>{var F;const[W,se]=U.split("-");return T.length?$.createElement("ol",{key:U,dir:y==="auto"?ox():y,tabIndex:-1,ref:J,className:l,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":W,"data-lifted":N&&T.length>1&&!o,"data-x-position":se,style:{"--front-toast-height":`${((F=R[0])==null?void 0:F.height)||0}px`,"--width":`${F4}px`,"--gap":`${w}px`,...m,...V4(u,d)},onBlur:z=>{M.current&&!z.currentTarget.contains(z.relatedTarget)&&(M.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||M.current||(M.current=!0,O.current=z.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{Y||j(!1)},onDragEnd:()=>j(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},T.filter(z=>!z.position&&I===0||z.position===U).map((z,ee)=>{var Ae,nt;return $.createElement(z4,{key:z.id,icons:b,index:ee,toast:z,defaultRichColors:f,duration:(Ae=x==null?void 0:x.duration)!=null?Ae:p,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:r,visibleToasts:g,closeButton:(nt=x==null?void 0:x.closeButton)!=null?nt:a,interacting:Y,position:U,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:V,toasts:T.filter(It=>It.position==z.position),heights:R.filter(It=>It.position==z.position),setHeights:D,expandByDefault:o,gap:w,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function Hn(e){return ok.custom(t=>h.jsx(H4,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Kd={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function H4(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return h.jsxs("div",{className:we("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",Kd[s||"info"].bg),children:[h.jsx("div",{className:"flex flex-1 items-center",children:h.jsxs("div",{className:"w-full",children:[t&&h.jsx("p",{className:we("text-sm font-medium",Kd[s||"info"].text),children:t}),h.jsx("p",{className:we("text-sm",Kd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&h.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:h.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),ok.dismiss(i)},children:r.label})})]})}function W4(e){return Array.isArray(e)&&e[0].field!==void 0}const ak=(e,t)=>{var n;if(W4(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||Hn({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Hn({description:e.error,variant:"error"});return}},q4=[{code:429,text:"Çok fazla istek gönderdiniz. Lütfen biraz bekleyin"},{code:401,text:"Bu işlemi yapabilmek için giriş yapmalısınız"},{code:403,text:"Bu işlemi yapabilmek için yetkiniz yok"},{code:500,text:"Sunucu hatası oluştu"},{code:422,text:"Form doğrulaması başarısız oldu"},{code:413,text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],G4=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],Q4=(e,t)=>{if(oi(t))return!1;if(e===null)return Hn({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=G4.find(s=>s.code===r);if(i)return Hn({description:i.text,variant:"error"}),!0}if(e.message)return Hn({description:e.message,variant:"error"}),!0}const n=q4.find(r=>r.code===t);return Hn({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0};function Y4(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 fg({id:e,text:t,className:n,required:r}){const i=ge();return t?h.jsxs("label",{htmlFor:e,className:we("mb-1 block text-sm font-medium",n),style:{color:i.getColor(S.InputText)},children:[t,r&&h.jsx("span",{className:"ml-1",style:{color:i.getColor(S.ErrorText)},children:"*"})]}):null}const Xd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function K4({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:d,ariaInvalid:c,ariaLabel:f,autoFocus:p,...m}){const g=ge();return h.jsxs("div",{className:we({"mb-2":!o},d),children:[h.jsx(fg,{id:e,text:t,required:a}),h.jsxs("div",{className:"flex items-center",children:[r&&h.jsx("span",{className:we("inline-block border border-solid border-r-0 rounded-l-md",Xd[i]),style:{borderColor:l?g.getColor(S.ErrorBorder):g.getColor(S.InputBorder),backgroundColor:g.getColor(S.InputBackground),borderRadius:g.getRadius()},children:r}),h.jsx("input",{id:e,className:we("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",Xd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{fontSize:"16px",color:l?g.getColor(S.ErrorText):g.getColor(S.InputText),backgroundColor:g.getColor(S.InputBackground),borderColor:l?g.getColor(S.ErrorBorder):g.getColor(S.InputBorder),borderRadius:g.getRadius()},...m}),n&&h.jsx("span",{className:we("inline-block border border-solid border-l-0 rounded-r-md",Xd[i]),style:{borderColor:l?g.getColor(S.ErrorBorder):g.getColor(S.InputBorder),backgroundColor:g.getColor(S.InputBackground),borderRadius:g.getRadius()},children:n})]}),!!l&&h.jsx("p",{className:"mt-1 text-xs",style:{color:g.getColor(S.ErrorText)},children:l})]})}const X4=(e,t)=>{const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/`},lk=v.createContext({}),Z4=()=>`${window.location.pathname}_$$_${document.title}`,J4=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},eL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function tL({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(eL());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 h.jsx(lk.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function pg(){return v.useContext(lk)}const du=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};function nL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return h.jsxs("div",{className:r||"",children:[e&&h.jsx(fg,{id:t,required:o,text:e}),h.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&&h.jsx("p",{className:"1 texm text-r500",children:a})]})}const ax={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:""}},rL={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"},iL={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"},sL={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 oL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:d="ring",reversed:c=!1,variant:f="blue",error:p,...m}){return h.jsxs("div",{children:[h.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${ax[d].label}`,children:[h.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[h.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 ${rL[f]} ${iL[u]} ${ax[d].input}`,required:n,checked:i,value:r,onChange:g=>s==null?void 0:s(g.target.checked),onBlur:g=>o==null?void 0:o(g.target.checked),...m}),h.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:h.jsx(ae.Check,{className:sL[u]})})]}),h.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&&h.jsx("small",{className:"text-xs text-red-500",children:a}),p&&h.jsx("small",{className:"text-xs text-red-500",children:p})]})}function aL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return h.jsxs("label",{htmlFor:e,className:we("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[h.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked: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}),h.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function lL({id:e,label:t,children:n,required:r,className:i,error:s}){return h.jsxs("fieldset",{id:e,className:i,children:[t&&h.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&h.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),h.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&h.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const lx=Object.assign(aL,{Group:lL});function hg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:d,inputRef:c,autoFocus:f=!0,style:p,...m}){const g=ge();return h.jsxs("div",{className:we({"mb-2":!s},i),children:[t&&h.jsx(fg,{id:e,text:t,required:l}),h.jsx("textarea",{className:we("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...m,ref:c,autoFocus:f,style:{...p,fontSize:"16px",color:u?g.getColor(S.ErrorText):g.getColor(S.InputText),backgroundColor:g.getColor(S.InputBackground),borderColor:u?g.getColor(S.ErrorBorder):g.getColor(S.InputBorder),borderRadius:g.getRadius()}}),!!u&&h.jsx("p",{className:"mt-1 text-xs",style:{color:g.getColor(S.ErrorText)},children:u})]})}function uL({onOk:e,clientId:t,widgetId:n,appearance:r}){var b,k,T,E,_,R,D,N;const i=ge(),{defaultValues:s,widget:o,setIsHaveChat:a}=De(),[l,u]=v.useState(!1),d=pg(),c=mC(),f=!!s&&"username"in s,p=(k=(b=r==null?void 0:r.body)==null?void 0:b.inputs)==null?void 0:k.reduce((j,Y)=>{let G=Y.remember?du(Y.name):s==null?void 0:s[Y.name];return Y.options&&G&&!Y.options.includes(G)&&(G=void 0),Y.name==="username"&&f&&(G=s.username),j[Y.name]=G||"",j},{}),m=(E=(T=r==null?void 0:r.body)==null?void 0:T.inputs)==null?void 0:E.reduce((j,Y)=>(j[Y.name]="",j),{}),g=Jm((R=(_=r==null?void 0:r.body)==null?void 0:_.inputs)==null?void 0:R.reduce((j,Y)=>(j[Y.name]=Y.required?ec().required(`${Y.label} alanı zorunludur`):ec(),j),{})),x=sk({init:{...p},schema:g,action:async j=>{var Y;if(!l){u(!0);try{f&&(j.username=s.username),s!=null&&s.secret_data&&(j.secret_data=s.secret_data);for(const ne in j)typeof j[ne]=="string"&&(j[ne]=j[ne].trim());const[G,Z]=await c.mutateAsync({inputs:j,history:d.history,client_id:t,widget_id:n,device_id:Va((o==null?void 0:o.link_id)||"")});if(oi(Z)){q3(G)&&(ua(dn.CustomerToken,G.customer_token,(o==null?void 0:o.link_id)||""),ua(dn.CustomerRefreshToken,G.customer_refresh_token,(o==null?void 0:o.link_id)||""),ua(dn.DeviceId,G.device_id,(o==null?void 0:o.link_id)||"")),d.clearHistory();for(const ne of((Y=r==null?void 0:r.body)==null?void 0:Y.inputs)||[])ne.remember&&X4(ne.name,j[ne.name]);a(!0),e==null||e();return}ak(G,{form:x})}catch(G){console.error("Chat creation error:",G)}finally{u(!1)}}}}),y=!Y4(m||{},(x==null?void 0:x.values)||{}),w=i.getColor(S.GreeterBackground);return h.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:w},children:h.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:j=>{j.preventDefault(),x.handleSubmit()},children:[(N=(D=r==null?void 0:r.body)==null?void 0:D.inputs)==null?void 0:N.map(j=>{var Y,G;if(["text","email","phone"].includes(j.type))return h.jsx(K4,{id:j.name,name:j.name,type:j.type,label:j.label,value:x.values[j.name],onChange:x.handleChange,onBlur:x.handleBlur,disabled:j.name==="username"&&f,readOnly:j.name==="username"&&f,autoComplete:"off",placeholder:j.placeholder,error:x.errors[j.name],ariaInvalid:x.errors.name?!0:void 0,required:j.required,noMargin:!0},j.name);if(j.type==="select")return h.jsx(nL,{id:j.name,name:j.name,value:x.values[j.name],onChange:x.handleChange,label:j.label,error:x.errors[j.name],required:j.required,children:(Y=j.options)==null?void 0:Y.map(Z=>h.jsx("option",{value:Z,children:Z},Z))},j.name);if(j.type==="checkbox")return h.jsx(oL,{id:j.name,name:j.name,value:x.values[j.name],checked:x.values[j.name]==="true",onChange:x.handleChange,required:j.required,error:x.errors[j.name],children:j.label},j.name);if(j.type==="radio")return h.jsx(lx.Group,{id:j.name,label:j.label,required:j.required,error:x.errors[j.name],children:(G=j.options)==null?void 0:G.map(Z=>h.jsx(lx,{onChange:ne=>{ne?x.setFieldValue(j.name,Z):x.setFieldValue(j.name,"")},id:Z,name:j.name,value:Z===x.values[j.name],children:Z},Z))},j.name);if(j.type==="textarea")return h.jsx(hg,{id:j.name,name:j.name,value:x.values[j.name],onChange:x.handleChange,placeholder:j.placeholder,error:x.errors[j.name],required:j.required,label:j.label},j.name)}),h.jsx(Ct,{textKey:S.GreeterButtonText,bgKey:S.GreeterButtonBackground,type:"submit",disabled:!y||l,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:l?h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx("span",{className:"mr-2",children:"Yükleniyor"}),h.jsx("span",{className:"animate-pulse",children:"..."})]}):"Sohbet Oluştur"})]})})}var Un=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(Un||{}),Ln=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e))(Ln||{}),$e=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))($e||{});const _o=e=>{const t=jb(),n=(r,i)=>{var o;const s=((o=pB.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}};function cL(){const{widget:e,setHistoryChat:t,setHistoryMessages:n}=De(),r=ge(),i=_o();if(!(e!=null&&e.link_id))return null;const s=Va(e.link_id),{data:o,isLoading:a}=J3(e.link_id,s);if(a)return h.jsx("div",{className:"p-4 text-center text-sm opacity-50",children:"Yükleniyor..."});if(!o)return null;const[l,u]=o;return!oi(u)||!Array.isArray(l)||l.length===0?null:h.jsxs("div",{className:"mb-4",children:[h.jsx("h3",{className:"text-sm font-medium mb-2 px-1",style:{color:r.getColor(S.GreeterText)},children:"Önceki Sohbetler"}),h.jsx("div",{className:"space-y-2",children:l.map(d=>h.jsxs("div",{className:"p-3 rounded-lg border text-sm cursor-pointer hover:opacity-80 transition-opacity",style:{backgroundColor:r.getColor(S.InputBackground),borderColor:r.getColor(S.InputBorder),color:r.getColor(S.InputText)},onClick:()=>{t(d),n(null),i.push("chat")},children:[h.jsxs("div",{className:"flex justify-between items-center mb-1",children:[h.jsx("span",{className:"font-medium",children:new Date(d.created_at).toLocaleDateString("tr-TR")}),h.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full flex items-center gap-1 ${d.status===Un.Open?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:d.status===Un.Open?"Açık":"Kapalı"})]}),h.jsxs("div",{className:"text-xs opacity-70 truncate",children:["ID: ",d._id.substring(0,8),"..."]})]},d._id))})]})}function dL({onClose:e}){const t=ge();return h.jsx(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2 hover:opacity-80 transition-opacity",style:{backgroundColor:t.getColor(S.CloseButtonBackground),color:t.getColor(S.CloseButtonText)},withoutTheming:!0,children:h.jsx(ae.X,{className:"size-5",style:{color:t.getColor(S.CloseButtonText)}})})}function fL({image_url:e,name:t,size:n="size-9"}){const r=ge();return e?h.jsx("img",{src:e,alt:t,className:we("rounded-md",n)}):h.jsx("div",{className:"flex items-center justify-center gap-1",children:h.jsx(ae.Website,{className:we(n),style:{color:r.getColor(S.IconColor)}})})}const Jn=Object.create(null);Jn.open="0";Jn.close="1";Jn.ping="2";Jn.pong="3";Jn.message="4";Jn.upgrade="5";Jn.noop="6";const fu=Object.create(null);Object.keys(Jn).forEach(e=>{fu[Jn[e]]=e});const Zp={type:"error",data:"parser error"},uk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ck=typeof ArrayBuffer=="function",dk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,mg=({type:e,data:t},n,r)=>uk&&t instanceof Blob?n?r(t):ux(t,r):ck&&(t instanceof ArrayBuffer||dk(t))?n?r(t):ux(new Blob([t]),r):r(Jn[e]+(t||"")),ux=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function cx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Zd;function pL(e,t){if(uk&&e.data instanceof Blob)return e.data.arrayBuffer().then(cx).then(t);if(ck&&(e.data instanceof ArrayBuffer||dk(e.data)))return t(cx(e.data));mg(e,!1,n=>{Zd||(Zd=new TextEncoder),t(Zd.encode(n))})}const dx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<dx.length;e++)Yo[dx.charCodeAt(e)]=e;const hL=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),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=Yo[e.charCodeAt(r)],o=Yo[e.charCodeAt(r+1)],a=Yo[e.charCodeAt(r+2)],l=Yo[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return u},mL=typeof ArrayBuffer=="function",gg=(e,t)=>{if(typeof e!="string")return{type:"message",data:fk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:gL(e.substring(1),t)}:fu[n]?e.length>1?{type:fu[n],data:e.substring(1)}:{type:fu[n]}:Zp},gL=(e,t)=>{if(mL){const n=hL(e);return fk(n,t)}else return{base64:!0,data:e}},fk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},pk="",vL=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{mg(s,!1,a=>{r[o]=a,++i===n&&t(r.join(pk))})})},yL=(e,t)=>{const n=e.split(pk),r=[];for(let i=0;i<n.length;i++){const s=gg(n[i],t);if(r.push(s),s.type==="error")break}return r};function xL(){return new TransformStream({transform(e,t){pL(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 Jd;function Vl(e){return e.reduce((t,n)=>t+n.length,0)}function Ul(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 wL(e,t){Jd||(Jd=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(Vl(n)<1)break;const l=Ul(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(Vl(n)<2)break;const l=Ul(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Vl(n)<8)break;const l=Ul(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Zp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Vl(n)<i)break;const l=Ul(n,i);a.enqueue(gg(s?l:Jd.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Zp);break}}}})}const hk=4;function He(e){if(e)return bL(e)}function bL(e){for(var t in He.prototype)e[t]=He.prototype[t];return e}He.prototype.on=He.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};He.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};He.prototype.off=He.prototype.removeListener=He.prototype.removeAllListeners=He.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};He.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};He.prototype.emitReserved=He.prototype.emit;He.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};He.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),an=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),SL="arraybuffer";function mk(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const CL=an.setTimeout,kL=an.clearTimeout;function Yc(e,t){t.useNativeTimers?(e.setTimeoutFn=CL.bind(an),e.clearTimeoutFn=kL.bind(an)):(e.setTimeoutFn=an.setTimeout.bind(an),e.clearTimeoutFn=an.clearTimeout.bind(an))}const TL=1.33;function EL(e){return typeof e=="string"?_L(e):Math.ceil((e.byteLength||e.size)*TL)}function _L(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 gk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function jL(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function AL(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 RL extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class vg extends He{constructor(t){super(),this.writable=!1,Yc(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 RL(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=gg(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=jL(t);return n.length?"?"+n:""}}class PL extends vg{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)};yL(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,vL(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]=gk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let vk=!1;try{vk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const OL=vk;function DL(){}class NL extends PL{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 Xn extends He{constructor(t,n,r){super(),this.createRequest=t,Yc(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=mk(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=Xn.requestsCount++,Xn.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=DL,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Xn.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()}}Xn.requestsCount=0;Xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",fx);else if(typeof addEventListener=="function"){const e="onpagehide"in an?"pagehide":"unload";addEventListener(e,fx,!1)}}function fx(){for(let e in Xn.requests)Xn.requests.hasOwnProperty(e)&&Xn.requests[e].abort()}const ML=function(){const e=yk({xdomain:!1});return e&&e.responseType!==null}();class FL extends NL{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=ML&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Xn(yk,this.uri(),t)}}function yk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||OL))return new XMLHttpRequest}catch{}if(!t)try{return new an[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const xk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class LL extends vg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=xk?{}:mk(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;mg(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qc(()=>{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]=gk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const ef=an.WebSocket||an.MozWebSocket;class IL extends LL{createSocket(t,n,r){return xk?new ef(t,n,r):n?new ef(t,n):new ef(t)}doWrite(t,n){this.ws.send(n)}}class $L extends vg{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=wL(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=xL();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&&Qc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const BL={websocket:IL,webtransport:$L,polling:FL},zL=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,VL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Jp(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=zL.exec(e||""),s={},o=14;for(;o--;)s[VL[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=UL(s,s.path),s.queryKey=HL(s,s.query),s}function UL(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 HL(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const eh=typeof addEventListener=="function"&&typeof removeEventListener=="function",pu=[];eh&&addEventListener("offline",()=>{pu.forEach(e=>e())},!1);class ni extends He{constructor(t,n){if(super(),this.binaryType=SL,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=Jp(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=Jp(n.host).host);Yc(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=AL(this.opts.query)),eh&&(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"})},pu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=hk,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&&ni.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",ni.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+=EL(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,Qc(()=>{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(ni.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(),eh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=pu.indexOf(this._offlineEventListener);r!==-1&&pu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ni.protocol=hk;class WL extends ni{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;ni.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;ni.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=c=>{const f=new Error("probe error: "+c);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const d=()=>{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 qL=class extends WL{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=>BL[i]).filter(i=>!!i)),super(t,r)}};function GL(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=Jp(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 QL=typeof ArrayBuffer=="function",YL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,wk=Object.prototype.toString,KL=typeof Blob=="function"||typeof Blob<"u"&&wk.call(Blob)==="[object BlobConstructor]",XL=typeof File=="function"||typeof File<"u"&&wk.call(File)==="[object FileConstructor]";function yg(e){return QL&&(e instanceof ArrayBuffer||YL(e))||KL&&e instanceof Blob||XL&&e instanceof File}function hu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(hu(e[n]))return!0;return!1}if(yg(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return hu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&hu(e[n]))return!0;return!1}function ZL(e){const t=[],n=e.data,r=e;return r.data=th(n,t),r.attachments=t.length,{packet:r,buffers:t}}function th(e,t){if(!e)return e;if(yg(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]=th(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]=th(e[r],t));return n}return e}function JL(e,t){return e.data=nh(e.data,t),delete e.attachments,e}function nh(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]=nh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=nh(e[n],t));return e}const eI=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],tI=5;var pe;(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"})(pe||(pe={}));class nI{constructor(t){this.replacer=t}encode(t){return(t.type===pe.EVENT||t.type===pe.ACK)&&hu(t)?this.encodeAsBinary({type:t.type===pe.EVENT?pe.BINARY_EVENT:pe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===pe.BINARY_EVENT||t.type===pe.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=ZL(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function px(e){return Object.prototype.toString.call(e)==="[object Object]"}class xg extends He{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===pe.BINARY_EVENT;r||n.type===pe.BINARY_ACK?(n.type=r?pe.EVENT:pe.ACK,this.reconstructor=new rI(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(yg(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(pe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pe.BINARY_EVENT||r.type===pe.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(xg.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 pe.CONNECT:return px(n);case pe.DISCONNECT:return n===void 0;case pe.CONNECT_ERROR:return typeof n=="string"||px(n);case pe.EVENT:case pe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&eI.indexOf(n[0])===-1);case pe.ACK:case pe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rI{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=JL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const iI=Object.freeze(Object.defineProperty({__proto__:null,Decoder:xg,Encoder:nI,get PacketType(){return pe},protocol:tI},Symbol.toStringTag,{value:"Module"}));function Cn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sI=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class bk extends He{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=[Cn(t,"open",this.onopen.bind(this)),Cn(t,"packet",this.onpacket.bind(this)),Cn(t,"error",this.onerror.bind(this)),Cn(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(sI.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:pe.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,c=n.pop();this._registerAckCallback(d,c),o.id=d}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:pe.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 pe.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 pe.EVENT:case pe.BINARY_EVENT:this.onevent(t);break;case pe.ACK:case pe.BINARY_ACK:this.onack(t);break;case pe.DISCONNECT:this.ondisconnect();break;case pe.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:pe.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:pe.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 jo(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}jo.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};jo.prototype.reset=function(){this.attempts=0};jo.prototype.setMin=function(e){this.ms=e};jo.prototype.setMax=function(e){this.max=e};jo.prototype.setJitter=function(e){this.jitter=e};class rh extends He{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,Yc(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 jo({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||iI;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 qL(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Cn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Cn(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(Cn(t,"ping",this.onping.bind(this)),Cn(t,"data",this.ondata.bind(this)),Cn(t,"error",this.onerror.bind(this)),Cn(t,"close",this.onclose.bind(this)),Cn(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){Qc(()=>{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 bk(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 zo={};function mu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=GL(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=zo[i]&&s in zo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new rh(r,t):(zo[i]||(zo[i]=new rh(r,t)),l=zo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(mu,{Manager:rh,Socket:bk,io:mu,connect:mu});const Sk=v.createContext(null),mi=()=>{const e=v.useContext(Sk);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},oI=({children:e})=>{const{widget:t,isHaveChat:n}=De(),r=v.useRef(null),i=v.useRef(!1),[s,o]=v.useState(!1),a=v.useCallback(()=>{r.current&&(console.log("WS: Cleaning up existing socket."),r.current.removeAllListeners(),r.current.disconnect(),r.current=null),o(!1),i.current=!1},[]),l=v.useCallback(x=>{if(i.current||r.current&&r.current.connected){console.log("WS: Connect called but already connecting or connected.");return}if(!n){console.log("WS: Connect skipped - no active chat");return}const y=lu(dn.CustomerToken,x)||du("customer_token"),w=lu(dn.CustomerRefreshToken,x)||du("customer_refresh_token");if(!y||!w){console.log("WS: Connect skipped - missing required tokens");return}r.current&&a(),console.log("WS: Attempting to connect..."),i.current=!0;const b=mu(V_,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:y,device_id:lu(dn.DeviceId,x)||du("device_id"),customer_refresh_token:w}});b.removeAllListeners(),b.on("error",k=>{console.error("WS: Websocket error",k),i.current=!1}),b.on("connect_error",k=>{console.error("WS: Connect error",k),i.current=!1,o(!1),r.current=null}),b.on("disconnect",k=>{console.log("WS: Disconnected",k),o(!1),i.current=!1,r.current===b&&(r.current=null)}),b.on("connect",()=>{console.log("WS: Connected successfully"),r.current=b,o(!0),i.current=!1})},[a,n]);v.useEffect(()=>{const x=t==null?void 0:t.link_id;return x&&n?(console.log("WS: Auto-connecting due to linkId and isHaveChat"),l(x)):(console.log("WS: Auto-disconnect due to missing linkId or isHaveChat"),a()),()=>{console.log("WS: Cleanup on effect change"),a()}},[t==null?void 0:t.link_id,n]);const u=v.useCallback(()=>{const x=t==null?void 0:t.link_id;x?l(x):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,l]),d=v.useCallback(()=>{console.log("WS: Reconnecting..."),a();const x=t==null?void 0:t.link_id;x&&l(x)},[t==null?void 0:t.link_id,l,a]),c=v.useCallback(()=>{console.log("WS: Manual disconnect"),a()},[a]),f=v.useCallback((x,y)=>{var w;(w=r.current)==null||w.on(x,y)},[]),p=v.useCallback((x,y)=>{var w;(w=r.current)==null||w.off(x,y)},[]),m=v.useCallback((x,y,w)=>{r.current&&r.current.connected?r.current.emit(x,y,w):console.warn(`WS: Cannot emit event '${x}', socket not connected.`)},[]),g=v.useMemo(()=>({connected:s,connect:u,reconnect:d,disconnect:c,on:f,off:p,emit:m}),[s,u,d,c,f,p,m]);return h.jsx(Sk.Provider,{value:g,children:e})},wg=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},hs=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},bg=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};var vt=(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.MessageRead="message:read",e))(vt||{}),he=(e=>(e.Connect="connect",e.Disconnect="disconnect",e.MessageAgentCreate="message:agent:create",e.MessageUserCreate="message:user:create",e.MessageCustomerCreate="message:customer:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e.ChatUserShowButton="chat:user:show-button",e.ChatUserLeave="chat:user:leave",e.ChatUserJoin="chat:user:join",e))(he||{});function aI(){const e=pg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return wg("popstate",t),null}function lI(){const e=mi(),t=pg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(vt.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return wg("popstate",n),v.useEffect(()=>{if(!e)return;const r=J4(),i=Z4();r!==i&&(e.emit(vt.PageChange,{page:i}),t.setPage(i))},[e]),null}function hx({children:e}){const t=ge(),{widget:n}=De();if(!n)return null;const r=hs();return h.jsxs("div",{className:"h-full w-full relative overflow-hidden",children:[h.jsx("div",{style:{background:t.getColor(S.GreeterTopBackground)},className:`h-44 absolute top-0 left-0 w-full ${r?"":"rounded-t-xl"} flex flex-col items-center justify-center shadow-sm`}),e]})}function uI(){return aI(),null}const tf=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function cI(){var b,k,T,E,_,R;const e=ge(),{widget:t,setOpen:n,showHistoryOnRegistration:r,setShowHistoryOnRegistration:i}=De(),[s,o]=v.useState(!0),[a,l]=v.useState(r),[u,d]=v.useState(!1),c=_o(),f=hs(),p=bg(),m=ul();if(!t)return null;const g=()=>{n(!1)};v.useEffect(()=>{l(r)},[r]),v.useEffect(()=>{if(u){o(!1);return}if(!m||!m.accessToken){o(!1);return}G3(t.client_id,go(m)).then(([D,N])=>{oi(N)?c.push("chat"):(ca(t.link_id||""),d(!0))}).catch(()=>{ca(t.link_id||""),d(!0)}).finally(()=>{o(!1)})},[u]);const x=tf(((k=(b=t.appearance)==null?void 0:b.head)==null?void 0:k.elements)||[],"text"),y=tf(((E=(T=t.appearance)==null?void 0:T.head)==null?void 0:E.elements)||[],"title"),w=tf(((R=(_=t.appearance)==null?void 0:_.head)==null?void 0:R.elements)||[],"logo");return s?h.jsxs(hx,{children:[h.jsx(lC,{}),h.jsx("div",{className:"overflow-y-auto",style:{height:f?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:h.jsx(aC,{})})]}):h.jsxs(hx,{children:[h.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(S.GreeterTopBackground)},children:[!p&&f&&h.jsx(dL,{onClose:g}),h.jsx(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:()=>{const D=!a;l(D),i(D)},className:"absolute top-2 left-2 hover:opacity-80 transition-opacity",style:{backgroundColor:e.getColor(S.CloseButtonBackground),color:e.getColor(S.CloseButtonText)},withoutTheming:!0,children:a?h.jsx(ae.Plus,{className:"size-5",style:{color:e.getColor(S.CloseButtonText)}}):h.jsx(ae.History,{className:"size-5",style:{color:e.getColor(S.CloseButtonText)}})}),w&&h.jsx(fL,{name:t.name,image_url:w,size:"size-20"}),y&&h.jsx("div",{style:{color:e.getColor(S.GreeterTopText)},className:"text-xl font-bold",children:y}),x&&h.jsx("div",{style:{color:e.getColor(S.GreeterTopText)},className:"text-sm opacity-90",children:x})]}),h.jsx("div",{className:"overflow-y-auto",style:{height:f?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:a?h.jsx("div",{className:"px-4 pt-4",children:h.jsx(cL,{})}):h.jsx(uL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{c.push("chat")}})})]})}function dI(){return h.jsxs(h.Fragment,{children:[h.jsx(cI,{}),h.jsx(uI,{})]})}const fI=[{path:"/",component:dI,name:"registration"}];function mx({name:e,avatar:t,className:n="text-neutral-500",textColor:r}){return h.jsxs(lt.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[h.jsx("div",{className:"min-w-max",children:h.jsxs("span",{children:[t&&h.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&h.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),h.jsx("div",{className:"flex flex-col",children:h.jsx("span",{className:we("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e})})]})}var pI=Object.defineProperty,hI=(e,t,n)=>t in e?pI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nf=(e,t,n)=>(hI(e,typeof t!="symbol"?t+"":t,n),n);let mI=class{constructor(){nf(this,"current",this.detect()),nf(this,"handoffState","pending"),nf(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"}},gu=new mI;function gI(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Kc(){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 gI(()=>{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=Kc();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 Ck(){let[e]=v.useState(Kc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let ri=(e,t)=>{gu.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function kk(e){let t=v.useRef(e);return ri(()=>{t.current=e},[e]),t}let cr=function(e){let t=kk(e);return $.useCallback((...n)=>t.current(...n),[t])};function ih(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Xc(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,Xc),r}var Tk=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tk||{}),Wr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wr||{});function Ek(){let e=yI();return v.useCallback(t=>vI({mergeRefs:e,...t}),[e])}function vI({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??xI;let l=_k(t,e);if(s)return Hl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return Hl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Xc(d?0:1,{0(){return null},1(){return Hl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Hl(l,n,r,o,a)}function Hl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=rf(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=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 f=!1,p=[];for(let[m,g]of Object.entries(t))typeof g=="boolean"&&(f=!0),g===!0&&p.push(m.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let m of p)c[`data-${m}`]=""}}if(s===v.Fragment&&(Object.keys(Ei(l)).length>0||Object.keys(Ei(c)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Ei(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(Ei(l)).concat(Object.keys(Ei(c))).map(f=>` - ${f}`).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(f=>` - ${f}`).join(`
107
107
  `)].join(`
108
- `))}else{let f=d.props,p=f==null?void 0:f.className,m=typeof p=="function"?(...y)=>rh(p(...y),l.className):rh(p,l.className),h=m?{className:m}:{},w=Ck(d.props,Ci(nf(l,["ref"])));for(let y in c)y in w&&delete c[y];return v.cloneElement(d,Object.assign({},w,c,u,{ref:i(hI(d),u.ref)},h))}return v.createElement(s,Object.assign({},nf(l,["ref"]),s!==v.Fragment&&u,s!==v.Fragment&&c),d)}function fI(){let e=v.useRef([]),t=v.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 pI(...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 Ck(...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 bg(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ci(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function nf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function hI(e){return L.version.split(".")[0]>="19"?e.props.ref:e.ref}let mI=Symbol();function kk(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=ur(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[mI]))?void 0:n}function gI(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(u=>u|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(u=>u&~l),[n]),a=v.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var vI={},hx,mx;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((hx=process==null?void 0:vI)==null?void 0:hx.NODE_ENV)==="test"&&typeof((mx=Element==null?void 0:Element.prototype)==null?void 0:mx.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 yI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(yI||{});function xI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function wI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=gI(e&&i?3:0),u=v.useRef(!1),d=v.useRef(!1),c=xk();return ti(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),bI(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var p;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(p=r==null?void 0:r.end)==null||p.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 bI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Qc();return CI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(SI(e,r))})}),s.dispose}function SI(e,t){var n,r;let i=Qc();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 CI(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 Sg=v.createContext(null);Sg.displayName="OpenClosedContext";var Pi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Pi||{});function Tk(){return v.useContext(Sg)}function kI({value:e,children:t}){return L.createElement(Sg.Provider,{value:e},t)}function TI(){let e=typeof document>"u";return"useSyncExternalStore"in of?(t=>t.useSyncExternalStore)(of)(()=>()=>{},()=>!1,()=>!e):!1}function Ek(){let e=TI(),[t,n]=v.useState(pu.isHandoffComplete);return t&&pu.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>pu.handoff(),[]),e?!1:t}function EI(){let e=v.useRef(!1);return ti(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function _k(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Rk)!==v.Fragment||L.Children.count(e.children)===1}let Kc=v.createContext(null);Kc.displayName="TransitionContext";var _I=(e=>(e.Visible="visible",e.Hidden="hidden",e))(_I||{});function jI(){let e=v.useContext(Kc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function RI(){let e=v.useContext(Xc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Xc=v.createContext(null);Xc.displayName="NestingContext";function Zc(e){return"children"in e?Zc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function jk(e,t){let n=wk(e),r=v.useRef([]),i=EI(),s=xk(),o=ur((p,m=Ur.Hidden)=>{let h=r.current.findIndex(({el:w})=>w===p);h!==-1&&(Yc(m,{[Ur.Unmount](){r.current.splice(h,1)},[Ur.Hidden](){r.current[h].state="hidden"}}),s.microTask(()=>{var w;!Zc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),a=ur(p=>{let m=r.current.find(({el:h})=>h===p);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,Ur.Unmount)}),l=v.useRef([]),u=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),c=ur((p,m,h)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([w])=>w!==p)),t==null||t.chains.current[m].push([p,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[m].push([p,new Promise(w=>{Promise.all(d.current[m].map(([y,x])=>x)).then(()=>w())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>h(m)):h(m)}),f=ur((p,m,h)=>{Promise.all(d.current[m].splice(0).map(([w,y])=>y)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>h(m))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:f,wait:u,chains:d}),[a,o,r,c,f,d,u])}let Rk=v.Fragment,Ak=bk.RenderStrategy;function AI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:f,leave:p,leaveFrom:m,leaveTo:h,...w}=e,[y,x]=v.useState(null),b=v.useRef(null),k=_k(e),T=kk(...k?[b,t,x]:t===null?[]:[t]),E=(n=w.unmount)==null||n?Ur.Unmount:Ur.Hidden,{show:j,appear:R,initial:M}=jI(),[N,A]=v.useState(j?"visible":"hidden"),W=RI(),{register:B,unregister:Q}=W;ti(()=>B(b),[B,b]),ti(()=>{if(E===Ur.Hidden&&b.current){if(j&&N!=="visible"){A("visible");return}return Yc(N,{hidden:()=>Q(b),visible:()=>B(b)})}},[N,b,B,Q,j,E]);let X=Ek();ti(()=>{if(k&&X&&N==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,N,X,k]);let J=M&&!R,ne=R&&j&&M,_=v.useRef(!1),O=jk(()=>{_.current||(A("hidden"),Q(b))},W),I=ur(Fe=>{_.current=!0;let et=Fe?"enter":"leave";O.onStart(b,et,tt=>{tt==="enter"?s==null||s():tt==="leave"&&(a==null||a())})}),z=ur(Fe=>{let et=Fe?"enter":"leave";_.current=!1,O.onStop(b,et,tt=>{tt==="enter"?o==null||o():tt==="leave"&&(l==null||l())}),et==="leave"&&!Zc(O)&&(A("hidden"),Q(b))});v.useEffect(()=>{k&&i||(I(j),z(j))},[j,k,i]);let U=!(!i||!k||!X||J),[,K]=wI(U,y,j,{start:I,end:z}),oe=Ci({ref:T,className:((r=rh(w.className,ne&&u,ne&&d,K.enter&&u,K.enter&&K.closed&&d,K.enter&&!K.closed&&c,K.leave&&p,K.leave&&!K.closed&&m,K.leave&&K.closed&&h,!K.transition&&j&&f))==null?void 0:r.trim())||void 0,...xI(K)}),xe=0;N==="visible"&&(xe|=Pi.Open),N==="hidden"&&(xe|=Pi.Closed),j&&N==="hidden"&&(xe|=Pi.Opening),!j&&N==="visible"&&(xe|=Pi.Closing);let re=Sk();return L.createElement(Xc.Provider,{value:O},L.createElement(kI,{value:xe},re({ourProps:oe,theirProps:w,defaultTag:Rk,features:Ak,visible:N==="visible",name:"Transition.Child"})))}function PI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=_k(e),l=kk(...a?[o,t]:t===null?[]:[t]);Ek();let u=Tk();if(n===void 0&&u!==null&&(n=(u&Pi.Open)===Pi.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=v.useState(n?"visible":"hidden"),f=jk(()=>{n||c("hidden")}),[p,m]=v.useState(!0),h=v.useRef([n]);ti(()=>{p!==!1&&h.current[h.current.length-1]!==n&&(h.current.push(n),m(!1))},[h,n]);let w=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);ti(()=>{n?c("visible"):!Zc(f)&&o.current!==null&&c("hidden")},[n,f]);let y={unmount:i},x=ur(()=>{var T;p&&m(!1),(T=e.beforeEnter)==null||T.call(e)}),b=ur(()=>{var T;p&&m(!1),(T=e.beforeLeave)==null||T.call(e)}),k=Sk();return L.createElement(Xc.Provider,{value:f},L.createElement(Kc.Provider,{value:w},k({ourProps:{...y,as:v.Fragment,children:L.createElement(Pk,{ref:l,...y,...s,beforeEnter:x,beforeLeave:b})},theirProps:{},defaultTag:v.Fragment,features:Ak,visible:d==="visible",name:"Transition"})))}function OI(e,t){let n=v.useContext(Kc)!==null,r=Tk()!==null;return L.createElement(L.Fragment,null,!n&&r?L.createElement(ih,{ref:t,...e}):L.createElement(Pk,{ref:t,...e}))}let ih=bg(PI),Pk=bg(AI),DI=bg(OI),NI=Object.assign(ih,{Child:DI,Root:ih});const Cg=v.createContext(void 0),ca=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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]),g.jsx(Cg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:g.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},MI=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(Cg),u=he(),d=n||"font-bold py-2 px-4 rounded-sm",c=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return g.jsx("div",{children:e==="a"?g.jsx(Cj,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:c+(o?" show":""),children:t}):g.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:u.getColor(S.ButtonBackground),color:u.getColor(S.ButtonText),borderRadius:u.getRadius(),...r},title:s,children:t})})},FI=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(Cg),a=he(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[u,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const c=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),p=()=>{if(s&&u==="right-end"&&c.current){const m=c.current;m.style.position="absolute",f==="rtl"?m.style.inset="0px auto auto 0px":m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&u==="start-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.transform="translate(0px, 20px)"}if(s&&u==="top-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="auto 0px 0px auto",m.style.margin="0px",m.style.transform="translate(-58px, -30px)"}if(s&&u==="bottom-start"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&u==="bottom-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 39px)"}if(s&&u==="top-start"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="auto auto 0px 0px",m.style.margin="0px",m.style.transform="translate(0px, -95px)"}if(s&&u==="left-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.right="0px",m.style.transform="translate(0px, -20px)"}return{}};return g.jsx(NI,{as:L.Fragment,show:s,children:m=>g.jsx(e,{ref:c,onClick:()=>o(!1),className:`${l} ${m==="entered"?"transition-all":""}`,style:{...p(),backgroundColor:a.getColor(S.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(S.ShadowColor)}, 0 8px 10px -6px ${a.getColor(S.ShadowColor)}`,...n},children:r})})};ca.Trigger=MI;ca.Content=FI;function LI({onChatClose:e}){const[t,n]=v.useState(!1),r=he(),i=tl(),s=fi(),o=()=>{s==null||s.emit(Nt.ChatClose,{}),localStorage.setItem("showActionButtons","false"),e()};return g.jsxs(g.Fragment,{children:[g.jsx(Ap,{children:t&&g.jsx(at.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(S.ModalOverlayColor)},children:g.jsxs(at.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(S.Background),borderRadius:r.getRadius()},children:[g.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(S.ChatCloseConfirmText)},children:i(Y.ChatCloseConfirm)}),g.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(S.FooterText)},children:i(Y.ChatCloseWarning)}),g.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[g.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(S.GreeterBackground),color:r.getColor(S.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(Y.CancelAction)}),g.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(S.ErrorBackground),color:r.getColor(S.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(Y.CloseAction)})]})]})})}),g.jsxs(ca,{className:"relative flex items-center h-full",children:[g.jsx(ca.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(Y.ChatSettings),children:g.jsx(ae.Menu,{className:"size-5",style:{color:r.getColor(S.HeaderText)}})}),g.jsx(Ap,{children:!t&&g.jsx(at.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:g.jsxs(ca.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(S.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[g.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(S.FooterText),borderBottomColor:r.getColor(S.DividerColor)},children:i(Y.ChatSettings)}),g.jsx("ul",{className:"py-2 px-2",children:g.jsx("li",{children:g.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(S.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[g.jsx(ae.X,{className:"w-4 h-4"}),g.jsx("span",{children:i(Y.ChatEndConversation)})]})})})]})})})]})]})}function II({text:e}){const n=he().getColor(S.LinkColor),i=(s=>{const o=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,a=s.split(/(<[^>]*>)/g);let l="",u=!1;for(let d=0;d<a.length;d++){const c=a[d];if(c.startsWith("<")&&c.endsWith(">"))if(c.match(/^<a\s/i)){if(c.includes("style="))l+=c;else{const f=c.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}u=!0}else c.match(/^<\/a>/i)?(l+=c,u=!1):l+=c;else if(!u&&c.trim()){const f=c.replace(o,p=>{const m=p.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(m)?m:`https://${m}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${m}</a>`});l+=f}else l+=c}return l})(e);return g.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const gx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function Ok({files:e,className:t,onDelete:n,hideName:r}){const i=ds(),[s,o]=v.useState(new Map);v.useEffect(()=>{const m=new Map;for(let h=0;h<e.length;h++){const w=e[h];if(w instanceof File){const y=URL.createObjectURL(w);m.set(h,y)}}return o(m),()=>{for(const h of m.values())URL.revokeObjectURL(h)}},[e]);const a=m=>{var w;return((w=(m instanceof File?m.name:m).split(".").pop())==null?void 0:w.toLowerCase())||""},l=m=>m instanceof File?m.name:m.split("/").pop()||m,u=m=>{const[h,w]=m.split(".");return h.length>10?`${h.slice(0,10)}...${w}`:m},d=m=>{const h=["jpg","jpeg","png","gif","bmp","webp","svg"],w=a(m);return h.includes(w)},c=(m,h)=>{if(m instanceof File){const w=s.get(h);w&&window.open(w,"_blank")}else window.open(m,"_blank")},f=(m,h)=>{m.stopPropagation(),n==null||n(h)},p=(m,h)=>m instanceof File?s.get(h)||"":m;return g.jsx("div",{className:ye("flex gap-2 w-full overflow-x-auto",t),children:e.map((m,h)=>{const w=l(m),y=a(m),x=d(m),b=p(m,h);return g.jsxs("div",{onClick:()=>c(m,h),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&g.jsx("button",{onClick:k=>f(k,h),className:ye("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:g.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:g.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),x?g.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:g.jsx("img",{src:b,alt:w,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):g.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:g.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:g.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),g.jsx("div",{className:ye("text-[10px] font-medium text-gray-600 uppercase",{[gx]:r}),children:y||"file"})]})}),g.jsx("div",{className:ye("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[gx]:r}),title:w,children:u(w)})]},h)})})}const $I={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},BI={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function zI({buttons:e,className:t=""}){const n=he();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?g.jsx(ae.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?g.jsx(ae.Phone,{className:"size-4"}):s.startsWith("mailto:")?g.jsx(ae.Mail,{className:"size-4"}):null;return g.jsx(at.div,{className:ye(t,"mt-2"),initial:"hidden",animate:"visible",variants:$I,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:g.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(S.Background)}f0`},children:g.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>g.jsxs(at.button,{variants:BI,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(S.GreeterBackground),color:n.getColor(S.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(S.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(S.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(S.ButtonBackground),a.currentTarget.style.color=n.getColor(S.ButtonText),a.currentTarget.style.borderColor=n.getColor(S.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(S.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(S.GreeterBackground),a.currentTarget.style.color=n.getColor(S.GreeterText),a.currentTarget.style.borderColor=n.getColor(S.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(S.ShadowColor)}30`},children:[g.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),g.jsx("span",{className:"font-medium",children:s.label})]}),g.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(S.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const VI={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},vx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function UI({messages:e,isTyping:t}){var c,f,p,m;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=kt(),a=he(),l=ds(),u=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},d=()=>{if(r.current){const{scrollTop:h,scrollHeight:w,clientHeight:y}=r.current,x=w-h<=y+10;s(x)}};return v.useEffect(()=>{(i||t)&&u()},[e,i,t]),g.jsxs("section",{onScroll:d,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((f=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:f.greeting_message)&&g.jsx("div",{className:"flex w-full items-center justify-start",children:g.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(S.MessageAdminBackground),color:a.getColor(S.MessageAdminText),borderRadius:a.getRadius()},children:(m=(p=o==null?void 0:o.appearance)==null?void 0:p.design)==null?void 0:m.greeting_message})}),g.jsx(Ap,{children:e.filter(h=>{var w;return(!!h.content||((w=h.files)==null?void 0:w.length)>0)&&h.content!==`
110
- `}).map((h,w)=>g.jsxs(at.div,{custom:w,initial:"hidden",animate:"visible",variants:VI,transition:{delay:w*.03,duration:.15,ease:"easeOut"},className:ye("flex flex-col w-full justify-center break-words",{"items-end":h.sender_type===Le.Customer||h.activity_type===Fn.ChatCreated,"items-start":h.sender_type===Le.User,"items-center":h.sender_type===Le.System||h.sender_type===Le.Activity}),children:[h.sender_type===Le.System&&g.jsx("div",{className:"whitespace-pre-wrap px-3 py-1.5 text-sm shadow-sm",style:{backgroundColor:a.getColor(S.MessageAdminBackground),color:a.getColor(S.MessageAdminText),borderRadius:a.getRadius()},children:h.content}),([Le.Customer,Le.User].includes(h.sender_type)||h.activity_type===Fn.ChatCreated)&&g.jsxs(at.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:h.sender_type===Le.User?a.getColor(S.MessageAdminBackground):a.getColor(S.MessageVisitorBackground),color:h.sender_type===Le.User?a.getColor(S.MessageAdminText):a.getColor(S.MessageVisitorText),borderRadius:a.getRadius()},children:[h.files&&h.files.length>0&&g.jsx(Ok,{files:h.files,className:"mb-1",hideName:!0}),h.sender_type===Le.User?g.jsx(II,{text:h.content}):h.content,h.created_at&&g.jsx("div",{className:"text-[0.5rem] text-right opacity-70",style:{color:h.sender_type===Le.User?a.getColor(S.MessageAdminText):a.getColor(S.MessageVisitorText)},children:vx(h.created_at)})]}),([Le.Customer,Le.User].includes(h.sender_type)||h.activity_type===Fn.ChatCreated)&&h.buttons&&h.buttons.length>0&&g.jsx("div",{className:ye("w-full",{"flex justify-end":h.sender_type===Le.Customer||h.activity_type===Fn.ChatCreated,"flex justify-start":h.sender_type===Le.User}),children:g.jsx("div",{className:"max-w-[85%]",children:g.jsx(zI,{buttons:h.buttons})})}),h.sender_type===Le.Activity&&h.activity_type!==Fn.ChatCreated&&g.jsx("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(S.MessageAdminBackground),color:a.getColor(S.MessageAdminText)},children:h.activity_type===Fn.AdminLeave?`${h.content.split("_")[2]} odadan ayrıldı`:h.activity_type===Fn.AdminJoin?`${h.content.split("_")[2]} odaya katıldı`:h.content}),Le.System===h.sender_type&&g.jsx("div",{className:"text-xs",style:{color:a.getColor(S.MessageAdminText)},children:h.created_at&&vx(h.created_at)})]},h.id||w))}),t&&g.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:g.jsx("div",{className:"flex items-center rounded-full px-3 py-1.5 shadow-none",style:{backgroundColor:a.getColor(S.MessageAdminBackground)},children:g.jsxs("div",{className:"flex space-x-1",children:[g.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(S.MessageAdminText),animationDelay:"0ms"}}),g.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(S.MessageAdminText),animationDelay:"150ms"}}),g.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(S.MessageAdminText),animationDelay:"300ms"}})]})})}),!i&&g.jsx("div",{className:ye("fixed",{"bottom-40 right-14":!l,"bottom-28 right-4":l}),children:g.jsx(Dt,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,w;(w=r.current)==null||w.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:g.jsx(ae.ArrowDown,{className:"size-4"})})}),g.jsx("div",{ref:n})]})}/**
108
+ `))}else{let f=d.props,p=f==null?void 0:f.className,m=typeof p=="function"?(...y)=>ih(p(...y),l.className):ih(p,l.className),g=m?{className:m}:{},x=_k(d.props,Ei(rf(l,["ref"])));for(let y in c)y in x&&delete c[y];return v.cloneElement(d,Object.assign({},x,c,u,{ref:i(wI(d),u.ref)},g))}return v.createElement(s,Object.assign({},rf(l,["ref"]),s!==v.Fragment&&u,s!==v.Fragment&&c),d)}function yI(){let e=v.useRef([]),t=v.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 xI(...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 _k(...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 Sg(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ei(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function rf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function wI(e){return $.version.split(".")[0]>="19"?e.props.ref:e.ref}let bI=Symbol();function jk(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=cr(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[bI]))?void 0:n}function SI(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(u=>u|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(u=>u&~l),[n]),a=v.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var CI={},gx,vx;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((gx=process==null?void 0:CI)==null?void 0:gx.NODE_ENV)==="test"&&typeof((vx=Element==null?void 0:Element.prototype)==null?void 0:vx.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 kI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(kI||{});function TI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function EI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=SI(e&&i?3:0),u=v.useRef(!1),d=v.useRef(!1),c=Ck();return ri(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),_I(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var p;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(p=r==null?void 0:r.end)==null||p.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 _I(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Kc();return AI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(jI(e,r))})}),s.dispose}function jI(e,t){var n,r;let i=Kc();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 AI(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 Cg=v.createContext(null);Cg.displayName="OpenClosedContext";var Ni=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ni||{});function Ak(){return v.useContext(Cg)}function RI({value:e,children:t}){return $.createElement(Cg.Provider,{value:e},t)}function PI(){let e=typeof document>"u";return"useSyncExternalStore"in af?(t=>t.useSyncExternalStore)(af)(()=>()=>{},()=>!1,()=>!e):!1}function Rk(){let e=PI(),[t,n]=v.useState(gu.isHandoffComplete);return t&&gu.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>gu.handoff(),[]),e?!1:t}function OI(){let e=v.useRef(!1);return ri(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pk(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Dk)!==v.Fragment||$.Children.count(e.children)===1}let Zc=v.createContext(null);Zc.displayName="TransitionContext";var DI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(DI||{});function NI(){let e=v.useContext(Zc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function MI(){let e=v.useContext(Jc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Jc=v.createContext(null);Jc.displayName="NestingContext";function ed(e){return"children"in e?ed(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ok(e,t){let n=kk(e),r=v.useRef([]),i=OI(),s=Ck(),o=cr((p,m=Wr.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(Xc(m,{[Wr.Unmount](){r.current.splice(g,1)},[Wr.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var x;!ed(r)&&i.current&&((x=n.current)==null||x.call(n))}))}),a=cr(p=>{let m=r.current.find(({el:g})=>g===p);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,Wr.Unmount)}),l=v.useRef([]),u=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),c=cr((p,m,g)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([x])=>x!==p)),t==null||t.chains.current[m].push([p,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[m].push([p,new Promise(x=>{Promise.all(d.current[m].map(([y,w])=>w)).then(()=>x())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(m)):g(m)}),f=cr((p,m,g)=>{Promise.all(d.current[m].splice(0).map(([x,y])=>y)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>g(m))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:f,wait:u,chains:d}),[a,o,r,c,f,d,u])}let Dk=v.Fragment,Nk=Tk.RenderStrategy;function FI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:f,leave:p,leaveFrom:m,leaveTo:g,...x}=e,[y,w]=v.useState(null),b=v.useRef(null),k=Pk(e),T=jk(...k?[b,t,w]:t===null?[]:[t]),E=(n=x.unmount)==null||n?Wr.Unmount:Wr.Hidden,{show:_,appear:R,initial:D}=NI(),[N,j]=v.useState(_?"visible":"hidden"),Y=MI(),{register:G,unregister:Z}=Y;ri(()=>G(b),[G,b]),ri(()=>{if(E===Wr.Hidden&&b.current){if(_&&N!=="visible"){j("visible");return}return Xc(N,{hidden:()=>Z(b),visible:()=>G(b)})}},[N,b,G,Z,_,E]);let ne=Rk();ri(()=>{if(k&&ne&&N==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,N,ne,k]);let J=D&&!R,oe=R&&_&&D,O=v.useRef(!1),M=Ok(()=>{O.current||(j("hidden"),Z(b))},Y),V=cr(ee=>{O.current=!0;let Ae=ee?"enter":"leave";M.onStart(b,Ae,nt=>{nt==="enter"?s==null||s():nt==="leave"&&(a==null||a())})}),U=cr(ee=>{let Ae=ee?"enter":"leave";O.current=!1,M.onStop(b,Ae,nt=>{nt==="enter"?o==null||o():nt==="leave"&&(l==null||l())}),Ae==="leave"&&!ed(M)&&(j("hidden"),Z(b))});v.useEffect(()=>{k&&i||(V(_),U(_))},[_,k,i]);let I=!(!i||!k||!ne||J),[,F]=EI(I,y,_,{start:V,end:U}),W=Ei({ref:T,className:((r=ih(x.className,oe&&u,oe&&d,F.enter&&u,F.enter&&F.closed&&d,F.enter&&!F.closed&&c,F.leave&&p,F.leave&&!F.closed&&m,F.leave&&F.closed&&g,!F.transition&&_&&f))==null?void 0:r.trim())||void 0,...TI(F)}),se=0;N==="visible"&&(se|=Ni.Open),N==="hidden"&&(se|=Ni.Closed),_&&N==="hidden"&&(se|=Ni.Opening),!_&&N==="visible"&&(se|=Ni.Closing);let z=Ek();return $.createElement(Jc.Provider,{value:M},$.createElement(RI,{value:se},z({ourProps:W,theirProps:x,defaultTag:Dk,features:Nk,visible:N==="visible",name:"Transition.Child"})))}function LI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=Pk(e),l=jk(...a?[o,t]:t===null?[]:[t]);Rk();let u=Ak();if(n===void 0&&u!==null&&(n=(u&Ni.Open)===Ni.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=v.useState(n?"visible":"hidden"),f=Ok(()=>{n||c("hidden")}),[p,m]=v.useState(!0),g=v.useRef([n]);ri(()=>{p!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),m(!1))},[g,n]);let x=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);ri(()=>{n?c("visible"):!ed(f)&&o.current!==null&&c("hidden")},[n,f]);let y={unmount:i},w=cr(()=>{var T;p&&m(!1),(T=e.beforeEnter)==null||T.call(e)}),b=cr(()=>{var T;p&&m(!1),(T=e.beforeLeave)==null||T.call(e)}),k=Ek();return $.createElement(Jc.Provider,{value:f},$.createElement(Zc.Provider,{value:x},k({ourProps:{...y,as:v.Fragment,children:$.createElement(Mk,{ref:l,...y,...s,beforeEnter:w,beforeLeave:b})},theirProps:{},defaultTag:v.Fragment,features:Nk,visible:d==="visible",name:"Transition"})))}function II(e,t){let n=v.useContext(Zc)!==null,r=Ak()!==null;return $.createElement($.Fragment,null,!n&&r?$.createElement(sh,{ref:t,...e}):$.createElement(Mk,{ref:t,...e}))}let sh=Sg(LI),Mk=Sg(FI),$I=Sg(II),BI=Object.assign(sh,{Child:$I,Root:sh});const kg=v.createContext(void 0),pa=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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]),h.jsx(kg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:h.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},zI=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(kg),u=ge(),d=n||"font-bold py-2 px-4 rounded-sm",c=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return h.jsx("div",{children:e==="a"?h.jsx(Ej,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:c+(o?" show":""),children:t}):h.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:u.getColor(S.ButtonBackground),color:u.getColor(S.ButtonText),borderRadius:u.getRadius(),...r},title:s,children:t})})},VI=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(kg),a=ge(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[u,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const c=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),p=()=>{if(s&&u==="right-end"&&c.current){const m=c.current;m.style.position="absolute",f==="rtl"?m.style.inset="0px auto auto 0px":m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&u==="start-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.transform="translate(0px, 20px)"}if(s&&u==="top-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="auto 0px 0px auto",m.style.margin="0px",m.style.transform="translate(-58px, -30px)"}if(s&&u==="bottom-start"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&u==="bottom-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 39px)"}if(s&&u==="top-start"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="auto auto 0px 0px",m.style.margin="0px",m.style.transform="translate(0px, -95px)"}if(s&&u==="left-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.right="0px",m.style.transform="translate(0px, -20px)"}return{}};return h.jsx(BI,{as:$.Fragment,show:s,children:m=>h.jsx(e,{ref:c,onClick:()=>o(!1),className:`${l} ${m==="entered"?"transition-all":""}`,style:{...p(),backgroundColor:a.getColor(S.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(S.ShadowColor)}, 0 8px 10px -6px ${a.getColor(S.ShadowColor)}`,...n},children:r})})};pa.Trigger=zI;pa.Content=VI;function UI({onChatClose:e}){const[t,n]=v.useState(!1),r=ge(),i=ll(),s=mi(),o=()=>{s==null||s.emit(vt.ChatClose,{}),localStorage.setItem("showActionButtons","false"),e()};return h.jsxs(h.Fragment,{children:[h.jsx(yp,{children:t&&h.jsx(lt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(S.ModalOverlayColor)},children:h.jsxs(lt.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(S.Background),borderRadius:r.getRadius()},children:[h.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(S.ChatCloseConfirmText)},children:i(X.ChatCloseConfirm)}),h.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(S.FooterText)},children:i(X.ChatCloseWarning)}),h.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[h.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(S.GreeterBackground),color:r.getColor(S.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(X.CancelAction)}),h.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(S.ErrorBackground),color:r.getColor(S.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(X.CloseAction)})]})]})})}),h.jsxs(pa,{className:"relative flex items-center h-full",children:[h.jsx(pa.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(X.ChatSettings),children:h.jsx(ae.Menu,{className:"size-5",style:{color:r.getColor(S.HeaderText)}})}),h.jsx(yp,{children:!t&&h.jsx(lt.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:h.jsxs(pa.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(S.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[h.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(S.FooterText),borderBottomColor:r.getColor(S.DividerColor)},children:i(X.ChatSettings)}),h.jsx("ul",{className:"py-2 px-2",children:h.jsx("li",{children:h.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(S.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[h.jsx(ae.X,{className:"w-4 h-4"}),h.jsx("span",{children:i(X.ChatEndConversation)})]})})})]})})})]})]})}function HI({text:e}){const n=ge().getColor(S.LinkColor),i=(s=>{const o=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,a=s.split(/(<[^>]*>)/g);let l="",u=!1;for(let d=0;d<a.length;d++){const c=a[d];if(c.startsWith("<")&&c.endsWith(">"))if(c.match(/^<a\s/i)){if(c.includes("style="))l+=c;else{const f=c.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}u=!0}else c.match(/^<\/a>/i)?(l+=c,u=!1):l+=c;else if(!u&&c.trim()){const f=c.replace(o,p=>{const m=p.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(m)?m:`https://${m}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${m}</a>`});l+=f}else l+=c}return l})(e);return h.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const yx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function Fk({files:e,className:t,onDelete:n,hideName:r}){const i=hs(),[s,o]=v.useState(new Map);v.useEffect(()=>{const m=new Map;for(let g=0;g<e.length;g++){const x=e[g];if(x instanceof File){const y=URL.createObjectURL(x);m.set(g,y)}}return o(m),()=>{for(const g of m.values())URL.revokeObjectURL(g)}},[e]);const a=m=>{var x;return((x=(m instanceof File?m.name:m).split(".").pop())==null?void 0:x.toLowerCase())||""},l=m=>m instanceof File?m.name:m.split("/").pop()||m,u=m=>{const[g,x]=m.split(".");return g.length>10?`${g.slice(0,10)}...${x}`:m},d=m=>{const g=["jpg","jpeg","png","gif","bmp","webp","svg"],x=a(m);return g.includes(x)},c=(m,g)=>{if(m instanceof File){const x=s.get(g);x&&window.open(x,"_blank")}else window.open(m,"_blank")},f=(m,g)=>{m.stopPropagation(),n==null||n(g)},p=(m,g)=>m instanceof File?s.get(g)||"":m;return h.jsx("div",{className:we("flex gap-2 w-full overflow-x-auto",t),children:e.map((m,g)=>{const x=l(m),y=a(m),w=d(m),b=p(m,g);return h.jsxs("div",{onClick:()=>c(m,g),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&h.jsx("button",{onClick:k=>f(k,g),className:we("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:h.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:h.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),w?h.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:h.jsx("img",{src:b,alt:x,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):h.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:h.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:h.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),h.jsx("div",{className:we("text-[10px] font-medium text-gray-600 uppercase",{[yx]:r}),children:y||"file"})]})}),h.jsx("div",{className:we("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[yx]:r}),title:x,children:u(x)})]},g)})})}const WI={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},qI={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function GI({buttons:e,className:t=""}){const n=ge();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?h.jsx(ae.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?h.jsx(ae.Phone,{className:"size-4"}):s.startsWith("mailto:")?h.jsx(ae.Mail,{className:"size-4"}):null;return h.jsx(lt.div,{className:we(t,"mt-2"),initial:"hidden",animate:"visible",variants:WI,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:h.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(S.Background)}f0`},children:h.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>h.jsxs(lt.button,{variants:qI,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(S.GreeterBackground),color:n.getColor(S.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(S.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(S.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(S.ButtonBackground),a.currentTarget.style.color=n.getColor(S.ButtonText),a.currentTarget.style.borderColor=n.getColor(S.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(S.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(S.GreeterBackground),a.currentTarget.style.color=n.getColor(S.GreeterText),a.currentTarget.style.borderColor=n.getColor(S.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(S.ShadowColor)}30`},children:[h.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),h.jsx("span",{className:"font-medium",children:s.label})]}),h.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(S.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const QI={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},xx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function YI({messages:e,isTyping:t}){var c,f,p,m;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=De(),a=ge(),l=hs(),u=()=>{var g;(g=n.current)==null||g.scrollIntoView({behavior:"smooth"})},d=()=>{if(r.current){const{scrollTop:g,scrollHeight:x,clientHeight:y}=r.current,w=x-g<=y+10;s(w)}};return v.useEffect(()=>{(i||t)&&u()},[e,i,t]),h.jsxs("section",{onScroll:d,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((f=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:f.greeting_message)&&h.jsx("div",{className:"flex w-full items-center justify-start",children:h.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(S.MessageAdminBackground),color:a.getColor(S.MessageAdminText),borderRadius:a.getRadius()},children:(m=(p=o==null?void 0:o.appearance)==null?void 0:p.design)==null?void 0:m.greeting_message})}),h.jsx(yp,{children:Array.isArray(e)&&e.filter(g=>{var x;return(!!g.content||((x=g.files)==null?void 0:x.length)>0)&&g.content!==`
110
+ `}).map((g,x)=>h.jsxs(lt.div,{custom:x,initial:"hidden",animate:"visible",variants:QI,transition:{delay:x*.03,duration:.15,ease:"easeOut"},className:we("flex flex-col w-full justify-center break-words",{"items-end":g.sender_type===$e.Customer||g.activity_type===Ln.ChatCreated,"items-start":g.sender_type===$e.User,"items-center":g.sender_type===$e.System||g.sender_type===$e.Activity}),children:[g.sender_type===$e.System&&h.jsx("div",{className:"whitespace-pre-wrap px-3 py-1.5 text-sm shadow-sm",style:{backgroundColor:a.getColor(S.MessageAdminBackground),color:a.getColor(S.MessageAdminText),borderRadius:a.getRadius()},children:g.content}),([$e.Customer,$e.User].includes(g.sender_type)||g.activity_type===Ln.ChatCreated)&&h.jsxs(lt.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:g.sender_type===$e.User?a.getColor(S.MessageAdminBackground):a.getColor(S.MessageVisitorBackground),color:g.sender_type===$e.User?a.getColor(S.MessageAdminText):a.getColor(S.MessageVisitorText),borderRadius:a.getRadius()},children:[g.files&&g.files.length>0&&h.jsx(Fk,{files:g.files,className:"mb-1",hideName:!0}),g.sender_type===$e.User?h.jsx(HI,{text:g.content}):g.content,g.created_at&&h.jsx("div",{className:"text-[0.5rem] text-right opacity-70",style:{color:g.sender_type===$e.User?a.getColor(S.MessageAdminText):a.getColor(S.MessageVisitorText)},children:xx(g.created_at)})]}),([$e.Customer,$e.User].includes(g.sender_type)||g.activity_type===Ln.ChatCreated)&&g.buttons&&g.buttons.length>0&&h.jsx("div",{className:we("w-full",{"flex justify-end":g.sender_type===$e.Customer||g.activity_type===Ln.ChatCreated,"flex justify-start":g.sender_type===$e.User}),children:h.jsx("div",{className:"max-w-[85%]",children:h.jsx(GI,{buttons:g.buttons})})}),g.sender_type===$e.Activity&&g.activity_type!==Ln.ChatCreated&&h.jsx("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(S.MessageAdminBackground),color:a.getColor(S.MessageAdminText)},children:g.activity_type===Ln.AdminLeave?`${g.content.split("_")[2]} odadan ayrıldı`:g.activity_type===Ln.AdminJoin?`${g.content.split("_")[2]} odaya katıldı`:g.content}),$e.System===g.sender_type&&h.jsx("div",{className:"text-xs",style:{color:a.getColor(S.MessageAdminText)},children:g.created_at&&xx(g.created_at)})]},g.id||x))}),t&&h.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:h.jsx("div",{className:"flex items-center rounded-full px-3 py-1.5 shadow-none",style:{backgroundColor:a.getColor(S.MessageAdminBackground)},children:h.jsxs("div",{className:"flex space-x-1",children:[h.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(S.MessageAdminText),animationDelay:"0ms"}}),h.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(S.MessageAdminText),animationDelay:"150ms"}}),h.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(S.MessageAdminText),animationDelay:"300ms"}})]})})}),!i&&h.jsx("div",{className:we("fixed",{"bottom-40 right-14":!l,"bottom-28 right-4":l}),children:h.jsx(Ct,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var g,x;(x=r.current)==null||x.scrollTo({top:(g=r.current)==null?void 0:g.scrollHeight,behavior:"smooth"})},children:h.jsx(ae.ArrowDown,{className:"size-4"})})}),h.jsx("div",{ref:n})]})}/**
111
111
  * @license lucide-react v0.511.0 - ISC
112
112
  *
113
113
  * This source code is licensed under the ISC license.
114
114
  * See the LICENSE file in the root directory of this source tree.
115
- */const HI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),WI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),yx=e=>{const t=WI(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),qI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
115
+ */const KI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),wx=e=>{const t=XI(e);return t.charAt(0).toUpperCase()+t.slice(1)},Lk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),ZI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
116
116
  * @license lucide-react v0.511.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */var GI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
120
+ */var JI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
121
121
  * @license lucide-react v0.511.0 - ISC
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */const QI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...GI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Dk("lucide",i),...!s&&!qI(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,d])=>v.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
125
+ */const e$=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...JI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Lk("lucide",i),...!s&&!ZI(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,d])=>v.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
126
126
  * @license lucide-react v0.511.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const YI=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(QI,{ref:s,iconNode:t,className:Dk(`lucide-${HI(yx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=yx(e),n};/**
130
+ */const t$=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(e$,{ref:s,iconNode:t,className:Lk(`lucide-${KI(wx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=wx(e),n};/**
131
131
  * @license lucide-react v0.511.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const KI=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Nk=YI("cloud-upload",KI);var Mk={exports:{}},XI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ZI=XI,JI=ZI;function Fk(){}function Lk(){}Lk.resetWarningCache=Fk;var e$=function(){function e(r,i,s,o,a,l){if(l!==JI){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Lk,resetWarningCache:Fk};return n.PropTypes=n,n};Mk.exports=e$();var t$=Mk.exports;const we=Zi(t$);function fs(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{u(r.next(d))}catch(c){o(c)}}function l(d){try{u(r.throw(d))}catch(c){o(c)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const n$=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function go(e,t,n){const r=r$(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&xx(r,"path",s),xx(r,"relativePath",s),r}function r$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=n$.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function xx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const i$=[".DS_Store","Thumbs.db"];function s$(e){return fs(this,void 0,void 0,function*(){return Ju(e)&&o$(e.dataTransfer)?c$(e.dataTransfer,e.type):a$(e)?l$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?u$(e):[]})}function o$(e){return Ju(e)}function a$(e){return Ju(e)&&Ju(e.target)}function Ju(e){return typeof e=="object"&&e!==null}function l$(e){return sh(e.target.files).map(t=>go(t))}function u$(e){return fs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>go(n))})}function c$(e,t){return fs(this,void 0,void 0,function*(){if(e.items){const n=sh(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(d$));return wx(Ik(r))}return wx(sh(e.files).map(n=>go(n)))})}function wx(e){return e.filter(t=>i$.indexOf(t.name)===-1)}function sh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function d$(e){if(typeof e.webkitGetAsEntry!="function")return bx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?$k(t):bx(e,t)}function Ik(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Ik(n):[n]],[])}function bx(e,t){return fs(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,go(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function f$(e){return fs(this,void 0,void 0,function*(){return e.isDirectory?$k(e):p$(e)})}function $k(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>fs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(f$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function p$(e){return fs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=go(r,e.fullPath);t(i)},r=>{n(r)})})})}var rf=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function Sx(e){return g$(e)||m$(e)||zk(e)||h$()}function h$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g$(e){if(Array.isArray(e))return oh(e)}function Cx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cx(Object(n),!0).forEach(function(r){Bk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Va(e,t){return x$(e)||y$(e,t)||zk(e,t)||v$()}function v$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zk(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function x$(e){if(Array.isArray(e))return e}var w$=typeof rf=="function"?rf:rf.default,b$="file-invalid-type",S$="file-too-large",C$="file-too-small",k$="too-many-files",T$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:b$,message:"File type must be ".concat(r)}},Tx=function(t){return{code:S$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ex=function(t){return{code:C$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},E$={code:k$,message:"Too many files"};function Vk(e,t){var n=e.type==="application/x-moz-file"||w$(e,t);return[n,n?null:T$(t)]}function Uk(e,t,n){if(ki(e.size))if(ki(t)&&ki(n)){if(e.size>n)return[!1,Tx(n)];if(e.size<t)return[!1,Ex(t)]}else{if(ki(t)&&e.size<t)return[!1,Ex(t)];if(ki(n)&&e.size>n)return[!1,Tx(n)]}return[!0,null]}function ki(e){return e!=null}function _$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var u=Vk(l,n),d=Va(u,1),c=d[0],f=Uk(l,r,i),p=Va(f,1),m=p[0],h=a?a(l):null;return c&&m&&!h})}function ec(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function _x(e){e.preventDefault()}function j$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function R$(e){return e.indexOf("Edge/")!==-1}function A$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return j$(e)||R$(e)}function Dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!ec(r)&&a&&a.apply(void 0,[r].concat(s)),ec(r)})}}function P$(){return"showOpenFilePicker"in window}function O$(e){if(ki(e)){var t=Object.entries(e).filter(function(n){var r=Va(n,2),i=r[0],s=r[1],o=!0;return Hk(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(Wk))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Va(r,2),s=i[0],o=i[1];return kx(kx({},n),{},Bk({},s,o))},{});return[{description:"Files",accept:t}]}return e}function D$(e){if(ki(e))return Object.entries(e).reduce(function(t,n){var r=Va(n,2),i=r[0],s=r[1];return[].concat(Sx(t),[i],Sx(s))},[]).filter(function(t){return Hk(t)||Wk(t)}).join(",")}function N$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function M$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Hk(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Wk(e){return/^.*\.[\w]+$/.test(e)}var F$=["children"],L$=["open"],I$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],$$=["refKey","onChange","onClick"];function B$(e){return U$(e)||V$(e)||qk(e)||z$()}function z$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function U$(e){if(Array.isArray(e))return ah(e)}function sf(e,t){return q$(e)||W$(e,t)||qk(e,t)||H$()}function H$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
139
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qk(e,t){if(e){if(typeof e=="string")return ah(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ah(e,t)}}function ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function q$(e){if(Array.isArray(e))return e}function jx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jx(Object(n),!0).forEach(function(r){lh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tc(e,t){if(e==null)return{};var n=G$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G$(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 ul=v.forwardRef(function(e,t){var n=e.children,r=tc(e,F$),i=Q$(r),s=i.open,o=tc(i,L$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),L.createElement(v.Fragment,null,n(je(je({},o),{},{open:s})))});ul.displayName="Dropzone";var Gk={disabled:!1,getFilesFromEvent:s$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ul.defaultProps=Gk;ul.propTypes={children:we.func,accept:we.objectOf(we.arrayOf(we.string)),multiple:we.bool,preventDropOnDocument:we.bool,noClick:we.bool,noKeyboard:we.bool,noDrag:we.bool,noDragEventsBubbling:we.bool,minSize:we.number,maxSize:we.number,maxFiles:we.number,disabled:we.bool,getFilesFromEvent:we.func,onFileDialogCancel:we.func,onFileDialogOpen:we.func,useFsAccessApi:we.bool,autoFocus:we.bool,onDragEnter:we.func,onDragLeave:we.func,onDragOver:we.func,onDrop:we.func,onDropAccepted:we.func,onDropRejected:we.func,onError:we.func,validator:we.func};var uh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Q$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=je(je({},Gk),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,w=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,j=t.noDragEventsBubbling,R=t.onError,M=t.validator,N=v.useMemo(function(){return D$(n)},[n]),A=v.useMemo(function(){return O$(n)},[n]),W=v.useMemo(function(){return typeof w=="function"?w:Rx},[w]),B=v.useMemo(function(){return typeof h=="function"?h:Rx},[h]),Q=v.useRef(null),X=v.useRef(null),J=v.useReducer(Y$,uh),ne=sf(J,2),_=ne[0],O=ne[1],I=_.isFocused,z=_.isFileDialogActive,U=v.useRef(typeof window<"u"&&window.isSecureContext&&y&&P$()),K=function(){!U.current&&z&&setTimeout(function(){if(X.current){var F=X.current.files;F.length||(O({type:"closeDialog"}),B())}},300)};v.useEffect(function(){return window.addEventListener("focus",K,!1),function(){window.removeEventListener("focus",K,!1)}},[X,z,B,U]);var oe=v.useRef([]),xe=function(F){Q.current&&Q.current.contains(F.target)||(F.preventDefault(),oe.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",_x,!1),document.addEventListener("drop",xe,!1)),function(){b&&(document.removeEventListener("dragover",_x),document.removeEventListener("drop",xe))}},[Q,b]),v.useEffect(function(){return!r&&x&&Q.current&&Q.current.focus(),function(){}},[Q,x,r]);var re=v.useCallback(function(D){R?R(D):console.error(D)},[R]),Fe=v.useCallback(function(D){D.preventDefault(),D.persist(),br(D),oe.current=[].concat(B$(oe.current),[D.target]),Vl(D)&&Promise.resolve(i(D)).then(function(F){if(!(ec(D)&&!j)){var G=F.length,ee=G>0&&_$({files:F,accept:N,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:M}),ue=G>0&&!ee;O({isDragAccept:ee,isDragReject:ue,isDragActive:!0,type:"setDraggedFiles"}),u&&u(D)}}).catch(function(F){return re(F)})},[i,u,re,j,N,o,s,a,l,M]),et=v.useCallback(function(D){D.preventDefault(),D.persist(),br(D);var F=Vl(D);if(F&&D.dataTransfer)try{D.dataTransfer.dropEffect="copy"}catch{}return F&&c&&c(D),!1},[c,j]),tt=v.useCallback(function(D){D.preventDefault(),D.persist(),br(D);var F=oe.current.filter(function(ee){return Q.current&&Q.current.contains(ee)}),G=F.indexOf(D.target);G!==-1&&F.splice(G,1),oe.current=F,!(F.length>0)&&(O({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vl(D)&&d&&d(D))},[Q,d,j]),It=v.useCallback(function(D,F){var G=[],ee=[];D.forEach(function(ue){var Ue=Vk(ue,N),nt=sf(Ue,2),Rn=nt[0],Xt=nt[1],hs=Uk(ue,o,s),er=sf(hs,2),Sr=er[0],ms=er[1],jo=M?M(ue):null;if(Rn&&Sr&&!jo)G.push(ue);else{var mi=[Xt,ms];jo&&(mi=mi.concat(jo)),ee.push({file:ue,errors:mi.filter(function(An){return An})})}}),(!a&&G.length>1||a&&l>=1&&G.length>l)&&(G.forEach(function(ue){ee.push({file:ue,errors:[E$]})}),G.splice(0)),O({acceptedFiles:G,fileRejections:ee,isDragReject:ee.length>0,type:"setFiles"}),f&&f(G,ee,F),ee.length>0&&m&&m(ee,F),G.length>0&&p&&p(G,F)},[O,a,N,o,s,l,f,p,m,M]),jn=v.useCallback(function(D){D.preventDefault(),D.persist(),br(D),oe.current=[],Vl(D)&&Promise.resolve(i(D)).then(function(F){ec(D)&&!j||It(F,D)}).catch(function(F){return re(F)}),O({type:"reset"})},[i,It,re,j]),pn=v.useCallback(function(){if(U.current){O({type:"openDialog"}),W();var D={multiple:a,types:A};window.showOpenFilePicker(D).then(function(F){return i(F)}).then(function(F){It(F,null),O({type:"closeDialog"})}).catch(function(F){N$(F)?(B(F),O({type:"closeDialog"})):M$(F)?(U.current=!1,X.current?(X.current.value=null,X.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(F)});return}X.current&&(O({type:"openDialog"}),W(),X.current.value=null,X.current.click())},[O,W,B,y,It,re,A,a]),pi=v.useCallback(function(D){!Q.current||!Q.current.isEqualNode(D.target)||(D.key===" "||D.key==="Enter"||D.keyCode===32||D.keyCode===13)&&(D.preventDefault(),pn())},[Q,pn]),xr=v.useCallback(function(){O({type:"focus"})},[]),ps=v.useCallback(function(){O({type:"blur"})},[]),hi=v.useCallback(function(){k||(A$()?setTimeout(pn,0):pn())},[k,pn]),Tt=function(F){return r?null:F},wr=function(F){return T?null:Tt(F)},Qe=function(F){return E?null:Tt(F)},br=function(F){j&&F.stopPropagation()},_o=v.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=D.refKey,G=F===void 0?"ref":F,ee=D.role,ue=D.onKeyDown,Ue=D.onFocus,nt=D.onBlur,Rn=D.onClick,Xt=D.onDragEnter,hs=D.onDragOver,er=D.onDragLeave,Sr=D.onDrop,ms=tc(D,I$);return je(je(lh({onKeyDown:wr(Dn(ue,pi)),onFocus:wr(Dn(Ue,xr)),onBlur:wr(Dn(nt,ps)),onClick:Tt(Dn(Rn,hi)),onDragEnter:Qe(Dn(Xt,Fe)),onDragOver:Qe(Dn(hs,et)),onDragLeave:Qe(Dn(er,tt)),onDrop:Qe(Dn(Sr,jn)),role:typeof ee=="string"&&ee!==""?ee:"presentation"},G,Q),!r&&!T?{tabIndex:0}:{}),ms)}},[Q,pi,xr,ps,hi,Fe,et,tt,jn,T,E,r]),P=v.useCallback(function(D){D.stopPropagation()},[]),V=v.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=D.refKey,G=F===void 0?"ref":F,ee=D.onChange,ue=D.onClick,Ue=tc(D,$$),nt=lh({accept:N,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Tt(Dn(ee,jn)),onClick:Tt(Dn(ue,P)),tabIndex:-1},G,X);return je(je({},nt),Ue)}},[X,n,a,jn,r]);return je(je({},_),{},{isFocused:I&&!r,getRootProps:_o,getInputProps:V,rootRef:Q,inputRef:X,open:Tt(pn)})}function Y$(e,t){switch(t.type){case"focus":return je(je({},e),{},{isFocused:!0});case"blur":return je(je({},e),{},{isFocused:!1});case"openDialog":return je(je({},uh),{},{isFileDialogActive:!0});case"closeDialog":return je(je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return je(je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return je(je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return je({},uh);default:return e}}function Rx(){}const Qk=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Ax=Object.values(vo).flat();function K$(e){var r;if(e.size>Qk)return{isValid:!1,error:`Dosya boyutu 5MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||Ax.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Ax.join(", ")}`}}function nc(e){for(const t of e){const n=K$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function Yk({onDrop:e}){const t=n=>{const r=nc(n);if(!r.isValid){alert(r.error);return}e(n)};return g.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:g.jsx(ul,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:Qk,children:({getRootProps:n,getInputProps:r})=>g.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[g.jsx("input",{...r()}),g.jsx("div",{className:"mb-3",children:g.jsx(Nk,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),g.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",g.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}Yk.Button=({onDrop:e})=>{const t=n=>{const r=nc(n);if(!r.isValid){Vn({description:r.error,variant:"error"});return}e(n)};return g.jsx(ul,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>g.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[g.jsx("input",{...r()}),g.jsx(Nk,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function X$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s}){const o=v.useRef(null),a=fi(),l=pR(t),u=he(),d=tl(),{setIsInputFocused:c}=kt(),[f,p]=v.useState(""),[m,h]=v.useState("3rem"),[w,y]=v.useState(!1),[x,b]=v.useState([]),[k,T]=v.useState(0),[E,j]=v.useState(!1),[R,M]=v.useState(0),[N,A]=v.useState(null),[W,B]=v.useState(()=>localStorage.getItem("showActionButtons")==="true");v.useEffect(()=>{if(r.length>0){const _=r[r.length-1];_.id!==N&&(A(_.id),_.sender_type===Le.User&&(T(0),j(!1)))}},[r,N]),v.useEffect(()=>{let _;return E&&R>0&&(_=window.setTimeout(()=>{M(O=>O<=1?(j(!1),T(0),0):O-1)},1e3)),()=>clearTimeout(_)},[E,R]),v.useEffect(()=>{const _=o.current;if(_){const O=()=>c(!0),I=()=>c(!1);return _.addEventListener("focus",O),_.addEventListener("blur",I),()=>{_.removeEventListener("focus",O),_.removeEventListener("blur",I)}}},[c]),v.useEffect(()=>{const _=()=>{B(!0),localStorage.setItem("showActionButtons","true")},O=()=>{B(!1),localStorage.setItem("showActionButtons","false")};return a==null||a.on(fe.ChatUserShowButton,_),a==null||a.on(fe.MessageUserCreate,O),()=>{a==null||a.off(fe.ChatUserShowButton,_),a==null||a.off(fe.MessageUserCreate,O)}},[a]),v.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&(B(!1),localStorage.setItem("showActionButtons","false"))},[r]),xg("paste",_=>{const O=_.clipboardData.items,I=[];for(const z of O){const U=z.getAsFile();U&&I.push(U)}if(I.length>0&&!n){Vn({description:d(Y.FileUploadDisabled),variant:"error"});return}if(I.length>0){const z=nc(I);if(!z.isValid){Vn({description:z.error,variant:"error"});return}b([...x,...I])}});const Q=async()=>{if(!f.trim()&&(!n||x.length===0))return;if(k>5&&!E){j(!0),M(3);return}if(E||w)return;const _=f,O=[...x];p(""),b([]),o.current&&(o.current.style.height="3rem",h("3rem")),y(!0);let I;if(n&&O.length>0){const[z,U]=await l.mutateAsync(O);if(!Za(U)){uN(z,U),y(!1),p(_),b(O);return}hR(z)&&(I=z.file_urls)}a==null||a.emit(Nt.MessageCreate,{content:_,files:I},z=>{e(z),y(!1),T(U=>U+1),B(!1),localStorage.setItem("showActionButtons","false")})},X=_=>{a==null||a.emit(Nt.MessageTyping,{content:_})},J=()=>{a==null||a.emit(Nt.ChatClose,{}),B(!1),localStorage.setItem("showActionButtons","false"),i==null||i()},ne=()=>{a==null||a.emit(Nt.ChatClose,{}),B(!1),localStorage.setItem("showActionButtons","false"),s==null||s()};return g.jsxs(g.Fragment,{children:[E&&g.jsxs(at.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:u.getColor(S.ErrorBackground),borderColor:u.getColor(S.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:u.getRadius()},children:[g.jsx(ae.XCircle,{className:"size-4 mr-2",style:{color:u.getColor(S.ErrorText)}}),g.jsx("span",{className:"text-sm font-medium",style:{color:u.getColor(S.ErrorText)},children:d(Y.RateLimitMessage).replace("{seconds}",R.toString())})]}),W&&g.jsxs(at.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex flex-col gap-2",children:[g.jsxs(Dt,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:J,style:{backgroundColor:u.getColor(S.ButtonBackground),color:u.getColor(S.ButtonText)},children:[g.jsx(ae.Star,{className:"size-5"}),g.jsx("span",{className:"font-medium",children:"Sohbeti Değerlendir"})]}),g.jsxs(Dt,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:ne,style:{backgroundColor:u.getColor(S.ButtonBackground),color:u.getColor(S.ButtonText)},children:[g.jsx(ae.Plus,{className:"size-5"}),g.jsx("span",{className:"font-medium",children:"Yeni Sohbet Oluştur"})]})]}),g.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:u.getColor(S.FooterBackground),borderRadius:u.getRadius()},onSubmit:_=>{_.preventDefault(),Q()},children:[n&&x&&x.length>0&&g.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:g.jsx(Ok,{files:x,onDelete:_=>{b(x.filter((O,I)=>I!==_))}})}),g.jsxs("div",{className:"grow relative",children:[g.jsx(pg,{id:"message",inputRef:o,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:m,maxHeight:"6rem"},placeholder:d(Y.MessagePlaceholder),value:f,maxLength:2e3,onChange:_=>{const O=_.target.value;if(O.length<=2e3&&(p(O),X(O)),O.length>0&&_.currentTarget.scrollHeight>_.currentTarget.clientHeight){const I=`${_.currentTarget.scrollHeight}px`;_.currentTarget.style.height=I,h(I)}else _.currentTarget.style.height="3rem",h("3rem")},onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),Q())}}),f.length>=500&&g.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:f.length>=2e3?u.getColor(S.ErrorText):u.getColor(S.FooterText),fontWeight:f.length>=2e3?"600":"normal"},children:2e3-f.length})]}),g.jsxs(at.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&g.jsx(Yk.Button,{onDrop:_=>{if(_.length){const O=nc(_);if(!O.isValid){console.log("val",O),Vn({description:O.error,variant:"error"});return}b([...x,..._])}}}),g.jsx(Dt,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:w||!f.trim()&&x.length===0||E,children:w?g.jsx(ae.Spin,{className:"size-6 animate-spin"}):E?g.jsx("span",{className:"text-xs font-bold",children:R}):g.jsx(ae.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function Z$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a}){var T,E;const{widget:l,setOpen:u,open:d,isHaveChat:c,isInputFocused:f}=kt(),p=he(),m=ds(),h=wg(),w=fi(),y=v.useRef(new Set),x=v.useRef(!1),b=()=>{e!=null&&e.agent_name?u(!1):(w.emit(Nt.ChatClose,{}),s())},k=v.useCallback(()=>{if(!w||!d||!c)return;const j=r.filter(R=>R.sender_type===Le.User&&!y.current.has(R.id)).map(R=>R.id);j.length!==0&&w.emit(Nt.MessageRead,{message_ids:j},R=>{if(R&&R.success===!0)for(const M of j)y.current.add(M)})},[w,r,d,c]);return v.useEffect(()=>{d&&(x.current=!0),d&&c&&(f||x.current)&&(k(),x.current=!1)},[d,c,f,k]),g.jsxs(g.Fragment,{children:[g.jsxs("header",{style:{backgroundColor:p.getColor(S.HeaderBackground),color:p.getColor(S.HeaderText),borderBottom:`1px solid ${p.getColor(S.HeaderBorder)}`,borderTopLeftRadius:m?"":p.getRadius(),borderTopRightRadius:m?"":p.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?g.jsx(oI,{name:e.agent_name,avatar:e.agent_avatar,textColor:p.getColor(S.HeaderText)}):g.jsx("div",{style:{color:p.getColor(S.HeaderText)},className:"font-medium",children:((E=(T=l==null?void 0:l.appearance)==null?void 0:T.design)==null?void 0:E.greeting_header)||"Bizimle Sohbet Edin"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(LI,{onChatClose:s}),!h&&!m&&g.jsx("button",{type:"button",style:{color:p.getColor(S.HeaderText)},onClick:b,children:g.jsx(ae.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),g.jsx(UI,{messages:r,isTyping:t||n.length>0}),g.jsx(X$,{client_id:(l==null?void 0:l.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:j=>{i(j)},onEvaluateChat:o,onNewChat:a}),g.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:p.getColor(S.FooterText),borderTop:`1px solid ${p.getColor(S.FooterBorder)}`,backgroundColor:p.getColor(S.FooterBackground)},children:[g.jsx("span",{children:"Powered by"}),g.jsx("span",{className:"font-medium",children:"Alfatek"}),g.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function J$({rating:e,onChange:t}){const n=he();return g.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return g.jsxs("div",{className:"relative w-10 h-10",children:[g.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(S.StarInactiveColor),fill:n.getColor(S.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:g.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"})}),s&&g.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:g.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(S.StarActiveColor),fill:n.getColor(S.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:g.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&&g.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(S.StarActiveColor),fill:n.getColor(S.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:g.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"})}),g.jsxs("div",{className:"absolute inset-0 flex",children:[g.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),g.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function eB({onOk:e}){const t=he(),n=tl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),u=fR(),[d,c]=v.useState(!1);v.useEffect(()=>{if(s){const h=setInterval(()=>{l(w=>w<=1?(clearInterval(h),e(!0),0):w-1)},1e3);return()=>clearInterval(h)}},[s]);const f=ym({comment:Hu()}),p=_S({init:{comment:""},schema:f,action:async h=>{const[w,y]=await u.mutateAsync({rating:r,comment:h.comment});if(Za(y)){o(!0);return}AS(w,{form:p})}}),m=()=>{e(!0)};return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("header",{style:{backgroundColor:s?t.getColor(S.RatingSuccessBackground):t.getColor(S.RatingHeaderBackground),color:s?t.getColor(S.RatingSuccessText):t.getColor(S.RatingHeaderText),borderBottom:`1px solid ${t.getColor(S.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[g.jsx("div",{className:"font-medium",children:n(s?Y.RatingHeaderThanks:Y.RatingHeaderEvaluate)}),g.jsx(Dt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:g.jsx(ae.X,{className:"size-4"})})]}),g.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[g.jsx("div",{className:"mb-4",style:{color:t.getColor(S.SuccessText)},children:g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),g.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(S.HeaderText)},children:n(Y.RatingThankYouTitle)}),g.jsx("p",{className:"mb-8",style:{color:t.getColor(S.FooterText)},children:n(Y.RatingThankYouDescription)}),g.jsx("p",{className:"mb-4",style:{color:t.getColor(S.FooterText)},children:n(Y.RatingCountdown).replace("{seconds}",a.toString())}),g.jsx(Dt,{onClick:m,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(S.ButtonBackground),color:t.getColor(S.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]}):g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:"text-center mb-6",children:g.jsx("p",{className:"text-base",style:{color:t.getColor(S.FooterText)},children:n(Y.RatingDescription)})}),g.jsxs("div",{className:"mb-6",children:[g.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(S.RatingRateConversationText)},children:n(Y.RatingRateConversation)}),g.jsx(J$,{rating:r,onChange:h=>{i(h),h>=1&&c(!1)}}),r>0&&g.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(S.FooterText)},children:n(Y.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?g.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(S.ErrorText)},children:n(Y.RatingMinimumError)}):null]}),g.jsxs("form",{onSubmit:p.handleSubmit,className:"space-y-5",children:[g.jsxs("div",{children:[g.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(S.InputText)},children:n(Y.RatingComment)}),g.jsx(pg,{id:"comment",onChange:p.handleChange,onBlur:p.handleBlur,value:p.values.comment,placeholder:n(Y.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(S.InputBorder),backgroundColor:t.getColor(S.InputBackground),color:t.getColor(S.InputText),borderRadius:t.getRadius()},error:p.errors.comment})]}),g.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[g.jsx(Dt,{type:"submit",onClick:h=>{r<1&&(h.preventDefault(),h.stopPropagation(),c(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(S.ButtonBackground),color:t.getColor(S.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingSubmit)}),g.jsx(Dt,{onClick:m,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(S.GreeterBackground),color:t.getColor(S.GreeterText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]})]})]})}),g.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(S.FooterText),borderTop:`1px solid ${t.getColor(S.FooterBorder)}`,backgroundColor:t.getColor(S.FooterBackground)},children:[g.jsx("span",{children:n(Y.PoweredBy)}),g.jsx("span",{className:"font-medium",children:"Alfatek"}),g.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function tB({children:e}){const{widget:t}=kt();return t?g.jsx("section",{className:"h-full w-full relative",children:e}):null}function nB({children:e}){const t=fi(),n=Gc(),[r,i]=v.useState(!0),[s,o]=v.useState(!1),a=v.useRef(!1);return v.useEffect(()=>{if(!t){i(!1);return}const l=()=>{i(!1),o(!1),a.current=!0},u=()=>{o(!0),n.push("registration")};return t.on(fe.Connect,l),t.on(fe.Disconnect,u),t.connected?(i(!1),a.current=!0):t.connect(),()=>{t.off(fe.Connect,l),t.off(fe.Disconnect,u)}},[t]),!t||s?(t||n.push("registration"),g.jsx(vp,{})):a.current&&!t.connected?g.jsx(vp,{}):r||!t.connected?g.jsx(Ob,{}):e}function rB(){const{widget:e,setOpen:t,setIsHaveChat:n,anyAdmin:r}=kt(),i=he(),s=fi(),o=nl(),a=Gc(),l=ds(),[u,d]=v.useState(null),[c,f]=v.useState([]),[p,m]=v.useState(!1),[h,w]=v.useState([]),[y,x]=v.useState([]),[b,k]=v.useState(!1),T=()=>{if(u){localStorage.setItem("showActionButtons","false"),d({...u,status:ys.Closed}),r||E(!1);return}E()},E=N=>{N||t(!1),k(!0),ra((e==null?void 0:e.link_id)||""),n(!1),d(null),f([]),w([]),yp(e.client_id,fo(o)).then(()=>{s==null||s.disconnect(),a.push("registration")})},j=()=>{T()},R=()=>{E(!0)};v.useEffect(()=>{s==null||s.emit(Nt.ChatView,{},N=>{if(N===null){t(!1),n(!1),yp(e.client_id,fo(o)),f([]),w([]),ra((e==null?void 0:e.link_id)||""),a.push("registration");return}d(N),n(!0)})},[]);const M=v.useCallback(N=>{u&&![ys.Closed,ys.Deleted].includes(u.status)&&f([...c,N])},[c,u]);return v.useEffect(()=>{if(!s)return;const N=_=>{const O={content:_.content,created_at:_.created_at,files:_.files,id:_._id,sender_type:_.sender_type,answers:_.answers,reply_id:_.reply_id,buttons:_.buttons};if(h.length>0){w(I=>[...I,O]);return}_.is_shortcut?w([O]):M(O),m(!1)},A=_=>{const O={content:_.content,created_at:_.created_at,files:_.files,id:_._id,sender_type:_.sender_type,activity_type:_.activity_type,answers:_.answers,reply_id:_.reply_id,buttons:_.buttons};M(O)},W=_=>{!_||!_.name?d(O=>O?{...O,agent_name:void 0,agent_avatar:void 0}:null):(u!=null&&u.agent_name||d({...u,agent_name:_.name,agent_avatar:_.avatar,is_customer_uploadable:(u==null?void 0:u.is_customer_uploadable)??!1,status:(u==null?void 0:u.status)??ys.Open}),x(O=>O.includes(_.name)?O:[...O,_.name]))},B=()=>{m(!0)},Q=()=>{T()},X=({is_customer_uploadable:_})=>{d(u?{...u,is_customer_uploadable:_}:null)},J=_=>{if(x(O=>O.filter(I=>I!==_.name)),!_.hasOtherAdmins)d(u?{...u,agent_name:void 0,agent_avatar:void 0}:null);else{const O=y.filter(I=>I!==_.name);O.length>0&&d(u?{...u,agent_name:O[0],agent_avatar:void 0}:null)}},ne=_=>{x(O=>O.includes(_.name)?O:[...O,_.name]),u!=null&&u.agent_name||d(u?{...u,agent_name:_.name,agent_avatar:void 0}:null)};return s.on(fe.MessageAgentCreate,N),s.on(fe.MessageUserCreate,A),s.on(fe.MessageCustomerCreate,A),s.on(fe.ChatUserAssignee,W),s.on(fe.MessageAgentTyping,B),s.on(fe.ChatUserClose,Q),s.on(fe.ChatToggleUpload,X),s.on(fe.ChatUserLeave,J),s.on(fe.ChatUserJoin,ne),()=>{s.off(fe.MessageAgentCreate,N),s.off(fe.MessageUserCreate,A),s.off(fe.MessageCustomerCreate,A),s.off(fe.ChatUserAssignee,W),s.off(fe.MessageAgentTyping,B),s.off(fe.ChatUserClose,Q),s.off(fe.ChatToggleUpload,X),s.off(fe.ChatUserLeave,J),s.off(fe.ChatUserJoin,ne)}},[M,y]),v.useEffect(()=>{!s||!u||s.emit(Nt.MessageList,{},N=>{f(N);const A=new Map;for(const B of N)B.sender_type===Le.Activity&&(B.activity_type===Fn.AdminJoin&&B.sender_name?A.set(B.sender_name,!0):B.activity_type===Fn.AdminLeave&&B.sender_name&&A.set(B.sender_name,!1));const W=Array.from(A.entries()).filter(([B,Q])=>Q).map(([B])=>B);x(W)})},[s,u]),v.useEffect(()=>{const N=setTimeout(()=>{m(!1)},2e3);return()=>clearTimeout(N)},[p]),v.useEffect(()=>{if(!e||h.length===0)return;let N=0;e.writing_timeout&&(N=[...h[0].content].length/e.writing_timeout,N<0&&(N=0));const A=setTimeout(()=>{M(h[0]),w(h.slice(1))},N*1e3);return()=>clearTimeout(A)},[h,e]),b?g.jsx(vp,{}):g.jsxs(g.Fragment,{children:[g.jsx("div",{id:"chat-alert-portal"}),g.jsx("div",{className:`h-full w-full ${l?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:l?"100%":"",minHeight:l?"var(--app-height, 100dvh)":"",maxHeight:l?"var(--app-height, 100dvh)":"",backgroundColor:i.getColor(S.Background)},children:u?u.status===ys.Closed?g.jsx(eB,{onOk:E}):g.jsx(Z$,{chat:u,isTyping:p,messages:c,shortcutMessages:h,onNewMessage:M,onChatClose:T,onEvaluateChat:j,onNewChat:R}):g.jsx(Ob,{})})]})}function iB(){return tI(),null}function sB(){return g.jsxs(nB,{children:[g.jsx(tB,{children:g.jsx(rB,{})}),g.jsx(iB,{})]})}const oB=[{path:"/chat",component:sB,name:"chat"}],Kk=[...oB],Xk=[...sI],aB=[...Kk,...Xk];function ch({text:e}){var u,d,c,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=kt(),o=he(),a=tl(),l=()=>{i(!1),s&&s()};return r?g.jsxs(at.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:ye("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(S.TooltipBackground),color:o.getColor(S.TooltipText)},children:[g.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(Y.CloseButtonAria),children:g.jsx(ae.X,{className:"size-3"})}),g.jsx(at.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(S.TooltipText)},children:e||(n?(d=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:d.tooltip_message_active:(f=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:f.tooltip_message)||a(n?Y.TooltipActive:Y.TooltipDefault)}),g.jsx("div",{className:ye("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const lB="/notify.mp3",uB=async e=>{await new Audio(e||lB).play()};function Px({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=fi(),{isHaveChat:i,open:s,soundPath:o}=kt(),[a,l]=v.useState(!0),[u,d]=v.useState(0),[c,f]=v.useState(null),p=tl(),m=()=>{uB(o)},h=(w,y)=>{if(c&&clearInterval(c),w||!i||y===0||Number.isNaN(y)){window.document.title=n,f(null);return}const x=setInterval(()=>{if(w||!i||y===0||Number.isNaN(y)){window.document.title=n,clearInterval(x),f(null);return}const b=`${y} ${p(Y.NewMessagesNotification)} - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return f(x),()=>{clearInterval(x),f(null)}};return v.useEffect(()=>h(s&&a,u),[u,s,a]),v.useEffect(()=>{const w=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",w,!1),()=>{document.removeEventListener("visibilitychange",w)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const w=()=>{!i||s&&a||(d(y=>y+1),m())};return r.on(fe.MessageAgentCreate,w),r.on(fe.ChatUserAssignee,m),()=>{r.off(fe.MessageAgentCreate,w),r.off(fe.ChatUserAssignee,m)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:g.jsx(ch,{text:p(Y.NewMessagesNotification)})}function cB({children:e,border:t}){var X,J,ne,_;const n=fi(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:u}=kt(),[d]=v.useState(!0),c=Gc(),f=nl(),p=el(),m=he(),h=ds(),w=wg(),[y,x]=v.useState({x:0,y:0}),b=H4(),k=v.useRef(null),T=v.useRef(null),[E,j]=v.useState(!1),[R,M]=v.useState(!1);v.useEffect(()=>((()=>{j("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{j(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{j(!0)})}),[]),v.useEffect(()=>{o&&p.pathname==="/"&&f&&f.accessToken&&c.push("chat")},[o]),v.useEffect(()=>{r?requestAnimationFrame(()=>{M(!0)}):M(!1)},[r]);const N=O=>{if(!k.current||!T.current)return O;const I=k.current.getBoundingClientRect(),z={width:window.innerWidth,height:window.innerHeight},U={top:20,right:20,bottom:40,left:20};let K=O.x,oe=O.y;return I.right+K-y.x>z.width-U.right&&(K=z.width-U.right-I.width-(I.left-y.x)),I.left+K-y.x<U.left&&(K=U.left-(I.left-y.x)),I.bottom+oe-y.y>z.height-U.bottom&&(oe=z.height-U.bottom-I.height-(I.top-y.y)),I.top+oe-y.y<U.top&&(oe=U.top-(I.top-y.y)),{x:K,y:oe}},A=()=>{i(!0),n&&(n.emit(Nt.WidgetOpen,{}),l&&l())},W=()=>{i(!1),n&&(n.emit(Nt.WidgetClose,{}),u&&u())},B=()=>{i(!1),s(!1),yp(a.client_id,fo(f)),c.push("registration")};v.useEffect(()=>{if(h&&(o||w)&&A(),!(!n||!a))return n.on(fe.Banned,B),()=>{n.off(fe.Banned,B)}},[]);function Q(O){E&&b.start(O)}return g.jsxs("section",{className:"relative w-full h-full",ref:T,children:[r&&g.jsx("div",{className:ye("fixed z-300 overflow-hidden transition-all duration-300 ease-out",{"border border-solid dark:border-zink-500":t,"bottom-12 right-12 rounded-xl":!h,"!bottom-0 !right-0":h,"opacity-100 scale-100 translate-y-0":R,"opacity-0 scale-95 translate-y-2":!R}),style:{width:h?"100%":((J=(X=a==null?void 0:a.appearance)==null?void 0:X.design)==null?void 0:J.width)||"21rem",height:h?"var(--app-height, 100dvh)":((_=(ne=a==null?void 0:a.appearance)==null?void 0:ne.design)==null?void 0:_.height)||"30rem",left:h?"0":"",right:h?"0px !important":"",maxHeight:h?"var(--app-height, 100dvh)":"",boxShadow:h?"":`0 10px 25px -5px ${m.getColor(S.ShadowColor)}, 0 8px 10px -6px ${m.getColor(S.ShadowColor)}`,backgroundColor:m.getColor(S.Background)},children:e}),!E&&g.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[g.jsx(Px,{fallback:g.jsx(ch,{}),fallbackOpen:d}),!r&&g.jsxs(Dt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:A,children:[g.jsx(at.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:ye("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(S.ButtonBackground)}}),g.jsx(ae.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!h&&g.jsx(Dt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:W,children:g.jsx(ae.X,{className:"size-7"})},"desktop-close-button")]}),E&&g.jsxs(at.div,{ref:k,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:y.x,y:y.y},drag:E,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(O,I)=>{const z={x:y.x+I.offset.x,y:y.y+I.offset.y},U=N(z);x(U)},children:[g.jsx(Px,{fallback:g.jsx(ch,{}),fallbackOpen:d}),!r&&g.jsx("div",{className:"cursor-move",onPointerDown:Q,children:g.jsxs(Dt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:A,children:[g.jsx(at.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:ye("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(S.ButtonBackground)}}),g.jsx(ae.Chat,{className:"size-7"})]})},"chat-button"),r&&!h&&g.jsx(Dt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:W,children:g.jsx(ae.X,{className:"size-7"})},"desktop-close-button")]})]})}function dB(e){const{widget:t}=kt();return g.jsx(Aj,{widget:t,children:g.jsx(cB,{...e})})}function fB(){return g.jsx(pj,{future:{v7_startTransition:!0},children:g.jsx(dB,{border:!0,children:g.jsxs(mj,{children:[Kk.map((e,t)=>g.jsx(hp,{path:e.path,element:g.jsx(e.component,{})},t)),Xk.map((e,t)=>g.jsx(hp,{path:e.path,element:g.jsx(e.component,{})},t))]})})})}const pB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=b2(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:u,setOpen:d,setOnTooltipClose:c,setIsTooltipVisible:f,setOnOpen:p,setOnClose:m,onOpen:h,onClose:w}=kt();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),h&&h()},close:()=>{d(!1),w&&w()}})),v.useEffect(()=>{r&&C2(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&u(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&f(!1),e.onOpen&&p(e.onOpen),e.onClose&&m(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?g.jsx("div",{children:"Loading..."}):s||!r||!o?null:g.jsx(Y4,{children:g.jsx(JL,{children:g.jsx(fB,{})})})}),hB=new r2;let Ox=null;function mB(e){if(!e.container)return;const t=L.createRef();return Ox=nb(e.container),Ox.render(g.jsxs(l2,{client:hB,children:[g.jsx(pB,{...e,ref:t}),g.jsx(iN,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=mB});export default gB();
135
+ */const n$=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Ik=t$("cloud-upload",n$);var $k={exports:{}},r$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i$=r$,s$=i$;function Bk(){}function zk(){}zk.resetWarningCache=Bk;var o$=function(){function e(r,i,s,o,a,l){if(l!==s$){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:zk,resetWarningCache:Bk};return n.PropTypes=n,n};$k.exports=o$();var a$=$k.exports;const be=ts(a$);function ms(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{u(r.next(d))}catch(c){o(c)}}function l(d){try{u(r.throw(d))}catch(c){o(c)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const l$=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function yo(e,t,n){const r=u$(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&bx(r,"path",s),bx(r,"relativePath",s),r}function u$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=l$.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function bx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const c$=[".DS_Store","Thumbs.db"];function d$(e){return ms(this,void 0,void 0,function*(){return nc(e)&&f$(e.dataTransfer)?g$(e.dataTransfer,e.type):p$(e)?h$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?m$(e):[]})}function f$(e){return nc(e)}function p$(e){return nc(e)&&nc(e.target)}function nc(e){return typeof e=="object"&&e!==null}function h$(e){return oh(e.target.files).map(t=>yo(t))}function m$(e){return ms(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>yo(n))})}function g$(e,t){return ms(this,void 0,void 0,function*(){if(e.items){const n=oh(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(v$));return Sx(Vk(r))}return Sx(oh(e.files).map(n=>yo(n)))})}function Sx(e){return e.filter(t=>c$.indexOf(t.name)===-1)}function oh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function v$(e){if(typeof e.webkitGetAsEntry!="function")return Cx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Uk(t):Cx(e,t)}function Vk(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Vk(n):[n]],[])}function Cx(e,t){return ms(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,yo(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return yo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function y$(e){return ms(this,void 0,void 0,function*(){return e.isDirectory?Uk(e):x$(e)})}function Uk(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>ms(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(y$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function x$(e){return ms(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=yo(r,e.fullPath);t(i)},r=>{n(r)})})})}var sf=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function kx(e){return S$(e)||b$(e)||Wk(e)||w$()}function w$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function S$(e){if(Array.isArray(e))return ah(e)}function Tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ex(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(n),!0).forEach(function(r){Hk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qa(e,t){return T$(e)||k$(e,t)||Wk(e,t)||C$()}function C$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wk(e,t){if(e){if(typeof e=="string")return ah(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ah(e,t)}}function ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function T$(e){if(Array.isArray(e))return e}var E$=typeof sf=="function"?sf:sf.default,_$="file-invalid-type",j$="file-too-large",A$="file-too-small",R$="too-many-files",P$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:_$,message:"File type must be ".concat(r)}},_x=function(t){return{code:j$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},jx=function(t){return{code:A$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},O$={code:R$,message:"Too many files"};function qk(e,t){var n=e.type==="application/x-moz-file"||E$(e,t);return[n,n?null:P$(t)]}function Gk(e,t,n){if(_i(e.size))if(_i(t)&&_i(n)){if(e.size>n)return[!1,_x(n)];if(e.size<t)return[!1,jx(t)]}else{if(_i(t)&&e.size<t)return[!1,jx(t)];if(_i(n)&&e.size>n)return[!1,_x(n)]}return[!0,null]}function _i(e){return e!=null}function D$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var u=qk(l,n),d=qa(u,1),c=d[0],f=Gk(l,r,i),p=qa(f,1),m=p[0],g=a?a(l):null;return c&&m&&!g})}function rc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Wl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ax(e){e.preventDefault()}function N$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function M$(e){return e.indexOf("Edge/")!==-1}function F$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return N$(e)||M$(e)}function Nn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!rc(r)&&a&&a.apply(void 0,[r].concat(s)),rc(r)})}}function L$(){return"showOpenFilePicker"in window}function I$(e){if(_i(e)){var t=Object.entries(e).filter(function(n){var r=qa(n,2),i=r[0],s=r[1],o=!0;return Qk(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(Yk))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=qa(r,2),s=i[0],o=i[1];return Ex(Ex({},n),{},Hk({},s,o))},{});return[{description:"Files",accept:t}]}return e}function $$(e){if(_i(e))return Object.entries(e).reduce(function(t,n){var r=qa(n,2),i=r[0],s=r[1];return[].concat(kx(t),[i],kx(s))},[]).filter(function(t){return Qk(t)||Yk(t)}).join(",")}function B$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function z$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Qk(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Yk(e){return/^.*\.[\w]+$/.test(e)}var V$=["children"],U$=["open"],H$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],W$=["refKey","onChange","onClick"];function q$(e){return Y$(e)||Q$(e)||Kk(e)||G$()}function G$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y$(e){if(Array.isArray(e))return lh(e)}function of(e,t){return Z$(e)||X$(e,t)||Kk(e,t)||K$()}function K$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kk(e,t){if(e){if(typeof e=="string")return lh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lh(e,t)}}function lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function Z$(e){if(Array.isArray(e))return e}function Rx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rx(Object(n),!0).forEach(function(r){uh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e,t){if(e==null)return{};var n=J$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}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}var fl=v.forwardRef(function(e,t){var n=e.children,r=ic(e,V$),i=eB(r),s=i.open,o=ic(i,U$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),$.createElement(v.Fragment,null,n(Re(Re({},o),{},{open:s})))});fl.displayName="Dropzone";var Xk={disabled:!1,getFilesFromEvent:d$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};fl.defaultProps=Xk;fl.propTypes={children:be.func,accept:be.objectOf(be.arrayOf(be.string)),multiple:be.bool,preventDropOnDocument:be.bool,noClick:be.bool,noKeyboard:be.bool,noDrag:be.bool,noDragEventsBubbling:be.bool,minSize:be.number,maxSize:be.number,maxFiles:be.number,disabled:be.bool,getFilesFromEvent:be.func,onFileDialogCancel:be.func,onFileDialogOpen:be.func,useFsAccessApi:be.bool,autoFocus:be.bool,onDragEnter:be.func,onDragLeave:be.func,onDragOver:be.func,onDrop:be.func,onDropAccepted:be.func,onDropRejected:be.func,onError:be.func,validator:be.func};var ch={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function eB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Xk),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,x=t.onFileDialogOpen,y=t.useFsAccessApi,w=t.autoFocus,b=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,R=t.onError,D=t.validator,N=v.useMemo(function(){return $$(n)},[n]),j=v.useMemo(function(){return I$(n)},[n]),Y=v.useMemo(function(){return typeof x=="function"?x:Px},[x]),G=v.useMemo(function(){return typeof g=="function"?g:Px},[g]),Z=v.useRef(null),ne=v.useRef(null),J=v.useReducer(tB,ch),oe=of(J,2),O=oe[0],M=oe[1],V=O.isFocused,U=O.isFileDialogActive,I=v.useRef(typeof window<"u"&&window.isSecureContext&&y&&L$()),F=function(){!I.current&&U&&setTimeout(function(){if(ne.current){var L=ne.current.files;L.length||(M({type:"closeDialog"}),G())}},300)};v.useEffect(function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}},[ne,U,G,I]);var W=v.useRef([]),se=function(L){Z.current&&Z.current.contains(L.target)||(L.preventDefault(),W.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Ax,!1),document.addEventListener("drop",se,!1)),function(){b&&(document.removeEventListener("dragover",Ax),document.removeEventListener("drop",se))}},[Z,b]),v.useEffect(function(){return!r&&w&&Z.current&&Z.current.focus(),function(){}},[Z,w,r]);var z=v.useCallback(function(P){R?R(P):console.error(P)},[R]),ee=v.useCallback(function(P){P.preventDefault(),P.persist(),Cr(P),W.current=[].concat(q$(W.current),[P.target]),Wl(P)&&Promise.resolve(i(P)).then(function(L){if(!(rc(P)&&!_)){var K=L.length,re=K>0&&D$({files:L,accept:N,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:D}),de=K>0&&!re;M({isDragAccept:re,isDragReject:de,isDragActive:!0,type:"setDraggedFiles"}),u&&u(P)}}).catch(function(L){return z(L)})},[i,u,z,_,N,o,s,a,l,D]),Ae=v.useCallback(function(P){P.preventDefault(),P.persist(),Cr(P);var L=Wl(P);if(L&&P.dataTransfer)try{P.dataTransfer.dropEffect="copy"}catch{}return L&&c&&c(P),!1},[c,_]),nt=v.useCallback(function(P){P.preventDefault(),P.persist(),Cr(P);var L=W.current.filter(function(re){return Z.current&&Z.current.contains(re)}),K=L.indexOf(P.target);K!==-1&&L.splice(K,1),W.current=L,!(L.length>0)&&(M({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Wl(P)&&d&&d(P))},[Z,d,_]),It=v.useCallback(function(P,L){var K=[],re=[];P.forEach(function(de){var We=qk(de,N),rt=of(We,2),Rn=rt[0],Xt=rt[1],vs=Gk(de,o,s),tr=of(vs,2),kr=tr[0],ys=tr[1],Ro=D?D(de):null;if(Rn&&kr&&!Ro)K.push(de);else{var yi=[Xt,ys];Ro&&(yi=yi.concat(Ro)),re.push({file:de,errors:yi.filter(function(Pn){return Pn})})}}),(!a&&K.length>1||a&&l>=1&&K.length>l)&&(K.forEach(function(de){re.push({file:de,errors:[O$]})}),K.splice(0)),M({acceptedFiles:K,fileRejections:re,isDragReject:re.length>0,type:"setFiles"}),f&&f(K,re,L),re.length>0&&m&&m(re,L),K.length>0&&p&&p(K,L)},[M,a,N,o,s,l,f,p,m,D]),An=v.useCallback(function(P){P.preventDefault(),P.persist(),Cr(P),W.current=[],Wl(P)&&Promise.resolve(i(P)).then(function(L){rc(P)&&!_||It(L,P)}).catch(function(L){return z(L)}),M({type:"reset"})},[i,It,z,_]),hn=v.useCallback(function(){if(I.current){M({type:"openDialog"}),Y();var P={multiple:a,types:j};window.showOpenFilePicker(P).then(function(L){return i(L)}).then(function(L){It(L,null),M({type:"closeDialog"})}).catch(function(L){B$(L)?(G(L),M({type:"closeDialog"})):z$(L)?(I.current=!1,ne.current?(ne.current.value=null,ne.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):z(L)});return}ne.current&&(M({type:"openDialog"}),Y(),ne.current.value=null,ne.current.click())},[M,Y,G,y,It,z,j,a]),gi=v.useCallback(function(P){!Z.current||!Z.current.isEqualNode(P.target)||(P.key===" "||P.key==="Enter"||P.keyCode===32||P.keyCode===13)&&(P.preventDefault(),hn())},[Z,hn]),br=v.useCallback(function(){M({type:"focus"})},[]),gs=v.useCallback(function(){M({type:"blur"})},[]),vi=v.useCallback(function(){k||(F$()?setTimeout(hn,0):hn())},[k,hn]),_t=function(L){return r?null:L},Sr=function(L){return T?null:_t(L)},Ke=function(L){return E?null:_t(L)},Cr=function(L){_&&L.stopPropagation()},Ao=v.useMemo(function(){return function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},L=P.refKey,K=L===void 0?"ref":L,re=P.role,de=P.onKeyDown,We=P.onFocus,rt=P.onBlur,Rn=P.onClick,Xt=P.onDragEnter,vs=P.onDragOver,tr=P.onDragLeave,kr=P.onDrop,ys=ic(P,H$);return Re(Re(uh({onKeyDown:Sr(Nn(de,gi)),onFocus:Sr(Nn(We,br)),onBlur:Sr(Nn(rt,gs)),onClick:_t(Nn(Rn,vi)),onDragEnter:Ke(Nn(Xt,ee)),onDragOver:Ke(Nn(vs,Ae)),onDragLeave:Ke(Nn(tr,nt)),onDrop:Ke(Nn(kr,An)),role:typeof re=="string"&&re!==""?re:"presentation"},K,Z),!r&&!T?{tabIndex:0}:{}),ys)}},[Z,gi,br,gs,vi,ee,Ae,nt,An,T,E,r]),A=v.useCallback(function(P){P.stopPropagation()},[]),H=v.useMemo(function(){return function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},L=P.refKey,K=L===void 0?"ref":L,re=P.onChange,de=P.onClick,We=ic(P,W$),rt=uh({accept:N,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:_t(Nn(re,An)),onClick:_t(Nn(de,A)),tabIndex:-1},K,ne);return Re(Re({},rt),We)}},[ne,n,a,An,r]);return Re(Re({},O),{},{isFocused:V&&!r,getRootProps:Ao,getInputProps:H,rootRef:Z,inputRef:ne,open:_t(hn)})}function tB(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},ch),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},ch);default:return e}}function Px(){}const Zk=5*1024*1024,xo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Ox=Object.values(xo).flat();function nB(e){var r;if(e.size>Zk)return{isValid:!1,error:`Dosya boyutu 5MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(xo).includes(e.type)||Ox.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Ox.join(", ")}`}}function sc(e){for(const t of e){const n=nB(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function Jk({onDrop:e}){const t=n=>{const r=sc(n);if(!r.isValid){alert(r.error);return}e(n)};return h.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:h.jsx(fl,{onDrop:t,accept:Object.keys(xo).reduce((n,r)=>(n[r]=xo[r],n),{}),maxSize:Zk,children:({getRootProps:n,getInputProps:r})=>h.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[h.jsx("input",{...r()}),h.jsx("div",{className:"mb-3",children:h.jsx(Ik,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),h.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",h.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}Jk.Button=({onDrop:e})=>{const t=n=>{const r=sc(n);if(!r.isValid){Hn({description:r.error,variant:"error"});return}e(n)};return h.jsx(fl,{onDrop:t,accept:Object.keys(xo).reduce((n,r)=>(n[r]=xo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>h.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[h.jsx("input",{...r()}),h.jsx(Ik,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function rB({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s,onSendMessage:o,isHistoryMode:a=!1,historyChat:l}){const u=v.useRef(null),d=mi(),c=K3(t),f=ge(),p=ll(),{setIsInputFocused:m}=De(),[g,x]=v.useState(""),[y,w]=v.useState("3rem"),[b,k]=v.useState(!1),[T,E]=v.useState([]),[_,R]=v.useState(0),[D,N]=v.useState(!1),[j,Y]=v.useState(0),[G,Z]=v.useState(null),[ne,J]=v.useState(()=>localStorage.getItem("showActionButtons")==="true"),oe=()=>{if(!a||!l||l.status!==Un.Closed||!l.closed_at)return!1;const F=new Date(l.closed_at);return(new Date().getTime()-F.getTime())/(1e3*60*60)>2},O=a&&(l==null?void 0:l.status)===Un.Closed&&oe();v.useEffect(()=>{if(r.length>0){const F=r[r.length-1];F.id!==G&&(Z(F.id),F.sender_type===$e.User&&(R(0),N(!1)))}},[r,G]),v.useEffect(()=>{let F;return D&&j>0&&(F=window.setTimeout(()=>{Y(W=>W<=1?(N(!1),R(0),0):W-1)},1e3)),()=>clearTimeout(F)},[D,j]),v.useEffect(()=>{const F=u.current;if(F){const W=()=>m(!0),se=()=>m(!1);return F.addEventListener("focus",W),F.addEventListener("blur",se),()=>{F.removeEventListener("focus",W),F.removeEventListener("blur",se)}}},[m]),v.useEffect(()=>{const F=()=>{J(!0),localStorage.setItem("showActionButtons","true")},W=()=>{J(!1),localStorage.setItem("showActionButtons","false")};return d==null||d.on(he.ChatUserShowButton,F),d==null||d.on(he.MessageUserCreate,W),()=>{d==null||d.off(he.ChatUserShowButton,F),d==null||d.off(he.MessageUserCreate,W)}},[d]),v.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&(J(!1),localStorage.setItem("showActionButtons","false"))},[r]),wg("paste",F=>{const W=F.clipboardData.items,se=[];for(const z of W){const ee=z.getAsFile();ee&&se.push(ee)}if(se.length>0&&!n){Hn({description:p(X.FileUploadDisabled),variant:"error"});return}if(se.length>0){const z=sc(se);if(!z.isValid){Hn({description:z.error,variant:"error"});return}E([...T,...se])}});const M=async()=>{if(!g.trim()&&(!n||T.length===0))return;if(_>5&&!D){N(!0),Y(3);return}if(D||b)return;const F=g,W=[...T];x(""),E([]),u.current&&(u.current.style.height="3rem",w("3rem")),k(!0);let se;if(n&&W.length>0){const[z,ee]=await c.mutateAsync(W);if(!oi(ee)){Q4(z,ee),k(!1),x(F),E(W);return}X3(z)&&(se=z.file_urls)}if(o){o(F,se),k(!1);return}d==null||d.emit(vt.MessageCreate,{content:F,files:se},z=>{e(z),k(!1),R(ee=>ee+1),J(!1),localStorage.setItem("showActionButtons","false")})},V=F=>{d==null||d.emit(vt.MessageTyping,{content:F})},U=()=>{d==null||d.emit(vt.ChatClose,{}),J(!1),localStorage.setItem("showActionButtons","false"),i==null||i()},I=()=>{d==null||d.emit(vt.ChatClose,{}),J(!1),localStorage.setItem("showActionButtons","false"),s==null||s()};return O?null:h.jsxs(h.Fragment,{children:[D&&h.jsxs(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:f.getColor(S.ErrorBackground),borderColor:f.getColor(S.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:f.getRadius()},children:[h.jsx(ae.XCircle,{className:"size-4 mr-2",style:{color:f.getColor(S.ErrorText)}}),h.jsx("span",{className:"text-sm font-medium",style:{color:f.getColor(S.ErrorText)},children:p(X.RateLimitMessage).replace("{seconds}",j.toString())})]}),ne&&h.jsxs(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex flex-col gap-2",children:[h.jsxs(Ct,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:U,style:{backgroundColor:f.getColor(S.ButtonBackground),color:f.getColor(S.ButtonText)},children:[h.jsx(ae.Star,{className:"size-5"}),h.jsx("span",{className:"font-medium",children:"Sohbeti Değerlendir"})]}),h.jsxs(Ct,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:I,style:{backgroundColor:f.getColor(S.ButtonBackground),color:f.getColor(S.ButtonText)},children:[h.jsx(ae.Plus,{className:"size-5"}),h.jsx("span",{className:"font-medium",children:"Yeni Sohbet Oluştur"})]})]}),h.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:f.getColor(S.FooterBackground),borderRadius:f.getRadius()},onSubmit:F=>{F.preventDefault(),M()},children:[n&&T&&T.length>0&&h.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:h.jsx(Fk,{files:T,onDelete:F=>{E(T.filter((W,se)=>se!==F))}})}),h.jsxs("div",{className:"grow relative",children:[h.jsx(hg,{id:"message",inputRef:u,className:"grow shadow-none",noMargin:!0,autoComplete:"off",disabled:a,style:{height:y,maxHeight:"6rem",opacity:a?.5:1,cursor:a?"not-allowed":"text"},placeholder:a?"Bu sohbet geçmiş bir sohbettir":p(X.MessagePlaceholder),value:g,maxLength:2e3,onChange:F=>{if(a)return;const W=F.target.value;if(W.length<=2e3&&(x(W),V(W)),W.length>0&&F.currentTarget.scrollHeight>F.currentTarget.clientHeight){const se=`${F.currentTarget.scrollHeight}px`;F.currentTarget.style.height=se,w(se)}else F.currentTarget.style.height="3rem",w("3rem")},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),M())}}),g.length>=500&&h.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:g.length>=2e3?f.getColor(S.ErrorText):f.getColor(S.FooterText),fontWeight:g.length>=2e3?"600":"normal"},children:2e3-g.length})]}),h.jsxs(lt.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&h.jsx(Jk.Button,{onDrop:F=>{if(F.length){const W=sc(F);if(!W.isValid){console.log("val",W),Hn({description:W.error,variant:"error"});return}E([...T,...F])}}}),h.jsx(Ct,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:b||!g.trim()&&T.length===0||D||a,children:b?h.jsx(ae.Spin,{className:"size-6 animate-spin"}):D?h.jsx("span",{className:"text-xs font-bold",children:j}):h.jsx(ae.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function iB({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:u=!1}){const{widget:d,setOpen:c,open:f,isHaveChat:p,isInputFocused:m}=De(),g=De(D=>D.historyChat),x=ge(),y=hs(),w=bg(),b=mi(),k=_o(),T=v.useRef(new Set),E=v.useRef(!1),_=()=>{e!=null&&e.agent_name?c(!1):(b.emit(vt.ChatClose,{}),s())},R=v.useCallback(()=>{if(!b||!f||!p||!Array.isArray(r))return;const D=r.filter(N=>N.sender_type===$e.User&&!T.current.has(N.id)).map(N=>N.id);D.length!==0&&b.emit(vt.MessageRead,{message_ids:D},N=>{if(N&&N.success===!0)for(const j of D)T.current.add(j)})},[b,r,f,p]);return v.useEffect(()=>{f&&(E.current=!0),f&&p&&(m||E.current)&&(R(),E.current=!1)},[f,p,m,R]),h.jsxs(h.Fragment,{children:[h.jsxs("header",{style:{backgroundColor:x.getColor(S.HeaderBackground),color:x.getColor(S.HeaderText),borderBottom:`1px solid ${x.getColor(S.HeaderBorder)}`,borderTopLeftRadius:y?"":x.getRadius(),borderTopRightRadius:y?"":x.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[(()=>{var D,N;if(u&&(g!=null&&g.who_joined_details)&&g.who_joined_details.length>0){const j=g.who_joined_details[0];return h.jsx(mx,{name:j.name,avatar:j.avatar,textColor:x.getColor(S.HeaderText)})}return e!=null&&e.agent_name?h.jsx(mx,{name:e.agent_name,avatar:e.agent_avatar,textColor:x.getColor(S.HeaderText)}):h.jsx("div",{style:{color:x.getColor(S.HeaderText)},className:"font-medium",children:((N=(D=d==null?void 0:d.appearance)==null?void 0:D.design)==null?void 0:N.greeting_header)||"Bizimle Sohbet Edin"})})(),h.jsxs("div",{className:"flex items-center gap-2",children:[!u&&h.jsx(UI,{onChatClose:s}),u&&h.jsxs("button",{type:"button",style:{color:x.getColor(S.HeaderText)},onClick:()=>{De.getState().setShowHistoryOnRegistration(!0),k.push("registration")},className:"flex items-center gap-2 px-3 py-1.5 rounded-lg hover:opacity-80 transition-opacity",children:[h.jsx(ae.ArrowLeft,{className:"w-5 h-5"}),h.jsx("span",{className:"text-sm font-medium",children:"Geri"})]}),!w&&!y&&!u&&h.jsx("button",{type:"button",style:{color:x.getColor(S.HeaderText)},onClick:_,children:h.jsx(ae.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),h.jsx(YI,{messages:r,isTyping:t||n.length>0}),h.jsx(rB,{client_id:(d==null?void 0:d.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:D=>{i(D)},onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:u,historyChat:u?De.getState().historyChat:void 0}),h.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:x.getColor(S.FooterText),borderTop:`1px solid ${x.getColor(S.FooterBorder)}`,backgroundColor:x.getColor(S.FooterBackground)},children:[h.jsx("span",{children:"Powered by"}),h.jsx("span",{className:"font-medium",children:"Alfatek"}),h.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function sB({rating:e,onChange:t}){const n=ge();return h.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return h.jsxs("div",{className:"relative w-10 h-10",children:[h.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(S.StarInactiveColor),fill:n.getColor(S.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:h.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"})}),s&&h.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:h.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(S.StarActiveColor),fill:n.getColor(S.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:h.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&&h.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(S.StarActiveColor),fill:n.getColor(S.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:h.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"})}),h.jsxs("div",{className:"absolute inset-0 flex",children:[h.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),h.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function oB({onOk:e}){const t=ge(),n=ll(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),u=Y3(),[d,c]=v.useState(!1);v.useEffect(()=>{if(s){const g=setInterval(()=>{l(x=>x<=1?(clearInterval(g),e(!0),0):x-1)},1e3);return()=>clearInterval(g)}},[s]);const f=Jm({comment:ec()}),p=sk({init:{comment:""},schema:f,action:async g=>{const[x,y]=await u.mutateAsync({rating:r,comment:g.comment});if(oi(y)){o(!0);return}ak(x,{form:p})}}),m=()=>{e(!0)};return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("header",{style:{backgroundColor:s?t.getColor(S.RatingSuccessBackground):t.getColor(S.RatingHeaderBackground),color:s?t.getColor(S.RatingSuccessText):t.getColor(S.RatingHeaderText),borderBottom:`1px solid ${t.getColor(S.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[h.jsx("div",{className:"font-medium",children:n(s?X.RatingHeaderThanks:X.RatingHeaderEvaluate)}),h.jsx(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:h.jsx(ae.X,{className:"size-4"})})]}),h.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?h.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[h.jsx("div",{className:"mb-4",style:{color:t.getColor(S.SuccessText)},children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),h.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(S.HeaderText)},children:n(X.RatingThankYouTitle)}),h.jsx("p",{className:"mb-8",style:{color:t.getColor(S.FooterText)},children:n(X.RatingThankYouDescription)}),h.jsx("p",{className:"mb-4",style:{color:t.getColor(S.FooterText)},children:n(X.RatingCountdown).replace("{seconds}",a.toString())}),h.jsx(Ct,{onClick:m,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(S.ButtonBackground),color:t.getColor(S.ButtonText),borderRadius:t.getRadius()},children:n(X.RatingNewConversation)})]}):h.jsxs("div",{className:"flex flex-col",children:[h.jsx("div",{className:"text-center mb-6",children:h.jsx("p",{className:"text-base",style:{color:t.getColor(S.FooterText)},children:n(X.RatingDescription)})}),h.jsxs("div",{className:"mb-6",children:[h.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(S.RatingRateConversationText)},children:n(X.RatingRateConversation)}),h.jsx(sB,{rating:r,onChange:g=>{i(g),g>=1&&c(!1)}}),r>0&&h.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(S.FooterText)},children:n(X.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?h.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(S.ErrorText)},children:n(X.RatingMinimumError)}):null]}),h.jsxs("form",{onSubmit:p.handleSubmit,className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(S.InputText)},children:n(X.RatingComment)}),h.jsx(hg,{id:"comment",onChange:p.handleChange,onBlur:p.handleBlur,value:p.values.comment,placeholder:n(X.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(S.InputBorder),backgroundColor:t.getColor(S.InputBackground),color:t.getColor(S.InputText),borderRadius:t.getRadius()},error:p.errors.comment})]}),h.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[h.jsx(Ct,{type:"submit",onClick:g=>{r<1&&(g.preventDefault(),g.stopPropagation(),c(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(S.ButtonBackground),color:t.getColor(S.ButtonText),borderRadius:t.getRadius()},children:n(X.RatingSubmit)}),h.jsx(Ct,{onClick:m,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(S.GreeterBackground),color:t.getColor(S.GreeterText),borderRadius:t.getRadius()},children:n(X.RatingNewConversation)})]})]})]})}),h.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(S.FooterText),borderTop:`1px solid ${t.getColor(S.FooterBorder)}`,backgroundColor:t.getColor(S.FooterBackground)},children:[h.jsx("span",{children:n(X.PoweredBy)}),h.jsx("span",{className:"font-medium",children:"Alfatek"}),h.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function aB({children:e}){const{widget:t}=De();return t?h.jsx("section",{className:"h-full w-full relative",children:e}):null}function lB({children:e}){const t=mi(),n=_o(),{historyChat:r}=De(),[i,s]=v.useState(!0),[o,a]=v.useState(!1),l=v.useRef(!1);return v.useEffect(()=>{if(r){s(!1);return}if(!t){s(!1);return}const u=()=>{s(!1),a(!1),l.current=!0},d=()=>{a(!0),n.push("registration")};return t.on(he.Connect,u),t.on(he.Disconnect,d),t.connected?(s(!1),l.current=!0):t.connect(),()=>{t.off(he.Connect,u),t.off(he.Disconnect,d)}},[t,r]),r?e:!t||o?(t||n.push("registration"),h.jsx($p,{})):l.current&&!t.connected?h.jsx($p,{}):i||!t.connected?h.jsx(uC,{}):e}function uB(){const{widget:e,setOpen:t,setIsHaveChat:n,anyAdmin:r,historyChat:i,setHistoryChat:s,historyMessages:o,setHistoryMessages:a}=De(),l=ge(),u=mi(),d=ul(),c=_o(),f=hs(),[p,m]=v.useState(null),[g,x]=v.useState([]),[y,w]=v.useState(!1),[b,k]=v.useState([]),[T,E]=v.useState([]),[_,R]=v.useState(!1),D=mC(),N=v.useRef(!1),j=v.useRef(null);v.useEffect(()=>{if(!i||!e)return;if(m({status:i.status,is_customer_uploadable:!1}),o){x(o);return}const O=Va(e.link_id);eD(i._id,e.link_id,O).then(([M,V])=>{if(oi(V)&&Array.isArray(M)){const U=M.map(I=>({id:I._id,content:I.content,created_at:I.created_at,files:I.files,sender_type:I.sender_type,activity_type:I.activity_type,answers:I.answers,reply_id:I.reply_id,buttons:I.buttons}));x(U),a(U)}}).catch(M=>{console.error("Failed to load history messages",M)})},[i,e,o,a]);const Y=async(O,M)=>{if(!e)return;if(!i){u==null||u.emit(vt.MessageCreate,{content:O,files:M},()=>{});return}const[V,U]=await D.mutateAsync({inputs:{message:O},history:[],client_id:e.client_id,widget_id:e.link_id,device_id:Va(e.link_id)});if(oi(U)){s(null),n(!0),V&&typeof V=="object"&&"customer_token"in V&&(ua(dn.CustomerToken,V.customer_token,e.link_id),ua(dn.CustomerRefreshToken,V.customer_refresh_token,e.link_id));let I=0;const F=20,W=setInterval(()=>{I+=1,u!=null&&u.connected?(u.emit(vt.MessageCreate,{content:O,files:M},()=>{}),clearInterval(W)):I>=F&&clearInterval(W)},200)}},G=O=>{O||t(!1),R(!0),ca((e==null?void 0:e.link_id)||""),n(!1),m(null),x([]),k([]),s(null),De.getState().setHistoryMessages(null),Bp(e.client_id,go(d)).then(()=>{u==null||u.disconnect(),c.push("registration")})},Z=()=>{if(p){localStorage.setItem("showActionButtons","false"),m({...p,status:Un.Closed}),r||G(!1);return}G()};v.useEffect(()=>{if(i){N.current=!1;return}!u||!e||N.current||(N.current=!0,u.emit(vt.ChatView,{},O=>{if(De.getState().historyChat){N.current=!1;return}if(O===null){t(!1),n(!1),Bp(e.client_id,go(d)),x([]),k([]),s(null),De.getState().setHistoryMessages(null),ca((e==null?void 0:e.link_id)||""),c.push("registration"),N.current=!1;return}m(O),n(!0)}))},[i,u,e,d,c,t,n,s]);const ne=()=>{Z()},J=()=>{G(!0)},oe=v.useCallback(O=>{p&&![Un.Closed,Un.Deleted].includes(p.status)&&x([...g,O])},[g,p]);return v.useEffect(()=>{if(!u)return;const O=z=>{const ee={content:z.content,created_at:z.created_at,files:z.files,id:z._id,sender_type:z.sender_type,answers:z.answers,reply_id:z.reply_id,buttons:z.buttons};if(b.length>0){k(Ae=>[...Ae,ee]);return}z.is_shortcut?k([ee]):oe(ee),w(!1)},M=z=>{const ee={content:z.content,created_at:z.created_at,files:z.files,id:z._id,sender_type:z.sender_type,activity_type:z.activity_type,answers:z.answers,reply_id:z.reply_id,buttons:z.buttons};oe(ee)},V=z=>{!z||!z.name?m(ee=>ee?{...ee,agent_name:void 0,agent_avatar:void 0}:null):(p!=null&&p.agent_name||m({...p,agent_name:z.name,agent_avatar:z.avatar,is_customer_uploadable:(p==null?void 0:p.is_customer_uploadable)??!1,status:(p==null?void 0:p.status)??Un.Open}),E(ee=>ee.includes(z.name)?ee:[...ee,z.name]))},U=()=>{w(!0)},I=()=>{Z()},F=({is_customer_uploadable:z})=>{m(p?{...p,is_customer_uploadable:z}:null)},W=z=>{if(E(ee=>ee.filter(Ae=>Ae!==z.name)),!z.hasOtherAdmins)m(p?{...p,agent_name:void 0,agent_avatar:void 0}:null);else{const ee=T.filter(Ae=>Ae!==z.name);ee.length>0&&m(p?{...p,agent_name:ee[0],agent_avatar:void 0}:null)}},se=z=>{E(ee=>ee.includes(z.name)?ee:[...ee,z.name]),p!=null&&p.agent_name||m(p?{...p,agent_name:z.name,agent_avatar:void 0}:null)};return u.on(he.MessageAgentCreate,O),u.on(he.MessageUserCreate,M),u.on(he.MessageCustomerCreate,M),u.on(he.ChatUserAssignee,V),u.on(he.MessageAgentTyping,U),u.on(he.ChatUserClose,I),u.on(he.ChatToggleUpload,F),u.on(he.ChatUserLeave,W),u.on(he.ChatUserJoin,se),()=>{u.off(he.MessageAgentCreate,O),u.off(he.MessageUserCreate,M),u.off(he.MessageCustomerCreate,M),u.off(he.ChatUserAssignee,V),u.off(he.MessageAgentTyping,U),u.off(he.ChatUserClose,I),u.off(he.ChatToggleUpload,F),u.off(he.ChatUserLeave,W),u.off(he.ChatUserJoin,se)}},[oe,T]),v.useEffect(()=>{if(!u||!p||i){j.current=null;return}const O=`${p.status}-${p.agent_name||"no-agent"}`;j.current!==O&&(j.current=O,u.emit(vt.MessageList,{},M=>{if(!Array.isArray(M)){console.warn("MessageList response is not an array:",M),j.current=null;return}x(M);const V=new Map;for(const I of M)I.sender_type===$e.Activity&&(I.activity_type===Ln.AdminJoin&&I.sender_name?V.set(I.sender_name,!0):I.activity_type===Ln.AdminLeave&&I.sender_name&&V.set(I.sender_name,!1));const U=Array.from(V.entries()).filter(([I,F])=>F).map(([I])=>I);E(U)}))},[u,p,i]),v.useEffect(()=>{const O=setTimeout(()=>{w(!1)},2e3);return()=>clearTimeout(O)},[y]),v.useEffect(()=>{if(!e||b.length===0)return;let O=0;e.writing_timeout&&(O=[...b[0].content].length/e.writing_timeout,O<0&&(O=0));const M=setTimeout(()=>{oe(b[0]),k(b.slice(1))},O*1e3);return()=>clearTimeout(M)},[b,e]),_?h.jsx($p,{}):h.jsxs(h.Fragment,{children:[h.jsx("div",{id:"chat-alert-portal"}),h.jsx("div",{className:`h-full w-full ${f?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:f?"100%":"",minHeight:f?"var(--app-height, 100dvh)":"",maxHeight:f?"var(--app-height, 100dvh)":"",backgroundColor:l.getColor(S.Background)},children:p?p.status===Un.Closed&&!i?h.jsx(oB,{onOk:G}):h.jsx(iB,{chat:p,isTyping:y,messages:g,shortcutMessages:b,onNewMessage:oe,onChatClose:Z,onEvaluateChat:ne,onNewChat:J,onSendMessage:Y,isHistoryMode:!!i}):h.jsx(uC,{})})]})}function cB(){return lI(),null}function dB(){return h.jsxs(lB,{children:[h.jsx(aB,{children:h.jsx(uB,{})}),h.jsx(cB,{})]})}const fB=[{path:"/chat",component:dB,name:"chat"}],eT=[...fB],tT=[...fI],pB=[...eT,...tT];function dh({text:e}){var u,d,c,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=De(),o=ge(),a=ll(),l=()=>{i(!1),s&&s()};return r?h.jsxs(lt.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:we("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(S.TooltipBackground),color:o.getColor(S.TooltipText)},children:[h.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(X.CloseButtonAria),children:h.jsx(ae.X,{className:"size-3"})}),h.jsx(lt.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(S.TooltipText)},children:e||(n?(d=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:d.tooltip_message_active:(f=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:f.tooltip_message)||a(n?X.TooltipActive:X.TooltipDefault)}),h.jsx("div",{className:we("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const hB="/notify.mp3",mB=async e=>{await new Audio(e||hB).play()};function Dx({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=mi(),{isHaveChat:i,open:s,soundPath:o}=De(),[a,l]=v.useState(!0),[u,d]=v.useState(0),[c,f]=v.useState(null),p=ll(),m=()=>{mB(o)},g=(x,y)=>{if(c&&clearInterval(c),x||!i||y===0||Number.isNaN(y)){window.document.title=n,f(null);return}const w=setInterval(()=>{if(x||!i||y===0||Number.isNaN(y)){window.document.title=n,clearInterval(w),f(null);return}const b=`${y} ${p(X.NewMessagesNotification)} - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return f(w),()=>{clearInterval(w),f(null)}};return v.useEffect(()=>g(s&&a,u),[u,s,a]),v.useEffect(()=>{const x=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",x,!1),()=>{document.removeEventListener("visibilitychange",x)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const x=()=>{!i||s&&a||(d(y=>y+1),m())};return r.on(he.MessageAgentCreate,x),r.on(he.ChatUserAssignee,m),()=>{r.off(he.MessageAgentCreate,x),r.off(he.ChatUserAssignee,m)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:h.jsx(dh,{text:p(X.NewMessagesNotification)})}function gB({children:e,border:t}){var ne,J,oe,O;const n=mi(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:u}=De(),[d]=v.useState(!0),c=_o(),f=ul(),p=rl(),m=ge(),g=hs(),x=bg(),[y,w]=v.useState({x:0,y:0}),b=a3(),k=v.useRef(null),T=v.useRef(null),[E,_]=v.useState(!1),[R,D]=v.useState(!1);v.useEffect(()=>((()=>{_("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{_(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{_(!0)})}),[]),v.useEffect(()=>{o&&p.pathname==="/"&&f&&f.accessToken&&c.push("chat")},[o]),v.useEffect(()=>{r?requestAnimationFrame(()=>{D(!0)}):D(!1)},[r]);const N=M=>{if(!k.current||!T.current)return M;const V=k.current.getBoundingClientRect(),U={width:window.innerWidth,height:window.innerHeight},I={top:20,right:20,bottom:40,left:20};let F=M.x,W=M.y;return V.right+F-y.x>U.width-I.right&&(F=U.width-I.right-V.width-(V.left-y.x)),V.left+F-y.x<I.left&&(F=I.left-(V.left-y.x)),V.bottom+W-y.y>U.height-I.bottom&&(W=U.height-I.bottom-V.height-(V.top-y.y)),V.top+W-y.y<I.top&&(W=I.top-(V.top-y.y)),{x:F,y:W}},j=()=>{i(!0),n&&(n.emit(vt.WidgetOpen,{}),l&&l())},Y=()=>{i(!1),n&&(n.emit(vt.WidgetClose,{}),u&&u())},G=()=>{i(!1),s(!1),Bp(a.client_id,go(f)),c.push("registration")};v.useEffect(()=>{if(g&&(o||x)&&j(),!(!n||!a))return n.on(he.Banned,G),()=>{n.off(he.Banned,G)}},[]);function Z(M){E&&b.start(M)}return h.jsxs("section",{className:"relative w-full h-full",ref:T,children:[r&&h.jsx("div",{className:we("fixed z-300 overflow-hidden transition-all duration-300 ease-out",{"border border-solid dark:border-zink-500":t,"bottom-12 right-12 rounded-xl":!g,"!bottom-0 !right-0":g,"opacity-100 scale-100 translate-y-0":R,"opacity-0 scale-95 translate-y-2":!R}),style:{width:g?"100%":((J=(ne=a==null?void 0:a.appearance)==null?void 0:ne.design)==null?void 0:J.width)||"21rem",height:g?"var(--app-height, 100dvh)":((O=(oe=a==null?void 0:a.appearance)==null?void 0:oe.design)==null?void 0:O.height)||"30rem",left:g?"0":"",right:g?"0px !important":"",maxHeight:g?"var(--app-height, 100dvh)":"",boxShadow:g?"":`0 10px 25px -5px ${m.getColor(S.ShadowColor)}, 0 8px 10px -6px ${m.getColor(S.ShadowColor)}`,backgroundColor:m.getColor(S.Background)},children:e}),!E&&h.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[h.jsx(Dx,{fallback:h.jsx(dh,{}),fallbackOpen:d}),!r&&h.jsxs(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:j,children:[h.jsx(lt.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:we("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(S.ButtonBackground)}}),h.jsx(ae.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!g&&h.jsx(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:Y,children:h.jsx(ae.X,{className:"size-7"})},"desktop-close-button")]}),E&&h.jsxs(lt.div,{ref:k,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:y.x,y:y.y},drag:E,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(M,V)=>{const U={x:y.x+V.offset.x,y:y.y+V.offset.y},I=N(U);w(I)},children:[h.jsx(Dx,{fallback:h.jsx(dh,{}),fallbackOpen:d}),!r&&h.jsx("div",{className:"cursor-move",onPointerDown:Z,children:h.jsxs(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:j,children:[h.jsx(lt.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:we("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(S.ButtonBackground)}}),h.jsx(ae.Chat,{className:"size-7"})]})},"chat-button"),r&&!g&&h.jsx(Ct,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:Y,children:h.jsx(ae.X,{className:"size-7"})},"desktop-close-button")]})]})}function vB(e){const{widget:t}=De();return h.jsx(p3,{widget:t,children:h.jsx(gB,{...e})})}function yB(){return h.jsx(gj,{future:{v7_startTransition:!0},children:h.jsx(vB,{border:!0,children:h.jsxs(yj,{children:[eT.map((e,t)=>h.jsx(mp,{path:e.path,element:h.jsx(e.component,{})},t)),tT.map((e,t)=>h.jsx(mp,{path:e.path,element:h.jsx(e.component,{})},t))]})})})}const xB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=k2(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:u,setOpen:d,setOnTooltipClose:c,setIsTooltipVisible:f,setOnOpen:p,setOnClose:m,onOpen:g,onClose:x}=De();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),g&&g()},close:()=>{d(!1),x&&x()}})),v.useEffect(()=>{r&&E2(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&u(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&f(!1),e.onOpen&&p(e.onOpen),e.onClose&&m(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?h.jsx("div",{children:"Loading..."}):s||!r||!o?null:h.jsx(tL,{children:h.jsx(oI,{children:h.jsx(yB,{})})})}),wB=new a2;let Nx=null;function bB(e){if(!e.container)return;const t=$.createRef();return Nx=ib(e.container),Nx.render(h.jsxs(f2,{client:wB,children:[h.jsx(xB,{...e,ref:t}),h.jsx(U4,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()},identify:n=>{if(!e.link_id)return;const r=Va(e.link_id);Z3({widget_id:e.link_id,device_id:r,decrypted_data:n})}}}window.widget=bB});export default SB();