@alfatech/livechat 2025.7.0-9.3 → 2025.7.0-9.5

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.
Files changed (2) hide show
  1. package/dist/main.js +17 -17
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var xg=e=>{throw TypeError(e)};var BE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Kc=(e,t,n)=>t.has(e)||xg("Cannot "+n);var S=(e,t,n)=>(Kc(e,t,"read from private field"),n?n.call(e):t.get(e)),K=(e,t,n)=>t.has(e)?xg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$=(e,t,n,r)=>(Kc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ie=(e,t,n)=>(Kc(e,t,"access private method"),n);var ol=(e,t,n,r)=>({set _(i){$(e,t,i,n)},get _(){return S(e,t,r)}});var G$=BE(($t,zt)=>{function VE(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 Yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fx={exports:{}},Yu={},Nx={exports:{}},se={};/**
1
+ var xg=e=>{throw TypeError(e)};var BE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Kc=(e,t,n)=>t.has(e)||xg("Cannot "+n);var S=(e,t,n)=>(Kc(e,t,"read from private field"),n?n.call(e):t.get(e)),K=(e,t,n)=>t.has(e)?xg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$=(e,t,n,r)=>(Kc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ie=(e,t,n)=>(Kc(e,t,"access private method"),n);var ol=(e,t,n,r)=>({set _(i){$(e,t,i,n)},get _(){return S(e,t,r)}});var G$=BE((zt,Bt)=>{function VE(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 Yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fx={exports:{}},Yu={},Nx={exports:{}},se={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -14,7 +14,7 @@ var xg=e=>{throw TypeError(e)};var BE=(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 iT=v,sT=Symbol.for("react.element"),oT=Symbol.for("react.fragment"),aT=Object.prototype.hasOwnProperty,lT=iT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uT={key:!0,ref:!0,__self:!0,__source:!0};function Hx(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)aT.call(t,r)&&!uT.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:sT,type:e,key:s,ref:o,props:i,_owner:lT.current}}Yu.Fragment=oT;Yu.jsx=Hx;Yu.jsxs=Hx;Fx.exports=Yu;var x=Fx.exports,Wx={exports:{}},Ut={},qx={exports:{}},Kx={};/**
17
+ */var iT=v,sT=Symbol.for("react.element"),oT=Symbol.for("react.fragment"),aT=Object.prototype.hasOwnProperty,lT=iT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uT={key:!0,ref:!0,__self:!0,__source:!0};function Hx(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)aT.call(t,r)&&!uT.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:sT,type:e,key:s,ref:o,props:i,_owner:lT.current}}Yu.Fragment=oT;Yu.jsx=Hx;Yu.jsxs=Hx;Fx.exports=Yu;var x=Fx.exports,Wx={exports:{}},Ht={},qx={exports:{}},Kx={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -30,14 +30,14 @@ var xg=e=>{throw TypeError(e)};var BE=(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 dT=v,Vt=cT;function N(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 Gx=new Set,aa={};function Xi(e,t){to(e,t),to(e+"Capture",t)}function to(e,t){for(aa[e]=t,e=0;e<t.length;e++)Gx.add(t[e])}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ef=Object.prototype.hasOwnProperty,fT=/^[: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]*$/,kg={},Eg={};function pT(e){return ef.call(Eg,e)?!0:ef.call(kg,e)?!1:fT.test(e)?Eg[e]=!0:(kg[e]=!0,!1)}function hT(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 mT(e,t,n,r){if(t===null||typeof t>"u"||hT(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 wt(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 st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new wt(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){st[e]=new wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ah=/[\-:]([a-z])/g;function lh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ah,lh);st[t]=new wt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ah,lh);st[t]=new wt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ah,lh);st[t]=new wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new wt(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function uh(e,t,n,r){var i=st.hasOwnProperty(t)?st[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mT(t,n,i,r)&&(n=null),r||i===null?pT(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 pr=dT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ll=Symbol.for("react.element"),vs=Symbol.for("react.portal"),ys=Symbol.for("react.fragment"),ch=Symbol.for("react.strict_mode"),tf=Symbol.for("react.profiler"),Qx=Symbol.for("react.provider"),Yx=Symbol.for("react.context"),dh=Symbol.for("react.forward_ref"),nf=Symbol.for("react.suspense"),rf=Symbol.for("react.suspense_list"),fh=Symbol.for("react.memo"),kr=Symbol.for("react.lazy"),Xx=Symbol.for("react.offscreen"),Tg=Symbol.iterator;function Co(e){return e===null||typeof e!="object"?null:(e=Tg&&e[Tg]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Object.assign,Qc;function Lo(e){if(Qc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qc=t&&t[1]||""}return`
33
+ */var dT=v,Ut=cT;function N(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 Gx=new Set,aa={};function Xi(e,t){to(e,t),to(e+"Capture",t)}function to(e,t){for(aa[e]=t,e=0;e<t.length;e++)Gx.add(t[e])}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ef=Object.prototype.hasOwnProperty,fT=/^[: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]*$/,kg={},Eg={};function pT(e){return ef.call(Eg,e)?!0:ef.call(kg,e)?!1:fT.test(e)?Eg[e]=!0:(kg[e]=!0,!1)}function hT(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 mT(e,t,n,r){if(t===null||typeof t>"u"||hT(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 wt(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 st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new wt(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){st[e]=new wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ah=/[\-:]([a-z])/g;function lh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ah,lh);st[t]=new wt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ah,lh);st[t]=new wt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ah,lh);st[t]=new wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new wt(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function uh(e,t,n,r){var i=st.hasOwnProperty(t)?st[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mT(t,n,i,r)&&(n=null),r||i===null?pT(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 pr=dT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ll=Symbol.for("react.element"),vs=Symbol.for("react.portal"),ys=Symbol.for("react.fragment"),ch=Symbol.for("react.strict_mode"),tf=Symbol.for("react.profiler"),Qx=Symbol.for("react.provider"),Yx=Symbol.for("react.context"),dh=Symbol.for("react.forward_ref"),nf=Symbol.for("react.suspense"),rf=Symbol.for("react.suspense_list"),fh=Symbol.for("react.memo"),kr=Symbol.for("react.lazy"),Xx=Symbol.for("react.offscreen"),Tg=Symbol.iterator;function Co(e){return e===null||typeof e!="object"?null:(e=Tg&&e[Tg]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Object.assign,Qc;function Lo(e){if(Qc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qc=t&&t[1]||""}return`
34
34
  `+Qc+e}var Yc=!1;function Xc(e,t){if(!e||Yc)return"";Yc=!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{Yc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Lo(e):""}function gT(e){switch(e.tag){case 5:return Lo(e.type);case 16:return Lo("Lazy");case 13:return Lo("Suspense");case 19:return Lo("SuspenseList");case 0:case 2:case 15:return e=Xc(e.type,!1),e;case 11:return e=Xc(e.type.render,!1),e;case 1:return e=Xc(e.type,!0),e;default:return""}}function sf(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 ys:return"Fragment";case vs:return"Portal";case tf:return"Profiler";case ch:return"StrictMode";case nf:return"Suspense";case rf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yx:return(e.displayName||"Context")+".Consumer";case Qx:return(e._context.displayName||"Context")+".Provider";case dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fh:return t=e.displayName||null,t!==null?t:sf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return sf(e(t))}catch{}}return null}function vT(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 sf(t);case 8:return t===ch?"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 ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yT(e){var t=Zx(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 ul(e){e._valueTracker||(e._valueTracker=yT(e))}function Jx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lu(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 of(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ei(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 e1(e,t){t=t.checked,t!=null&&uh(e,"checked",t,!1)}function af(e,t){e1(e,t);var n=ei(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")?lf(e,t.type,n):t.hasOwnProperty("defaultValue")&&lf(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _g(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 lf(e,t,n){(t!=="number"||lu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Io=Array.isArray;function Ns(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=""+ei(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 uf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if(Io(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function t1(e,t){var n=ei(t.value),r=ei(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 jg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function n1(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 cf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?n1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cl,r1=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(cl=cl||document.createElement("div"),cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function la(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wo={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},xT=["Webkit","ms","Moz","O"];Object.keys(Wo).forEach(function(e){xT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wo[t]=Wo[e]})});function i1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wo.hasOwnProperty(e)&&Wo[e]?(""+t).trim():t+"px"}function s1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=i1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wT=Ae({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 df(e,t){if(t){if(wT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function ff(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 pf=null;function ph(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hf=null,Ms=null,Ls=null;function Ag(e){if(e=Ka(e)){if(typeof hf!="function")throw Error(N(280));var t=e.stateNode;t&&(t=tc(t),hf(e.stateNode,e.type,t))}}function o1(e){Ms?Ls?Ls.push(e):Ls=[e]:Ms=e}function a1(){if(Ms){var e=Ms,t=Ls;if(Ls=Ms=null,Ag(e),t)for(e=0;e<t.length;e++)Ag(t[e])}}function l1(e,t){return e(t)}function u1(){}var Zc=!1;function c1(e,t,n){if(Zc)return e(t,n);Zc=!0;try{return l1(e,t,n)}finally{Zc=!1,(Ms!==null||Ls!==null)&&(u1(),a1())}}function ua(e,t){var n=e.stateNode;if(n===null)return null;var r=tc(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(N(231,t,typeof n));return n}var mf=!1;if(lr)try{var _o={};Object.defineProperty(_o,"passive",{get:function(){mf=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{mf=!1}function bT(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 qo=!1,uu=null,cu=!1,gf=null,ST={onError:function(e){qo=!0,uu=e}};function kT(e,t,n,r,i,s,o,a,l){qo=!1,uu=null,bT.apply(ST,arguments)}function ET(e,t,n,r,i,s,o,a,l){if(kT.apply(this,arguments),qo){if(qo){var u=uu;qo=!1,uu=null}else throw Error(N(198));cu||(cu=!0,gf=u)}}function Zi(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 d1(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 Rg(e){if(Zi(e)!==e)throw Error(N(188))}function TT(e){var t=e.alternate;if(!t){if(t=Zi(e),t===null)throw Error(N(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 Rg(i),e;if(s===r)return Rg(i),t;s=s.sibling}throw Error(N(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(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function f1(e){return e=TT(e),e!==null?p1(e):null}function p1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=p1(e);if(t!==null)return t;e=e.sibling}return null}var h1=Vt.unstable_scheduleCallback,Og=Vt.unstable_cancelCallback,CT=Vt.unstable_shouldYield,_T=Vt.unstable_requestPaint,Me=Vt.unstable_now,PT=Vt.unstable_getCurrentPriorityLevel,hh=Vt.unstable_ImmediatePriority,m1=Vt.unstable_UserBlockingPriority,du=Vt.unstable_NormalPriority,jT=Vt.unstable_LowPriority,g1=Vt.unstable_IdlePriority,Xu=null,$n=null;function AT(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(Xu,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:DT,RT=Math.log,OT=Math.LN2;function DT(e){return e>>>=0,e===0?32:31-(RT(e)/OT|0)|0}var dl=64,fl=4194304;function $o(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 fu(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=$o(a):(s&=o,s!==0&&(r=$o(s)))}else o=n&~i,o!==0?r=$o(o):s!==0&&(r=$o(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-kn(t),i=1<<n,r|=e[n],t&=~i;return r}function FT(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 NT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-kn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=FT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function vf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function v1(){var e=dl;return dl<<=1,!(dl&4194240)&&(dl=64),e}function Jc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kn(t),e[t]=n}function MT(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-kn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function mh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var pe=0;function y1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var x1,gh,w1,b1,S1,yf=!1,pl=[],Br=null,Vr=null,Ur=null,ca=new Map,da=new Map,Cr=[],LT="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 Dg(e,t){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":ca.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":da.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&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IT(e,t,n,r,i){switch(t){case"focusin":return Br=Po(Br,e,t,n,r,i),!0;case"dragenter":return Vr=Po(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=Po(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ca.set(s,Po(ca.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,da.set(s,Po(da.get(s)||null,e,t,n,r,i)),!0}return!1}function k1(e){var t=ki(e.target);if(t!==null){var n=Zi(t);if(n!==null){if(t=n.tag,t===13){if(t=d1(n),t!==null){e.blockedOn=t,S1(e.priority,function(){w1(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 $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pf=r,n.target.dispatchEvent(r),pf=null}else return t=Ka(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function Fg(e,t,n){$l(e)&&n.delete(t)}function $T(){yf=!1,Br!==null&&$l(Br)&&(Br=null),Vr!==null&&$l(Vr)&&(Vr=null),Ur!==null&&$l(Ur)&&(Ur=null),ca.forEach(Fg),da.forEach(Fg)}function jo(e,t){e.blockedOn===t&&(e.blockedOn=null,yf||(yf=!0,Vt.unstable_scheduleCallback(Vt.unstable_NormalPriority,$T)))}function fa(e){function t(i){return jo(i,e)}if(0<pl.length){jo(pl[0],e);for(var n=1;n<pl.length;n++){var r=pl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Br!==null&&jo(Br,e),Vr!==null&&jo(Vr,e),Ur!==null&&jo(Ur,e),ca.forEach(t),da.forEach(t),n=0;n<Cr.length;n++)r=Cr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cr.length&&(n=Cr[0],n.blockedOn===null);)k1(n),n.blockedOn===null&&Cr.shift()}var Is=pr.ReactCurrentBatchConfig,pu=!0;function zT(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=1,vh(e,t,n,r)}finally{pe=i,Is.transition=s}}function BT(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=4,vh(e,t,n,r)}finally{pe=i,Is.transition=s}}function vh(e,t,n,r){if(pu){var i=xf(e,t,n,r);if(i===null)ud(e,t,r,hu,n),Dg(e,r);else if(IT(i,e,t,n,r))r.stopPropagation();else if(Dg(e,r),t&4&&-1<LT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&x1(s),s=xf(e,t,n,r),s===null&&ud(e,t,r,hu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ud(e,t,r,null,n)}}var hu=null;function xf(e,t,n,r){if(hu=null,e=ph(r),e=ki(e),e!==null)if(t=Zi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=d1(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 hu=e,null}function E1(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(PT()){case hh:return 1;case m1:return 4;case du:case jT:return 16;case g1:return 536870912;default:return 16}default:return 16}}var Lr=null,yh=null,zl=null;function T1(){if(zl)return zl;var e,t=yh,n=t.length,r,i="value"in Lr?Lr.value:Lr.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 zl=i.slice(e,1<r?1-r:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hl(){return!0}function Ng(){return!1}function Ht(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)?hl:Ng,this.isPropagationStopped=Ng,this}return Ae(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=hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),t}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xh=Ht(mo),qa=Ae({},mo,{view:0,detail:0}),VT=Ht(qa),ed,td,Ao,Zu=Ae({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wh,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!==Ao&&(Ao&&e.type==="mousemove"?(ed=e.screenX-Ao.screenX,td=e.screenY-Ao.screenY):td=ed=0,Ao=e),ed)},movementY:function(e){return"movementY"in e?e.movementY:td}}),Mg=Ht(Zu),UT=Ae({},Zu,{dataTransfer:0}),HT=Ht(UT),WT=Ae({},qa,{relatedTarget:0}),nd=Ht(WT),qT=Ae({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),KT=Ht(qT),GT=Ae({},mo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QT=Ht(GT),YT=Ae({},mo,{data:0}),Lg=Ht(YT),XT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZT={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"},JT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JT[e])?!!t[e]:!1}function wh(){return eC}var tC=Ae({},qa,{key:function(e){if(e.key){var t=XT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wh,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nC=Ht(tC),rC=Ae({},Zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ig=Ht(rC),iC=Ae({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wh}),sC=Ht(iC),oC=Ae({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),aC=Ht(oC),lC=Ae({},Zu,{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}),uC=Ht(lC),cC=[9,13,27,32],bh=lr&&"CompositionEvent"in window,Ko=null;lr&&"documentMode"in document&&(Ko=document.documentMode);var dC=lr&&"TextEvent"in window&&!Ko,C1=lr&&(!bh||Ko&&8<Ko&&11>=Ko),$g=" ",zg=!1;function _1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function P1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function fC(e,t){switch(e){case"compositionend":return P1(t);case"keypress":return t.which!==32?null:(zg=!0,$g);case"textInput":return e=t.data,e===$g&&zg?null:e;default:return null}}function pC(e,t){if(xs)return e==="compositionend"||!bh&&_1(e,t)?(e=T1(),zl=yh=Lr=null,xs=!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 C1&&t.locale!=="ko"?null:t.data;default:return null}}var hC={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 Bg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hC[e.type]:t==="textarea"}function j1(e,t,n,r){o1(r),t=mu(t,"onChange"),0<t.length&&(n=new xh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Go=null,pa=null;function mC(e){z1(e,0)}function Ju(e){var t=Ss(e);if(Jx(t))return e}function gC(e,t){if(e==="change")return t}var A1=!1;if(lr){var rd;if(lr){var id="oninput"in document;if(!id){var Vg=document.createElement("div");Vg.setAttribute("oninput","return;"),id=typeof Vg.oninput=="function"}rd=id}else rd=!1;A1=rd&&(!document.documentMode||9<document.documentMode)}function Ug(){Go&&(Go.detachEvent("onpropertychange",R1),pa=Go=null)}function R1(e){if(e.propertyName==="value"&&Ju(pa)){var t=[];j1(t,pa,e,ph(e)),c1(mC,t)}}function vC(e,t,n){e==="focusin"?(Ug(),Go=t,pa=n,Go.attachEvent("onpropertychange",R1)):e==="focusout"&&Ug()}function yC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ju(pa)}function xC(e,t){if(e==="click")return Ju(t)}function wC(e,t){if(e==="input"||e==="change")return Ju(t)}function bC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:bC;function ha(e,t){if(Tn(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(!ef.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Hg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wg(e,t){var n=Hg(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=Hg(n)}}function O1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?O1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function D1(){for(var e=window,t=lu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lu(e.document)}return t}function Sh(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 SC(e){var t=D1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&O1(n.ownerDocument.documentElement,n)){if(r!==null&&Sh(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=Wg(n,s);var o=Wg(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 kC=lr&&"documentMode"in document&&11>=document.documentMode,ws=null,wf=null,Qo=null,bf=!1;function qg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bf||ws==null||ws!==lu(r)||(r=ws,"selectionStart"in r&&Sh(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}),Qo&&ha(Qo,r)||(Qo=r,r=mu(wf,"onSelect"),0<r.length&&(t=new xh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ws)))}function ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bs={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionend:ml("Transition","TransitionEnd")},sd={},F1={};lr&&(F1=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function ec(e){if(sd[e])return sd[e];if(!bs[e])return e;var t=bs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in F1)return sd[e]=t[n];return e}var N1=ec("animationend"),M1=ec("animationiteration"),L1=ec("animationstart"),I1=ec("transitionend"),$1=new Map,Kg="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 si(e,t){$1.set(e,t),Xi(t,[e])}for(var od=0;od<Kg.length;od++){var ad=Kg[od],EC=ad.toLowerCase(),TC=ad[0].toUpperCase()+ad.slice(1);si(EC,"on"+TC)}si(N1,"onAnimationEnd");si(M1,"onAnimationIteration");si(L1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(I1,"onTransitionEnd");to("onMouseEnter",["mouseout","mouseover"]);to("onMouseLeave",["mouseout","mouseover"]);to("onPointerEnter",["pointerout","pointerover"]);to("onPointerLeave",["pointerout","pointerover"]);Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="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(" "),CC=new Set("cancel close invalid load scroll toggle".split(" ").concat(zo));function Gg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ET(r,t,void 0,e),e.currentTarget=null}function z1(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;Gg(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;Gg(i,a,u),s=l}}}if(cu)throw e=gf,cu=!1,gf=null,e}function be(e,t){var n=t[Cf];n===void 0&&(n=t[Cf]=new Set);var r=e+"__bubble";n.has(r)||(B1(t,e,2,!1),n.add(r))}function ld(e,t,n){var r=0;t&&(r|=4),B1(n,e,r,t)}var gl="_reactListening"+Math.random().toString(36).slice(2);function ma(e){if(!e[gl]){e[gl]=!0,Gx.forEach(function(n){n!=="selectionchange"&&(CC.has(n)||ld(n,!1,e),ld(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gl]||(t[gl]=!0,ld("selectionchange",!1,t))}}function B1(e,t,n,r){switch(E1(t)){case 1:var i=zT;break;case 4:i=BT;break;default:i=vh}n=i.bind(null,t,n,e),i=void 0,!mf||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 ud(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=ki(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}c1(function(){var u=s,d=ph(n),c=[];e:{var f=$1.get(e);if(f!==void 0){var p=xh,h=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":p=nC;break;case"focusin":h="focus",p=nd;break;case"focusout":h="blur",p=nd;break;case"beforeblur":case"afterblur":p=nd;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=Mg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=HT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=sC;break;case N1:case M1:case L1:p=KT;break;case I1:p=aC;break;case"scroll":p=VT;break;case"wheel":p=uC;break;case"copy":case"cut":case"paste":p=QT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ig}var m=(t&4)!==0,b=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var y=u,w;y!==null;){w=y;var T=w.stateNode;if(w.tag===5&&T!==null&&(w=T,g!==null&&(T=ua(y,g),T!=null&&m.push(ga(y,T,w)))),b)break;y=y.return}0<m.length&&(f=new p(f,h,null,n,d),c.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==pf&&(h=n.relatedTarget||n.fromElement)&&(ki(h)||h[ur]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?ki(h):null,h!==null&&(b=Zi(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(m=Mg,T="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=Ig,T="onPointerLeave",g="onPointerEnter",y="pointer"),b=p==null?f:Ss(p),w=h==null?f:Ss(h),f=new m(T,y+"leave",p,n,d),f.target=b,f.relatedTarget=w,T=null,ki(d)===u&&(m=new m(g,y+"enter",h,n,d),m.target=w,m.relatedTarget=b,T=m),b=T,p&&h)t:{for(m=p,g=h,y=0,w=m;w;w=hs(w))y++;for(w=0,T=g;T;T=hs(T))w++;for(;0<y-w;)m=hs(m),y--;for(;0<w-y;)g=hs(g),w--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=hs(m),g=hs(g)}m=null}else m=null;p!==null&&Qg(c,f,p,m,!1),h!==null&&b!==null&&Qg(c,b,h,m,!0)}}e:{if(f=u?Ss(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=gC;else if(Bg(f))if(A1)E=wC;else{E=yC;var _=vC}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=xC);if(E&&(E=E(e,u))){j1(c,E,n,d);break e}_&&_(e,f,u),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&lf(f,"number",f.value)}switch(_=u?Ss(u):window,e){case"focusin":(Bg(_)||_.contentEditable==="true")&&(ws=_,wf=u,Qo=null);break;case"focusout":Qo=wf=ws=null;break;case"mousedown":bf=!0;break;case"contextmenu":case"mouseup":case"dragend":bf=!1,qg(c,n,d);break;case"selectionchange":if(kC)break;case"keydown":case"keyup":qg(c,n,d)}var C;if(bh)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else xs?_1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(C1&&n.locale!=="ko"&&(xs||j!=="onCompositionStart"?j==="onCompositionEnd"&&xs&&(C=T1()):(Lr=d,yh="value"in Lr?Lr.value:Lr.textContent,xs=!0)),_=mu(u,j),0<_.length&&(j=new Lg(j,e,null,n,d),c.push({event:j,listeners:_}),C?j.data=C:(C=P1(n),C!==null&&(j.data=C)))),(C=dC?fC(e,n):pC(e,n))&&(u=mu(u,"onBeforeInput"),0<u.length&&(d=new Lg("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=C))}z1(c,t)})}function ga(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ua(e,n),s!=null&&r.unshift(ga(e,s,i)),s=ua(e,t),s!=null&&r.push(ga(e,s,i))),e=e.return}return r}function hs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qg(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=ua(n,s),l!=null&&o.unshift(ga(n,l,a))):i||(l=ua(n,s),l!=null&&o.push(ga(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var _C=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Yg(e){return(typeof e=="string"?e:""+e).replace(_C,`
38
- `).replace(PC,"")}function vl(e,t,n){if(t=Yg(t),Yg(e)!==t&&n)throw Error(N(425))}function gu(){}var Sf=null,kf=null;function Ef(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 Tf=typeof setTimeout=="function"?setTimeout:void 0,jC=typeof clearTimeout=="function"?clearTimeout:void 0,Xg=typeof Promise=="function"?Promise:void 0,AC=typeof queueMicrotask=="function"?queueMicrotask:typeof Xg<"u"?function(e){return Xg.resolve(null).then(e).catch(RC)}:Tf;function RC(e){setTimeout(function(){throw e})}function cd(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),fa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);fa(t)}function Hr(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 Zg(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 go=Math.random().toString(36).slice(2),In="__reactFiber$"+go,va="__reactProps$"+go,ur="__reactContainer$"+go,Cf="__reactEvents$"+go,OC="__reactListeners$"+go,DC="__reactHandles$"+go;function ki(e){var t=e[In];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ur]||n[In]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zg(e);e!==null;){if(n=e[In])return n;e=Zg(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[In]||e[ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function tc(e){return e[va]||null}var _f=[],ks=-1;function oi(e){return{current:e}}function ke(e){0>ks||(e.current=_f[ks],_f[ks]=null,ks--)}function xe(e,t){ks++,_f[ks]=e.current,e.current=t}var ti={},pt=oi(ti),jt=oi(!1),Vi=ti;function no(e,t){var n=e.type.contextTypes;if(!n)return ti;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 At(e){return e=e.childContextTypes,e!=null}function vu(){ke(jt),ke(pt)}function Jg(e,t,n){if(pt.current!==ti)throw Error(N(168));xe(pt,t),xe(jt,n)}function V1(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(N(108,vT(e)||"Unknown",i));return Ae({},n,r)}function yu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Vi=pt.current,xe(pt,e),xe(jt,jt.current),!0}function ev(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=V1(e,t,Vi),r.__reactInternalMemoizedMergedChildContext=e,ke(jt),ke(pt),xe(pt,e)):ke(jt),xe(jt,n)}var er=null,nc=!1,dd=!1;function U1(e){er===null?er=[e]:er.push(e)}function FC(e){nc=!0,U1(e)}function ai(){if(!dd&&er!==null){dd=!0;var e=0,t=pe;try{var n=er;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}er=null,nc=!1}catch(i){throw er!==null&&(er=er.slice(e+1)),h1(hh,ai),i}finally{pe=t,dd=!1}}return null}var Es=[],Ts=0,xu=null,wu=0,en=[],tn=0,Ui=null,rr=1,ir="";function gi(e,t){Es[Ts++]=wu,Es[Ts++]=xu,xu=e,wu=t}function H1(e,t,n){en[tn++]=rr,en[tn++]=ir,en[tn++]=Ui,Ui=e;var r=rr;e=ir;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var s=32-kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,rr=1<<32-kn(t)+i|n<<i|r,ir=s+e}else rr=1<<s|n<<i|r,ir=e}function kh(e){e.return!==null&&(gi(e,1),H1(e,1,0))}function Eh(e){for(;e===xu;)xu=Es[--Ts],Es[Ts]=null,wu=Es[--Ts],Es[Ts]=null;for(;e===Ui;)Ui=en[--tn],en[tn]=null,ir=en[--tn],en[tn]=null,rr=en[--tn],en[tn]=null}var Bt=null,It=null,Ee=!1,bn=null;function W1(e,t){var n=rn(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 tv(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,Bt=e,It=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Bt=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ui!==null?{id:rr,overflow:ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Bt=e,It=null,!0):!1;default:return!1}}function Pf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jf(e){if(Ee){var t=It;if(t){var n=t;if(!tv(e,t)){if(Pf(e))throw Error(N(418));t=Hr(n.nextSibling);var r=Bt;t&&tv(e,t)?W1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Bt=e)}}else{if(Pf(e))throw Error(N(418));e.flags=e.flags&-4097|2,Ee=!1,Bt=e}}}function nv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Bt=e}function yl(e){if(e!==Bt)return!1;if(!Ee)return nv(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ef(e.type,e.memoizedProps)),t&&(t=It)){if(Pf(e))throw q1(),Error(N(418));for(;t;)W1(e,t),t=Hr(t.nextSibling)}if(nv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){It=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}It=null}}else It=Bt?Hr(e.stateNode.nextSibling):null;return!0}function q1(){for(var e=It;e;)e=Hr(e.nextSibling)}function ro(){It=Bt=null,Ee=!1}function Th(e){bn===null?bn=[e]:bn.push(e)}var NC=pr.ReactCurrentBatchConfig;function Ro(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(N(309));var r=n.stateNode}if(!r)throw Error(N(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(N(284));if(!n._owner)throw Error(N(290,e))}return e}function xl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rv(e){var t=e._init;return t(e._payload)}function K1(e){function t(g,y){if(e){var w=g.deletions;w===null?(g.deletions=[y],g.flags|=16):w.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=Gr(g,y),g.index=0,g.sibling=null,g}function s(g,y,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<y?(g.flags|=2,y):w):(g.flags|=2,y)):(g.flags|=1048576,y)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,y,w,T){return y===null||y.tag!==6?(y=yd(w,g.mode,T),y.return=g,y):(y=i(y,w),y.return=g,y)}function l(g,y,w,T){var E=w.type;return E===ys?d(g,y,w.props.children,T,w.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===kr&&rv(E)===y.type)?(T=i(y,w.props),T.ref=Ro(g,y,w),T.return=g,T):(T=Gl(w.type,w.key,w.props,null,g.mode,T),T.ref=Ro(g,y,w),T.return=g,T)}function u(g,y,w,T){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=xd(w,g.mode,T),y.return=g,y):(y=i(y,w.children||[]),y.return=g,y)}function d(g,y,w,T,E){return y===null||y.tag!==7?(y=Ii(w,g.mode,T,E),y.return=g,y):(y=i(y,w),y.return=g,y)}function c(g,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=yd(""+y,g.mode,w),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ll:return w=Gl(y.type,y.key,y.props,null,g.mode,w),w.ref=Ro(g,null,y),w.return=g,w;case vs:return y=xd(y,g.mode,w),y.return=g,y;case kr:var T=y._init;return c(g,T(y._payload),w)}if(Io(y)||Co(y))return y=Ii(y,g.mode,w,null),y.return=g,y;xl(g,y)}return null}function f(g,y,w,T){var E=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:a(g,y,""+w,T);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:return w.key===E?l(g,y,w,T):null;case vs:return w.key===E?u(g,y,w,T):null;case kr:return E=w._init,f(g,y,E(w._payload),T)}if(Io(w)||Co(w))return E!==null?null:d(g,y,w,T,null);xl(g,w)}return null}function p(g,y,w,T,E){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(w)||null,a(y,g,""+T,E);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ll:return g=g.get(T.key===null?w:T.key)||null,l(y,g,T,E);case vs:return g=g.get(T.key===null?w:T.key)||null,u(y,g,T,E);case kr:var _=T._init;return p(g,y,w,_(T._payload),E)}if(Io(T)||Co(T))return g=g.get(w)||null,d(y,g,T,E,null);xl(y,T)}return null}function h(g,y,w,T){for(var E=null,_=null,C=y,j=y=0,k=null;C!==null&&j<w.length;j++){C.index>j?(k=C,C=null):k=C.sibling;var R=f(g,C,w[j],T);if(R===null){C===null&&(C=k);break}e&&C&&R.alternate===null&&t(g,C),y=s(R,y,j),_===null?E=R:_.sibling=R,_=R,C=k}if(j===w.length)return n(g,C),Ee&&gi(g,j),E;if(C===null){for(;j<w.length;j++)C=c(g,w[j],T),C!==null&&(y=s(C,y,j),_===null?E=C:_.sibling=C,_=C);return Ee&&gi(g,j),E}for(C=r(g,C);j<w.length;j++)k=p(C,g,j,w[j],T),k!==null&&(e&&k.alternate!==null&&C.delete(k.key===null?j:k.key),y=s(k,y,j),_===null?E=k:_.sibling=k,_=k);return e&&C.forEach(function(M){return t(g,M)}),Ee&&gi(g,j),E}function m(g,y,w,T){var E=Co(w);if(typeof E!="function")throw Error(N(150));if(w=E.call(w),w==null)throw Error(N(151));for(var _=E=null,C=y,j=y=0,k=null,R=w.next();C!==null&&!R.done;j++,R=w.next()){C.index>j?(k=C,C=null):k=C.sibling;var M=f(g,C,R.value,T);if(M===null){C===null&&(C=k);break}e&&C&&M.alternate===null&&t(g,C),y=s(M,y,j),_===null?E=M:_.sibling=M,_=M,C=k}if(R.done)return n(g,C),Ee&&gi(g,j),E;if(C===null){for(;!R.done;j++,R=w.next())R=c(g,R.value,T),R!==null&&(y=s(R,y,j),_===null?E=R:_.sibling=R,_=R);return Ee&&gi(g,j),E}for(C=r(g,C);!R.done;j++,R=w.next())R=p(C,g,j,R.value,T),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?j:R.key),y=s(R,y,j),_===null?E=R:_.sibling=R,_=R);return e&&C.forEach(function(H){return t(g,H)}),Ee&&gi(g,j),E}function b(g,y,w,T){if(typeof w=="object"&&w!==null&&w.type===ys&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:e:{for(var E=w.key,_=y;_!==null;){if(_.key===E){if(E=w.type,E===ys){if(_.tag===7){n(g,_.sibling),y=i(_,w.props.children),y.return=g,g=y;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===kr&&rv(E)===_.type){n(g,_.sibling),y=i(_,w.props),y.ref=Ro(g,_,w),y.return=g,g=y;break e}n(g,_);break}else t(g,_);_=_.sibling}w.type===ys?(y=Ii(w.props.children,g.mode,T,w.key),y.return=g,g=y):(T=Gl(w.type,w.key,w.props,null,g.mode,T),T.ref=Ro(g,y,w),T.return=g,g=T)}return o(g);case vs:e:{for(_=w.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),y=i(y,w.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=xd(w,g.mode,T),y.return=g,g=y}return o(g);case kr:return _=w._init,b(g,y,_(w._payload),T)}if(Io(w))return h(g,y,w,T);if(Co(w))return m(g,y,w,T);xl(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,w),y.return=g,g=y):(n(g,y),y=yd(w,g.mode,T),y.return=g,g=y),o(g)):n(g,y)}return b}var io=K1(!0),G1=K1(!1),bu=oi(null),Su=null,Cs=null,Ch=null;function _h(){Ch=Cs=Su=null}function Ph(e){var t=bu.current;ke(bu),e._currentValue=t}function Af(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 $s(e,t){Su=e,Ch=Cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(Ch!==e)if(e={context:e,memoizedValue:t,next:null},Cs===null){if(Su===null)throw Error(N(308));Cs=e,Su.dependencies={lanes:0,firstContext:e}}else Cs=Cs.next=e;return t}var Ei=null;function jh(e){Ei===null?Ei=[e]:Ei.push(e)}function Q1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,jh(t)):(n.next=i.next,i.next=n),t.interleaved=n,cr(e,r)}function cr(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 Er=!1;function Ah(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Y1(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 or(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,cr(e,n)}return i=r.interleaved,i===null?(t.next=t,jh(r)):(t.next=i.next,i.next=t),r.interleaved=t,cr(e,n)}function Vl(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,mh(e,n)}}function iv(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 ku(e,t,n,r){var i=e.updateQueue;Er=!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 h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){c=h.call(p,c,f);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,c,f):h,f==null)break e;c=Ae({},c,f);break e;case 2:Er=!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);Wi|=o,e.lanes=o,e.memoizedState=c}}function sv(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(N(191,i));i.call(r)}}}var Ga={},zn=oi(Ga),ya=oi(Ga),xa=oi(Ga);function Ti(e){if(e===Ga)throw Error(N(174));return e}function Rh(e,t){switch(xe(xa,t),xe(ya,e),xe(zn,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cf(t,e)}ke(zn),xe(zn,t)}function so(){ke(zn),ke(ya),ke(xa)}function X1(e){Ti(xa.current);var t=Ti(zn.current),n=cf(t,e.type);t!==n&&(xe(ya,e),xe(zn,n))}function Oh(e){ya.current===e&&(ke(zn),ke(ya))}var _e=oi(0);function Eu(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 fd=[];function Dh(){for(var e=0;e<fd.length;e++)fd[e]._workInProgressVersionPrimary=null;fd.length=0}var Ul=pr.ReactCurrentDispatcher,pd=pr.ReactCurrentBatchConfig,Hi=0,je=null,ze=null,Ke=null,Tu=!1,Yo=!1,wa=0,MC=0;function at(){throw Error(N(321))}function Fh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function Nh(e,t,n,r,i,s){if(Hi=s,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ul.current=e===null||e.memoizedState===null?zC:BC,e=n(r,i),Yo){s=0;do{if(Yo=!1,wa=0,25<=s)throw Error(N(301));s+=1,Ke=ze=null,t.updateQueue=null,Ul.current=VC,e=n(r,i)}while(Yo)}if(Ul.current=Cu,t=ze!==null&&ze.next!==null,Hi=0,Ke=ze=je=null,Tu=!1,t)throw Error(N(300));return e}function Mh(){var e=wa!==0;return wa=0,e}function On(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function cn(){if(ze===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ke===null?je.memoizedState:Ke.next;if(t!==null)Ke=t,ze=e;else{if(e===null)throw Error(N(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function ba(e,t){return typeof t=="function"?t(e):t}function hd(e){var t=cn(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=ze,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((Hi&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,je.lanes|=d,Wi|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(Pt=!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,je.lanes|=s,Wi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function md(e){var t=cn(),n=t.queue;if(n===null)throw Error(N(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);Tn(s,t.memoizedState)||(Pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Z1(){}function J1(e,t){var n=je,r=cn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,Pt=!0),r=r.queue,Lh(nw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Sa(9,tw.bind(null,n,r,i,t),void 0,null),Ge===null)throw Error(N(349));Hi&30||ew(n,t,i)}return i}function ew(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tw(e,t,n,r){t.value=n,t.getSnapshot=r,rw(t)&&iw(e)}function nw(e,t,n){return n(function(){rw(t)&&iw(e)})}function rw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function iw(e){var t=cr(e,1);t!==null&&En(t,e,1,-1)}function ov(e){var t=On();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=$C.bind(null,je,e),[t.memoizedState,e]}function Sa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.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 sw(){return cn().memoizedState}function Hl(e,t,n,r){var i=On();je.flags|=e,i.memoizedState=Sa(1|t,n,void 0,r===void 0?null:r)}function rc(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(ze!==null){var o=ze.memoizedState;if(s=o.destroy,r!==null&&Fh(r,o.deps)){i.memoizedState=Sa(t,n,s,r);return}}je.flags|=e,i.memoizedState=Sa(1|t,n,s,r)}function av(e,t){return Hl(8390656,8,e,t)}function Lh(e,t){return rc(2048,8,e,t)}function ow(e,t){return rc(4,2,e,t)}function aw(e,t){return rc(4,4,e,t)}function lw(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 uw(e,t,n){return n=n!=null?n.concat([e]):null,rc(4,4,lw.bind(null,t,e),n)}function Ih(){}function cw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fw(e,t,n){return Hi&21?(Tn(n,t)||(n=v1(),je.lanes|=n,Wi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function LC(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=pd.transition;pd.transition={};try{e(!1),t()}finally{pe=n,pd.transition=r}}function pw(){return cn().memoizedState}function IC(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hw(e))mw(t,n);else if(n=Q1(e,t,n,r),n!==null){var i=yt();En(n,e,r,i),gw(n,t,r)}}function $C(e,t,n){var r=Kr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hw(e))mw(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,Tn(a,o)){var l=t.interleaved;l===null?(i.next=i,jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Q1(e,t,i,r),n!==null&&(i=yt(),En(n,e,r,i),gw(n,t,r))}}function hw(e){var t=e.alternate;return e===je||t!==null&&t===je}function mw(e,t){Yo=Tu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mh(e,n)}}var Cu={readContext:un,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},zC={readContext:un,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:av,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hl(4194308,4,lw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hl(4,2,e,t)},useMemo:function(e,t){var n=On();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=On();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=IC.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:ov,useDebugValue:Ih,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=ov(!1),t=e[0];return e=LC.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=On();if(Ee){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ge===null)throw Error(N(349));Hi&30||ew(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,av(nw.bind(null,r,s,e),[e]),r.flags|=2048,Sa(9,tw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=On(),t=Ge.identifierPrefix;if(Ee){var n=ir,r=rr;n=(r&~(1<<32-kn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BC={readContext:un,useCallback:cw,useContext:un,useEffect:Lh,useImperativeHandle:uw,useInsertionEffect:ow,useLayoutEffect:aw,useMemo:dw,useReducer:hd,useRef:sw,useState:function(){return hd(ba)},useDebugValue:Ih,useDeferredValue:function(e){var t=cn();return fw(t,ze.memoizedState,e)},useTransition:function(){var e=hd(ba)[0],t=cn().memoizedState;return[e,t]},useMutableSource:Z1,useSyncExternalStore:J1,useId:pw,unstable_isNewReconciler:!1},VC={readContext:un,useCallback:cw,useContext:un,useEffect:Lh,useImperativeHandle:uw,useInsertionEffect:ow,useLayoutEffect:aw,useMemo:dw,useReducer:md,useRef:sw,useState:function(){return md(ba)},useDebugValue:Ih,useDeferredValue:function(e){var t=cn();return ze===null?t.memoizedState=e:fw(t,ze.memoizedState,e)},useTransition:function(){var e=md(ba)[0],t=cn().memoizedState;return[e,t]},useMutableSource:Z1,useSyncExternalStore:J1,useId:pw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Rf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={isMounted:function(e){return(e=e._reactInternals)?Zi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(En(t,e,i,r),Vl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(En(t,e,i,r),Vl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),r=Kr(e),i=or(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(En(t,e,r,n),Vl(t,e,r))}};function lv(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?!ha(n,r)||!ha(i,s):!0}function vw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=At(t)?Vi:pt.current,r=t.contextTypes,s=(r=r!=null)?no(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ic,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function uv(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&&ic.enqueueReplaceState(t,t.state,null)}function Of(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ah(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=At(t)?Vi:pt.current,i.context=no(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Rf(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&&ic.enqueueReplaceState(i,i.state,null),ku(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function oo(e,t){try{var n="",r=t;do n+=gT(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{Yc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Lo(e):""}function gT(e){switch(e.tag){case 5:return Lo(e.type);case 16:return Lo("Lazy");case 13:return Lo("Suspense");case 19:return Lo("SuspenseList");case 0:case 2:case 15:return e=Xc(e.type,!1),e;case 11:return e=Xc(e.type.render,!1),e;case 1:return e=Xc(e.type,!0),e;default:return""}}function sf(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 ys:return"Fragment";case vs:return"Portal";case tf:return"Profiler";case ch:return"StrictMode";case nf:return"Suspense";case rf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yx:return(e.displayName||"Context")+".Consumer";case Qx:return(e._context.displayName||"Context")+".Provider";case dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fh:return t=e.displayName||null,t!==null?t:sf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return sf(e(t))}catch{}}return null}function vT(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 sf(t);case 8:return t===ch?"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 ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yT(e){var t=Zx(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 ul(e){e._valueTracker||(e._valueTracker=yT(e))}function Jx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lu(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 of(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ei(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 e1(e,t){t=t.checked,t!=null&&uh(e,"checked",t,!1)}function af(e,t){e1(e,t);var n=ei(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")?lf(e,t.type,n):t.hasOwnProperty("defaultValue")&&lf(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _g(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 lf(e,t,n){(t!=="number"||lu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Io=Array.isArray;function Ns(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=""+ei(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 uf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if(Io(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function t1(e,t){var n=ei(t.value),r=ei(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 jg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function n1(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 cf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?n1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cl,r1=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(cl=cl||document.createElement("div"),cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function la(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wo={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},xT=["Webkit","ms","Moz","O"];Object.keys(Wo).forEach(function(e){xT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wo[t]=Wo[e]})});function i1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wo.hasOwnProperty(e)&&Wo[e]?(""+t).trim():t+"px"}function s1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=i1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wT=Ae({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 df(e,t){if(t){if(wT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function ff(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 pf=null;function ph(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hf=null,Ms=null,Ls=null;function Ag(e){if(e=Ka(e)){if(typeof hf!="function")throw Error(N(280));var t=e.stateNode;t&&(t=tc(t),hf(e.stateNode,e.type,t))}}function o1(e){Ms?Ls?Ls.push(e):Ls=[e]:Ms=e}function a1(){if(Ms){var e=Ms,t=Ls;if(Ls=Ms=null,Ag(e),t)for(e=0;e<t.length;e++)Ag(t[e])}}function l1(e,t){return e(t)}function u1(){}var Zc=!1;function c1(e,t,n){if(Zc)return e(t,n);Zc=!0;try{return l1(e,t,n)}finally{Zc=!1,(Ms!==null||Ls!==null)&&(u1(),a1())}}function ua(e,t){var n=e.stateNode;if(n===null)return null;var r=tc(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(N(231,t,typeof n));return n}var mf=!1;if(lr)try{var _o={};Object.defineProperty(_o,"passive",{get:function(){mf=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{mf=!1}function bT(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 qo=!1,uu=null,cu=!1,gf=null,ST={onError:function(e){qo=!0,uu=e}};function kT(e,t,n,r,i,s,o,a,l){qo=!1,uu=null,bT.apply(ST,arguments)}function ET(e,t,n,r,i,s,o,a,l){if(kT.apply(this,arguments),qo){if(qo){var u=uu;qo=!1,uu=null}else throw Error(N(198));cu||(cu=!0,gf=u)}}function Zi(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 d1(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 Rg(e){if(Zi(e)!==e)throw Error(N(188))}function TT(e){var t=e.alternate;if(!t){if(t=Zi(e),t===null)throw Error(N(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 Rg(i),e;if(s===r)return Rg(i),t;s=s.sibling}throw Error(N(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(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function f1(e){return e=TT(e),e!==null?p1(e):null}function p1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=p1(e);if(t!==null)return t;e=e.sibling}return null}var h1=Ut.unstable_scheduleCallback,Og=Ut.unstable_cancelCallback,CT=Ut.unstable_shouldYield,_T=Ut.unstable_requestPaint,Me=Ut.unstable_now,PT=Ut.unstable_getCurrentPriorityLevel,hh=Ut.unstable_ImmediatePriority,m1=Ut.unstable_UserBlockingPriority,du=Ut.unstable_NormalPriority,jT=Ut.unstable_LowPriority,g1=Ut.unstable_IdlePriority,Xu=null,In=null;function AT(e){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(Xu,e,void 0,(e.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:DT,RT=Math.log,OT=Math.LN2;function DT(e){return e>>>=0,e===0?32:31-(RT(e)/OT|0)|0}var dl=64,fl=4194304;function $o(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 fu(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=$o(a):(s&=o,s!==0&&(r=$o(s)))}else o=n&~i,o!==0?r=$o(o):s!==0&&(r=$o(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-Sn(t),i=1<<n,r|=e[n],t&=~i;return r}function FT(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 NT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Sn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=FT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function vf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function v1(){var e=dl;return dl<<=1,!(dl&4194240)&&(dl=64),e}function Jc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sn(t),e[t]=n}function MT(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-Sn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function mh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Sn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var pe=0;function y1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var x1,gh,w1,b1,S1,yf=!1,pl=[],Br=null,Vr=null,Ur=null,ca=new Map,da=new Map,Cr=[],LT="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 Dg(e,t){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":ca.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":da.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&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IT(e,t,n,r,i){switch(t){case"focusin":return Br=Po(Br,e,t,n,r,i),!0;case"dragenter":return Vr=Po(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=Po(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ca.set(s,Po(ca.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,da.set(s,Po(da.get(s)||null,e,t,n,r,i)),!0}return!1}function k1(e){var t=ki(e.target);if(t!==null){var n=Zi(t);if(n!==null){if(t=n.tag,t===13){if(t=d1(n),t!==null){e.blockedOn=t,S1(e.priority,function(){w1(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 $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pf=r,n.target.dispatchEvent(r),pf=null}else return t=Ka(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function Fg(e,t,n){$l(e)&&n.delete(t)}function $T(){yf=!1,Br!==null&&$l(Br)&&(Br=null),Vr!==null&&$l(Vr)&&(Vr=null),Ur!==null&&$l(Ur)&&(Ur=null),ca.forEach(Fg),da.forEach(Fg)}function jo(e,t){e.blockedOn===t&&(e.blockedOn=null,yf||(yf=!0,Ut.unstable_scheduleCallback(Ut.unstable_NormalPriority,$T)))}function fa(e){function t(i){return jo(i,e)}if(0<pl.length){jo(pl[0],e);for(var n=1;n<pl.length;n++){var r=pl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Br!==null&&jo(Br,e),Vr!==null&&jo(Vr,e),Ur!==null&&jo(Ur,e),ca.forEach(t),da.forEach(t),n=0;n<Cr.length;n++)r=Cr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cr.length&&(n=Cr[0],n.blockedOn===null);)k1(n),n.blockedOn===null&&Cr.shift()}var Is=pr.ReactCurrentBatchConfig,pu=!0;function zT(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=1,vh(e,t,n,r)}finally{pe=i,Is.transition=s}}function BT(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=4,vh(e,t,n,r)}finally{pe=i,Is.transition=s}}function vh(e,t,n,r){if(pu){var i=xf(e,t,n,r);if(i===null)ud(e,t,r,hu,n),Dg(e,r);else if(IT(i,e,t,n,r))r.stopPropagation();else if(Dg(e,r),t&4&&-1<LT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&x1(s),s=xf(e,t,n,r),s===null&&ud(e,t,r,hu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ud(e,t,r,null,n)}}var hu=null;function xf(e,t,n,r){if(hu=null,e=ph(r),e=ki(e),e!==null)if(t=Zi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=d1(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 hu=e,null}function E1(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(PT()){case hh:return 1;case m1:return 4;case du:case jT:return 16;case g1:return 536870912;default:return 16}default:return 16}}var Lr=null,yh=null,zl=null;function T1(){if(zl)return zl;var e,t=yh,n=t.length,r,i="value"in Lr?Lr.value:Lr.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 zl=i.slice(e,1<r?1-r:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hl(){return!0}function Ng(){return!1}function Wt(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)?hl:Ng,this.isPropagationStopped=Ng,this}return Ae(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=hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),t}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xh=Wt(mo),qa=Ae({},mo,{view:0,detail:0}),VT=Wt(qa),ed,td,Ao,Zu=Ae({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wh,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!==Ao&&(Ao&&e.type==="mousemove"?(ed=e.screenX-Ao.screenX,td=e.screenY-Ao.screenY):td=ed=0,Ao=e),ed)},movementY:function(e){return"movementY"in e?e.movementY:td}}),Mg=Wt(Zu),UT=Ae({},Zu,{dataTransfer:0}),HT=Wt(UT),WT=Ae({},qa,{relatedTarget:0}),nd=Wt(WT),qT=Ae({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),KT=Wt(qT),GT=Ae({},mo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QT=Wt(GT),YT=Ae({},mo,{data:0}),Lg=Wt(YT),XT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZT={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"},JT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JT[e])?!!t[e]:!1}function wh(){return eC}var tC=Ae({},qa,{key:function(e){if(e.key){var t=XT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wh,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nC=Wt(tC),rC=Ae({},Zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ig=Wt(rC),iC=Ae({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wh}),sC=Wt(iC),oC=Ae({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),aC=Wt(oC),lC=Ae({},Zu,{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}),uC=Wt(lC),cC=[9,13,27,32],bh=lr&&"CompositionEvent"in window,Ko=null;lr&&"documentMode"in document&&(Ko=document.documentMode);var dC=lr&&"TextEvent"in window&&!Ko,C1=lr&&(!bh||Ko&&8<Ko&&11>=Ko),$g=" ",zg=!1;function _1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function P1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function fC(e,t){switch(e){case"compositionend":return P1(t);case"keypress":return t.which!==32?null:(zg=!0,$g);case"textInput":return e=t.data,e===$g&&zg?null:e;default:return null}}function pC(e,t){if(xs)return e==="compositionend"||!bh&&_1(e,t)?(e=T1(),zl=yh=Lr=null,xs=!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 C1&&t.locale!=="ko"?null:t.data;default:return null}}var hC={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 Bg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hC[e.type]:t==="textarea"}function j1(e,t,n,r){o1(r),t=mu(t,"onChange"),0<t.length&&(n=new xh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Go=null,pa=null;function mC(e){z1(e,0)}function Ju(e){var t=Ss(e);if(Jx(t))return e}function gC(e,t){if(e==="change")return t}var A1=!1;if(lr){var rd;if(lr){var id="oninput"in document;if(!id){var Vg=document.createElement("div");Vg.setAttribute("oninput","return;"),id=typeof Vg.oninput=="function"}rd=id}else rd=!1;A1=rd&&(!document.documentMode||9<document.documentMode)}function Ug(){Go&&(Go.detachEvent("onpropertychange",R1),pa=Go=null)}function R1(e){if(e.propertyName==="value"&&Ju(pa)){var t=[];j1(t,pa,e,ph(e)),c1(mC,t)}}function vC(e,t,n){e==="focusin"?(Ug(),Go=t,pa=n,Go.attachEvent("onpropertychange",R1)):e==="focusout"&&Ug()}function yC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ju(pa)}function xC(e,t){if(e==="click")return Ju(t)}function wC(e,t){if(e==="input"||e==="change")return Ju(t)}function bC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:bC;function ha(e,t){if(En(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(!ef.call(t,i)||!En(e[i],t[i]))return!1}return!0}function Hg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wg(e,t){var n=Hg(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=Hg(n)}}function O1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?O1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function D1(){for(var e=window,t=lu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lu(e.document)}return t}function Sh(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 SC(e){var t=D1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&O1(n.ownerDocument.documentElement,n)){if(r!==null&&Sh(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=Wg(n,s);var o=Wg(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 kC=lr&&"documentMode"in document&&11>=document.documentMode,ws=null,wf=null,Qo=null,bf=!1;function qg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bf||ws==null||ws!==lu(r)||(r=ws,"selectionStart"in r&&Sh(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}),Qo&&ha(Qo,r)||(Qo=r,r=mu(wf,"onSelect"),0<r.length&&(t=new xh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ws)))}function ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bs={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionend:ml("Transition","TransitionEnd")},sd={},F1={};lr&&(F1=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function ec(e){if(sd[e])return sd[e];if(!bs[e])return e;var t=bs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in F1)return sd[e]=t[n];return e}var N1=ec("animationend"),M1=ec("animationiteration"),L1=ec("animationstart"),I1=ec("transitionend"),$1=new Map,Kg="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 si(e,t){$1.set(e,t),Xi(t,[e])}for(var od=0;od<Kg.length;od++){var ad=Kg[od],EC=ad.toLowerCase(),TC=ad[0].toUpperCase()+ad.slice(1);si(EC,"on"+TC)}si(N1,"onAnimationEnd");si(M1,"onAnimationIteration");si(L1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(I1,"onTransitionEnd");to("onMouseEnter",["mouseout","mouseover"]);to("onMouseLeave",["mouseout","mouseover"]);to("onPointerEnter",["pointerout","pointerover"]);to("onPointerLeave",["pointerout","pointerover"]);Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="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(" "),CC=new Set("cancel close invalid load scroll toggle".split(" ").concat(zo));function Gg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ET(r,t,void 0,e),e.currentTarget=null}function z1(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;Gg(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;Gg(i,a,u),s=l}}}if(cu)throw e=gf,cu=!1,gf=null,e}function be(e,t){var n=t[Cf];n===void 0&&(n=t[Cf]=new Set);var r=e+"__bubble";n.has(r)||(B1(t,e,2,!1),n.add(r))}function ld(e,t,n){var r=0;t&&(r|=4),B1(n,e,r,t)}var gl="_reactListening"+Math.random().toString(36).slice(2);function ma(e){if(!e[gl]){e[gl]=!0,Gx.forEach(function(n){n!=="selectionchange"&&(CC.has(n)||ld(n,!1,e),ld(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gl]||(t[gl]=!0,ld("selectionchange",!1,t))}}function B1(e,t,n,r){switch(E1(t)){case 1:var i=zT;break;case 4:i=BT;break;default:i=vh}n=i.bind(null,t,n,e),i=void 0,!mf||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 ud(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=ki(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}c1(function(){var u=s,d=ph(n),c=[];e:{var f=$1.get(e);if(f!==void 0){var p=xh,h=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":p=nC;break;case"focusin":h="focus",p=nd;break;case"focusout":h="blur",p=nd;break;case"beforeblur":case"afterblur":p=nd;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=Mg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=HT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=sC;break;case N1:case M1:case L1:p=KT;break;case I1:p=aC;break;case"scroll":p=VT;break;case"wheel":p=uC;break;case"copy":case"cut":case"paste":p=QT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ig}var m=(t&4)!==0,b=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var y=u,w;y!==null;){w=y;var T=w.stateNode;if(w.tag===5&&T!==null&&(w=T,g!==null&&(T=ua(y,g),T!=null&&m.push(ga(y,T,w)))),b)break;y=y.return}0<m.length&&(f=new p(f,h,null,n,d),c.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==pf&&(h=n.relatedTarget||n.fromElement)&&(ki(h)||h[ur]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?ki(h):null,h!==null&&(b=Zi(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(m=Mg,T="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=Ig,T="onPointerLeave",g="onPointerEnter",y="pointer"),b=p==null?f:Ss(p),w=h==null?f:Ss(h),f=new m(T,y+"leave",p,n,d),f.target=b,f.relatedTarget=w,T=null,ki(d)===u&&(m=new m(g,y+"enter",h,n,d),m.target=w,m.relatedTarget=b,T=m),b=T,p&&h)t:{for(m=p,g=h,y=0,w=m;w;w=hs(w))y++;for(w=0,T=g;T;T=hs(T))w++;for(;0<y-w;)m=hs(m),y--;for(;0<w-y;)g=hs(g),w--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=hs(m),g=hs(g)}m=null}else m=null;p!==null&&Qg(c,f,p,m,!1),h!==null&&b!==null&&Qg(c,b,h,m,!0)}}e:{if(f=u?Ss(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=gC;else if(Bg(f))if(A1)E=wC;else{E=yC;var _=vC}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=xC);if(E&&(E=E(e,u))){j1(c,E,n,d);break e}_&&_(e,f,u),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&lf(f,"number",f.value)}switch(_=u?Ss(u):window,e){case"focusin":(Bg(_)||_.contentEditable==="true")&&(ws=_,wf=u,Qo=null);break;case"focusout":Qo=wf=ws=null;break;case"mousedown":bf=!0;break;case"contextmenu":case"mouseup":case"dragend":bf=!1,qg(c,n,d);break;case"selectionchange":if(kC)break;case"keydown":case"keyup":qg(c,n,d)}var C;if(bh)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else xs?_1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(C1&&n.locale!=="ko"&&(xs||j!=="onCompositionStart"?j==="onCompositionEnd"&&xs&&(C=T1()):(Lr=d,yh="value"in Lr?Lr.value:Lr.textContent,xs=!0)),_=mu(u,j),0<_.length&&(j=new Lg(j,e,null,n,d),c.push({event:j,listeners:_}),C?j.data=C:(C=P1(n),C!==null&&(j.data=C)))),(C=dC?fC(e,n):pC(e,n))&&(u=mu(u,"onBeforeInput"),0<u.length&&(d=new Lg("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=C))}z1(c,t)})}function ga(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ua(e,n),s!=null&&r.unshift(ga(e,s,i)),s=ua(e,t),s!=null&&r.push(ga(e,s,i))),e=e.return}return r}function hs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qg(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=ua(n,s),l!=null&&o.unshift(ga(n,l,a))):i||(l=ua(n,s),l!=null&&o.push(ga(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var _C=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Yg(e){return(typeof e=="string"?e:""+e).replace(_C,`
38
+ `).replace(PC,"")}function vl(e,t,n){if(t=Yg(t),Yg(e)!==t&&n)throw Error(N(425))}function gu(){}var Sf=null,kf=null;function Ef(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 Tf=typeof setTimeout=="function"?setTimeout:void 0,jC=typeof clearTimeout=="function"?clearTimeout:void 0,Xg=typeof Promise=="function"?Promise:void 0,AC=typeof queueMicrotask=="function"?queueMicrotask:typeof Xg<"u"?function(e){return Xg.resolve(null).then(e).catch(RC)}:Tf;function RC(e){setTimeout(function(){throw e})}function cd(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),fa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);fa(t)}function Hr(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 Zg(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 go=Math.random().toString(36).slice(2),Ln="__reactFiber$"+go,va="__reactProps$"+go,ur="__reactContainer$"+go,Cf="__reactEvents$"+go,OC="__reactListeners$"+go,DC="__reactHandles$"+go;function ki(e){var t=e[Ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ur]||n[Ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zg(e);e!==null;){if(n=e[Ln])return n;e=Zg(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[Ln]||e[ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function tc(e){return e[va]||null}var _f=[],ks=-1;function oi(e){return{current:e}}function ke(e){0>ks||(e.current=_f[ks],_f[ks]=null,ks--)}function xe(e,t){ks++,_f[ks]=e.current,e.current=t}var ti={},pt=oi(ti),jt=oi(!1),Vi=ti;function no(e,t){var n=e.type.contextTypes;if(!n)return ti;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 At(e){return e=e.childContextTypes,e!=null}function vu(){ke(jt),ke(pt)}function Jg(e,t,n){if(pt.current!==ti)throw Error(N(168));xe(pt,t),xe(jt,n)}function V1(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(N(108,vT(e)||"Unknown",i));return Ae({},n,r)}function yu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Vi=pt.current,xe(pt,e),xe(jt,jt.current),!0}function ev(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=V1(e,t,Vi),r.__reactInternalMemoizedMergedChildContext=e,ke(jt),ke(pt),xe(pt,e)):ke(jt),xe(jt,n)}var er=null,nc=!1,dd=!1;function U1(e){er===null?er=[e]:er.push(e)}function FC(e){nc=!0,U1(e)}function ai(){if(!dd&&er!==null){dd=!0;var e=0,t=pe;try{var n=er;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}er=null,nc=!1}catch(i){throw er!==null&&(er=er.slice(e+1)),h1(hh,ai),i}finally{pe=t,dd=!1}}return null}var Es=[],Ts=0,xu=null,wu=0,en=[],tn=0,Ui=null,rr=1,ir="";function gi(e,t){Es[Ts++]=wu,Es[Ts++]=xu,xu=e,wu=t}function H1(e,t,n){en[tn++]=rr,en[tn++]=ir,en[tn++]=Ui,Ui=e;var r=rr;e=ir;var i=32-Sn(r)-1;r&=~(1<<i),n+=1;var s=32-Sn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,rr=1<<32-Sn(t)+i|n<<i|r,ir=s+e}else rr=1<<s|n<<i|r,ir=e}function kh(e){e.return!==null&&(gi(e,1),H1(e,1,0))}function Eh(e){for(;e===xu;)xu=Es[--Ts],Es[Ts]=null,wu=Es[--Ts],Es[Ts]=null;for(;e===Ui;)Ui=en[--tn],en[tn]=null,ir=en[--tn],en[tn]=null,rr=en[--tn],en[tn]=null}var Vt=null,$t=null,Ee=!1,wn=null;function W1(e,t){var n=rn(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 tv(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,Vt=e,$t=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Vt=e,$t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ui!==null?{id:rr,overflow:ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Vt=e,$t=null,!0):!1;default:return!1}}function Pf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jf(e){if(Ee){var t=$t;if(t){var n=t;if(!tv(e,t)){if(Pf(e))throw Error(N(418));t=Hr(n.nextSibling);var r=Vt;t&&tv(e,t)?W1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Vt=e)}}else{if(Pf(e))throw Error(N(418));e.flags=e.flags&-4097|2,Ee=!1,Vt=e}}}function nv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Vt=e}function yl(e){if(e!==Vt)return!1;if(!Ee)return nv(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ef(e.type,e.memoizedProps)),t&&(t=$t)){if(Pf(e))throw q1(),Error(N(418));for(;t;)W1(e,t),t=Hr(t.nextSibling)}if(nv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$t=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$t=null}}else $t=Vt?Hr(e.stateNode.nextSibling):null;return!0}function q1(){for(var e=$t;e;)e=Hr(e.nextSibling)}function ro(){$t=Vt=null,Ee=!1}function Th(e){wn===null?wn=[e]:wn.push(e)}var NC=pr.ReactCurrentBatchConfig;function Ro(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(N(309));var r=n.stateNode}if(!r)throw Error(N(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(N(284));if(!n._owner)throw Error(N(290,e))}return e}function xl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rv(e){var t=e._init;return t(e._payload)}function K1(e){function t(g,y){if(e){var w=g.deletions;w===null?(g.deletions=[y],g.flags|=16):w.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=Gr(g,y),g.index=0,g.sibling=null,g}function s(g,y,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<y?(g.flags|=2,y):w):(g.flags|=2,y)):(g.flags|=1048576,y)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,y,w,T){return y===null||y.tag!==6?(y=yd(w,g.mode,T),y.return=g,y):(y=i(y,w),y.return=g,y)}function l(g,y,w,T){var E=w.type;return E===ys?d(g,y,w.props.children,T,w.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===kr&&rv(E)===y.type)?(T=i(y,w.props),T.ref=Ro(g,y,w),T.return=g,T):(T=Gl(w.type,w.key,w.props,null,g.mode,T),T.ref=Ro(g,y,w),T.return=g,T)}function u(g,y,w,T){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=xd(w,g.mode,T),y.return=g,y):(y=i(y,w.children||[]),y.return=g,y)}function d(g,y,w,T,E){return y===null||y.tag!==7?(y=Ii(w,g.mode,T,E),y.return=g,y):(y=i(y,w),y.return=g,y)}function c(g,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=yd(""+y,g.mode,w),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ll:return w=Gl(y.type,y.key,y.props,null,g.mode,w),w.ref=Ro(g,null,y),w.return=g,w;case vs:return y=xd(y,g.mode,w),y.return=g,y;case kr:var T=y._init;return c(g,T(y._payload),w)}if(Io(y)||Co(y))return y=Ii(y,g.mode,w,null),y.return=g,y;xl(g,y)}return null}function f(g,y,w,T){var E=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:a(g,y,""+w,T);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:return w.key===E?l(g,y,w,T):null;case vs:return w.key===E?u(g,y,w,T):null;case kr:return E=w._init,f(g,y,E(w._payload),T)}if(Io(w)||Co(w))return E!==null?null:d(g,y,w,T,null);xl(g,w)}return null}function p(g,y,w,T,E){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(w)||null,a(y,g,""+T,E);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ll:return g=g.get(T.key===null?w:T.key)||null,l(y,g,T,E);case vs:return g=g.get(T.key===null?w:T.key)||null,u(y,g,T,E);case kr:var _=T._init;return p(g,y,w,_(T._payload),E)}if(Io(T)||Co(T))return g=g.get(w)||null,d(y,g,T,E,null);xl(y,T)}return null}function h(g,y,w,T){for(var E=null,_=null,C=y,j=y=0,k=null;C!==null&&j<w.length;j++){C.index>j?(k=C,C=null):k=C.sibling;var R=f(g,C,w[j],T);if(R===null){C===null&&(C=k);break}e&&C&&R.alternate===null&&t(g,C),y=s(R,y,j),_===null?E=R:_.sibling=R,_=R,C=k}if(j===w.length)return n(g,C),Ee&&gi(g,j),E;if(C===null){for(;j<w.length;j++)C=c(g,w[j],T),C!==null&&(y=s(C,y,j),_===null?E=C:_.sibling=C,_=C);return Ee&&gi(g,j),E}for(C=r(g,C);j<w.length;j++)k=p(C,g,j,w[j],T),k!==null&&(e&&k.alternate!==null&&C.delete(k.key===null?j:k.key),y=s(k,y,j),_===null?E=k:_.sibling=k,_=k);return e&&C.forEach(function(M){return t(g,M)}),Ee&&gi(g,j),E}function m(g,y,w,T){var E=Co(w);if(typeof E!="function")throw Error(N(150));if(w=E.call(w),w==null)throw Error(N(151));for(var _=E=null,C=y,j=y=0,k=null,R=w.next();C!==null&&!R.done;j++,R=w.next()){C.index>j?(k=C,C=null):k=C.sibling;var M=f(g,C,R.value,T);if(M===null){C===null&&(C=k);break}e&&C&&M.alternate===null&&t(g,C),y=s(M,y,j),_===null?E=M:_.sibling=M,_=M,C=k}if(R.done)return n(g,C),Ee&&gi(g,j),E;if(C===null){for(;!R.done;j++,R=w.next())R=c(g,R.value,T),R!==null&&(y=s(R,y,j),_===null?E=R:_.sibling=R,_=R);return Ee&&gi(g,j),E}for(C=r(g,C);!R.done;j++,R=w.next())R=p(C,g,j,R.value,T),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?j:R.key),y=s(R,y,j),_===null?E=R:_.sibling=R,_=R);return e&&C.forEach(function(H){return t(g,H)}),Ee&&gi(g,j),E}function b(g,y,w,T){if(typeof w=="object"&&w!==null&&w.type===ys&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:e:{for(var E=w.key,_=y;_!==null;){if(_.key===E){if(E=w.type,E===ys){if(_.tag===7){n(g,_.sibling),y=i(_,w.props.children),y.return=g,g=y;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===kr&&rv(E)===_.type){n(g,_.sibling),y=i(_,w.props),y.ref=Ro(g,_,w),y.return=g,g=y;break e}n(g,_);break}else t(g,_);_=_.sibling}w.type===ys?(y=Ii(w.props.children,g.mode,T,w.key),y.return=g,g=y):(T=Gl(w.type,w.key,w.props,null,g.mode,T),T.ref=Ro(g,y,w),T.return=g,g=T)}return o(g);case vs:e:{for(_=w.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),y=i(y,w.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=xd(w,g.mode,T),y.return=g,g=y}return o(g);case kr:return _=w._init,b(g,y,_(w._payload),T)}if(Io(w))return h(g,y,w,T);if(Co(w))return m(g,y,w,T);xl(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,w),y.return=g,g=y):(n(g,y),y=yd(w,g.mode,T),y.return=g,g=y),o(g)):n(g,y)}return b}var io=K1(!0),G1=K1(!1),bu=oi(null),Su=null,Cs=null,Ch=null;function _h(){Ch=Cs=Su=null}function Ph(e){var t=bu.current;ke(bu),e._currentValue=t}function Af(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 $s(e,t){Su=e,Ch=Cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function ln(e){var t=e._currentValue;if(Ch!==e)if(e={context:e,memoizedValue:t,next:null},Cs===null){if(Su===null)throw Error(N(308));Cs=e,Su.dependencies={lanes:0,firstContext:e}}else Cs=Cs.next=e;return t}var Ei=null;function jh(e){Ei===null?Ei=[e]:Ei.push(e)}function Q1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,jh(t)):(n.next=i.next,i.next=n),t.interleaved=n,cr(e,r)}function cr(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 Er=!1;function Ah(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Y1(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 or(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,cr(e,n)}return i=r.interleaved,i===null?(t.next=t,jh(r)):(t.next=i.next,i.next=t),r.interleaved=t,cr(e,n)}function Vl(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,mh(e,n)}}function iv(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 ku(e,t,n,r){var i=e.updateQueue;Er=!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 h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){c=h.call(p,c,f);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,c,f):h,f==null)break e;c=Ae({},c,f);break e;case 2:Er=!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);Wi|=o,e.lanes=o,e.memoizedState=c}}function sv(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(N(191,i));i.call(r)}}}var Ga={},$n=oi(Ga),ya=oi(Ga),xa=oi(Ga);function Ti(e){if(e===Ga)throw Error(N(174));return e}function Rh(e,t){switch(xe(xa,t),xe(ya,e),xe($n,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cf(t,e)}ke($n),xe($n,t)}function so(){ke($n),ke(ya),ke(xa)}function X1(e){Ti(xa.current);var t=Ti($n.current),n=cf(t,e.type);t!==n&&(xe(ya,e),xe($n,n))}function Oh(e){ya.current===e&&(ke($n),ke(ya))}var _e=oi(0);function Eu(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 fd=[];function Dh(){for(var e=0;e<fd.length;e++)fd[e]._workInProgressVersionPrimary=null;fd.length=0}var Ul=pr.ReactCurrentDispatcher,pd=pr.ReactCurrentBatchConfig,Hi=0,je=null,ze=null,Ke=null,Tu=!1,Yo=!1,wa=0,MC=0;function at(){throw Error(N(321))}function Fh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Nh(e,t,n,r,i,s){if(Hi=s,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ul.current=e===null||e.memoizedState===null?zC:BC,e=n(r,i),Yo){s=0;do{if(Yo=!1,wa=0,25<=s)throw Error(N(301));s+=1,Ke=ze=null,t.updateQueue=null,Ul.current=VC,e=n(r,i)}while(Yo)}if(Ul.current=Cu,t=ze!==null&&ze.next!==null,Hi=0,Ke=ze=je=null,Tu=!1,t)throw Error(N(300));return e}function Mh(){var e=wa!==0;return wa=0,e}function Rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function un(){if(ze===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ke===null?je.memoizedState:Ke.next;if(t!==null)Ke=t,ze=e;else{if(e===null)throw Error(N(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function ba(e,t){return typeof t=="function"?t(e):t}function hd(e){var t=un(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=ze,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((Hi&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,je.lanes|=d,Wi|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,En(r,t.memoizedState)||(Pt=!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,je.lanes|=s,Wi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function md(e){var t=un(),n=t.queue;if(n===null)throw Error(N(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);En(s,t.memoizedState)||(Pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Z1(){}function J1(e,t){var n=je,r=un(),i=t(),s=!En(r.memoizedState,i);if(s&&(r.memoizedState=i,Pt=!0),r=r.queue,Lh(nw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Sa(9,tw.bind(null,n,r,i,t),void 0,null),Ge===null)throw Error(N(349));Hi&30||ew(n,t,i)}return i}function ew(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tw(e,t,n,r){t.value=n,t.getSnapshot=r,rw(t)&&iw(e)}function nw(e,t,n){return n(function(){rw(t)&&iw(e)})}function rw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function iw(e){var t=cr(e,1);t!==null&&kn(t,e,1,-1)}function ov(e){var t=Rn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=$C.bind(null,je,e),[t.memoizedState,e]}function Sa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.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 sw(){return un().memoizedState}function Hl(e,t,n,r){var i=Rn();je.flags|=e,i.memoizedState=Sa(1|t,n,void 0,r===void 0?null:r)}function rc(e,t,n,r){var i=un();r=r===void 0?null:r;var s=void 0;if(ze!==null){var o=ze.memoizedState;if(s=o.destroy,r!==null&&Fh(r,o.deps)){i.memoizedState=Sa(t,n,s,r);return}}je.flags|=e,i.memoizedState=Sa(1|t,n,s,r)}function av(e,t){return Hl(8390656,8,e,t)}function Lh(e,t){return rc(2048,8,e,t)}function ow(e,t){return rc(4,2,e,t)}function aw(e,t){return rc(4,4,e,t)}function lw(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 uw(e,t,n){return n=n!=null?n.concat([e]):null,rc(4,4,lw.bind(null,t,e),n)}function Ih(){}function cw(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dw(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fw(e,t,n){return Hi&21?(En(n,t)||(n=v1(),je.lanes|=n,Wi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function LC(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=pd.transition;pd.transition={};try{e(!1),t()}finally{pe=n,pd.transition=r}}function pw(){return un().memoizedState}function IC(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hw(e))mw(t,n);else if(n=Q1(e,t,n,r),n!==null){var i=yt();kn(n,e,r,i),gw(n,t,r)}}function $C(e,t,n){var r=Kr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hw(e))mw(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,En(a,o)){var l=t.interleaved;l===null?(i.next=i,jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Q1(e,t,i,r),n!==null&&(i=yt(),kn(n,e,r,i),gw(n,t,r))}}function hw(e){var t=e.alternate;return e===je||t!==null&&t===je}function mw(e,t){Yo=Tu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mh(e,n)}}var Cu={readContext:ln,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},zC={readContext:ln,useCallback:function(e,t){return Rn().memoizedState=[e,t===void 0?null:t],e},useContext:ln,useEffect:av,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hl(4194308,4,lw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hl(4,2,e,t)},useMemo:function(e,t){var n=Rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rn();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=IC.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=Rn();return e={current:e},t.memoizedState=e},useState:ov,useDebugValue:Ih,useDeferredValue:function(e){return Rn().memoizedState=e},useTransition:function(){var e=ov(!1),t=e[0];return e=LC.bind(null,e[1]),Rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=Rn();if(Ee){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ge===null)throw Error(N(349));Hi&30||ew(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,av(nw.bind(null,r,s,e),[e]),r.flags|=2048,Sa(9,tw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Rn(),t=Ge.identifierPrefix;if(Ee){var n=ir,r=rr;n=(r&~(1<<32-Sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BC={readContext:ln,useCallback:cw,useContext:ln,useEffect:Lh,useImperativeHandle:uw,useInsertionEffect:ow,useLayoutEffect:aw,useMemo:dw,useReducer:hd,useRef:sw,useState:function(){return hd(ba)},useDebugValue:Ih,useDeferredValue:function(e){var t=un();return fw(t,ze.memoizedState,e)},useTransition:function(){var e=hd(ba)[0],t=un().memoizedState;return[e,t]},useMutableSource:Z1,useSyncExternalStore:J1,useId:pw,unstable_isNewReconciler:!1},VC={readContext:ln,useCallback:cw,useContext:ln,useEffect:Lh,useImperativeHandle:uw,useInsertionEffect:ow,useLayoutEffect:aw,useMemo:dw,useReducer:md,useRef:sw,useState:function(){return md(ba)},useDebugValue:Ih,useDeferredValue:function(e){var t=un();return ze===null?t.memoizedState=e:fw(t,ze.memoizedState,e)},useTransition:function(){var e=md(ba)[0],t=un().memoizedState;return[e,t]},useMutableSource:Z1,useSyncExternalStore:J1,useId:pw,unstable_isNewReconciler:!1};function gn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Rf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={isMounted:function(e){return(e=e._reactInternals)?Zi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(kn(t,e,i,r),Vl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(kn(t,e,i,r),Vl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),r=Kr(e),i=or(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(kn(t,e,r,n),Vl(t,e,r))}};function lv(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?!ha(n,r)||!ha(i,s):!0}function vw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=ln(s):(i=At(t)?Vi:pt.current,r=t.contextTypes,s=(r=r!=null)?no(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ic,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function uv(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&&ic.enqueueReplaceState(t,t.state,null)}function Of(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ah(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=ln(s):(s=At(t)?Vi:pt.current,i.context=no(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Rf(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&&ic.enqueueReplaceState(i,i.state,null),ku(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function oo(e,t){try{var n="",r=t;do n+=gT(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 gd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Df(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UC=typeof WeakMap=="function"?WeakMap:Map;function yw(e,t,n){n=or(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Pu||(Pu=!0,Uf=r),Df(e,t)},n}function xw(e,t,n){n=or(-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(){Df(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Df(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function cv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UC;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=r2.bind(null,e,t,n),t.then(e,e))}function dv(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 fv(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=or(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var HC=pr.ReactCurrentOwner,Pt=!1;function gt(e,t,n,r){t.child=e===null?G1(t,null,n,r):io(t,e.child,n,r)}function pv(e,t,n,r,i){n=n.render;var s=t.ref;return $s(t,i),r=Nh(e,t,n,r,s,i),n=Mh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&n&&kh(t),t.flags|=1,gt(e,t,r,i),t.child)}function hv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!qh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,ww(e,t,s,r,i)):(e=Gl(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:ha,n(o,r)&&e.ref===t.ref)return dr(e,t,i)}return t.flags|=1,e=Gr(s,r),e.ref=t.ref,e.return=t,t.child=e}function ww(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ha(s,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,dr(e,t,i)}return Ff(e,t,n,r,i)}function bw(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},xe(Ps,Lt),Lt|=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,xe(Ps,Lt),Lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(Ps,Lt),Lt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(Ps,Lt),Lt|=r;return gt(e,t,i,n),t.child}function Sw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ff(e,t,n,r,i){var s=At(n)?Vi:pt.current;return s=no(t,s),$s(t,i),n=Nh(e,t,n,r,s,i),r=Mh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&r&&kh(t),t.flags|=1,gt(e,t,n,i),t.child)}function mv(e,t,n,r,i){if(At(n)){var s=!0;yu(t)}else s=!1;if($s(t,i),t.stateNode===null)Wl(e,t),vw(t,n,r),Of(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=un(u):(u=At(n)?Vi:pt.current,u=no(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)&&uv(t,o,r,u),Er=!1;var f=t.memoizedState;o.state=f,ku(t,r,o,i),l=t.memoizedState,a!==r||f!==l||jt.current||Er?(typeof d=="function"&&(Rf(t,n,d,r),l=t.memoizedState),(a=Er||lv(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,Y1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:vn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=At(n)?Vi:pt.current,l=no(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)&&uv(t,o,r,l),Er=!1,f=t.memoizedState,o.state=f,ku(t,r,o,i);var h=t.memoizedState;a!==c||f!==h||jt.current||Er?(typeof p=="function"&&(Rf(t,n,p,r),h=t.memoizedState),(u=Er||lv(t,n,u,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,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=h),o.props=r,o.state=h,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 Nf(e,t,n,r,s,i)}function Nf(e,t,n,r,i,s){Sw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&ev(t,n,!1),dr(e,t,s);r=t.stateNode,HC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=io(t,e.child,null,s),t.child=io(t,null,a,s)):gt(e,t,a,s),t.memoizedState=r.state,i&&ev(t,n,!0),t.child}function kw(e){var t=e.stateNode;t.pendingContext?Jg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Jg(e,t.context,!1),Rh(e,t.containerInfo)}function gv(e,t,n,r,i){return ro(),Th(i),t.flags|=256,gt(e,t,n,r),t.child}var Mf={dehydrated:null,treeContext:null,retryLane:0};function Lf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ew(e,t,n){var r=t.pendingProps,i=_e.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),xe(_e,i&1),e===null)return jf(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=ac(o,r,0,null),e=Ii(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Lf(n),t.memoizedState=Mf,e):$h(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return WC(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=Gr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Gr(a,s):(s=Ii(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?Lf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Mf,r}return s=e.child,e=s.sibling,r=Gr(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 $h(e,t){return t=ac({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wl(e,t,n,r){return r!==null&&Th(r),io(t,e.child,null,n),e=$h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=gd(Error(N(422))),wl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=ac({mode:"visible",children:r.children},i,0,null),s=Ii(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&io(t,e.child,null,o),t.child.memoizedState=Lf(o),t.memoizedState=Mf,s);if(!(t.mode&1))return wl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(N(419)),r=gd(s,r,void 0),wl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pt||a){if(r=Ge,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,cr(e,i),En(r,e,i,-1))}return Wh(),r=gd(Error(N(421))),wl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=i2.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,It=Hr(i.nextSibling),Bt=t,Ee=!0,bn=null,e!==null&&(en[tn++]=rr,en[tn++]=ir,en[tn++]=Ui,rr=e.id,ir=e.overflow,Ui=t),t=$h(t,r.children),t.flags|=4096,t)}function vv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Af(e.return,t,n)}function vd(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 Tw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(gt(e,t,r.children,n),r=_e.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&&vv(e,n,t);else if(e.tag===19)vv(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(xe(_e,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&&Eu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vd(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&&Eu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vd(t,!0,n,null,s);break;case"together":vd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Gr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qC(e,t,n){switch(t.tag){case 3:kw(t),ro();break;case 5:X1(t);break;case 1:At(t.type)&&yu(t);break;case 4:Rh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;xe(bu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(_e,_e.current&1),t.flags|=128,null):n&t.child.childLanes?Ew(e,t,n):(xe(_e,_e.current&1),e=dr(e,t,n),e!==null?e.sibling:null);xe(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),xe(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,bw(e,t,n)}return dr(e,t,n)}var Cw,If,_w,Pw;Cw=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}};If=function(){};_w=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(zn.current);var s=null;switch(n){case"input":i=of(e,i),r=of(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=uf(e,i),r=uf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=gu)}df(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"&&(aa.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"&&(aa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&be("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)}};Pw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oo(e,t){if(!Ee)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 lt(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 KC(e,t,n){var r=t.pendingProps;switch(Eh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return At(t.type)&&vu(),lt(t),null;case 3:return r=t.stateNode,so(),ke(jt),ke(pt),Dh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(qf(bn),bn=null))),If(e,t),lt(t),null;case 5:Oh(t);var i=Ti(xa.current);if(n=t.type,e!==null&&t.stateNode!=null)_w(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return lt(t),null}if(e=Ti(zn.current),yl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[In]=t,r[va]=s,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(i=0;i<zo.length;i++)be(zo[i],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":Cg(r,s),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},be("invalid",r);break;case"textarea":Pg(r,s),be("invalid",r)}df(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&&vl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",""+a]):aa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&be("scroll",r)}switch(n){case"input":ul(r),_g(r,s,!0);break;case"textarea":ul(r),jg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=gu)}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=n1(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[In]=t,e[va]=r,Cw(e,t,!1,!1),t.stateNode=e;e:{switch(o=ff(n,r),n){case"dialog":be("cancel",e),be("close",e),i=r;break;case"iframe":case"object":case"embed":be("load",e),i=r;break;case"video":case"audio":for(i=0;i<zo.length;i++)be(zo[i],e);i=r;break;case"source":be("error",e),i=r;break;case"img":case"image":case"link":be("error",e),be("load",e),i=r;break;case"details":be("toggle",e),i=r;break;case"input":Cg(e,r),i=of(e,r),be("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),be("invalid",e);break;case"textarea":Pg(e,r),i=uf(e,r),be("invalid",e);break;default:i=r}df(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?s1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&r1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&la(e,l):typeof l=="number"&&la(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(aa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&be("scroll",e):l!=null&&uh(e,s,l,o))}switch(n){case"input":ul(e),_g(e,r,!1);break;case"textarea":ul(e),jg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=gu)}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 lt(t),null;case 6:if(e&&t.stateNode!=null)Pw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Ti(xa.current),Ti(zn.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[In]=t,(s=r.nodeValue!==n)&&(e=Bt,e!==null))switch(e.tag){case 3:vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[In]=t,t.stateNode=r}return lt(t),null;case 13:if(ke(_e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&It!==null&&t.mode&1&&!(t.flags&128))q1(),ro(),t.flags|=98560,s=!1;else if(s=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(N(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));s[In]=t}else ro(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lt(t),s=!1}else bn!==null&&(qf(bn),bn=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||_e.current&1?Ve===0&&(Ve=3):Wh())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return so(),If(e,t),e===null&&ma(t.stateNode.containerInfo),lt(t),null;case 10:return Ph(t.type._context),lt(t),null;case 17:return At(t.type)&&vu(),lt(t),null;case 19:if(ke(_e),s=t.memoizedState,s===null)return lt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Oo(s,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eu(e),o!==null){for(t.flags|=128,Oo(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 xe(_e,_e.current&1|2),t.child}e=e.sibling}s.tail!==null&&Me()>ao&&(t.flags|=128,r=!0,Oo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Eu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return lt(t),null}else 2*Me()-s.renderingStartTime>ao&&n!==1073741824&&(t.flags|=128,r=!0,Oo(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=Me(),t.sibling=null,n=_e.current,xe(_e,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Hh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Lt&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function GC(e,t){switch(Eh(t),t.tag){case 1:return At(t.type)&&vu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return so(),ke(jt),ke(pt),Dh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oh(t),null;case 13:if(ke(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));ro()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(_e),null;case 4:return so(),null;case 10:return Ph(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var bl=!1,dt=!1,QC=typeof WeakSet=="function"?WeakSet:Set,z=null;function _s(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function $f(e,t,n){try{n()}catch(r){De(e,t,r)}}var yv=!1;function YC(e,t){if(Sf=pu,e=D1(),Sh(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(kf={focusedElem:e,selectionRange:n},pu=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:vn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(T){De(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return h=yv,yv=!1,h}function Xo(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&&$f(t,n,s)}i=i.next}while(i!==r)}}function sc(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 zf(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 jw(e){var t=e.alternate;t!==null&&(e.alternate=null,jw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[In],delete t[va],delete t[Cf],delete t[OC],delete t[DC])),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 Aw(e){return e.tag===5||e.tag===3||e.tag===4}function xv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Aw(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 Bf(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=gu));else if(r!==4&&(e=e.child,e!==null))for(Bf(e,t,n),e=e.sibling;e!==null;)Bf(e,t,n),e=e.sibling}function Vf(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(Vf(e,t,n),e=e.sibling;e!==null;)Vf(e,t,n),e=e.sibling}var tt=null,xn=!1;function wr(e,t,n){for(n=n.child;n!==null;)Rw(e,t,n),n=n.sibling}function Rw(e,t,n){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(Xu,n)}catch{}switch(n.tag){case 5:dt||_s(n,t);case 6:var r=tt,i=xn;tt=null,wr(e,t,n),tt=r,xn=i,tt!==null&&(xn?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(xn?(e=tt,n=n.stateNode,e.nodeType===8?cd(e.parentNode,n):e.nodeType===1&&cd(e,n),fa(e)):cd(tt,n.stateNode));break;case 4:r=tt,i=xn,tt=n.stateNode.containerInfo,xn=!0,wr(e,t,n),tt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!dt&&(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)&&$f(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!dt&&(_s(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(dt=(r=dt)||n.memoizedState!==null,wr(e,t,n),dt=r):wr(e,t,n);break;default:wr(e,t,n)}}function wv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QC),t.forEach(function(r){var i=s2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(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:tt=a.stateNode,xn=!1;break e;case 3:tt=a.stateNode.containerInfo,xn=!0;break e;case 4:tt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(tt===null)throw Error(N(160));Rw(s,o,i),tt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){De(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ow(t,e),t=t.sibling}function Ow(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),jn(e),r&4){try{Xo(3,e,e.return),sc(3,e)}catch(m){De(e,e.return,m)}try{Xo(5,e,e.return)}catch(m){De(e,e.return,m)}}break;case 1:hn(t,e),jn(e),r&512&&n!==null&&_s(n,n.return);break;case 5:if(hn(t,e),jn(e),r&512&&n!==null&&_s(n,n.return),e.flags&32){var i=e.stateNode;try{la(i,"")}catch(m){De(e,e.return,m)}}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&&e1(i,s),ff(a,o);var u=ff(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?s1(i,c):d==="dangerouslySetInnerHTML"?r1(i,c):d==="children"?la(i,c):uh(i,d,c,u)}switch(a){case"input":af(i,s);break;case"textarea":t1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[va]=s}catch(m){De(e,e.return,m)}}break;case 6:if(hn(t,e),jn(e),r&4){if(e.stateNode===null)throw Error(N(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){De(e,e.return,m)}}break;case 3:if(hn(t,e),jn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{fa(t.containerInfo)}catch(m){De(e,e.return,m)}break;case 4:hn(t,e),jn(e);break;case 13:hn(t,e),jn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Vh=Me())),r&4&&wv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(dt=(u=dt)||d,hn(t,e),dt=u):hn(t,e),jn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(c=z=d;z!==null;){switch(f=z,p=f.child,f.tag){case 0:case 11:case 14:case 15:Xo(4,f,f.return);break;case 1:_s(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){De(r,n,m)}}break;case 5:_s(f,f.return);break;case 22:if(f.memoizedState!==null){Sv(c);continue}}p!==null?(p.return=f,z=p):Sv(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=i1("display",o))}catch(m){De(e,e.return,m)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(m){De(e,e.return,m)}}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:hn(t,e),jn(e),r&4&&wv(e);break;case 21:break;default:hn(t,e),jn(e)}}function jn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Aw(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(la(i,""),r.flags&=-33);var s=xv(e);Vf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=xv(e);Bf(e,a,o);break;default:throw Error(N(161))}}catch(l){De(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function XC(e,t,n){z=e,Dw(e)}function Dw(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||bl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||dt;a=bl;var u=dt;if(bl=o,(dt=l)&&!u)for(z=i;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?kv(i):l!==null?(l.return=o,z=l):kv(i);for(;s!==null;)z=s,Dw(s),s=s.sibling;z=i,bl=a,dt=u}bv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):bv(e)}}function bv(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:dt||sc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!dt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&sv(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}sv(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&&fa(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}dt||t.flags&512&&zf(t)}catch(f){De(t,t.return,f)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function Sv(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function kv(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{sc(4,t)}catch(l){De(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){De(t,i,l)}}var s=t.return;try{zf(t)}catch(l){De(t,s,l)}break;case 5:var o=t.return;try{zf(t)}catch(l){De(t,o,l)}}}catch(l){De(t,t.return,l)}if(t===e){z=null;break}var a=t.sibling;if(a!==null){a.return=t.return,z=a;break}z=t.return}}var ZC=Math.ceil,_u=pr.ReactCurrentDispatcher,zh=pr.ReactCurrentOwner,on=pr.ReactCurrentBatchConfig,ce=0,Ge=null,Le=null,it=0,Lt=0,Ps=oi(0),Ve=0,ka=null,Wi=0,oc=0,Bh=0,Zo=null,Ct=null,Vh=0,ao=1/0,Jn=null,Pu=!1,Uf=null,qr=null,Sl=!1,Ir=null,ju=0,Jo=0,Hf=null,ql=-1,Kl=0;function yt(){return ce&6?Me():ql!==-1?ql:ql=Me()}function Kr(e){return e.mode&1?ce&2&&it!==0?it&-it:NC.transition!==null?(Kl===0&&(Kl=v1()),Kl):(e=pe,e!==0||(e=window.event,e=e===void 0?16:E1(e.type)),e):1}function En(e,t,n,r){if(50<Jo)throw Jo=0,Hf=null,Error(N(185));Wa(e,n,r),(!(ce&2)||e!==Ge)&&(e===Ge&&(!(ce&2)&&(oc|=n),Ve===4&&_r(e,it)),Rt(e,r),n===1&&ce===0&&!(t.mode&1)&&(ao=Me()+500,nc&&ai()))}function Rt(e,t){var n=e.callbackNode;NT(e,t);var r=fu(e,e===Ge?it:0);if(r===0)n!==null&&Og(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Og(n),t===1)e.tag===0?FC(Ev.bind(null,e)):U1(Ev.bind(null,e)),AC(function(){!(ce&6)&&ai()}),n=null;else{switch(y1(r)){case 1:n=hh;break;case 4:n=m1;break;case 16:n=du;break;case 536870912:n=g1;break;default:n=du}n=Bw(n,Fw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fw(e,t){if(ql=-1,Kl=0,ce&6)throw Error(N(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=fu(e,e===Ge?it:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Au(e,r);else{t=r;var i=ce;ce|=2;var s=Mw();(Ge!==e||it!==t)&&(Jn=null,ao=Me()+500,Li(e,t));do try{t2();break}catch(a){Nw(e,a)}while(!0);_h(),_u.current=s,ce=i,Le!==null?t=0:(Ge=null,it=0,t=Ve)}if(t!==0){if(t===2&&(i=vf(e),i!==0&&(r=i,t=Wf(e,i))),t===1)throw n=ka,Li(e,0),_r(e,r),Rt(e,Me()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!JC(i)&&(t=Au(e,r),t===2&&(s=vf(e),s!==0&&(r=s,t=Wf(e,s))),t===1))throw n=ka,Li(e,0),_r(e,r),Rt(e,Me()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:vi(e,Ct,Jn);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Vh+500-Me(),10<t)){if(fu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Tf(vi.bind(null,e,Ct,Jn),t);break}vi(e,Ct,Jn);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZC(r/1960))-r,10<r){e.timeoutHandle=Tf(vi.bind(null,e,Ct,Jn),r);break}vi(e,Ct,Jn);break;case 5:vi(e,Ct,Jn);break;default:throw Error(N(329))}}}return Rt(e,Me()),e.callbackNode===n?Fw.bind(null,e):null}function Wf(e,t){var n=Zo;return e.current.memoizedState.isDehydrated&&(Li(e,t).flags|=256),e=Au(e,t),e!==2&&(t=Ct,Ct=n,t!==null&&qf(t)),e}function qf(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function JC(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(!Tn(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 _r(e,t){for(t&=~Bh,t&=~oc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function Ev(e){if(ce&6)throw Error(N(327));zs();var t=fu(e,0);if(!(t&1))return Rt(e,Me()),null;var n=Au(e,t);if(e.tag!==0&&n===2){var r=vf(e);r!==0&&(t=r,n=Wf(e,r))}if(n===1)throw n=ka,Li(e,0),_r(e,t),Rt(e,Me()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,Ct,Jn),Rt(e,Me()),null}function Uh(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(ao=Me()+500,nc&&ai())}}function qi(e){Ir!==null&&Ir.tag===0&&!(ce&6)&&zs();var t=ce;ce|=1;var n=on.transition,r=pe;try{if(on.transition=null,pe=1,e)return e()}finally{pe=r,on.transition=n,ce=t,!(ce&6)&&ai()}}function Hh(){Lt=Ps.current,ke(Ps)}function Li(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jC(n)),Le!==null)for(n=Le.return;n!==null;){var r=n;switch(Eh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vu();break;case 3:so(),ke(jt),ke(pt),Dh();break;case 5:Oh(r);break;case 4:so();break;case 13:ke(_e);break;case 19:ke(_e);break;case 10:Ph(r.type._context);break;case 22:case 23:Hh()}n=n.return}if(Ge=e,Le=e=Gr(e.current,null),it=Lt=t,Ve=0,ka=null,Bh=oc=Wi=0,Ct=Zo=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 Nw(e,t){do{var n=Le;try{if(_h(),Ul.current=Cu,Tu){for(var r=je.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Tu=!1}if(Hi=0,Ke=ze=je=null,Yo=!1,wa=0,zh.current=null,n===null||n.return===null){Ve=1,ka=t,Le=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=it,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=dv(o);if(p!==null){p.flags&=-257,fv(p,o,a,s,t),p.mode&1&&cv(s,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){cv(s,u,t),Wh();break e}l=Error(N(426))}}else if(Ee&&a.mode&1){var b=dv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),fv(b,o,a,s,t),Th(oo(l,a));break e}}s=l=oo(l,a),Ve!==4&&(Ve=2),Zo===null?Zo=[s]:Zo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=yw(s,l,t);iv(s,g);break e;case 1:a=l;var y=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(qr===null||!qr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var T=xw(s,a,t);iv(s,T);break e}}s=s.return}while(s!==null)}Iw(n)}catch(E){t=E,Le===n&&n!==null&&(Le=n=n.return);continue}break}while(!0)}function Mw(){var e=_u.current;return _u.current=Cu,e===null?Cu:e}function Wh(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Ge===null||!(Wi&268435455)&&!(oc&268435455)||_r(Ge,it)}function Au(e,t){var n=ce;ce|=2;var r=Mw();(Ge!==e||it!==t)&&(Jn=null,Li(e,t));do try{e2();break}catch(i){Nw(e,i)}while(!0);if(_h(),ce=n,_u.current=r,Le!==null)throw Error(N(261));return Ge=null,it=0,Ve}function e2(){for(;Le!==null;)Lw(Le)}function t2(){for(;Le!==null&&!CT();)Lw(Le)}function Lw(e){var t=zw(e.alternate,e,Lt);e.memoizedProps=e.pendingProps,t===null?Iw(e):Le=t,zh.current=null}function Iw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=GC(n,t),n!==null){n.flags&=32767,Le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Le=null;return}}else if(n=KC(n,t,Lt),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);Ve===0&&(Ve=5)}function vi(e,t,n){var r=pe,i=on.transition;try{on.transition=null,pe=1,n2(e,t,n,r)}finally{on.transition=i,pe=r}return null}function n2(e,t,n,r){do zs();while(Ir!==null);if(ce&6)throw Error(N(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(N(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(MT(e,s),e===Ge&&(Le=Ge=null,it=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sl||(Sl=!0,Bw(du,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=on.transition,on.transition=null;var o=pe;pe=1;var a=ce;ce|=4,zh.current=null,YC(e,n),Ow(n,e),SC(kf),pu=!!Sf,kf=Sf=null,e.current=n,XC(n),_T(),ce=a,pe=o,on.transition=s}else e.current=n;if(Sl&&(Sl=!1,Ir=e,ju=i),s=e.pendingLanes,s===0&&(qr=null),AT(n.stateNode),Rt(e,Me()),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(Pu)throw Pu=!1,e=Uf,Uf=null,e;return ju&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Hf?Jo++:(Jo=0,Hf=e):Jo=0,ai(),null}function zs(){if(Ir!==null){var e=y1(ju),t=on.transition,n=pe;try{if(on.transition=null,pe=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,ju=0,ce&6)throw Error(N(331));var i=ce;for(ce|=4,z=e.current;z!==null;){var s=z,o=s.child;if(z.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:Xo(8,d,s)}var c=d.child;if(c!==null)c.return=d,z=c;else for(;z!==null;){d=z;var f=d.sibling,p=d.return;if(jw(d),d===u){z=null;break}if(f!==null){f.return=p,z=f;break}z=p}}}var h=s.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}z=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,z=o;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Xo(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,z=g;break e}z=s.return}}var y=e.current;for(z=y;z!==null;){o=z;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,z=w;else e:for(o=y;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:sc(9,a)}}catch(E){De(a,a.return,E)}if(a===o){z=null;break e}var T=a.sibling;if(T!==null){T.return=a.return,z=T;break e}z=a.return}}if(ce=i,ai(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(Xu,e)}catch{}r=!0}return r}finally{pe=n,on.transition=t}}return!1}function Tv(e,t,n){t=oo(n,t),t=yw(e,t,1),e=Wr(e,t,1),t=yt(),e!==null&&(Wa(e,1,t),Rt(e,t))}function De(e,t,n){if(e.tag===3)Tv(e,e,n);else for(;t!==null;){if(t.tag===3){Tv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=oo(n,e),e=xw(t,e,1),t=Wr(t,e,1),e=yt(),t!==null&&(Wa(t,1,e),Rt(t,e));break}}t=t.return}}function r2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,Ge===e&&(it&n)===n&&(Ve===4||Ve===3&&(it&130023424)===it&&500>Me()-Vh?Li(e,0):Bh|=n),Rt(e,t)}function $w(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var n=yt();e=cr(e,t),e!==null&&(Wa(e,t,n),Rt(e,n))}function i2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$w(e,n)}function s2(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(N(314))}r!==null&&r.delete(t),$w(e,n)}var zw;zw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,qC(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Ee&&t.flags&1048576&&H1(t,wu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=no(t,pt.current);$s(t,n),i=Nh(null,t,r,e,i,n);var s=Mh();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,At(r)?(s=!0,yu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ah(t),i.updater=ic,t.stateNode=i,i._reactInternals=t,Of(t,r,e,n),t=Nf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&kh(t),gt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=a2(r),e=vn(r,e),i){case 0:t=Ff(null,t,r,e,n);break e;case 1:t=mv(null,t,r,e,n);break e;case 11:t=pv(null,t,r,e,n);break e;case 14:t=hv(null,t,r,vn(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Ff(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),mv(e,t,r,i,n);case 3:e:{if(kw(t),e===null)throw Error(N(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Y1(e,t),ku(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=oo(Error(N(423)),t),t=gv(e,t,r,n,i);break e}else if(r!==i){i=oo(Error(N(424)),t),t=gv(e,t,r,n,i);break e}else for(It=Hr(t.stateNode.containerInfo.firstChild),Bt=t,Ee=!0,bn=null,n=G1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ro(),r===i){t=dr(e,t,n);break e}gt(e,t,r,n)}t=t.child}return t;case 5:return X1(t),e===null&&jf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Ef(r,i)?o=null:s!==null&&Ef(r,s)&&(t.flags|=32),Sw(e,t),gt(e,t,o,n),t.child;case 6:return e===null&&jf(t),null;case 13:return Ew(e,t,n);case 4:return Rh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=io(t,null,r,n):gt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),pv(e,t,r,i,n);case 7:return gt(e,t,t.pendingProps,n),t.child;case 8:return gt(e,t,t.pendingProps.children,n),t.child;case 12:return gt(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,xe(bu,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!jt.current){t=dr(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=or(-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),Af(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(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Af(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}gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$s(t,n),i=un(i),r=r(i),t.flags|=1,gt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),hv(e,t,r,i,n);case 15:return ww(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Wl(e,t),t.tag=1,At(r)?(e=!0,yu(t)):e=!1,$s(t,n),vw(t,r,i),Of(t,r,i,n),Nf(null,t,r,!0,e,n);case 19:return Tw(e,t,n);case 22:return bw(e,t,n)}throw Error(N(156,t.tag))};function Bw(e,t){return h1(e,t)}function o2(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 rn(e,t,n,r){return new o2(e,t,n,r)}function qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a2(e){if(typeof e=="function")return qh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dh)return 11;if(e===fh)return 14}return 2}function Gr(e,t){var n=e.alternate;return n===null?(n=rn(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 Gl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")qh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ys:return Ii(n.children,i,s,t);case ch:o=8,i|=8;break;case tf:return e=rn(12,n,t,i|2),e.elementType=tf,e.lanes=s,e;case nf:return e=rn(13,n,t,i),e.elementType=nf,e.lanes=s,e;case rf:return e=rn(19,n,t,i),e.elementType=rf,e.lanes=s,e;case Xx:return ac(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qx:o=10;break e;case Yx:o=9;break e;case dh:o=11;break e;case fh:o=14;break e;case kr:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=rn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ii(e,t,n,r){return e=rn(7,e,r,t),e.lanes=n,e}function ac(e,t,n,r){return e=rn(22,e,r,t),e.elementType=Xx,e.lanes=n,e.stateNode={isHidden:!1},e}function yd(e,t,n){return e=rn(6,e,null,t),e.lanes=n,e}function xd(e,t,n){return t=rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function l2(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=Jc(0),this.expirationTimes=Jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Kh(e,t,n,r,i,s,o,a,l){return e=new l2(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=rn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ah(s),e}function u2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vw(e){if(!e)return ti;e=e._reactInternals;e:{if(Zi(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(At(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(At(n))return V1(e,n,t)}return t}function Uw(e,t,n,r,i,s,o,a,l){return e=Kh(n,r,!0,e,i,s,o,a,l),e.context=Vw(null),n=e.current,r=yt(),i=Kr(n),s=or(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Wa(e,i,r),Rt(e,r),e}function lc(e,t,n,r){var i=t.current,s=yt(),o=Kr(i);return n=Vw(n),t.context===null?t.context=n:t.pendingContext=n,t=or(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(En(e,i,o,s),Vl(e,i,o)),o}function Ru(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 Cv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gh(e,t){Cv(e,t),(e=e.alternate)&&Cv(e,t)}function c2(){return null}var Hw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qh(e){this._internalRoot=e}uc.prototype.render=Qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));lc(e,t,null,null)};uc.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qi(function(){lc(null,e,null,null)}),t[ur]=null}};function uc(e){this._internalRoot=e}uc.prototype.unstable_scheduleHydration=function(e){if(e){var t=b1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cr.length&&t!==0&&t<Cr[n].priority;n++);Cr.splice(n,0,e),n===0&&k1(e)}};function Yh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _v(){}function d2(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Ru(o);s.call(u)}}var o=Uw(t,r,e,0,null,!1,!1,"",_v);return e._reactRootContainer=o,e[ur]=o.current,ma(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=Ru(l);a.call(u)}}var l=Kh(e,0,!1,null,null,!1,!1,"",_v);return e._reactRootContainer=l,e[ur]=l.current,ma(e.nodeType===8?e.parentNode:e),qi(function(){lc(t,l,n,r)}),l}function dc(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=Ru(o);a.call(l)}}lc(t,o,e,i)}else o=d2(n,t,e,i,r);return Ru(o)}x1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=$o(t.pendingLanes);n!==0&&(mh(t,n|1),Rt(t,Me()),!(ce&6)&&(ao=Me()+500,ai()))}break;case 13:qi(function(){var r=cr(e,1);if(r!==null){var i=yt();En(r,e,1,i)}}),Gh(e,1)}};gh=function(e){if(e.tag===13){var t=cr(e,134217728);if(t!==null){var n=yt();En(t,e,134217728,n)}Gh(e,134217728)}};w1=function(e){if(e.tag===13){var t=Kr(e),n=cr(e,t);if(n!==null){var r=yt();En(n,e,t,r)}Gh(e,t)}};b1=function(){return pe};S1=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};hf=function(e,t,n){switch(t){case"input":if(af(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=tc(r);if(!i)throw Error(N(90));Jx(r),af(r,i)}}}break;case"textarea":t1(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};l1=Uh;u1=qi;var f2={usingClientEntryPoint:!1,Events:[Ka,Ss,tc,o1,a1,Uh]},Do={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p2={bundleType:Do.bundleType,version:Do.version,rendererPackageName:Do.rendererPackageName,rendererConfig:Do.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=f1(e),e===null?null:e.stateNode},findFiberByHostInstance:Do.findFiberByHostInstance||c2,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 kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kl.isDisabled&&kl.supportsFiber)try{Xu=kl.inject(p2),$n=kl}catch{}}Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f2;Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yh(t))throw Error(N(200));return u2(e,t,null,n)};Ut.createRoot=function(e,t){if(!Yh(e))throw Error(N(299));var n=!1,r="",i=Hw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Kh(e,1,!1,null,null,n,!1,r,i),e[ur]=t.current,ma(e.nodeType===8?e.parentNode:e),new Qh(t)};Ut.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(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=f1(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e){return qi(e)};Ut.hydrate=function(e,t,n){if(!cc(t))throw Error(N(200));return dc(null,e,t,!0,n)};Ut.hydrateRoot=function(e,t,n){if(!Yh(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Hw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Uw(t,null,e,1,n??null,i,!1,s,o),e[ur]=t.current,ma(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 uc(t)};Ut.render=function(e,t,n){if(!cc(t))throw Error(N(200));return dc(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!cc(e))throw Error(N(40));return e._reactRootContainer?(qi(function(){dc(null,null,e,!1,function(){e._reactRootContainer=null,e[ur]=null})}),!0):!1};Ut.unstable_batchedUpdates=Uh;Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cc(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return dc(e,t,n,!1,r)};Ut.version="18.3.1-next-f1338f8080-20240426";function Ww(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ww)}catch(e){console.error(e)}}Ww(),Wx.exports=Ut;var qw=Wx.exports;const h2=Yi(qw);var Kw,Pv=qw;Kw=Pv.createRoot,Pv.hydrateRoot;const m2="@alfatech/livechat",g2="v2025.07.09.3",v2="module",y2="https://api-live.alfatek.dev",x2="wss://api-live.alfatek.dev",w2=["dist","README.md"],b2="dist/widget.js",S2={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"},k2={"@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"},E2={"@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"},Gw={name:m2,private:!1,version:g2,type:v2,apiURL:y2,wsURL:x2,files:w2,main:b2,scripts:S2,dependencies:k2,devDependencies:E2,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},T2=Gw.apiURL,C2=Gw.wsURL;var an=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(an||{});const wd=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},Ql=e=>localStorage.getItem(e),jv=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},_2=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],P2=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],j2={429:_2,404:P2};async function vo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=localStorage.getItem(an.CustomerToken),i=localStorage.getItem(an.CustomerRefreshToken);r&&(n["X-Customer-Token"]=r),i&&(n["X-Customer-Refresh-Token"]=i);const s=await fetch(`${T2}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(a=>new Response(null,{status:500}));if(!s.ok){let a={};try{return a=await s.json(),[a,s.status]}catch{}const l=j2[s.status];return l?l(s,a):[{},s.status]}const o=s.headers.get("Content-Type");return o&&o.includes("application/json")?[await s.json(),s.status]:[await s.text(),s.status]}const fc=e=>[200,201,204].includes(e),A2=(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 yo=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(){}},Ki=typeof window>"u"||"Deno"in globalThis;function Jt(){}function R2(e,t){return typeof e=="function"?e(t):e}function Kf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Qw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Av(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Xh(o,t.options))return!1}else if(!Ea(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 Rv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gi(t.options.mutationKey)!==Gi(s))return!1}else if(!Ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Xh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gi)(e)}function Gi(e){return JSON.stringify(e,(t,n)=>Gf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ea(e[n],t[n])):!1}function Yw(e,t){if(e===t)return e;const n=Ov(e)&&Ov(t);if(n||Gf(e)&&Gf(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]=Yw(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Ou(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 Ov(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gf(e){if(!Dv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Dv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Dv(e){return Object.prototype.toString.call(e)==="[object Object]"}function O2(e){return new Promise(t=>{setTimeout(t,e)})}function Qf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yw(e,t):t}function D2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function F2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Zh=Symbol();function Xw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Zh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Vs,Ex,N2=(Ex=class extends yo{constructor(){super();K(this,Ai);K(this,Pr);K(this,Vs);$(this,Vs,t=>{if(!Ki&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Vs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),$(this,Pr,void 0))}setEventListener(t){var n;$(this,Vs,t),(n=S(this,Pr))==null||n.call(this),$(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&($(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Vs=new WeakMap,Ex),Jh=new N2,Us,jr,Hs,Tx,M2=(Tx=class extends yo{constructor(){super();K(this,Us,!0);K(this,jr);K(this,Hs);$(this,Hs,t=>{if(!Ki&&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(){S(this,jr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),$(this,jr,void 0))}setEventListener(t){var n;$(this,Hs,t),(n=S(this,jr))==null||n.call(this),$(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Us)!==t&&($(this,Us,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Us)}},Us=new WeakMap,jr=new WeakMap,Hs=new WeakMap,Tx),Du=new M2;function Yf(){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 L2(e){return Math.min(1e3*2**e,3e4)}function Zw(e){return(e??"online")==="online"?Du.isOnline():!0}var Jw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function bd(e){return e instanceof Jw}function eb(e){let t=!1,n=0,r=!1,i;const s=Yf(),o=m=>{var b;r||(f(new Jw(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Jh.isFocused()&&(e.networkMode==="always"||Du.isOnline())&&e.canRun(),d=()=>Zw(e.networkMode)&&e.canRun(),c=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),i==null||i(),s.reject(m))},p=()=>new Promise(m=>{var b;i=g=>{(r||u())&&m(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(c).catch(g=>{var _;if(r)return;const y=e.retry??(Ki?0:3),w=e.retryDelay??L2,T=typeof w=="function"?w(n,g):w,E=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,g);if(t||!E){f(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),O2(T).then(()=>u()?void 0:p()).then(()=>{t?f(g):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function I2(){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 Be=I2(),Ri,Cx,tb=(Cx=class{constructor(){K(this,Ri)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kf(this.gcTime)&&$(this,Ri,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ki?1/0:5*60*1e3))}clearGcTimeout(){S(this,Ri)&&(clearTimeout(S(this,Ri)),$(this,Ri,void 0))}},Ri=new WeakMap,Cx),Ws,qs,Zt,ut,za,Oi,yn,Zn,_x,$2=(_x=class extends tb{constructor(t){super();K(this,yn);K(this,Ws);K(this,qs);K(this,Zt);K(this,ut);K(this,za);K(this,Oi);$(this,Oi,!1),$(this,za,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Zt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Ws,z2(this.options)),this.state=t.state??S(this,Ws),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,ut))==null?void 0:t.promise}setOptions(t){this.options={...S(this,za),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Zt).remove(this)}setData(t,n){const r=Qf(this.state.data,t,this.options);return ie(this,yn,Zn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ie(this,yn,Zn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,ut))==null?void 0:r.promise;return(i=S(this,ut))==null||i.cancel(t),n?n.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Ws))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zh||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||!Qw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Zt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,ut)&&(S(this,Oi)?S(this,ut).cancel({revert:!0}):S(this,ut).cancelRetry()),this.scheduleGc()),S(this,Zt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ie(this,yn,Zn).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(S(this,ut))return S(this,ut).continueRetry(),S(this,ut).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:()=>($(this,Oi,!0),r.signal)})},s=()=>{const c=Xw(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),$(this,Oi,!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),$(this,qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ie(this,yn,Zn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,h,m;bd(c)&&c.silent||ie(this,yn,Zn).call(this,{type:"error",error:c}),bd(c)||((p=(f=S(this,Zt).config).onError)==null||p.call(f,c,this),(m=(h=S(this,Zt).config).onSettled)==null||m.call(h,this.state.data,c,this)),this.scheduleGc()};return $(this,ut,eb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,h,m;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(p=(f=S(this,Zt).config).onSuccess)==null||p.call(f,c,this),(m=(h=S(this,Zt).config).onSettled)==null||m.call(h,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{ie(this,yn,Zn).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{ie(this,yn,Zn).call(this,{type:"pause"})},onContinue:()=>{ie(this,yn,Zn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,ut).start()}},Ws=new WeakMap,qs=new WeakMap,Zt=new WeakMap,ut=new WeakMap,za=new WeakMap,Oi=new WeakMap,yn=new WeakSet,Zn=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,...nb(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 bd(i)&&i.revert&&S(this,qs)?{...S(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),Be.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Zt).notify({query:this,type:"updated",action:t})})},_x);function nb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function z2(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 Fn,Px,B2=(Px=class extends yo{constructor(t={}){super();K(this,Fn);this.config=t,$(this,Fn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Xh(i,n);let o=this.get(s);return o||(o=new $2({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Fn).has(t.queryHash)||(S(this,Fn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Fn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Fn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Fn).get(t)}getAll(){return[...S(this,Fn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Av(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Av(t,r)):n}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fn=new WeakMap,Px),Nn,ht,Di,Mn,br,jx,V2=(jx=class extends tb{constructor(t){super();K(this,Mn);K(this,Nn);K(this,ht);K(this,Di);this.mutationId=t.mutationId,$(this,ht,t.mutationCache),$(this,Nn,[]),this.state=t.state||rb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,ht).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,ht).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,ht).remove(this))}continue(){var t;return((t=S(this,Di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,p,h,m,b,g,y,w,T,E,_,C;$(this,Di,eb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,k)=>{ie(this,Mn,br).call(this,{type:"failed",failureCount:j,error:k})},onPause:()=>{ie(this,Mn,br).call(this,{type:"pause"})},onContinue:()=>{ie(this,Mn,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,ht).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Di).canStart();try{if(!n){ie(this,Mn,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,ht).config).onMutate)==null?void 0:s.call(i,t,this));const k=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));k!==this.state.context&&ie(this,Mn,br).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const j=await S(this,Di).start();return await((u=(l=S(this,ht).config).onSuccess)==null?void 0:u.call(l,j,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,j,t,this.state.context)),await((p=(f=S(this,ht).config).onSettled)==null?void 0:p.call(f,j,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,j,null,t,this.state.context)),ie(this,Mn,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(b=S(this,ht).config).onError)==null?void 0:g.call(b,j,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,j,t,this.state.context)),await((E=(T=S(this,ht).config).onSettled)==null?void 0:E.call(T,void 0,j,this.state.variables,this.state.context,this)),await((C=(_=this.options).onSettled)==null?void 0:C.call(_,void 0,j,t,this.state.context)),j}finally{ie(this,Mn,br).call(this,{type:"error",error:j})}}finally{S(this,ht).runNext(this)}}},Nn=new WeakMap,ht=new WeakMap,Di=new WeakMap,Mn=new WeakSet,br=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),Be.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,ht).notify({mutation:this,type:"updated",action:t})})},jx);function rb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt,Ba,Ax,U2=(Ax=class extends yo{constructor(t={}){super();K(this,Mt);K(this,Ba);this.config=t,$(this,Mt,new Map),$(this,Ba,Date.now())}build(t,n,r){const i=new V2({mutationCache:this,mutationId:++ol(this,Ba)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=El(t),r=S(this,Mt).get(n)??[];r.push(t),S(this,Mt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=El(t);if(S(this,Mt).has(n)){const i=(r=S(this,Mt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Mt).delete(n):S(this,Mt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Mt).get(El(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Mt).get(El(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Mt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rv(n,r))}findAll(t={}){return this.getAll().filter(n=>Rv(t,n))}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Be.batch(()=>Promise.all(t.map(n=>n.continue().catch(Jt))))}},Mt=new WeakMap,Ba=new WeakMap,Ax);function El(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Fv(e){return{onFetch:(t,n)=>{var d,c,f,p,h;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=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=Xw(t.options,t.fetchOptions),y=async(w,T,E)=>{if(m)return Promise.reject();if(T==null&&w.pages.length)return Promise.resolve(w);const _={queryKey:t.queryKey,pageParam:T,direction:E?"backward":"forward",meta:t.options.meta};b(_);const C=await g(_),{maxPages:j}=t.options,k=E?F2:D2;return{pages:k(w.pages,C,j),pageParams:k(w.pageParams,T,j)}};if(i&&s.length){const w=i==="backward",T=w?H2:Nv,E={pages:s,pageParams:o},_=T(r,E);a=await y(E,_,w)}else{const w=e??s.length;do{const T=l===0?o[0]??r.initialPageParam:Nv(r,a);if(l>0&&T==null)break;a=await y(a,T),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Nv(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 H2(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 Re,Ar,Rr,Ks,Gs,Or,Qs,Ys,Rx,W2=(Rx=class{constructor(e={}){K(this,Re);K(this,Ar);K(this,Rr);K(this,Ks);K(this,Gs);K(this,Or);K(this,Qs);K(this,Ys);$(this,Re,e.queryCache||new B2),$(this,Ar,e.mutationCache||new U2),$(this,Rr,e.defaultOptions||{}),$(this,Ks,new Map),$(this,Gs,new Map),$(this,Or,0)}mount(){ol(this,Or)._++,S(this,Or)===1&&($(this,Qs,Jh.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onFocus())})),$(this,Ys,Du.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onOnline())})))}unmount(){var e,t;ol(this,Or)._--,S(this,Or)===0&&((e=S(this,Qs))==null||e.call(this),$(this,Qs,void 0),(t=S(this,Ys))==null||t.call(this),$(this,Ys,void 0))}isFetching(e){return S(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).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=S(this,Re).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Bs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,Re).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=S(this,Re).get(r.queryHash),s=i==null?void 0:i.state.data,o=R2(t,s);if(o!==void 0)return S(this,Re).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Be.batch(()=>S(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Re);Be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Re),r={type:"active",...e};return Be.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Be.batch(()=>S(this,Re).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Be.batch(()=>{if(S(this,Re).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=Be.batch(()=>S(this,Re).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Jt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Re).build(this,t);return n.isStaleByTime(Bs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=Fv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=Fv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Du.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Re)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Rr)}setDefaultOptions(e){$(this,Rr,e)}setQueryDefaults(e,t){S(this,Ks).set(Gi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ks).values()],n={};return t.forEach(r=>{Ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Gs).set(Gi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Gs).values()];let n={};return t.forEach(r=>{Ea(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Rr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Xh(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===Zh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Re).clear(),S(this,Ar).clear()}},Re=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Or=new WeakMap,Qs=new WeakMap,Ys=new WeakMap,Rx),kt,ae,Va,mt,Fi,Xs,Dr,Ln,Ua,Zs,Js,Ni,Mi,Fr,eo,de,Bo,Xf,Zf,Jf,ep,tp,np,rp,ib,Ox,q2=(Ox=class extends yo{constructor(t,n){super();K(this,de);K(this,kt);K(this,ae);K(this,Va);K(this,mt);K(this,Fi);K(this,Xs);K(this,Dr);K(this,Ln);K(this,Ua);K(this,Zs);K(this,Js);K(this,Ni);K(this,Mi);K(this,Fr);K(this,eo,new Set);this.options=n,$(this,kt,t),$(this,Ln,null),$(this,Dr,Yf()),this.options.experimental_prefetchInRender||S(this,Dr).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&&(S(this,ae).addObserver(this),Mv(S(this,ae),this.options)?ie(this,de,Bo).call(this):this.updateResult(),ie(this,de,ep).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ip(S(this,ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ip(S(this,ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ie(this,de,tp).call(this),ie(this,de,np).call(this),S(this,ae).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ae);if(this.options=S(this,kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ie(this,de,rp).call(this),S(this,ae).setOptions(this.options),r._defaulted&&!Ou(this.options,r)&&S(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ae),observer:this});const s=this.hasListeners();s&&Lv(S(this,ae),i,this.options,r)&&ie(this,de,Bo).call(this),this.updateResult(n),s&&(S(this,ae)!==i||Sn(this.options.enabled,S(this,ae))!==Sn(r.enabled,S(this,ae))||Bs(this.options.staleTime,S(this,ae))!==Bs(r.staleTime,S(this,ae)))&&ie(this,de,Xf).call(this);const o=ie(this,de,Zf).call(this);s&&(S(this,ae)!==i||Sn(this.options.enabled,S(this,ae))!==Sn(r.enabled,S(this,ae))||o!==S(this,Fr))&&ie(this,de,Jf).call(this,o)}getOptimisticResult(t){const n=S(this,kt).getQueryCache().build(S(this,kt),t),r=this.createResult(n,t);return G2(this,r)&&($(this,mt,r),$(this,Xs,this.options),$(this,Fi,S(this,ae).state)),r}getCurrentResult(){return S(this,mt)}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){S(this,eo).add(t)}getCurrentQuery(){return S(this,ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,kt).defaultQueryOptions(t),r=S(this,kt).getQueryCache().build(S(this,kt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ie(this,de,Bo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,mt)))}createResult(t,n){var j;const r=S(this,ae),i=this.options,s=S(this,mt),o=S(this,Fi),a=S(this,Xs),u=t!==r?t.state:S(this,Va),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const k=this.hasListeners(),R=!k&&Mv(t,n),M=k&&Lv(t,r,n,i);(R||M)&&(c={...c,...nb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,Ua))p=S(this,Zs);else try{$(this,Ua,n.select),p=n.select(c.data),p=Qf(s==null?void 0:s.data,p,n),$(this,Zs,p),$(this,Ln,null)}catch(k){$(this,Ln,k)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let k;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))k=s.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,Js))==null?void 0:j.state.data,S(this,Js)):n.placeholderData,n.select&&k!==void 0)try{k=n.select(k),$(this,Ln,null)}catch(R){$(this,Ln,R)}k!==void 0&&(b="success",p=Qf(s==null?void 0:s.data,k,n),f=!0)}S(this,Ln)&&(h=S(this,Ln),p=S(this,Zs),m=Date.now(),b="error");const g=c.fetchStatus==="fetching",y=b==="pending",w=b==="error",T=y&&g,E=p!==void 0,C={status:b,fetchStatus:c.fetchStatus,isPending:y,isSuccess:b==="success",isError:w,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:m,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:g,isRefetching:g&&!y,isLoadingError:w&&!E,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&E,isStale:em(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const k=H=>{C.status==="error"?H.reject(C.error):C.data!==void 0&&H.resolve(C.data)},R=()=>{const H=$(this,Dr,C.promise=Yf());k(H)},M=S(this,Dr);switch(M.status){case"pending":t.queryHash===r.queryHash&&k(M);break;case"fulfilled":(C.status==="error"||C.data!==M.value)&&R();break;case"rejected":(C.status!=="error"||C.error!==M.reason)&&R();break}}return C}updateResult(t){const n=S(this,mt),r=this.createResult(S(this,ae),this.options);if($(this,Fi,S(this,ae).state),$(this,Xs,this.options),S(this,Fi).data!==void 0&&$(this,Js,S(this,ae)),Ou(r,n))return;$(this,mt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,eo).size)return!0;const l=new Set(a??S(this,eo));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,mt)).some(u=>{const d=u;return S(this,mt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ie(this,de,ib).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ie(this,de,ep).call(this)}},kt=new WeakMap,ae=new WeakMap,Va=new WeakMap,mt=new WeakMap,Fi=new WeakMap,Xs=new WeakMap,Dr=new WeakMap,Ln=new WeakMap,Ua=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Ni=new WeakMap,Mi=new WeakMap,Fr=new WeakMap,eo=new WeakMap,de=new WeakSet,Bo=function(t){ie(this,de,rp).call(this);let n=S(this,ae).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Jt)),n},Xf=function(){ie(this,de,tp).call(this);const t=Bs(this.options.staleTime,S(this,ae));if(Ki||S(this,mt).isStale||!Kf(t))return;const r=Qw(S(this,mt).dataUpdatedAt,t)+1;$(this,Ni,setTimeout(()=>{S(this,mt).isStale||this.updateResult()},r))},Zf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ae)):this.options.refetchInterval)??!1},Jf=function(t){ie(this,de,np).call(this),$(this,Fr,t),!(Ki||Sn(this.options.enabled,S(this,ae))===!1||!Kf(S(this,Fr))||S(this,Fr)===0)&&$(this,Mi,setInterval(()=>{(this.options.refetchIntervalInBackground||Jh.isFocused())&&ie(this,de,Bo).call(this)},S(this,Fr)))},ep=function(){ie(this,de,Xf).call(this),ie(this,de,Jf).call(this,ie(this,de,Zf).call(this))},tp=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),$(this,Ni,void 0))},np=function(){S(this,Mi)&&(clearInterval(S(this,Mi)),$(this,Mi,void 0))},rp=function(){const t=S(this,kt).getQueryCache().build(S(this,kt),this.options);if(t===S(this,ae))return;const n=S(this,ae);$(this,ae,t),$(this,Va,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ib=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,mt))}),S(this,kt).getQueryCache().notify({query:S(this,ae),type:"observerResultsUpdated"})})},Ox);function K2(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mv(e,t){return K2(e,t)||e.state.data!==void 0&&ip(e,t,t.refetchOnMount)}function ip(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&em(e,t)}return!1}function Lv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&em(e,n)}function em(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Bs(t.staleTime,e))}function G2(e,t){return!Ou(e.getCurrentResult(),t)}var Nr,Mr,Et,nr,ar,Yl,sp,Dx,Q2=(Dx=class extends yo{constructor(t,n){super();K(this,ar);K(this,Nr);K(this,Mr);K(this,Et);K(this,nr);$(this,Nr,t),this.setOptions(n),this.bindMethods(),ie(this,ar,Yl).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=S(this,Nr).defaultMutationOptions(t),Ou(this.options,n)||S(this,Nr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Et),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Gi(n.mutationKey)!==Gi(this.options.mutationKey)?this.reset():((r=S(this,Et))==null?void 0:r.state.status)==="pending"&&S(this,Et).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Et))==null||t.removeObserver(this)}onMutationUpdate(t){ie(this,ar,Yl).call(this),ie(this,ar,sp).call(this,t)}getCurrentResult(){return S(this,Mr)}reset(){var t;(t=S(this,Et))==null||t.removeObserver(this),$(this,Et,void 0),ie(this,ar,Yl).call(this),ie(this,ar,sp).call(this)}mutate(t,n){var r;return $(this,nr,n),(r=S(this,Et))==null||r.removeObserver(this),$(this,Et,S(this,Nr).getMutationCache().build(S(this,Nr),this.options)),S(this,Et).addObserver(this),S(this,Et).execute(t)}},Nr=new WeakMap,Mr=new WeakMap,Et=new WeakMap,nr=new WeakMap,ar=new WeakSet,Yl=function(){var n;const t=((n=S(this,Et))==null?void 0:n.state)??rb();$(this,Mr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},sp=function(t){Be.batch(()=>{var n,r,i,s,o,a,l,u;if(S(this,nr)&&this.hasListeners()){const d=S(this,Mr).variables,c=S(this,Mr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,nr)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=S(this,nr)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,nr)).onError)==null||a.call(o,t.error,d,c),(u=(l=S(this,nr)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(S(this,Mr))})})},Dx),sb=v.createContext(void 0),ob=e=>{const t=v.useContext(sb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Y2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(sb.Provider,{value:e,children:t})),ab=v.createContext(!1),X2=()=>v.useContext(ab);ab.Provider;function Z2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var J2=v.createContext(Z2()),e_=()=>v.useContext(J2);function lb(e,t){return typeof e=="function"?e(...t):!!e}function op(){}var t_=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n_=e=>{v.useEffect(()=>{e.clearReset()},[e])},r_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&lb(n,[e.error,r]),i_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},s_=(e,t)=>e.isLoading&&e.isFetching&&!t,o_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Iv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function a_(e,t,n){var d,c,f,p,h;const r=ob(),i=X2(),s=e_(),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",i_(o),t_(o,s),n_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const b=i?op:l.subscribe(Be.batchCalls(m));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),o_(o,u))throw Iv(o,l,s);if(r_({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&&!Ki&&s_(u,i)){const m=a?Iv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;m==null||m.catch(op).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function l_(e,t){return a_(e,q2)}function tm(e,t){const n=ob(),[r]=v.useState(()=>new Q2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(Be.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(op)},[r]);if(i.error&&lb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const u_=e=>l_({queryKey:["widgets",e],queryFn:()=>c_(e)}),c_=e=>vo(`widgets/with-link/${e}`);var Y=(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))(Y||{});function d_(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 gd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Df(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UC=typeof WeakMap=="function"?WeakMap:Map;function yw(e,t,n){n=or(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Pu||(Pu=!0,Uf=r),Df(e,t)},n}function xw(e,t,n){n=or(-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(){Df(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Df(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function cv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UC;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=r2.bind(null,e,t,n),t.then(e,e))}function dv(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 fv(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=or(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var HC=pr.ReactCurrentOwner,Pt=!1;function gt(e,t,n,r){t.child=e===null?G1(t,null,n,r):io(t,e.child,n,r)}function pv(e,t,n,r,i){n=n.render;var s=t.ref;return $s(t,i),r=Nh(e,t,n,r,s,i),n=Mh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&n&&kh(t),t.flags|=1,gt(e,t,r,i),t.child)}function hv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!qh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,ww(e,t,s,r,i)):(e=Gl(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:ha,n(o,r)&&e.ref===t.ref)return dr(e,t,i)}return t.flags|=1,e=Gr(s,r),e.ref=t.ref,e.return=t,t.child=e}function ww(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ha(s,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,dr(e,t,i)}return Ff(e,t,n,r,i)}function bw(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},xe(Ps,It),It|=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,xe(Ps,It),It|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(Ps,It),It|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(Ps,It),It|=r;return gt(e,t,i,n),t.child}function Sw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ff(e,t,n,r,i){var s=At(n)?Vi:pt.current;return s=no(t,s),$s(t,i),n=Nh(e,t,n,r,s,i),r=Mh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&r&&kh(t),t.flags|=1,gt(e,t,n,i),t.child)}function mv(e,t,n,r,i){if(At(n)){var s=!0;yu(t)}else s=!1;if($s(t,i),t.stateNode===null)Wl(e,t),vw(t,n,r),Of(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=ln(u):(u=At(n)?Vi:pt.current,u=no(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)&&uv(t,o,r,u),Er=!1;var f=t.memoizedState;o.state=f,ku(t,r,o,i),l=t.memoizedState,a!==r||f!==l||jt.current||Er?(typeof d=="function"&&(Rf(t,n,d,r),l=t.memoizedState),(a=Er||lv(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,Y1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:gn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ln(l):(l=At(n)?Vi:pt.current,l=no(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)&&uv(t,o,r,l),Er=!1,f=t.memoizedState,o.state=f,ku(t,r,o,i);var h=t.memoizedState;a!==c||f!==h||jt.current||Er?(typeof p=="function"&&(Rf(t,n,p,r),h=t.memoizedState),(u=Er||lv(t,n,u,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,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=h),o.props=r,o.state=h,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 Nf(e,t,n,r,s,i)}function Nf(e,t,n,r,i,s){Sw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&ev(t,n,!1),dr(e,t,s);r=t.stateNode,HC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=io(t,e.child,null,s),t.child=io(t,null,a,s)):gt(e,t,a,s),t.memoizedState=r.state,i&&ev(t,n,!0),t.child}function kw(e){var t=e.stateNode;t.pendingContext?Jg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Jg(e,t.context,!1),Rh(e,t.containerInfo)}function gv(e,t,n,r,i){return ro(),Th(i),t.flags|=256,gt(e,t,n,r),t.child}var Mf={dehydrated:null,treeContext:null,retryLane:0};function Lf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ew(e,t,n){var r=t.pendingProps,i=_e.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),xe(_e,i&1),e===null)return jf(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=ac(o,r,0,null),e=Ii(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Lf(n),t.memoizedState=Mf,e):$h(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return WC(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=Gr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Gr(a,s):(s=Ii(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?Lf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Mf,r}return s=e.child,e=s.sibling,r=Gr(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 $h(e,t){return t=ac({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wl(e,t,n,r){return r!==null&&Th(r),io(t,e.child,null,n),e=$h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=gd(Error(N(422))),wl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=ac({mode:"visible",children:r.children},i,0,null),s=Ii(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&io(t,e.child,null,o),t.child.memoizedState=Lf(o),t.memoizedState=Mf,s);if(!(t.mode&1))return wl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(N(419)),r=gd(s,r,void 0),wl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pt||a){if(r=Ge,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,cr(e,i),kn(r,e,i,-1))}return Wh(),r=gd(Error(N(421))),wl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=i2.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,$t=Hr(i.nextSibling),Vt=t,Ee=!0,wn=null,e!==null&&(en[tn++]=rr,en[tn++]=ir,en[tn++]=Ui,rr=e.id,ir=e.overflow,Ui=t),t=$h(t,r.children),t.flags|=4096,t)}function vv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Af(e.return,t,n)}function vd(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 Tw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(gt(e,t,r.children,n),r=_e.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&&vv(e,n,t);else if(e.tag===19)vv(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(xe(_e,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&&Eu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vd(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&&Eu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vd(t,!0,n,null,s);break;case"together":vd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Gr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qC(e,t,n){switch(t.tag){case 3:kw(t),ro();break;case 5:X1(t);break;case 1:At(t.type)&&yu(t);break;case 4:Rh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;xe(bu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(_e,_e.current&1),t.flags|=128,null):n&t.child.childLanes?Ew(e,t,n):(xe(_e,_e.current&1),e=dr(e,t,n),e!==null?e.sibling:null);xe(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),xe(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,bw(e,t,n)}return dr(e,t,n)}var Cw,If,_w,Pw;Cw=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}};If=function(){};_w=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti($n.current);var s=null;switch(n){case"input":i=of(e,i),r=of(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=uf(e,i),r=uf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=gu)}df(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"&&(aa.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"&&(aa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&be("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)}};Pw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oo(e,t){if(!Ee)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 lt(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 KC(e,t,n){var r=t.pendingProps;switch(Eh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return At(t.type)&&vu(),lt(t),null;case 3:return r=t.stateNode,so(),ke(jt),ke(pt),Dh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wn!==null&&(qf(wn),wn=null))),If(e,t),lt(t),null;case 5:Oh(t);var i=Ti(xa.current);if(n=t.type,e!==null&&t.stateNode!=null)_w(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return lt(t),null}if(e=Ti($n.current),yl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ln]=t,r[va]=s,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(i=0;i<zo.length;i++)be(zo[i],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":Cg(r,s),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},be("invalid",r);break;case"textarea":Pg(r,s),be("invalid",r)}df(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&&vl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",""+a]):aa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&be("scroll",r)}switch(n){case"input":ul(r),_g(r,s,!0);break;case"textarea":ul(r),jg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=gu)}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=n1(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[Ln]=t,e[va]=r,Cw(e,t,!1,!1),t.stateNode=e;e:{switch(o=ff(n,r),n){case"dialog":be("cancel",e),be("close",e),i=r;break;case"iframe":case"object":case"embed":be("load",e),i=r;break;case"video":case"audio":for(i=0;i<zo.length;i++)be(zo[i],e);i=r;break;case"source":be("error",e),i=r;break;case"img":case"image":case"link":be("error",e),be("load",e),i=r;break;case"details":be("toggle",e),i=r;break;case"input":Cg(e,r),i=of(e,r),be("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),be("invalid",e);break;case"textarea":Pg(e,r),i=uf(e,r),be("invalid",e);break;default:i=r}df(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?s1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&r1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&la(e,l):typeof l=="number"&&la(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(aa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&be("scroll",e):l!=null&&uh(e,s,l,o))}switch(n){case"input":ul(e),_g(e,r,!1);break;case"textarea":ul(e),jg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=gu)}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 lt(t),null;case 6:if(e&&t.stateNode!=null)Pw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Ti(xa.current),Ti($n.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ln]=t,(s=r.nodeValue!==n)&&(e=Vt,e!==null))switch(e.tag){case 3:vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ln]=t,t.stateNode=r}return lt(t),null;case 13:if(ke(_e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&$t!==null&&t.mode&1&&!(t.flags&128))q1(),ro(),t.flags|=98560,s=!1;else if(s=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(N(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));s[Ln]=t}else ro(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lt(t),s=!1}else wn!==null&&(qf(wn),wn=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||_e.current&1?Ve===0&&(Ve=3):Wh())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return so(),If(e,t),e===null&&ma(t.stateNode.containerInfo),lt(t),null;case 10:return Ph(t.type._context),lt(t),null;case 17:return At(t.type)&&vu(),lt(t),null;case 19:if(ke(_e),s=t.memoizedState,s===null)return lt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Oo(s,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eu(e),o!==null){for(t.flags|=128,Oo(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 xe(_e,_e.current&1|2),t.child}e=e.sibling}s.tail!==null&&Me()>ao&&(t.flags|=128,r=!0,Oo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Eu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return lt(t),null}else 2*Me()-s.renderingStartTime>ao&&n!==1073741824&&(t.flags|=128,r=!0,Oo(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=Me(),t.sibling=null,n=_e.current,xe(_e,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Hh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?It&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function GC(e,t){switch(Eh(t),t.tag){case 1:return At(t.type)&&vu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return so(),ke(jt),ke(pt),Dh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oh(t),null;case 13:if(ke(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));ro()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(_e),null;case 4:return so(),null;case 10:return Ph(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var bl=!1,dt=!1,QC=typeof WeakSet=="function"?WeakSet:Set,z=null;function _s(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function $f(e,t,n){try{n()}catch(r){De(e,t,r)}}var yv=!1;function YC(e,t){if(Sf=pu,e=D1(),Sh(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(kf={focusedElem:e,selectionRange:n},pu=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:gn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(T){De(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return h=yv,yv=!1,h}function Xo(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&&$f(t,n,s)}i=i.next}while(i!==r)}}function sc(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 zf(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 jw(e){var t=e.alternate;t!==null&&(e.alternate=null,jw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ln],delete t[va],delete t[Cf],delete t[OC],delete t[DC])),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 Aw(e){return e.tag===5||e.tag===3||e.tag===4}function xv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Aw(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 Bf(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=gu));else if(r!==4&&(e=e.child,e!==null))for(Bf(e,t,n),e=e.sibling;e!==null;)Bf(e,t,n),e=e.sibling}function Vf(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(Vf(e,t,n),e=e.sibling;e!==null;)Vf(e,t,n),e=e.sibling}var tt=null,yn=!1;function wr(e,t,n){for(n=n.child;n!==null;)Rw(e,t,n),n=n.sibling}function Rw(e,t,n){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Xu,n)}catch{}switch(n.tag){case 5:dt||_s(n,t);case 6:var r=tt,i=yn;tt=null,wr(e,t,n),tt=r,yn=i,tt!==null&&(yn?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(yn?(e=tt,n=n.stateNode,e.nodeType===8?cd(e.parentNode,n):e.nodeType===1&&cd(e,n),fa(e)):cd(tt,n.stateNode));break;case 4:r=tt,i=yn,tt=n.stateNode.containerInfo,yn=!0,wr(e,t,n),tt=r,yn=i;break;case 0:case 11:case 14:case 15:if(!dt&&(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)&&$f(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!dt&&(_s(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(dt=(r=dt)||n.memoizedState!==null,wr(e,t,n),dt=r):wr(e,t,n);break;default:wr(e,t,n)}}function wv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QC),t.forEach(function(r){var i=s2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function pn(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:tt=a.stateNode,yn=!1;break e;case 3:tt=a.stateNode.containerInfo,yn=!0;break e;case 4:tt=a.stateNode.containerInfo,yn=!0;break e}a=a.return}if(tt===null)throw Error(N(160));Rw(s,o,i),tt=null,yn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){De(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ow(t,e),t=t.sibling}function Ow(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pn(t,e),Pn(e),r&4){try{Xo(3,e,e.return),sc(3,e)}catch(m){De(e,e.return,m)}try{Xo(5,e,e.return)}catch(m){De(e,e.return,m)}}break;case 1:pn(t,e),Pn(e),r&512&&n!==null&&_s(n,n.return);break;case 5:if(pn(t,e),Pn(e),r&512&&n!==null&&_s(n,n.return),e.flags&32){var i=e.stateNode;try{la(i,"")}catch(m){De(e,e.return,m)}}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&&e1(i,s),ff(a,o);var u=ff(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?s1(i,c):d==="dangerouslySetInnerHTML"?r1(i,c):d==="children"?la(i,c):uh(i,d,c,u)}switch(a){case"input":af(i,s);break;case"textarea":t1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[va]=s}catch(m){De(e,e.return,m)}}break;case 6:if(pn(t,e),Pn(e),r&4){if(e.stateNode===null)throw Error(N(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){De(e,e.return,m)}}break;case 3:if(pn(t,e),Pn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{fa(t.containerInfo)}catch(m){De(e,e.return,m)}break;case 4:pn(t,e),Pn(e);break;case 13:pn(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||(Vh=Me())),r&4&&wv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(dt=(u=dt)||d,pn(t,e),dt=u):pn(t,e),Pn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(c=z=d;z!==null;){switch(f=z,p=f.child,f.tag){case 0:case 11:case 14:case 15:Xo(4,f,f.return);break;case 1:_s(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){De(r,n,m)}}break;case 5:_s(f,f.return);break;case 22:if(f.memoizedState!==null){Sv(c);continue}}p!==null?(p.return=f,z=p):Sv(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=i1("display",o))}catch(m){De(e,e.return,m)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(m){De(e,e.return,m)}}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:pn(t,e),Pn(e),r&4&&wv(e);break;case 21:break;default:pn(t,e),Pn(e)}}function Pn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Aw(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(la(i,""),r.flags&=-33);var s=xv(e);Vf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=xv(e);Bf(e,a,o);break;default:throw Error(N(161))}}catch(l){De(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function XC(e,t,n){z=e,Dw(e)}function Dw(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||bl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||dt;a=bl;var u=dt;if(bl=o,(dt=l)&&!u)for(z=i;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?kv(i):l!==null?(l.return=o,z=l):kv(i);for(;s!==null;)z=s,Dw(s),s=s.sibling;z=i,bl=a,dt=u}bv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):bv(e)}}function bv(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:dt||sc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!dt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&sv(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}sv(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&&fa(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}dt||t.flags&512&&zf(t)}catch(f){De(t,t.return,f)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function Sv(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function kv(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{sc(4,t)}catch(l){De(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){De(t,i,l)}}var s=t.return;try{zf(t)}catch(l){De(t,s,l)}break;case 5:var o=t.return;try{zf(t)}catch(l){De(t,o,l)}}}catch(l){De(t,t.return,l)}if(t===e){z=null;break}var a=t.sibling;if(a!==null){a.return=t.return,z=a;break}z=t.return}}var ZC=Math.ceil,_u=pr.ReactCurrentDispatcher,zh=pr.ReactCurrentOwner,on=pr.ReactCurrentBatchConfig,ce=0,Ge=null,Le=null,it=0,It=0,Ps=oi(0),Ve=0,ka=null,Wi=0,oc=0,Bh=0,Zo=null,Ct=null,Vh=0,ao=1/0,Jn=null,Pu=!1,Uf=null,qr=null,Sl=!1,Ir=null,ju=0,Jo=0,Hf=null,ql=-1,Kl=0;function yt(){return ce&6?Me():ql!==-1?ql:ql=Me()}function Kr(e){return e.mode&1?ce&2&&it!==0?it&-it:NC.transition!==null?(Kl===0&&(Kl=v1()),Kl):(e=pe,e!==0||(e=window.event,e=e===void 0?16:E1(e.type)),e):1}function kn(e,t,n,r){if(50<Jo)throw Jo=0,Hf=null,Error(N(185));Wa(e,n,r),(!(ce&2)||e!==Ge)&&(e===Ge&&(!(ce&2)&&(oc|=n),Ve===4&&_r(e,it)),Rt(e,r),n===1&&ce===0&&!(t.mode&1)&&(ao=Me()+500,nc&&ai()))}function Rt(e,t){var n=e.callbackNode;NT(e,t);var r=fu(e,e===Ge?it:0);if(r===0)n!==null&&Og(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Og(n),t===1)e.tag===0?FC(Ev.bind(null,e)):U1(Ev.bind(null,e)),AC(function(){!(ce&6)&&ai()}),n=null;else{switch(y1(r)){case 1:n=hh;break;case 4:n=m1;break;case 16:n=du;break;case 536870912:n=g1;break;default:n=du}n=Bw(n,Fw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fw(e,t){if(ql=-1,Kl=0,ce&6)throw Error(N(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=fu(e,e===Ge?it:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Au(e,r);else{t=r;var i=ce;ce|=2;var s=Mw();(Ge!==e||it!==t)&&(Jn=null,ao=Me()+500,Li(e,t));do try{t2();break}catch(a){Nw(e,a)}while(!0);_h(),_u.current=s,ce=i,Le!==null?t=0:(Ge=null,it=0,t=Ve)}if(t!==0){if(t===2&&(i=vf(e),i!==0&&(r=i,t=Wf(e,i))),t===1)throw n=ka,Li(e,0),_r(e,r),Rt(e,Me()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!JC(i)&&(t=Au(e,r),t===2&&(s=vf(e),s!==0&&(r=s,t=Wf(e,s))),t===1))throw n=ka,Li(e,0),_r(e,r),Rt(e,Me()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:vi(e,Ct,Jn);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Vh+500-Me(),10<t)){if(fu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Tf(vi.bind(null,e,Ct,Jn),t);break}vi(e,Ct,Jn);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Sn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZC(r/1960))-r,10<r){e.timeoutHandle=Tf(vi.bind(null,e,Ct,Jn),r);break}vi(e,Ct,Jn);break;case 5:vi(e,Ct,Jn);break;default:throw Error(N(329))}}}return Rt(e,Me()),e.callbackNode===n?Fw.bind(null,e):null}function Wf(e,t){var n=Zo;return e.current.memoizedState.isDehydrated&&(Li(e,t).flags|=256),e=Au(e,t),e!==2&&(t=Ct,Ct=n,t!==null&&qf(t)),e}function qf(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function JC(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(!En(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 _r(e,t){for(t&=~Bh,t&=~oc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Sn(t),r=1<<n;e[n]=-1,t&=~r}}function Ev(e){if(ce&6)throw Error(N(327));zs();var t=fu(e,0);if(!(t&1))return Rt(e,Me()),null;var n=Au(e,t);if(e.tag!==0&&n===2){var r=vf(e);r!==0&&(t=r,n=Wf(e,r))}if(n===1)throw n=ka,Li(e,0),_r(e,t),Rt(e,Me()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,Ct,Jn),Rt(e,Me()),null}function Uh(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(ao=Me()+500,nc&&ai())}}function qi(e){Ir!==null&&Ir.tag===0&&!(ce&6)&&zs();var t=ce;ce|=1;var n=on.transition,r=pe;try{if(on.transition=null,pe=1,e)return e()}finally{pe=r,on.transition=n,ce=t,!(ce&6)&&ai()}}function Hh(){It=Ps.current,ke(Ps)}function Li(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jC(n)),Le!==null)for(n=Le.return;n!==null;){var r=n;switch(Eh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vu();break;case 3:so(),ke(jt),ke(pt),Dh();break;case 5:Oh(r);break;case 4:so();break;case 13:ke(_e);break;case 19:ke(_e);break;case 10:Ph(r.type._context);break;case 22:case 23:Hh()}n=n.return}if(Ge=e,Le=e=Gr(e.current,null),it=It=t,Ve=0,ka=null,Bh=oc=Wi=0,Ct=Zo=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 Nw(e,t){do{var n=Le;try{if(_h(),Ul.current=Cu,Tu){for(var r=je.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Tu=!1}if(Hi=0,Ke=ze=je=null,Yo=!1,wa=0,zh.current=null,n===null||n.return===null){Ve=1,ka=t,Le=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=it,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=dv(o);if(p!==null){p.flags&=-257,fv(p,o,a,s,t),p.mode&1&&cv(s,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){cv(s,u,t),Wh();break e}l=Error(N(426))}}else if(Ee&&a.mode&1){var b=dv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),fv(b,o,a,s,t),Th(oo(l,a));break e}}s=l=oo(l,a),Ve!==4&&(Ve=2),Zo===null?Zo=[s]:Zo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=yw(s,l,t);iv(s,g);break e;case 1:a=l;var y=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(qr===null||!qr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var T=xw(s,a,t);iv(s,T);break e}}s=s.return}while(s!==null)}Iw(n)}catch(E){t=E,Le===n&&n!==null&&(Le=n=n.return);continue}break}while(!0)}function Mw(){var e=_u.current;return _u.current=Cu,e===null?Cu:e}function Wh(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Ge===null||!(Wi&268435455)&&!(oc&268435455)||_r(Ge,it)}function Au(e,t){var n=ce;ce|=2;var r=Mw();(Ge!==e||it!==t)&&(Jn=null,Li(e,t));do try{e2();break}catch(i){Nw(e,i)}while(!0);if(_h(),ce=n,_u.current=r,Le!==null)throw Error(N(261));return Ge=null,it=0,Ve}function e2(){for(;Le!==null;)Lw(Le)}function t2(){for(;Le!==null&&!CT();)Lw(Le)}function Lw(e){var t=zw(e.alternate,e,It);e.memoizedProps=e.pendingProps,t===null?Iw(e):Le=t,zh.current=null}function Iw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=GC(n,t),n!==null){n.flags&=32767,Le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Le=null;return}}else if(n=KC(n,t,It),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);Ve===0&&(Ve=5)}function vi(e,t,n){var r=pe,i=on.transition;try{on.transition=null,pe=1,n2(e,t,n,r)}finally{on.transition=i,pe=r}return null}function n2(e,t,n,r){do zs();while(Ir!==null);if(ce&6)throw Error(N(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(N(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(MT(e,s),e===Ge&&(Le=Ge=null,it=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sl||(Sl=!0,Bw(du,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=on.transition,on.transition=null;var o=pe;pe=1;var a=ce;ce|=4,zh.current=null,YC(e,n),Ow(n,e),SC(kf),pu=!!Sf,kf=Sf=null,e.current=n,XC(n),_T(),ce=a,pe=o,on.transition=s}else e.current=n;if(Sl&&(Sl=!1,Ir=e,ju=i),s=e.pendingLanes,s===0&&(qr=null),AT(n.stateNode),Rt(e,Me()),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(Pu)throw Pu=!1,e=Uf,Uf=null,e;return ju&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Hf?Jo++:(Jo=0,Hf=e):Jo=0,ai(),null}function zs(){if(Ir!==null){var e=y1(ju),t=on.transition,n=pe;try{if(on.transition=null,pe=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,ju=0,ce&6)throw Error(N(331));var i=ce;for(ce|=4,z=e.current;z!==null;){var s=z,o=s.child;if(z.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:Xo(8,d,s)}var c=d.child;if(c!==null)c.return=d,z=c;else for(;z!==null;){d=z;var f=d.sibling,p=d.return;if(jw(d),d===u){z=null;break}if(f!==null){f.return=p,z=f;break}z=p}}}var h=s.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}z=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,z=o;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Xo(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,z=g;break e}z=s.return}}var y=e.current;for(z=y;z!==null;){o=z;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,z=w;else e:for(o=y;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:sc(9,a)}}catch(E){De(a,a.return,E)}if(a===o){z=null;break e}var T=a.sibling;if(T!==null){T.return=a.return,z=T;break e}z=a.return}}if(ce=i,ai(),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Xu,e)}catch{}r=!0}return r}finally{pe=n,on.transition=t}}return!1}function Tv(e,t,n){t=oo(n,t),t=yw(e,t,1),e=Wr(e,t,1),t=yt(),e!==null&&(Wa(e,1,t),Rt(e,t))}function De(e,t,n){if(e.tag===3)Tv(e,e,n);else for(;t!==null;){if(t.tag===3){Tv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=oo(n,e),e=xw(t,e,1),t=Wr(t,e,1),e=yt(),t!==null&&(Wa(t,1,e),Rt(t,e));break}}t=t.return}}function r2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,Ge===e&&(it&n)===n&&(Ve===4||Ve===3&&(it&130023424)===it&&500>Me()-Vh?Li(e,0):Bh|=n),Rt(e,t)}function $w(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var n=yt();e=cr(e,t),e!==null&&(Wa(e,t,n),Rt(e,n))}function i2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$w(e,n)}function s2(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(N(314))}r!==null&&r.delete(t),$w(e,n)}var zw;zw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,qC(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Ee&&t.flags&1048576&&H1(t,wu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=no(t,pt.current);$s(t,n),i=Nh(null,t,r,e,i,n);var s=Mh();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,At(r)?(s=!0,yu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ah(t),i.updater=ic,t.stateNode=i,i._reactInternals=t,Of(t,r,e,n),t=Nf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&kh(t),gt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=a2(r),e=gn(r,e),i){case 0:t=Ff(null,t,r,e,n);break e;case 1:t=mv(null,t,r,e,n);break e;case 11:t=pv(null,t,r,e,n);break e;case 14:t=hv(null,t,r,gn(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),Ff(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),mv(e,t,r,i,n);case 3:e:{if(kw(t),e===null)throw Error(N(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Y1(e,t),ku(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=oo(Error(N(423)),t),t=gv(e,t,r,n,i);break e}else if(r!==i){i=oo(Error(N(424)),t),t=gv(e,t,r,n,i);break e}else for($t=Hr(t.stateNode.containerInfo.firstChild),Vt=t,Ee=!0,wn=null,n=G1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ro(),r===i){t=dr(e,t,n);break e}gt(e,t,r,n)}t=t.child}return t;case 5:return X1(t),e===null&&jf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Ef(r,i)?o=null:s!==null&&Ef(r,s)&&(t.flags|=32),Sw(e,t),gt(e,t,o,n),t.child;case 6:return e===null&&jf(t),null;case 13:return Ew(e,t,n);case 4:return Rh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=io(t,null,r,n):gt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),pv(e,t,r,i,n);case 7:return gt(e,t,t.pendingProps,n),t.child;case 8:return gt(e,t,t.pendingProps.children,n),t.child;case 12:return gt(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,xe(bu,r._currentValue),r._currentValue=o,s!==null)if(En(s.value,o)){if(s.children===i.children&&!jt.current){t=dr(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=or(-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),Af(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(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Af(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}gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$s(t,n),i=ln(i),r=r(i),t.flags|=1,gt(e,t,r,n),t.child;case 14:return r=t.type,i=gn(r,t.pendingProps),i=gn(r.type,i),hv(e,t,r,i,n);case 15:return ww(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),Wl(e,t),t.tag=1,At(r)?(e=!0,yu(t)):e=!1,$s(t,n),vw(t,r,i),Of(t,r,i,n),Nf(null,t,r,!0,e,n);case 19:return Tw(e,t,n);case 22:return bw(e,t,n)}throw Error(N(156,t.tag))};function Bw(e,t){return h1(e,t)}function o2(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 rn(e,t,n,r){return new o2(e,t,n,r)}function qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a2(e){if(typeof e=="function")return qh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dh)return 11;if(e===fh)return 14}return 2}function Gr(e,t){var n=e.alternate;return n===null?(n=rn(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 Gl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")qh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ys:return Ii(n.children,i,s,t);case ch:o=8,i|=8;break;case tf:return e=rn(12,n,t,i|2),e.elementType=tf,e.lanes=s,e;case nf:return e=rn(13,n,t,i),e.elementType=nf,e.lanes=s,e;case rf:return e=rn(19,n,t,i),e.elementType=rf,e.lanes=s,e;case Xx:return ac(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qx:o=10;break e;case Yx:o=9;break e;case dh:o=11;break e;case fh:o=14;break e;case kr:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=rn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ii(e,t,n,r){return e=rn(7,e,r,t),e.lanes=n,e}function ac(e,t,n,r){return e=rn(22,e,r,t),e.elementType=Xx,e.lanes=n,e.stateNode={isHidden:!1},e}function yd(e,t,n){return e=rn(6,e,null,t),e.lanes=n,e}function xd(e,t,n){return t=rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function l2(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=Jc(0),this.expirationTimes=Jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Kh(e,t,n,r,i,s,o,a,l){return e=new l2(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=rn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ah(s),e}function u2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vw(e){if(!e)return ti;e=e._reactInternals;e:{if(Zi(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(At(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(At(n))return V1(e,n,t)}return t}function Uw(e,t,n,r,i,s,o,a,l){return e=Kh(n,r,!0,e,i,s,o,a,l),e.context=Vw(null),n=e.current,r=yt(),i=Kr(n),s=or(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Wa(e,i,r),Rt(e,r),e}function lc(e,t,n,r){var i=t.current,s=yt(),o=Kr(i);return n=Vw(n),t.context===null?t.context=n:t.pendingContext=n,t=or(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(kn(e,i,o,s),Vl(e,i,o)),o}function Ru(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 Cv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gh(e,t){Cv(e,t),(e=e.alternate)&&Cv(e,t)}function c2(){return null}var Hw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qh(e){this._internalRoot=e}uc.prototype.render=Qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));lc(e,t,null,null)};uc.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qi(function(){lc(null,e,null,null)}),t[ur]=null}};function uc(e){this._internalRoot=e}uc.prototype.unstable_scheduleHydration=function(e){if(e){var t=b1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cr.length&&t!==0&&t<Cr[n].priority;n++);Cr.splice(n,0,e),n===0&&k1(e)}};function Yh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _v(){}function d2(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Ru(o);s.call(u)}}var o=Uw(t,r,e,0,null,!1,!1,"",_v);return e._reactRootContainer=o,e[ur]=o.current,ma(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=Ru(l);a.call(u)}}var l=Kh(e,0,!1,null,null,!1,!1,"",_v);return e._reactRootContainer=l,e[ur]=l.current,ma(e.nodeType===8?e.parentNode:e),qi(function(){lc(t,l,n,r)}),l}function dc(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=Ru(o);a.call(l)}}lc(t,o,e,i)}else o=d2(n,t,e,i,r);return Ru(o)}x1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=$o(t.pendingLanes);n!==0&&(mh(t,n|1),Rt(t,Me()),!(ce&6)&&(ao=Me()+500,ai()))}break;case 13:qi(function(){var r=cr(e,1);if(r!==null){var i=yt();kn(r,e,1,i)}}),Gh(e,1)}};gh=function(e){if(e.tag===13){var t=cr(e,134217728);if(t!==null){var n=yt();kn(t,e,134217728,n)}Gh(e,134217728)}};w1=function(e){if(e.tag===13){var t=Kr(e),n=cr(e,t);if(n!==null){var r=yt();kn(n,e,t,r)}Gh(e,t)}};b1=function(){return pe};S1=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};hf=function(e,t,n){switch(t){case"input":if(af(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=tc(r);if(!i)throw Error(N(90));Jx(r),af(r,i)}}}break;case"textarea":t1(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};l1=Uh;u1=qi;var f2={usingClientEntryPoint:!1,Events:[Ka,Ss,tc,o1,a1,Uh]},Do={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p2={bundleType:Do.bundleType,version:Do.version,rendererPackageName:Do.rendererPackageName,rendererConfig:Do.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=f1(e),e===null?null:e.stateNode},findFiberByHostInstance:Do.findFiberByHostInstance||c2,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 kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kl.isDisabled&&kl.supportsFiber)try{Xu=kl.inject(p2),In=kl}catch{}}Ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f2;Ht.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yh(t))throw Error(N(200));return u2(e,t,null,n)};Ht.createRoot=function(e,t){if(!Yh(e))throw Error(N(299));var n=!1,r="",i=Hw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Kh(e,1,!1,null,null,n,!1,r,i),e[ur]=t.current,ma(e.nodeType===8?e.parentNode:e),new Qh(t)};Ht.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(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=f1(t),e=e===null?null:e.stateNode,e};Ht.flushSync=function(e){return qi(e)};Ht.hydrate=function(e,t,n){if(!cc(t))throw Error(N(200));return dc(null,e,t,!0,n)};Ht.hydrateRoot=function(e,t,n){if(!Yh(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Hw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Uw(t,null,e,1,n??null,i,!1,s,o),e[ur]=t.current,ma(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 uc(t)};Ht.render=function(e,t,n){if(!cc(t))throw Error(N(200));return dc(null,e,t,!1,n)};Ht.unmountComponentAtNode=function(e){if(!cc(e))throw Error(N(40));return e._reactRootContainer?(qi(function(){dc(null,null,e,!1,function(){e._reactRootContainer=null,e[ur]=null})}),!0):!1};Ht.unstable_batchedUpdates=Uh;Ht.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cc(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return dc(e,t,n,!1,r)};Ht.version="18.3.1-next-f1338f8080-20240426";function Ww(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ww)}catch(e){console.error(e)}}Ww(),Wx.exports=Ht;var qw=Wx.exports;const h2=Yi(qw);var Kw,Pv=qw;Kw=Pv.createRoot,Pv.hydrateRoot;const m2="@alfatech/livechat",g2="v2025.07.09.5",v2="module",y2="https://api-live.alfatek.dev",x2="wss://api-live.alfatek.dev",w2=["dist","README.md"],b2="dist/widget.js",S2={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"},k2={"@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"},E2={"@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"},Gw={name:m2,private:!1,version:g2,type:v2,apiURL:y2,wsURL:x2,files:w2,main:b2,scripts:S2,dependencies:k2,devDependencies:E2,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},T2=Gw.apiURL,C2=Gw.wsURL,_2=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],P2=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],j2={429:_2,404:P2};async function vo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${T2}/${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=j2[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 fc=e=>[200,201,204].includes(e),A2=(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 yo=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(){}},Ki=typeof window>"u"||"Deno"in globalThis;function Jt(){}function R2(e,t){return typeof e=="function"?e(t):e}function Kf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Qw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bs(e,t){return typeof e=="function"?e(t):e}function bn(e,t){return typeof e=="function"?e(t):e}function jv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Xh(o,t.options))return!1}else if(!Ea(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 Av(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gi(t.options.mutationKey)!==Gi(s))return!1}else if(!Ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Xh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gi)(e)}function Gi(e){return JSON.stringify(e,(t,n)=>Gf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ea(e[n],t[n])):!1}function Yw(e,t){if(e===t)return e;const n=Rv(e)&&Rv(t);if(n||Gf(e)&&Gf(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]=Yw(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Ou(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 Rv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gf(e){if(!Ov(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ov(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ov(e){return Object.prototype.toString.call(e)==="[object Object]"}function O2(e){return new Promise(t=>{setTimeout(t,e)})}function Qf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yw(e,t):t}function D2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function F2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Zh=Symbol();function Xw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Zh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Vs,Ex,N2=(Ex=class extends yo{constructor(){super();K(this,Ai);K(this,Pr);K(this,Vs);$(this,Vs,t=>{if(!Ki&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Vs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),$(this,Pr,void 0))}setEventListener(t){var n;$(this,Vs,t),(n=S(this,Pr))==null||n.call(this),$(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&($(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Vs=new WeakMap,Ex),Jh=new N2,Us,jr,Hs,Tx,M2=(Tx=class extends yo{constructor(){super();K(this,Us,!0);K(this,jr);K(this,Hs);$(this,Hs,t=>{if(!Ki&&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(){S(this,jr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),$(this,jr,void 0))}setEventListener(t){var n;$(this,Hs,t),(n=S(this,jr))==null||n.call(this),$(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Us)!==t&&($(this,Us,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Us)}},Us=new WeakMap,jr=new WeakMap,Hs=new WeakMap,Tx),Du=new M2;function Yf(){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 L2(e){return Math.min(1e3*2**e,3e4)}function Zw(e){return(e??"online")==="online"?Du.isOnline():!0}var Jw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wd(e){return e instanceof Jw}function eb(e){let t=!1,n=0,r=!1,i;const s=Yf(),o=m=>{var b;r||(f(new Jw(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Jh.isFocused()&&(e.networkMode==="always"||Du.isOnline())&&e.canRun(),d=()=>Zw(e.networkMode)&&e.canRun(),c=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),i==null||i(),s.reject(m))},p=()=>new Promise(m=>{var b;i=g=>{(r||u())&&m(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(c).catch(g=>{var _;if(r)return;const y=e.retry??(Ki?0:3),w=e.retryDelay??L2,T=typeof w=="function"?w(n,g):w,E=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,g);if(t||!E){f(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),O2(T).then(()=>u()?void 0:p()).then(()=>{t?f(g):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function I2(){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 Be=I2(),Ri,Cx,tb=(Cx=class{constructor(){K(this,Ri)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kf(this.gcTime)&&$(this,Ri,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ki?1/0:5*60*1e3))}clearGcTimeout(){S(this,Ri)&&(clearTimeout(S(this,Ri)),$(this,Ri,void 0))}},Ri=new WeakMap,Cx),Ws,qs,Zt,ut,za,Oi,vn,Zn,_x,$2=(_x=class extends tb{constructor(t){super();K(this,vn);K(this,Ws);K(this,qs);K(this,Zt);K(this,ut);K(this,za);K(this,Oi);$(this,Oi,!1),$(this,za,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Zt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Ws,z2(this.options)),this.state=t.state??S(this,Ws),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,ut))==null?void 0:t.promise}setOptions(t){this.options={...S(this,za),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Zt).remove(this)}setData(t,n){const r=Qf(this.state.data,t,this.options);return ie(this,vn,Zn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ie(this,vn,Zn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,ut))==null?void 0:r.promise;return(i=S(this,ut))==null||i.cancel(t),n?n.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Ws))}isActive(){return this.observers.some(t=>bn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zh||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||!Qw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Zt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,ut)&&(S(this,Oi)?S(this,ut).cancel({revert:!0}):S(this,ut).cancelRetry()),this.scheduleGc()),S(this,Zt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ie(this,vn,Zn).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(S(this,ut))return S(this,ut).continueRetry(),S(this,ut).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:()=>($(this,Oi,!0),r.signal)})},s=()=>{const c=Xw(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),$(this,Oi,!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),$(this,qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ie(this,vn,Zn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,h,m;wd(c)&&c.silent||ie(this,vn,Zn).call(this,{type:"error",error:c}),wd(c)||((p=(f=S(this,Zt).config).onError)==null||p.call(f,c,this),(m=(h=S(this,Zt).config).onSettled)==null||m.call(h,this.state.data,c,this)),this.scheduleGc()};return $(this,ut,eb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,h,m;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(p=(f=S(this,Zt).config).onSuccess)==null||p.call(f,c,this),(m=(h=S(this,Zt).config).onSettled)==null||m.call(h,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{ie(this,vn,Zn).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{ie(this,vn,Zn).call(this,{type:"pause"})},onContinue:()=>{ie(this,vn,Zn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,ut).start()}},Ws=new WeakMap,qs=new WeakMap,Zt=new WeakMap,ut=new WeakMap,za=new WeakMap,Oi=new WeakMap,vn=new WeakSet,Zn=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,...nb(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 wd(i)&&i.revert&&S(this,qs)?{...S(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),Be.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Zt).notify({query:this,type:"updated",action:t})})},_x);function nb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function z2(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 Dn,Px,B2=(Px=class extends yo{constructor(t={}){super();K(this,Dn);this.config=t,$(this,Dn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Xh(i,n);let o=this.get(s);return o||(o=new $2({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Dn).has(t.queryHash)||(S(this,Dn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Dn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Dn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Dn).get(t)}getAll(){return[...S(this,Dn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>jv(t,r)):n}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dn=new WeakMap,Px),Fn,ht,Di,Nn,br,jx,V2=(jx=class extends tb{constructor(t){super();K(this,Nn);K(this,Fn);K(this,ht);K(this,Di);this.mutationId=t.mutationId,$(this,ht,t.mutationCache),$(this,Fn,[]),this.state=t.state||rb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Fn).includes(t)||(S(this,Fn).push(t),this.clearGcTimeout(),S(this,ht).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Fn,S(this,Fn).filter(n=>n!==t)),this.scheduleGc(),S(this,ht).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Fn).length||(this.state.status==="pending"?this.scheduleGc():S(this,ht).remove(this))}continue(){var t;return((t=S(this,Di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,p,h,m,b,g,y,w,T,E,_,C;$(this,Di,eb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,k)=>{ie(this,Nn,br).call(this,{type:"failed",failureCount:j,error:k})},onPause:()=>{ie(this,Nn,br).call(this,{type:"pause"})},onContinue:()=>{ie(this,Nn,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,ht).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Di).canStart();try{if(!n){ie(this,Nn,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,ht).config).onMutate)==null?void 0:s.call(i,t,this));const k=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));k!==this.state.context&&ie(this,Nn,br).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const j=await S(this,Di).start();return await((u=(l=S(this,ht).config).onSuccess)==null?void 0:u.call(l,j,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,j,t,this.state.context)),await((p=(f=S(this,ht).config).onSettled)==null?void 0:p.call(f,j,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,j,null,t,this.state.context)),ie(this,Nn,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(b=S(this,ht).config).onError)==null?void 0:g.call(b,j,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,j,t,this.state.context)),await((E=(T=S(this,ht).config).onSettled)==null?void 0:E.call(T,void 0,j,this.state.variables,this.state.context,this)),await((C=(_=this.options).onSettled)==null?void 0:C.call(_,void 0,j,t,this.state.context)),j}finally{ie(this,Nn,br).call(this,{type:"error",error:j})}}finally{S(this,ht).runNext(this)}}},Fn=new WeakMap,ht=new WeakMap,Di=new WeakMap,Nn=new WeakSet,br=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),Be.batch(()=>{S(this,Fn).forEach(r=>{r.onMutationUpdate(t)}),S(this,ht).notify({mutation:this,type:"updated",action:t})})},jx);function rb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lt,Ba,Ax,U2=(Ax=class extends yo{constructor(t={}){super();K(this,Lt);K(this,Ba);this.config=t,$(this,Lt,new Map),$(this,Ba,Date.now())}build(t,n,r){const i=new V2({mutationCache:this,mutationId:++ol(this,Ba)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=El(t),r=S(this,Lt).get(n)??[];r.push(t),S(this,Lt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=El(t);if(S(this,Lt).has(n)){const i=(r=S(this,Lt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Lt).delete(n):S(this,Lt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Lt).get(El(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Lt).get(El(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Lt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Av(n,r))}findAll(t={}){return this.getAll().filter(n=>Av(t,n))}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Be.batch(()=>Promise.all(t.map(n=>n.continue().catch(Jt))))}},Lt=new WeakMap,Ba=new WeakMap,Ax);function El(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Dv(e){return{onFetch:(t,n)=>{var d,c,f,p,h;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=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=Xw(t.options,t.fetchOptions),y=async(w,T,E)=>{if(m)return Promise.reject();if(T==null&&w.pages.length)return Promise.resolve(w);const _={queryKey:t.queryKey,pageParam:T,direction:E?"backward":"forward",meta:t.options.meta};b(_);const C=await g(_),{maxPages:j}=t.options,k=E?F2:D2;return{pages:k(w.pages,C,j),pageParams:k(w.pageParams,T,j)}};if(i&&s.length){const w=i==="backward",T=w?H2:Fv,E={pages:s,pageParams:o},_=T(r,E);a=await y(E,_,w)}else{const w=e??s.length;do{const T=l===0?o[0]??r.initialPageParam:Fv(r,a);if(l>0&&T==null)break;a=await y(a,T),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Fv(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 H2(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 Re,Ar,Rr,Ks,Gs,Or,Qs,Ys,Rx,W2=(Rx=class{constructor(e={}){K(this,Re);K(this,Ar);K(this,Rr);K(this,Ks);K(this,Gs);K(this,Or);K(this,Qs);K(this,Ys);$(this,Re,e.queryCache||new B2),$(this,Ar,e.mutationCache||new U2),$(this,Rr,e.defaultOptions||{}),$(this,Ks,new Map),$(this,Gs,new Map),$(this,Or,0)}mount(){ol(this,Or)._++,S(this,Or)===1&&($(this,Qs,Jh.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onFocus())})),$(this,Ys,Du.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onOnline())})))}unmount(){var e,t;ol(this,Or)._--,S(this,Or)===0&&((e=S(this,Qs))==null||e.call(this),$(this,Qs,void 0),(t=S(this,Ys))==null||t.call(this),$(this,Ys,void 0))}isFetching(e){return S(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).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=S(this,Re).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Bs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,Re).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=S(this,Re).get(r.queryHash),s=i==null?void 0:i.state.data,o=R2(t,s);if(o!==void 0)return S(this,Re).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Be.batch(()=>S(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Re);Be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Re),r={type:"active",...e};return Be.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Be.batch(()=>S(this,Re).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Be.batch(()=>{if(S(this,Re).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=Be.batch(()=>S(this,Re).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Jt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Re).build(this,t);return n.isStaleByTime(Bs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=Dv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=Dv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Du.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Re)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Rr)}setDefaultOptions(e){$(this,Rr,e)}setQueryDefaults(e,t){S(this,Ks).set(Gi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ks).values()],n={};return t.forEach(r=>{Ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Gs).set(Gi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Gs).values()];let n={};return t.forEach(r=>{Ea(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Rr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Xh(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===Zh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Re).clear(),S(this,Ar).clear()}},Re=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Or=new WeakMap,Qs=new WeakMap,Ys=new WeakMap,Rx),kt,ae,Va,mt,Fi,Xs,Dr,Mn,Ua,Zs,Js,Ni,Mi,Fr,eo,de,Bo,Xf,Zf,Jf,ep,tp,np,rp,ib,Ox,q2=(Ox=class extends yo{constructor(t,n){super();K(this,de);K(this,kt);K(this,ae);K(this,Va);K(this,mt);K(this,Fi);K(this,Xs);K(this,Dr);K(this,Mn);K(this,Ua);K(this,Zs);K(this,Js);K(this,Ni);K(this,Mi);K(this,Fr);K(this,eo,new Set);this.options=n,$(this,kt,t),$(this,Mn,null),$(this,Dr,Yf()),this.options.experimental_prefetchInRender||S(this,Dr).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&&(S(this,ae).addObserver(this),Nv(S(this,ae),this.options)?ie(this,de,Bo).call(this):this.updateResult(),ie(this,de,ep).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ip(S(this,ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ip(S(this,ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ie(this,de,tp).call(this),ie(this,de,np).call(this),S(this,ae).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ae);if(this.options=S(this,kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bn(this.options.enabled,S(this,ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ie(this,de,rp).call(this),S(this,ae).setOptions(this.options),r._defaulted&&!Ou(this.options,r)&&S(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ae),observer:this});const s=this.hasListeners();s&&Mv(S(this,ae),i,this.options,r)&&ie(this,de,Bo).call(this),this.updateResult(n),s&&(S(this,ae)!==i||bn(this.options.enabled,S(this,ae))!==bn(r.enabled,S(this,ae))||Bs(this.options.staleTime,S(this,ae))!==Bs(r.staleTime,S(this,ae)))&&ie(this,de,Xf).call(this);const o=ie(this,de,Zf).call(this);s&&(S(this,ae)!==i||bn(this.options.enabled,S(this,ae))!==bn(r.enabled,S(this,ae))||o!==S(this,Fr))&&ie(this,de,Jf).call(this,o)}getOptimisticResult(t){const n=S(this,kt).getQueryCache().build(S(this,kt),t),r=this.createResult(n,t);return G2(this,r)&&($(this,mt,r),$(this,Xs,this.options),$(this,Fi,S(this,ae).state)),r}getCurrentResult(){return S(this,mt)}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){S(this,eo).add(t)}getCurrentQuery(){return S(this,ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,kt).defaultQueryOptions(t),r=S(this,kt).getQueryCache().build(S(this,kt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ie(this,de,Bo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,mt)))}createResult(t,n){var j;const r=S(this,ae),i=this.options,s=S(this,mt),o=S(this,Fi),a=S(this,Xs),u=t!==r?t.state:S(this,Va),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const k=this.hasListeners(),R=!k&&Nv(t,n),M=k&&Mv(t,r,n,i);(R||M)&&(c={...c,...nb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,Ua))p=S(this,Zs);else try{$(this,Ua,n.select),p=n.select(c.data),p=Qf(s==null?void 0:s.data,p,n),$(this,Zs,p),$(this,Mn,null)}catch(k){$(this,Mn,k)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let k;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))k=s.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,Js))==null?void 0:j.state.data,S(this,Js)):n.placeholderData,n.select&&k!==void 0)try{k=n.select(k),$(this,Mn,null)}catch(R){$(this,Mn,R)}k!==void 0&&(b="success",p=Qf(s==null?void 0:s.data,k,n),f=!0)}S(this,Mn)&&(h=S(this,Mn),p=S(this,Zs),m=Date.now(),b="error");const g=c.fetchStatus==="fetching",y=b==="pending",w=b==="error",T=y&&g,E=p!==void 0,C={status:b,fetchStatus:c.fetchStatus,isPending:y,isSuccess:b==="success",isError:w,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:m,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:g,isRefetching:g&&!y,isLoadingError:w&&!E,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&E,isStale:em(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const k=H=>{C.status==="error"?H.reject(C.error):C.data!==void 0&&H.resolve(C.data)},R=()=>{const H=$(this,Dr,C.promise=Yf());k(H)},M=S(this,Dr);switch(M.status){case"pending":t.queryHash===r.queryHash&&k(M);break;case"fulfilled":(C.status==="error"||C.data!==M.value)&&R();break;case"rejected":(C.status!=="error"||C.error!==M.reason)&&R();break}}return C}updateResult(t){const n=S(this,mt),r=this.createResult(S(this,ae),this.options);if($(this,Fi,S(this,ae).state),$(this,Xs,this.options),S(this,Fi).data!==void 0&&$(this,Js,S(this,ae)),Ou(r,n))return;$(this,mt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,eo).size)return!0;const l=new Set(a??S(this,eo));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,mt)).some(u=>{const d=u;return S(this,mt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ie(this,de,ib).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ie(this,de,ep).call(this)}},kt=new WeakMap,ae=new WeakMap,Va=new WeakMap,mt=new WeakMap,Fi=new WeakMap,Xs=new WeakMap,Dr=new WeakMap,Mn=new WeakMap,Ua=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Ni=new WeakMap,Mi=new WeakMap,Fr=new WeakMap,eo=new WeakMap,de=new WeakSet,Bo=function(t){ie(this,de,rp).call(this);let n=S(this,ae).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Jt)),n},Xf=function(){ie(this,de,tp).call(this);const t=Bs(this.options.staleTime,S(this,ae));if(Ki||S(this,mt).isStale||!Kf(t))return;const r=Qw(S(this,mt).dataUpdatedAt,t)+1;$(this,Ni,setTimeout(()=>{S(this,mt).isStale||this.updateResult()},r))},Zf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ae)):this.options.refetchInterval)??!1},Jf=function(t){ie(this,de,np).call(this),$(this,Fr,t),!(Ki||bn(this.options.enabled,S(this,ae))===!1||!Kf(S(this,Fr))||S(this,Fr)===0)&&$(this,Mi,setInterval(()=>{(this.options.refetchIntervalInBackground||Jh.isFocused())&&ie(this,de,Bo).call(this)},S(this,Fr)))},ep=function(){ie(this,de,Xf).call(this),ie(this,de,Jf).call(this,ie(this,de,Zf).call(this))},tp=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),$(this,Ni,void 0))},np=function(){S(this,Mi)&&(clearInterval(S(this,Mi)),$(this,Mi,void 0))},rp=function(){const t=S(this,kt).getQueryCache().build(S(this,kt),this.options);if(t===S(this,ae))return;const n=S(this,ae);$(this,ae,t),$(this,Va,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ib=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,mt))}),S(this,kt).getQueryCache().notify({query:S(this,ae),type:"observerResultsUpdated"})})},Ox);function K2(e,t){return bn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Nv(e,t){return K2(e,t)||e.state.data!==void 0&&ip(e,t,t.refetchOnMount)}function ip(e,t,n){if(bn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&em(e,t)}return!1}function Mv(e,t,n,r){return(e!==t||bn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&em(e,n)}function em(e,t){return bn(t.enabled,e)!==!1&&e.isStaleByTime(Bs(t.staleTime,e))}function G2(e,t){return!Ou(e.getCurrentResult(),t)}var Nr,Mr,Et,nr,ar,Ql,sp,Dx,Q2=(Dx=class extends yo{constructor(t,n){super();K(this,ar);K(this,Nr);K(this,Mr);K(this,Et);K(this,nr);$(this,Nr,t),this.setOptions(n),this.bindMethods(),ie(this,ar,Ql).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=S(this,Nr).defaultMutationOptions(t),Ou(this.options,n)||S(this,Nr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Et),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Gi(n.mutationKey)!==Gi(this.options.mutationKey)?this.reset():((r=S(this,Et))==null?void 0:r.state.status)==="pending"&&S(this,Et).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Et))==null||t.removeObserver(this)}onMutationUpdate(t){ie(this,ar,Ql).call(this),ie(this,ar,sp).call(this,t)}getCurrentResult(){return S(this,Mr)}reset(){var t;(t=S(this,Et))==null||t.removeObserver(this),$(this,Et,void 0),ie(this,ar,Ql).call(this),ie(this,ar,sp).call(this)}mutate(t,n){var r;return $(this,nr,n),(r=S(this,Et))==null||r.removeObserver(this),$(this,Et,S(this,Nr).getMutationCache().build(S(this,Nr),this.options)),S(this,Et).addObserver(this),S(this,Et).execute(t)}},Nr=new WeakMap,Mr=new WeakMap,Et=new WeakMap,nr=new WeakMap,ar=new WeakSet,Ql=function(){var n;const t=((n=S(this,Et))==null?void 0:n.state)??rb();$(this,Mr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},sp=function(t){Be.batch(()=>{var n,r,i,s,o,a,l,u;if(S(this,nr)&&this.hasListeners()){const d=S(this,Mr).variables,c=S(this,Mr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,nr)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=S(this,nr)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,nr)).onError)==null||a.call(o,t.error,d,c),(u=(l=S(this,nr)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(S(this,Mr))})})},Dx),sb=v.createContext(void 0),ob=e=>{const t=v.useContext(sb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Y2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(sb.Provider,{value:e,children:t})),ab=v.createContext(!1),X2=()=>v.useContext(ab);ab.Provider;function Z2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var J2=v.createContext(Z2()),e_=()=>v.useContext(J2);function lb(e,t){return typeof e=="function"?e(...t):!!e}function op(){}var t_=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n_=e=>{v.useEffect(()=>{e.clearReset()},[e])},r_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&lb(n,[e.error,r]),i_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},s_=(e,t)=>e.isLoading&&e.isFetching&&!t,o_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Lv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function a_(e,t,n){var d,c,f,p,h;const r=ob(),i=X2(),s=e_(),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",i_(o),t_(o,s),n_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const b=i?op:l.subscribe(Be.batchCalls(m));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),o_(o,u))throw Lv(o,l,s);if(r_({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&&!Ki&&s_(u,i)){const m=a?Lv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;m==null||m.catch(op).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function l_(e,t){return a_(e,q2)}function tm(e,t){const n=ob(),[r]=v.useState(()=>new Q2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(Be.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(op)},[r]);if(i.error&&lb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const u_=e=>l_({queryKey:["widgets",e],queryFn:()=>c_(e)}),c_=e=>vo(`widgets/with-link/${e}`);var Y=(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))(Y||{});function d_(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 Fu(){return Fu=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},Fu.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function f_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,h)=>d(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let s=l(n??i.length-1),o=$r.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function u(){return i[s]}function d(p,h,m){h===void 0&&(h=null);let b=h_(i?u().pathname:"/",p,h,m);return nm(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),b}function c(p){return typeof p=="string"?p:ap(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 h=typeof p=="string"?Ji(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){o=$r.Push;let m=d(p,h);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(p,h){o=$r.Replace;let m=d(p,h);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(p){o=$r.Pop;let h=l(s+p),m=i[h];s=h,a&&a({action:o,location:m,delta:p})},listen(p){return a=p,()=>{a=null}}}}function Ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function p_(){return Math.random().toString(36).substr(2,8)}function h_(e,t,n,r){return n===void 0&&(n=null),Fu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||p_()})}function ap(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 Ji(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 $v;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($v||($v={}));function m_(e,t,n){return n===void 0&&(n="/"),g_(e,t,n,!1)}function g_(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=rm(i.pathname||"/",n);if(s==null)return null;let o=ub(e);v_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=P_(s);a=C_(o[l],u,r)}return a}function ub(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("/")&&(Ue(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=Qr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ue(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ub(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:E_(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 cb(s.path))i(s,o,l)}),t}function cb(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=cb(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 v_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:T_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y_=/^:[\w-]+$/,x_=3,w_=2,b_=1,S_=10,k_=-2,zv=e=>e==="*";function E_(e,t){let n=e.split("/"),r=n.length;return n.some(zv)&&(r+=k_),t&&(r+=w_),n.filter(i=>!zv(i)).reduce((i,s)=>i+(y_.test(s)?x_:s===""?b_:S_),r)}function T_(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 C_(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=Bv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=Bv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Qr([s,c.pathname]),pathnameBase:O_(Qr([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=Qr([s,c.pathnameBase]))}return o}function Bv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=__(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 m=a[c]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[c];return p&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function __(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),nm(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 P_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return nm(!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 rm(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 j_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ji(e):e;return{pathname:n?n.startsWith("/")?n:A_(n,t):t,search:D_(r),hash:F_(i)}}function A_(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 Sd(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 R_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function db(e,t){let n=R_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function fb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ji(e):(i=Fu({},e),Ue(!i.pathname||!i.pathname.includes("?"),Sd("?","pathname","search",i)),Ue(!i.pathname||!i.pathname.includes("#"),Sd("#","pathname","hash",i)),Ue(!i.search||!i.search.includes("#"),Sd("#","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=j_(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Qr=e=>e.join("/").replace(/\/\/+/g,"/"),O_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),D_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,F_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function N_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pb=["post","put","patch","delete"];new Set(pb);const M_=["get",...pb];new Set(M_);/**
49
+ */function Fu(){return Fu=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},Fu.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function f_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,h)=>d(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let s=l(n??i.length-1),o=$r.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function u(){return i[s]}function d(p,h,m){h===void 0&&(h=null);let b=h_(i?u().pathname:"/",p,h,m);return nm(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),b}function c(p){return typeof p=="string"?p:ap(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 h=typeof p=="string"?Ji(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){o=$r.Push;let m=d(p,h);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(p,h){o=$r.Replace;let m=d(p,h);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(p){o=$r.Pop;let h=l(s+p),m=i[h];s=h,a&&a({action:o,location:m,delta:p})},listen(p){return a=p,()=>{a=null}}}}function Ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function p_(){return Math.random().toString(36).substr(2,8)}function h_(e,t,n,r){return n===void 0&&(n=null),Fu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||p_()})}function ap(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 Ji(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 Iv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Iv||(Iv={}));function m_(e,t,n){return n===void 0&&(n="/"),g_(e,t,n,!1)}function g_(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=rm(i.pathname||"/",n);if(s==null)return null;let o=ub(e);v_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=P_(s);a=C_(o[l],u,r)}return a}function ub(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("/")&&(Ue(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=Qr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ue(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ub(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:E_(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 cb(s.path))i(s,o,l)}),t}function cb(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=cb(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 v_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:T_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y_=/^:[\w-]+$/,x_=3,w_=2,b_=1,S_=10,k_=-2,$v=e=>e==="*";function E_(e,t){let n=e.split("/"),r=n.length;return n.some($v)&&(r+=k_),t&&(r+=w_),n.filter(i=>!$v(i)).reduce((i,s)=>i+(y_.test(s)?x_:s===""?b_:S_),r)}function T_(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 C_(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=zv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=zv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Qr([s,c.pathname]),pathnameBase:O_(Qr([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=Qr([s,c.pathnameBase]))}return o}function zv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=__(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 m=a[c]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[c];return p&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function __(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),nm(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 P_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return nm(!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 rm(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 j_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ji(e):e;return{pathname:n?n.startsWith("/")?n:A_(n,t):t,search:D_(r),hash:F_(i)}}function A_(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 bd(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 R_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function db(e,t){let n=R_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function fb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ji(e):(i=Fu({},e),Ue(!i.pathname||!i.pathname.includes("?"),bd("?","pathname","search",i)),Ue(!i.pathname||!i.pathname.includes("#"),bd("#","pathname","hash",i)),Ue(!i.search||!i.search.includes("#"),bd("#","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=j_(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Qr=e=>e.join("/").replace(/\/\/+/g,"/"),O_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),D_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,F_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function N_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pb=["post","put","patch","delete"];new Set(pb);const M_=["get",...pb];new Set(M_);/**
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 Ta(){return Ta=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},Ta.apply(this,arguments)}const im=v.createContext(null),L_=v.createContext(null),es=v.createContext(null),pc=v.createContext(null),ts=v.createContext({outlet:null,matches:[],isDataRoute:!1}),hb=v.createContext(null);function I_(e,t){let{relative:n}=t===void 0?{}:t;Qa()||Ue(!1);let{basename:r,navigator:i}=v.useContext(es),{hash:s,pathname:o,search:a}=vb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Qr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Qa(){return v.useContext(pc)!=null}function Ya(){return Qa()||Ue(!1),v.useContext(pc).location}function mb(e){v.useContext(es).static||v.useLayoutEffect(e)}function gb(){let{isDataRoute:e}=v.useContext(ts);return e?X_():$_()}function $_(){Qa()||Ue(!1);let e=v.useContext(im),{basename:t,future:n,navigator:r}=v.useContext(es),{matches:i}=v.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(db(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return mb(()=>{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=fb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Qr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function vb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(es),{matches:i}=v.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(db(i,r.v7_relativeSplatPath));return v.useMemo(()=>fb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function z_(e,t){return B_(e,t)}function B_(e,t,n,r){Qa()||Ue(!1);let{navigator:i}=v.useContext(es),{matches:s}=v.useContext(ts),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ya(),d;if(t){var c;let b=typeof t=="string"?Ji(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||Ue(!1),d=b}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let h=m_(e,{pathname:p}),m=q_(h&&h.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Qr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Qr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&m?v.createElement(pc.Provider,{value:{location:Ta({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$r.Pop}},m):m}function V_(){let e=Y_(),t=N_(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 U_=v.createElement(V_,null);class H_ 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(ts.Provider,{value:this.props.routeContext},v.createElement(hb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function W_(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(im);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ts.Provider,{value:t},r)}function q_(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||Ue(!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,h=c.route.loader&&f[c.route.id]===void 0&&(!p||p[c.route.id]===void 0);if(c.route.lazy||h){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,f)=>{let p,h=!1,m=null,b=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,m=c.route.errorElement||U_,l&&(u<0&&f===0?(h=!0,b=null):u===f&&(h=!0,b=c.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),y=()=>{let w;return p?w=m:h?w=b:c.route.Component?w=v.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,v.createElement(W_,{match:c,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?v.createElement(H_,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var yb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(yb||{}),Nu=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}(Nu||{});function K_(e){let t=v.useContext(im);return t||Ue(!1),t}function G_(e){let t=v.useContext(L_);return t||Ue(!1),t}function Q_(e){let t=v.useContext(ts);return t||Ue(!1),t}function xb(e){let t=Q_(),n=t.matches[t.matches.length-1];return n.route.id||Ue(!1),n.route.id}function Y_(){var e;let t=v.useContext(hb),n=G_(Nu.UseRouteError),r=xb(Nu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function X_(){let{router:e}=K_(yb.UseNavigateStable),t=xb(Nu.UseNavigateStable),n=v.useRef(!1);return mb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ta({fromRouteId:t},s)))},[e,t])}const Vv={};function Z_(e,t){Vv[t]||(Vv[t]=!0,console.warn(t))}const Uv=(e,t,n)=>Z_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function J_(e,t){e!=null&&e.v7_startTransition||Uv("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&&Uv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const eP="startTransition",Hv=Jd[eP];function tP(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=f_({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&&Hv?Hv(()=>u(f)):u(f)},[u,d]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.useEffect(()=>J_(s),[s]),v.createElement(nP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function lp(e){Ue(!1)}function nP(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:a}=e;Qa()&&Ue(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Ta({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Ji(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:h="default"}=r,m=v.useMemo(()=>{let b=rm(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:p,key:h},navigationType:i}},[l,d,c,f,p,h,i]);return m==null?null:v.createElement(es.Provider,{value:u},v.createElement(pc.Provider,{children:n,value:m}))}function rP(e){let{children:t,location:n}=e;return z_(up(t),n)}new Promise(()=>{});function up(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,up(r.props.children,s));return}r.type!==lp&&Ue(!1),!r.props.index||!r.props.children||Ue(!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=up(r.props.children,s)),n.push(o)}),n}/**
58
+ */function Ta(){return Ta=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},Ta.apply(this,arguments)}const im=v.createContext(null),L_=v.createContext(null),es=v.createContext(null),pc=v.createContext(null),ts=v.createContext({outlet:null,matches:[],isDataRoute:!1}),hb=v.createContext(null);function I_(e,t){let{relative:n}=t===void 0?{}:t;Qa()||Ue(!1);let{basename:r,navigator:i}=v.useContext(es),{hash:s,pathname:o,search:a}=vb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Qr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Qa(){return v.useContext(pc)!=null}function Ya(){return Qa()||Ue(!1),v.useContext(pc).location}function mb(e){v.useContext(es).static||v.useLayoutEffect(e)}function gb(){let{isDataRoute:e}=v.useContext(ts);return e?X_():$_()}function $_(){Qa()||Ue(!1);let e=v.useContext(im),{basename:t,future:n,navigator:r}=v.useContext(es),{matches:i}=v.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(db(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return mb(()=>{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=fb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Qr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function vb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(es),{matches:i}=v.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(db(i,r.v7_relativeSplatPath));return v.useMemo(()=>fb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function z_(e,t){return B_(e,t)}function B_(e,t,n,r){Qa()||Ue(!1);let{navigator:i}=v.useContext(es),{matches:s}=v.useContext(ts),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ya(),d;if(t){var c;let b=typeof t=="string"?Ji(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||Ue(!1),d=b}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let h=m_(e,{pathname:p}),m=q_(h&&h.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Qr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Qr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&m?v.createElement(pc.Provider,{value:{location:Ta({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$r.Pop}},m):m}function V_(){let e=Y_(),t=N_(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 U_=v.createElement(V_,null);class H_ 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(ts.Provider,{value:this.props.routeContext},v.createElement(hb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function W_(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(im);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ts.Provider,{value:t},r)}function q_(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||Ue(!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,h=c.route.loader&&f[c.route.id]===void 0&&(!p||p[c.route.id]===void 0);if(c.route.lazy||h){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,f)=>{let p,h=!1,m=null,b=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,m=c.route.errorElement||U_,l&&(u<0&&f===0?(h=!0,b=null):u===f&&(h=!0,b=c.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),y=()=>{let w;return p?w=m:h?w=b:c.route.Component?w=v.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,v.createElement(W_,{match:c,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?v.createElement(H_,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var yb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(yb||{}),Nu=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}(Nu||{});function K_(e){let t=v.useContext(im);return t||Ue(!1),t}function G_(e){let t=v.useContext(L_);return t||Ue(!1),t}function Q_(e){let t=v.useContext(ts);return t||Ue(!1),t}function xb(e){let t=Q_(),n=t.matches[t.matches.length-1];return n.route.id||Ue(!1),n.route.id}function Y_(){var e;let t=v.useContext(hb),n=G_(Nu.UseRouteError),r=xb(Nu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function X_(){let{router:e}=K_(yb.UseNavigateStable),t=xb(Nu.UseNavigateStable),n=v.useRef(!1);return mb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ta({fromRouteId:t},s)))},[e,t])}const Bv={};function Z_(e,t){Bv[t]||(Bv[t]=!0,console.warn(t))}const Vv=(e,t,n)=>Z_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function J_(e,t){e!=null&&e.v7_startTransition||Vv("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&&Vv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const eP="startTransition",Uv=Jd[eP];function tP(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=f_({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&&Uv?Uv(()=>u(f)):u(f)},[u,d]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.useEffect(()=>J_(s),[s]),v.createElement(nP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function lp(e){Ue(!1)}function nP(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:a}=e;Qa()&&Ue(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Ta({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Ji(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:h="default"}=r,m=v.useMemo(()=>{let b=rm(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:p,key:h},navigationType:i}},[l,d,c,f,p,h,i]);return m==null?null:v.createElement(es.Provider,{value:u},v.createElement(pc.Provider,{children:n,value:m}))}function rP(e){let{children:t,location:n}=e;return z_(up(t),n)}new Promise(()=>{});function up(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,up(r.props.children,s));return}r.type!==lp&&Ue(!1),!r.props.index||!r.props.children||Ue(!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=up(r.props.children,s)),n.push(o)}),n}/**
59
59
  * React Router DOM v6.28.0
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+s.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function cp(){return cp=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},cp.apply(this,arguments)}function iP(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 sP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oP(e,t){return e.button===0&&(!t||t==="_self")&&!sP(e)}const aP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lP="6";try{window.__reactRouterVersion=lP}catch{}const uP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dP=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=iP(t,aP),{basename:p}=v.useContext(es),h,m=!1;if(typeof u=="string"&&cP.test(u)&&(h=u,uP))try{let w=new URL(window.location.href),T=u.startsWith("//")?new URL(w.protocol+u):new URL(u),E=rm(T.pathname,p);T.origin===w.origin&&E!=null?u=E+T.search+T.hash:m=!0}catch{}let b=I_(u,{relative:i}),g=fP(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function y(w){r&&r(w),w.defaultPrevented||g(w)}return v.createElement("a",cp({},f,{href:h||b,onClick:m||s?r:y,ref:n,target:l}))});var Wv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wv||(Wv={}));var qv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qv||(qv={}));function fP(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=gb(),u=Ya(),d=vb(e,{relative:o});return v.useCallback(c=>{if(oP(c,n)){c.preventDefault();let f=r!==void 0?r:ap(u)===ap(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}const pP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Kv=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(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(pP?"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},hP=e=>e?Kv(e):Kv;var wb={exports:{}},bb={},Sb={exports:{}},kb={};/**
67
+ */function cp(){return cp=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},cp.apply(this,arguments)}function iP(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 sP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oP(e,t){return e.button===0&&(!t||t==="_self")&&!sP(e)}const aP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lP="6";try{window.__reactRouterVersion=lP}catch{}const uP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dP=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=iP(t,aP),{basename:p}=v.useContext(es),h,m=!1;if(typeof u=="string"&&cP.test(u)&&(h=u,uP))try{let w=new URL(window.location.href),T=u.startsWith("//")?new URL(w.protocol+u):new URL(u),E=rm(T.pathname,p);T.origin===w.origin&&E!=null?u=E+T.search+T.hash:m=!0}catch{}let b=I_(u,{relative:i}),g=fP(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function y(w){r&&r(w),w.defaultPrevented||g(w)}return v.createElement("a",cp({},f,{href:h||b,onClick:m||s?r:y,ref:n,target:l}))});var Hv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hv||(Hv={}));var Wv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Wv||(Wv={}));function fP(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=gb(),u=Ya(),d=vb(e,{relative:o});return v.useCallback(c=>{if(oP(c,n)){c.preventDefault();let f=r!==void 0?r:ap(u)===ap(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}const pP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},qv=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(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(pP?"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},hP=e=>e?qv(e):qv;var wb={exports:{}},bb={},Sb={exports:{}},kb={};/**
68
68
  * @license React
69
69
  * use-sync-external-store-shim.production.min.js
70
70
  *
@@ -72,7 +72,7 @@ Error generating stack: `+s.message+`
72
72
  *
73
73
  * This source code is licensed under the MIT license found in the
74
74
  * LICENSE file in the root directory of this source tree.
75
- */var lo=v;function mP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gP=typeof Object.is=="function"?Object.is:mP,vP=lo.useState,yP=lo.useEffect,xP=lo.useLayoutEffect,wP=lo.useDebugValue;function bP(e,t){var n=t(),r=vP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return xP(function(){i.value=n,i.getSnapshot=t,kd(i)&&s({inst:i})},[e,n,t]),yP(function(){return kd(i)&&s({inst:i}),e(function(){kd(i)&&s({inst:i})})},[e]),wP(n),n}function kd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gP(e,n)}catch{return!0}}function SP(e,t){return t()}var kP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?SP:bP;kb.useSyncExternalStore=lo.useSyncExternalStore!==void 0?lo.useSyncExternalStore:kP;Sb.exports=kb;var EP=Sb.exports;/**
75
+ */var lo=v;function mP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gP=typeof Object.is=="function"?Object.is:mP,vP=lo.useState,yP=lo.useEffect,xP=lo.useLayoutEffect,wP=lo.useDebugValue;function bP(e,t){var n=t(),r=vP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return xP(function(){i.value=n,i.getSnapshot=t,Sd(i)&&s({inst:i})},[e,n,t]),yP(function(){return Sd(i)&&s({inst:i}),e(function(){Sd(i)&&s({inst:i})})},[e]),wP(n),n}function Sd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gP(e,n)}catch{return!0}}function SP(e,t){return t()}var kP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?SP:bP;kb.useSyncExternalStore=lo.useSyncExternalStore!==void 0?lo.useSyncExternalStore:kP;Sb.exports=kb;var EP=Sb.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,7 +80,7 @@ Error generating stack: `+s.message+`
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var hc=v,TP=EP;function CP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _P=typeof Object.is=="function"?Object.is:CP,PP=TP.useSyncExternalStore,jP=hc.useRef,AP=hc.useEffect,RP=hc.useMemo,OP=hc.useDebugValue;bb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=jP(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=RP(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return c=h}return c=p}if(h=c,_P(d,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(d=p,c=m)}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=PP(e,s[0],s[1]);return AP(function(){o.hasValue=!0,o.value=a},[a]),OP(a),a};wb.exports=bb;var DP=wb.exports;const FP=Yi(DP),Eb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:NP}=F,{useSyncExternalStoreWithSelector:MP}=FP;let Gv=!1;const LP=e=>e;function IP(e,t=LP,n){(Eb?"production":void 0)!=="production"&&n&&!Gv&&(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"),Gv=!0);const r=MP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return NP(r),r}const Qv=e=>{(Eb?"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"?hP(e):e,n=(r,i)=>IP(t,r,i);return Object.assign(n,t),n},$P=e=>e?Qv(e):Qv,Wt=$P(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})}})),zP={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"}},Yv={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var Tb={exports:{}};/*!
83
+ */var hc=v,TP=EP;function CP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _P=typeof Object.is=="function"?Object.is:CP,PP=TP.useSyncExternalStore,jP=hc.useRef,AP=hc.useEffect,RP=hc.useMemo,OP=hc.useDebugValue;bb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=jP(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=RP(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return c=h}return c=p}if(h=c,_P(d,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(d=p,c=m)}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=PP(e,s[0],s[1]);return AP(function(){o.hasValue=!0,o.value=a},[a]),OP(a),a};wb.exports=bb;var DP=wb.exports;const FP=Yi(DP),Eb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:NP}=F,{useSyncExternalStoreWithSelector:MP}=FP;let Kv=!1;const LP=e=>e;function IP(e,t=LP,n){(Eb?"production":void 0)!=="production"&&n&&!Kv&&(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"),Kv=!0);const r=MP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return NP(r),r}const Gv=e=>{(Eb?"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"?hP(e):e,n=(r,i)=>IP(t,r,i);return Object.assign(n,t),n},$P=e=>e?Gv(e):Gv,Ot=$P(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})}})),zP={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"}},Qv={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var Tb={exports:{}};/*!
84
84
  Copyright (c) 2018 Jed Watson.
85
85
  Licensed under the MIT License (MIT), see
86
86
  http://jedwatson.github.io/classnames
@@ -92,21 +92,21 @@ Error generating stack: `+s.message+`
92
92
  ${f}px !important;
93
93
  top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(p)}},[t]),x.jsx(VP,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const HP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=mc(WP),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=x.jsx(UP,{isPresent:n,anchorX:a,children:e})),x.jsx(gc.Provider,{value:c,children:e})};function WP(){return new Map}function _b(e=!0){const t=v.useContext(gc);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 Tl=e=>e.key||"";function Xv(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Yr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=_b(o),d=v.useMemo(()=>Xv(e),[e]),c=o&&!l?[]:d.map(Tl),f=v.useRef(!0),p=v.useRef(d),h=mc(()=>new Map),[m,b]=v.useState(d),[g,y]=v.useState(d);Cb(()=>{f.current=!1,p.current=d;for(let E=0;E<g.length;E++){const _=Tl(g[E]);c.includes(_)?h.delete(_):h.get(_)!==!0&&h.set(_,!1)}},[g,c.length,c.join("-")]);const w=[];if(d!==m){let E=[...d];for(let _=0;_<g.length;_++){const C=g[_],j=Tl(C);c.includes(j)||(E.splice(_,0,C),w.push(C))}return s==="wait"&&w.length&&(E=w),y(Xv(E)),b(d),null}const{forceRender:T}=v.useContext(sm);return x.jsx(x.Fragment,{children:g.map(E=>{const _=Tl(E),C=o&&!l?!1:d===g||c.includes(_),j=()=>{if(h.has(_))h.set(_,!0);else return;let k=!0;h.forEach(R=>{R||(k=!1)}),k&&(T==null||T(),y(p.current),o&&(u==null||u()),r&&r())};return x.jsx(HP,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:C?void 0:j,anchorX:a,children:E},_)})})};function lm(e,t){e.indexOf(t)===-1&&e.push(t)}function um(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let dp=()=>{};const fp={skipAnimations:!1,useManualTiming:!1};function cm(e){let t;return()=>(t===void 0&&(t=e()),t)}const ln=e=>e,Ca=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class dm{constructor(){this.subscriptions=[]}add(t){return lm(this.subscriptions,t),()=>um(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 Bn=e=>e*1e3,Vn=e=>e/1e3;function Pb(e,t){return t?e*(1e3/t):0}const qP=cm(()=>window.ScrollTimeline!==void 0);class KP{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(qP()&&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 GP extends KP{then(t,n){return this.finished.finally(t).then(()=>{})}}const Zv={value:null,addProjectionMetrics:null},fm=e=>Array.isArray(e)&&typeof e[0]=="number",QP={};function YP(e,t){const n=cm(e);return()=>QP[t]??n()}const _a=YP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jb=(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)})`},Vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,pp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vo([0,.65,.55,1]),circOut:Vo([.55,0,1,.45]),backIn:Vo([.31,.01,.66,-.59]),backOut:Vo([.33,1.53,.69,.99])};function Ab(e,t){if(e)return typeof e=="function"&&_a()?jb(e,t):fm(e)?Vo(e):Array.isArray(e)?e.map(n=>Ab(n,t)||pp.easeOut):pp[e]}function XP(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=Ab(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 pm(e){return typeof e=="function"&&"applyToOptions"in e}function hm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Mu=2e4;function mm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mu;)t+=n,r=e.next(t);return t>=Mu?1/0:t}function ZP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(mm(r),Mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Vn(i)}}function Rb(e){return!!(typeof e=="function"&&_a()||!e||typeof e=="string"&&(e in pp||_a())||fm(e)||Array.isArray(e)&&e.every(Rb))}function Jv(e,t){e.timeline=t,e.onfinish=null}const Cl=["read","resolveKeyframes","update","preRender","render","postRender"];function JP(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 m=p&&i?n:r;return f&&o.add(c),m.has(c)||m.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&&Zv.value&&Zv.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const ej=40;function Ob(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Cl.reduce((g,y)=>(g[y]=JP(s,t?y:void 0),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,ej),1),i.timestamp=g,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))},h=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Cl.reduce((g,y)=>{const w=o[y];return g[y]=(T,E=!1,_=!1)=>(n||h(),w.schedule(T,E,_)),g},{}),cancel:g=>{for(let y=0;y<Cl.length;y++)o[Cl[y]].cancel(g)},state:i,steps:o}}const{schedule:gm,cancel:X$}=Ob(queueMicrotask,!1),{schedule:we,cancel:ni,state:nt,steps:Ed}=Ob(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0);let Xl;function tj(){Xl=void 0}const Un={now:()=>(Xl===void 0&&Un.set(nt.isProcessing||fp.useManualTiming?nt.timestamp:performance.now()),Xl),set:e=>{Xl=e,queueMicrotask(tj)}},gn={x:!1,y:!1};function Db(){return gn.x||gn.y}function nj(e){return e==="x"||e==="y"?gn[e]?null:(gn[e]=!0,()=>{gn[e]=!1}):gn.x||gn.y?null:(gn.x=gn.y=!0,()=>{gn.x=gn.y=!1})}function rj(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 Fb(e,t){const n=rj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function e0(e){return!(e.pointerType==="touch"||Db())}function ij(e,t,n={}){const[r,i,s]=Fb(e,n),o=a=>{if(!e0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{e0(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Nb=(e,t)=>t?e===t?!0:Nb(e,t.parentElement):!1,vm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,sj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function oj(e){return sj.has(e.tagName)||e.tabIndex!==-1}const Uo=new WeakSet;function t0(e){return t=>{t.key==="Enter"&&e(t)}}function Td(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const aj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=t0(()=>{if(Uo.has(n))return;Td(n,"down");const i=t0(()=>{Td(n,"up")}),s=()=>Td(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 n0(e){return vm(e)&&!Db()}function lj(e,t,n={}){const[r,i,s]=Fb(e,n),o=a=>{const l=a.currentTarget;if(!n0(a)||Uo.has(l))return;Uo.add(l);const u=t(l,a),d=(p,h)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!n0(p)||!Uo.has(l))&&(Uo.delete(l),typeof u=="function"&&u(p,{success:h}))},c=p=>{d(p,l===window||l===document||n.useGlobalTarget||Nb(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=>aj(u,i)),!oj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const r0=30,uj=e=>!isNaN(parseFloat(e));class cj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Un.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=Un.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uj(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 dm);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.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=Un.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>r0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,r0);return Pb(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 Pa(e,t){return new cj(e,t)}const Mb=v.createContext({strict:!1}),i0={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"]},uo={};for(const e in i0)uo[e]={isEnabled:t=>i0[e].some(n=>!!t[n])};function dj(e){for(const t in e)uo[t]={...uo[t],...e[t]}}const fj=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 Lu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fj.has(e)}let Lb=e=>!Lu(e);function pj(e){e&&(Lb=t=>t.startsWith("on")?!Lu(t):e(t))}try{pj(require("@emotion/is-prop-valid").default)}catch{}function hj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Lb(i)||n===!0&&Lu(i)||!t&&!Lu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function mj(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 vc=v.createContext({});function yc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ja(e){return typeof e=="string"||Array.isArray(e)}const ym=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xm=["initial",...ym];function xc(e){return yc(e.animate)||xm.some(t=>ja(e[t]))}function Ib(e){return!!(xc(e)||e.variants)}function gj(e,t){if(xc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ja(n)?n:void 0,animate:ja(r)?r:void 0}}return e.inherit!==!1?t:{}}function vj(e){const{initial:t,animate:n}=gj(e,v.useContext(vc));return v.useMemo(()=>({initial:t,animate:n}),[s0(t),s0(n)])}function s0(e){return Array.isArray(e)?e.join(" "):e}const yj=Symbol.for("motionComponentSymbol");function js(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xj(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):js(n)&&(n.current=r))},[t])}const wm=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wj="framerAppearId",$b="data-"+wm(wj),zb=v.createContext({});function bj(e,t,n,r,i){var m,b;const{visualElement:s}=v.useContext(vc),o=v.useContext(Mb),a=v.useContext(gc),l=v.useContext(am).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(zb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Sj(u.current,n,i,c);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[$b],h=v.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Cb(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),gm.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,p)}),h.current=!1))}),d}function Sj(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:Bb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&js(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function Bb(e){if(e)return e.options.allowProjection!==!1?e.projection:Bb(e.parent)}function kj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&dj(e);function s(a,l){let u;const d={...v.useContext(am),...a,layoutId:Ej(a)},{isStatic:c}=d,f=vj(a),p=r(a,c);if(!c&&om){Tj();const h=Cj(d);u=h.MeasureLayout,f.visualElement=bj(i,p,d,t,h.ProjectionNode)}return x.jsxs(vc.Provider,{value:f,children:[u&&f.visualElement?x.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,xj(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[yj]=i,o}function Ej({layoutId:e}){const t=v.useContext(sm).id;return t&&e!==void 0?t+"-"+e:e}function Tj(e,t){v.useContext(Mb).strict}function Cj(e){const{drag:t,layout:n}=uo;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 Vb=e=>t=>typeof t=="string"&&t.startsWith(e),bm=Vb("--"),_j=Vb("var(--"),Sm=e=>_j(e)?Pj.test(e.split("/*")[0].trim()):!1,Pj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Aa={};function jj(e){for(const t in e)Aa[t]=e[t],bm(t)&&(Aa[t].isCSSVariable=!0)}const xo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ns=new Set(xo);function Ub(e,{layout:t,layoutId:n}){return ns.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Aa[e]||e==="opacity")}const ft=e=>!!(e&&e.getVelocity),Hb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fr=(e,t,n)=>n>t?t:n<e?e:n,wo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ra={...wo,transform:e=>fr(0,1,e)},_l={...wo,default:1},Xa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sr=Xa("deg"),Hn=Xa("%"),Q=Xa("px"),Aj=Xa("vh"),Rj=Xa("vw"),o0={...Hn,parse:e=>Hn.parse(e)/100,transform:e=>Hn.transform(e*100)},Oj={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,radius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,backgroundPositionX:Q,backgroundPositionY:Q},Dj={rotate:Sr,rotateX:Sr,rotateY:Sr,rotateZ:Sr,scale:_l,scaleX:_l,scaleY:_l,scaleZ:_l,skew:Sr,skewX:Sr,skewY:Sr,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Ra,originX:o0,originY:o0,originZ:Q},a0={...wo,transform:Math.round},km={...Oj,...Dj,zIndex:a0,size:Q,fillOpacity:Ra,strokeOpacity:Ra,numOctaves:a0},Fj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nj=xo.length;function Mj(e,t,n){let r="",i=!0;for(let s=0;s<Nj;s++){const o=xo[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=Hb(a,km[o]);if(!l){i=!1;const d=Fj[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Em(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(ns.has(l)){o=!0;continue}else if(bm(l)){i[l]=u;continue}else{const d=Hb(u,km[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Mj(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 Tm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wb(e,t,n){for(const r in t)!ft(t[r])&&!Ub(r,n)&&(e[r]=t[r])}function Lj({transformTemplate:e},t){return v.useMemo(()=>{const n=Tm();return Em(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ij(e,t){const n=e.style||{},r={};return Wb(r,n,e),Object.assign(r,Lj(e,t)),r}function $j(e,t){const n={},r=Ij(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 zj=["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 Cm(e){return typeof e!="string"||e.includes("-")?!1:!!(zj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Bj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vj={offset:"strokeDashoffset",array:"strokeDasharray"};function Uj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Bj:Vj;e[s.offset]=Q.transform(-r);const o=Q.transform(t),a=Q.transform(n);e[s.array]=`${o} ${a}`}function l0(e,t,n){return typeof e=="string"?e:Q.transform(t+n*e)}function Hj(e,t,n){const r=l0(t,e.x,e.width),i=l0(n,e.y,e.height);return`${r} ${i}`}function _m(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Em(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:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=Hj(h,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&&Uj(f,o,a,l,!1)}const qb=()=>({...Tm(),attrs:{}}),Pm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Wj(e,t,n,r){const i=v.useMemo(()=>{const s=qb();return _m(s,t,Pm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Wb(s,e.style,e),i.style={...s,...i.style}}return i}function qj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Cm(n)?Wj:$j)(r,s,o,n),u=hj(r,typeof n=="string",e),d=n!==v.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=v.useMemo(()=>ft(c)?c.get():c,[c]);return v.createElement(n,{...d,children:f})}}function u0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function jm(e,t,n,r){if(typeof t=="function"){const[i,s]=u0(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]=u0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const hp=e=>Array.isArray(e),Kj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Gj=e=>hp(e)?e[e.length-1]||0:e;function Zl(e){const t=ft(e)?e.get():e;return Kj(t)?t.toValue():t}function Qj({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:Yj(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Kb=e=>(t,n)=>{const r=v.useContext(vc),i=v.useContext(gc),s=()=>Qj(e,t,r,i);return n?s():mc(s)};function Yj(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=Zl(s[f]);let{initial:o,animate:a}=e;const l=xc(e),u=Ib(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"&&!yc(c)){const f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){const h=jm(e,f[p]);if(h){const{transitionEnd:m,transition:b,...g}=h;for(const y in g){let w=g[y];if(Array.isArray(w)){const T=d?w.length-1:0;w=w[T]}w!==null&&(i[y]=w)}for(const y in m)i[y]=m[y]}}}return i}function Am(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ft(r[o])||t.style&&ft(t.style[o])||Ub(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Xj={useVisualState:Kb({scrapeMotionValuesFromProps:Am,createRenderState:Tm})};function Gb(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 Qb(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 Yb=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 Xb(e,t,n,r){Qb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Yb.has(i)?i:wm(i),t.attrs[i])}function Zb(e,t,n){const r=Am(e,t,n);for(const i in e)if(ft(e[i])||ft(t[i])){const s=xo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const c0=["x","y","width","height","cx","cy","r"],Zj={useVisualState:Kb({scrapeMotionValuesFromProps:Zb,createRenderState:qb,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(ns.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<c0.length;a++){const l=c0[a];e[l]!==t[l]&&(o=!0)}o&&we.read(()=>{Gb(n,r),we.render(()=>{_m(r,i,Pm(n.tagName),e.transformTemplate),Xb(n,r)})})}})};function Jj(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Cm(r)?Zj:Xj,preloadedFeatures:e,useRender:qj(i),createVisualElement:t,Component:r};return kj(o)}}function Oa(e,t,n){const r=e.getProps();return jm(r,t,n!==void 0?n:r.custom,e)}const Jb=new Set(["width","height","top","left","right","bottom",...xo]);function eA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pa(n))}function tA(e,t){const n=Oa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=Gj(s[o]);eA(e,o,a)}}function nA(e){return!!(ft(e)&&e.add)}function mp(e,t){const n=e.getValue("willChange");if(nA(n))return n.add(t);if(!n&&fp.WillChange){const r=new fp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function eS(e){return e.props[$b]}const tS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rA=1e-7,iA=12;function sA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=tS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>rA&&++a<iA);return o}function Za(e,t,n,r){if(e===t&&n===r)return ln;const i=s=>sA(s,0,1,e,n);return s=>s===0||s===1?s:tS(i(s),t,r)}const nS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rS=e=>t=>1-e(1-t),iS=Za(.33,1.53,.69,.99),Rm=rS(iS),sS=nS(Rm),oS=e=>(e*=2)<1?.5*Rm(e):.5*(2-Math.pow(2,-10*(e-1))),Om=e=>1-Math.sin(Math.acos(e)),aS=rS(Om),lS=nS(Om),uS=e=>/^0[^.\s]+$/u.test(e);function oA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||uS(e):!0}const ea=e=>Math.round(e*1e5)/1e5,Dm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aA(e){return e==null}const lA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fm=(e,t)=>n=>!!(typeof n=="string"&&lA.test(n)&&n.startsWith(e)||t&&!aA(n)&&Object.prototype.hasOwnProperty.call(n,t)),cS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Dm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},uA=e=>fr(0,255,e),Cd={...wo,transform:e=>Math.round(uA(e))},Ci={test:Fm("rgb","red"),parse:cS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cd.transform(e)+", "+Cd.transform(t)+", "+Cd.transform(n)+", "+ea(Ra.transform(r))+")"};function cA(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 gp={test:Fm("#"),parse:cA,transform:Ci.transform},As={test:Fm("hsl","hue"),parse:cS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Hn.transform(ea(t))+", "+Hn.transform(ea(n))+", "+ea(Ra.transform(r))+")"},ct={test:e=>Ci.test(e)||gp.test(e)||As.test(e),parse:e=>Ci.test(e)?Ci.parse(e):As.test(e)?As.parse(e):gp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ci.transform(e):As.transform(e)},dA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Dm))==null?void 0:t.length)||0)+(((n=e.match(dA))==null?void 0:n.length)||0)>0}const dS="number",fS="color",pA="var",hA="var(",d0="${}",mA=/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 Da(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(mA,l=>(ct.test(l)?(r.color.push(s),i.push(fS),n.push(ct.parse(l))):l.startsWith(hA)?(r.var.push(s),i.push(pA),n.push(l)):(r.number.push(s),i.push(dS),n.push(parseFloat(l))),++s,d0)).split(d0);return{values:n,split:a,indexes:r,types:i}}function pS(e){return Da(e).values}function hS(e){const{split:t,types:n}=Da(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===dS?s+=ea(i[o]):a===fS?s+=ct.transform(i[o]):s+=i[o]}return s}}const gA=e=>typeof e=="number"?0:e;function vA(e){const t=pS(e);return hS(e)(t.map(gA))}const ri={test:fA,parse:pS,createTransformer:hS,getAnimatableNone:vA},yA=new Set(["brightness","contrast","saturate","opacity"]);function xA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Dm)||[];if(!r)return e;const i=n.replace(r,"");let s=yA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const wA=/\b([a-z-]*)\(.*?\)/gu,vp={...ri,getAnimatableNone:e=>{const t=e.match(wA);return t?t.map(xA).join(" "):e}},bA={...km,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:vp,WebkitFilter:vp},mS=e=>bA[e];function gS(e,t){let n=mS(e);return n!==vp&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SA=new Set(["auto","none","0"]);function kA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!SA.has(s)&&Da(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=gS(n,i)}const _i=e=>e*180/Math.PI,yp=e=>{const t=_i(Math.atan2(e[1],e[0]));return xp(t)},EA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:yp,rotateZ:yp,skewX:e=>_i(Math.atan(e[1])),skewY:e=>_i(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xp=e=>(e=e%360,e<0&&(e+=360),e),f0=yp,p0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),h0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),TA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:p0,scaleY:h0,scale:e=>(p0(e)+h0(e))/2,rotateX:e=>xp(_i(Math.atan2(e[6],e[5]))),rotateY:e=>xp(_i(Math.atan2(-e[2],e[0]))),rotateZ:f0,rotate:f0,skewX:e=>_i(Math.atan(e[4])),skewY:e=>_i(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function m0(e){return e.includes("scale")?1:0}function wp(e,t){if(!e||e==="none")return m0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=TA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=EA,i=a}if(!i)return m0(t);const s=r[t],o=i[1].split(",").map(_A);return typeof s=="function"?s(o):o[s]}const CA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wp(n,t)};function _A(e){return parseFloat(e.trim())}const g0=e=>e===wo||e===Q,PA=new Set(["x","y","z"]),jA=xo.filter(e=>!PA.has(e));function AA(e){const t=[];return jA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const co={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})=>wp(t,"x"),y:(e,{transform:t})=>wp(t,"y")};co.translateX=co.x;co.translateY=co.y;const $i=new Set;let bp=!1,Sp=!1;function vS(){if(Sp){const e=Array.from($i).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=AA(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)})}Sp=!1,bp=!1,$i.forEach(e=>e.complete()),$i.clear()}function yS(){$i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sp=!0)})}function RA(){yS(),vS()}class Nm{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?($i.add(this),bp||(bp=!0,we.read(yS),we.resolveKeyframes(vS))):(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),$i.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$i.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function DA(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function wS(e,t,n=1){const[r,i]=DA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return xS(o)?parseFloat(o):o}return Sm(i)?wS(i,t,n+1):i}const bS=e=>t=>t.test(e),FA={test:e=>e==="auto",parse:e=>e},SS=[wo,Q,Hn,Sr,Rj,Aj,FA],v0=e=>SS.find(bS(e));class kS extends Nm{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(),Sm(u))){const d=wS(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Jb.has(r)||t.length!==2)return;const[i,s]=t,o=v0(i),a=v0(s);if(o!==a)if(g0(o)&&g0(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++)oA(t[i])&&r.push(i);r.length&&kA(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=co[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]=co[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 y0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ri.test(e)||e==="0")&&!e.startsWith("url("));function NA(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 MA(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=y0(i,t),a=y0(s,t);return!o||!a?!1:NA(e)||(n==="spring"||pm(n))&&r}const LA=e=>e!==null;function wc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(LA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const IA=40;class ES{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=Un.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>IA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&RA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Un.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!MA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(wc(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 Pe=(e,t,n)=>e+(t-e)*n;function _d(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 $A({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=_d(l,a,e+1/3),s=_d(l,a,e),o=_d(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Iu(e,t){return n=>n>0?t:e}const Pd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},zA=[gp,Ci,As],BA=e=>zA.find(t=>t.test(e));function x0(e){const t=BA(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=$A(n)),n}const w0=(e,t)=>{const n=x0(e),r=x0(t);if(!n||!r)return Iu(e,t);const i={...n};return s=>(i.red=Pd(n.red,r.red,s),i.green=Pd(n.green,r.green,s),i.blue=Pd(n.blue,r.blue,s),i.alpha=Pe(n.alpha,r.alpha,s),Ci.transform(i))},VA=(e,t)=>n=>t(e(n)),Ja=(...e)=>e.reduce(VA),kp=new Set(["none","hidden"]);function UA(e,t){return kp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function HA(e,t){return n=>Pe(e,t,n)}function Mm(e){return typeof e=="number"?HA:typeof e=="string"?Sm(e)?Iu:ct.test(e)?w0:KA:Array.isArray(e)?TS:typeof e=="object"?ct.test(e)?w0:WA:Iu}function TS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Mm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function WA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Mm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function qA(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 KA=(e,t)=>{const n=ri.createTransformer(t),r=Da(e),i=Da(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?kp.has(e)&&!i.values.length||kp.has(t)&&!r.values.length?UA(e,t):Ja(TS(qA(r,i),i.values),n):Iu(e,t)};function CS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pe(e,t,n):Mm(e)(e,t)}const GA=5;function _S(e,t,n){const r=Math.max(t-GA,0);return Pb(n-e(r),t-r)}const Oe={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},jd=.001;function QA({duration:e=Oe.duration,bounce:t=Oe.bounce,velocity:n=Oe.velocity,mass:r=Oe.mass}){let i,s,o=1-t;o=fr(Oe.minDamping,Oe.maxDamping,o),e=fr(Oe.minDuration,Oe.maxDuration,Vn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,p=Ep(u,o),h=Math.exp(-c);return jd-f/p*h},s=u=>{const c=u*o*e,f=c*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-c),m=Ep(Math.pow(u,2),o);return(-i(u)+jd>0?-1:1)*((f-p)*h)/m}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-jd+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=XA(i,s,a);if(e=Bn(e),isNaN(l))return{stiffness:Oe.stiffness,damping:Oe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const YA=12;function XA(e,t,n){let r=n;for(let i=1;i<YA;i++)r=r-e(r)/t(r);return r}function Ep(e,t){return e*Math.sqrt(1-t*t)}const ZA=["duration","bounce"],JA=["stiffness","damping","mass"];function b0(e,t){return t.some(n=>e[n]!==void 0)}function eR(e){let t={velocity:Oe.velocity,stiffness:Oe.stiffness,damping:Oe.damping,mass:Oe.mass,isResolvedFromDuration:!1,...e};if(!b0(e,JA)&&b0(e,ZA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*fr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Oe.mass,stiffness:i,damping:s}}else{const n=QA(e);t={...t,...n,mass:Oe.mass},t.isResolvedFromDuration=!0}return t}function $u(e=Oe.visualDuration,t=Oe.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}=eR({...n,velocity:-Vn(n.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*d)),b=o-s,g=Vn(Math.sqrt(l/d)),y=Math.abs(b)<5;r||(r=y?Oe.restSpeed.granular:Oe.restSpeed.default),i||(i=y?Oe.restDelta.granular:Oe.restDelta.default);let w;if(m<1){const E=Ep(g,m);w=_=>{const C=Math.exp(-m*g*_);return o-C*((h+m*g*b)/E*Math.sin(E*_)+b*Math.cos(E*_))}}else if(m===1)w=E=>o-Math.exp(-g*E)*(b+(h+g*b)*E);else{const E=g*Math.sqrt(m*m-1);w=_=>{const C=Math.exp(-m*g*_),j=Math.min(E*_,300);return o-C*((h+m*g*b)*Math.sinh(j)+E*b*Math.cosh(j))/E}}const T={calculatedDuration:p&&c||null,next:E=>{const _=w(E);if(p)a.done=E>=c;else{let C=0;m<1&&(C=E===0?Bn(h):_S(w,E,_));const j=Math.abs(C)<=r,k=Math.abs(o-_)<=i;a.done=j&&k}return a.value=a.done?o:_,a},toString:()=>{const E=Math.min(mm(T),Mu),_=jb(C=>T.next(E*C).value,E,30);return E+"ms "+_},toTransition:()=>{}};return T}$u.applyToOptions=e=>{const t=ZP(e,100,$u);return e.ease=_a()?t.ease:"easeOut",e.duration=Bn(t.duration),e.type="keyframes",e};function S0({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=j=>a!==void 0&&j<a||l!==void 0&&j>l,h=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let m=n*t;const b=c+m,g=o===void 0?b:o(b);g!==b&&(m=g-c);const y=j=>-m*Math.exp(-j/r),w=j=>g+y(j),T=j=>{const k=y(j),R=w(j);f.done=Math.abs(k)<=u,f.value=f.done?g:R};let E,_;const C=j=>{p(f.value)&&(E=j,_=$u({keyframes:[f.value,h(f.value)],velocity:_S(w,j,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:j=>{let k=!1;return!_&&E===void 0&&(k=!0,T(j),C(j)),E!==void 0&&j>=E?_.next(j-E):(!k&&T(j),f)}}}const tR=Za(.42,0,1,1),nR=Za(0,0,.58,1),PS=Za(.42,0,.58,1),rR=e=>Array.isArray(e)&&typeof e[0]!="number",k0={linear:ln,easeIn:tR,easeInOut:PS,easeOut:nR,circIn:Om,circInOut:lS,circOut:aS,backIn:Rm,backInOut:sS,backOut:iS,anticipate:oS},E0=e=>{if(fm(e)){dp(e.length===4);const[t,n,r,i]=e;return Za(t,n,r,i)}else if(typeof e=="string")return dp(k0[e]!==void 0),k0[e];return e};function iR(e,t,n){const r=[],i=n||CS,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]||ln:t;a=Ja(l,a)}r.push(a)}return r}function sR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(dp(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=iR(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=Ca(e[c],e[c+1],d);return a[c](f)};return n?d=>u(fr(e[0],e[s-1],d)):u}function oR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ca(0,t,r);e.push(Pe(n,1,i))}}function aR(e){const t=[0];return oR(t,e.length-1),t}function lR(e,t){return e.map(n=>n*t)}function uR(e,t){return e.map(()=>t||PS).splice(0,e.length-1)}function zu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=rR(r)?r.map(E0):E0(r),s={done:!1,value:t[0]},o=lR(n&&n.length===t.length?n:aR(t),e),a=sR(o,t,{ease:Array.isArray(i)?i:uR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const cR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>we.update(t,!0),stop:()=>ni(t),now:()=>nt.isProcessing?nt.timestamp:Un.now()}},dR={decay:S0,inertia:S0,tween:zu,keyframes:zu,spring:$u},fR=e=>e/100;class Lm extends ES{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)||Nm,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=pm(n)?n:dR[n]||zu;let l,u;a!==zu&&typeof t[0]!="number"&&(l=Ja(fR,CS(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=mm(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:j}=this.options;return{done:!0,value:j[j.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:h,repeatDelay:m,onUpdate:b}=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 g=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,T=s;if(p){const j=Math.min(this.currentTime,d)/c;let k=Math.floor(j),R=j%1;!R&&j>=1&&(R=1),R===1&&k--,k=Math.min(k,p+1),!!(k%2)&&(h==="reverse"?(R=1-R,m&&(R-=m/c)):h==="mirror"&&(T=o)),w=fr(0,1,R)*c}const E=y?{done:!1,value:l[0]}:T.next(w);a&&(E.value=a(E.value));let{done:_}=E;!y&&u!==null&&(_=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return C&&i!==void 0&&(E.value=wc(l,this.options,i)),b&&b(E.value),C&&this.finish(),E}get duration(){const{resolved:t}=this;return t?Vn(t.calculatedDuration):0}get time(){return Vn(this.currentTime)}set time(t){t=Bn(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=Vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=cR,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 pR=new Set(["opacity","clipPath","filter","transform"]),hR=cm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bu=10,mR=2e4;function gR(e){return pm(e.type)||e.type==="spring"||!Rb(e.ease)}function vR(e,t){const n=new Lm({...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<mR;)r=n.sample(s),i.push(r.value),s+=Bu;return{times:void 0,keyframes:i,duration:s-Bu,ease:"linear"}}const jS={anticipate:oS,backInOut:sS,circInOut:lS};function yR(e){return e in jS}class T0 extends ES{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new kS(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"&&_a()&&yR(s)&&(s=jS[s]),gR(this.options)){const{onComplete:c,onUpdate:f,motionValue:p,element:h,...m}=this.options,b=vR(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=XP(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Jv(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(wc(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 Vn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Vn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Bn(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 ln;const{animation:r}=n;Jv(r,t)}return ln}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,h=new Lm({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=Bn(this.time);u.setWithVelocity(h.sample(m-Bu).value,h.sample(m).value,Bu)}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 hR()&&r&&pR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const xR={type:"spring",stiffness:500,damping:25,restSpeed:10},wR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bR={type:"keyframes",duration:.8},SR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kR=(e,{keyframes:t})=>t.length>2?bR:ns.has(e)?e.startsWith("scale")?wR(t[1]):xR:SR;function ER({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 Im=(e,t,n,r={},i,s)=>o=>{const a=hm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Bn(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};ER(a)||(d={...d,...kR(e,d)}),d.duration&&(d.duration=Bn(d.duration)),d.repeatDelay&&(d.repeatDelay=Bn(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=wc(d.keyframes,a);if(f!==void 0)return we.update(()=>{d.onUpdate(f),d.onComplete()}),new GP([])}return!s&&T0.supports(d)?new T0(d):new Lm(d)};function TR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function AS(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&&TR(u,d))continue;const p={delay:n,...hm(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const b=eS(e);if(b){const g=window.MotionHandoffAnimation(b,d,we);g!==null&&(p.startTime=g,h=!0)}}mp(e,d),c.start(Im(d,c,f,e.shouldReduceMotion&&Jb.has(d)?{type:!1}:p,e,h));const m=c.animation;m&&l.push(m)}return o&&Promise.all(l).then(()=>{we.update(()=>{o&&tA(e,o)})}),l}function Tp(e,t,n={}){var l;const r=Oa(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(AS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return CR(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 CR(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(_R).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Tp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function _R(e,t){return e.sortNodePosition(t)}function PR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Tp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Tp(e,t,n);else{const i=typeof t=="function"?Oa(e,t,n.custom):t;r=Promise.all(AS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function RS(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 jR=xm.length;function OS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?OS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<jR;n++){const r=xm[n],i=e.props[r];(ja(i)||i===!1)&&(t[r]=i)}return t}const AR=[...ym].reverse(),RR=ym.length;function OR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>PR(e,n,r)))}function DR(e){let t=OR(e),n=C0(),r=!0;const i=l=>(u,d)=>{var f;const c=Oa(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:p,transitionEnd:h,...m}=c;u={...u,...m,...h}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=OS(e.parent)||{},c=[],f=new Set;let p={},h=1/0;for(let b=0;b<RR;b++){const g=AR[b],y=n[g],w=u[g]!==void 0?u[g]:d[g],T=ja(w),E=g===l?y.isActive:null;E===!1&&(h=b);let _=w===d[g]&&w!==u[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),y.protectedKeys={...p},!y.isActive&&E===null||!w&&!y.prevProp||yc(w)||typeof w=="boolean")continue;const C=FR(y.prevProp,w);let j=C||g===l&&y.isActive&&!_&&T||b>h&&T,k=!1;const R=Array.isArray(w)?w:[w];let M=R.reduce(i(g),{});E===!1&&(M={});const{prevResolvedValues:H={}}=y,Z={...H,...M},te=J=>{j=!0,f.has(J)&&(k=!0,f.delete(J)),y.needsAnimating[J]=!0;const O=e.getValue(J);O&&(O.liveStyle=!1)};for(const J in Z){const O=M[J],L=H[J];if(p.hasOwnProperty(J))continue;let V=!1;hp(O)&&hp(L)?V=!RS(O,L):V=O!==L,V?O!=null?te(J):f.add(J):O!==void 0&&f.has(J)?te(J):y.protectedKeys[J]=!0}y.prevProp=w,y.prevResolvedValues=M,y.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(j=!1),j&&(!(_&&C)||k)&&c.push(...R.map(J=>({animation:J,options:{type:g}})))}if(f.size){const b={};if(typeof u.initial!="boolean"){const g=Oa(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(b.transition=g.transition)}f.forEach(g=>{const y=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=y??null}),c.push({animation:b})}let m=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?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=C0(),r=!0}}}function FR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!RS(t,e):!1}function hi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function C0(){return{animate:hi(!0),whileInView:hi(),whileHover:hi(),whileTap:hi(),whileDrag:hi(),whileFocus:hi(),exit:hi()}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}class NR extends li{constructor(t){super(t),t.animationState||(t.animationState=DR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();yc(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 MR=0;class LR extends li{constructor(){super(...arguments),this.id=MR++}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 IR={animation:{Feature:NR},exit:{Feature:LR}};function Fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function el(e){return{point:{x:e.pageX,y:e.pageY}}}const $R=e=>t=>vm(t)&&e(t,el(t));function ta(e,t,n,r){return Fa(e,t,$R(n),r)}function DS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BR(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 FS=1e-4,VR=1-FS,UR=1+FS,NS=.01,HR=0-NS,WR=0+NS;function vt(e){return e.max-e.min}function qR(e,t,n){return Math.abs(e-t)<=n}function _0(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=vt(n)/vt(t),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=VR&&e.scale<=UR||isNaN(e.scale))&&(e.scale=1),(e.translate>=HR&&e.translate<=WR||isNaN(e.translate))&&(e.translate=0)}function na(e,t,n,r){_0(e.x,t.x,n.x,r?r.originX:void 0),_0(e.y,t.y,n.y,r?r.originY:void 0)}function P0(e,t,n){e.min=n.min+t.min,e.max=e.min+vt(t)}function KR(e,t,n){P0(e.x,t.x,n.x),P0(e.y,t.y,n.y)}function j0(e,t,n){e.min=t.min-n.min,e.max=e.min+vt(t)}function ra(e,t,n){j0(e.x,t.x,n.x),j0(e.y,t.y,n.y)}const A0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rs=()=>({x:A0(),y:A0()}),R0=()=>({min:0,max:0}),Ne=()=>({x:R0(),y:R0()});function Xt(e){return[e("x"),e("y")]}function Ad(e){return e===void 0||e===1}function Cp({scale:e,scaleX:t,scaleY:n}){return!Ad(e)||!Ad(t)||!Ad(n)}function yi(e){return Cp(e)||MS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function MS(e){return O0(e.x)||O0(e.y)}function O0(e){return e&&e!=="0%"}function Vu(e,t,n){const r=e-n,i=t*r;return n+i}function D0(e,t,n,r,i){return i!==void 0&&(e=Vu(e,i,r)),Vu(e,n,r)+t}function _p(e,t=0,n=1,r,i){e.min=D0(e.min,t,n,r,i),e.max=D0(e.max,t,n,r,i)}function LS(e,{x:t,y:n}){_p(e.x,t.translate,t.scale,t.originPoint),_p(e.y,n.translate,n.scale,n.originPoint)}const F0=.999999999999,N0=1.0000000000001;function GR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,LS(e,o)),r&&yi(s.latestValues)&&Ds(e,s.latestValues))}t.x<N0&&t.x>F0&&(t.x=1),t.y<N0&&t.y>F0&&(t.y=1)}function Os(e,t){e.min=e.min+t,e.max=e.max+t}function M0(e,t,n,r,i=.5){const s=Pe(e.min,e.max,i);_p(e,t,n,s,r)}function Ds(e,t){M0(e.x,t.x,t.scaleX,t.scale,t.originX),M0(e.y,t.y,t.scaleY,t.scale,t.originY)}function IS(e,t){return DS(BR(e.getBoundingClientRect(),t))}function QR(e,t,n){const r=IS(e,n),{scroll:i}=t;return i&&(Os(r.x,i.offset.x),Os(r.y,i.offset.y)),r}const $S=({current:e})=>e?e.ownerDocument.defaultView:null,L0=(e,t)=>Math.abs(e-t);function YR(e,t){const n=L0(e.x,t.x),r=L0(e.y,t.y);return Math.sqrt(n**2+r**2)}class zS{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=Od(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=YR(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=c,{timestamp:m}=nt;this.history.push({...h,timestamp:m});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Rd(f,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Od(c.type==="pointercancel"?this.lastMoveEventInfo:Rd(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,b),h&&h(c,b)},!vm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=el(t),a=Rd(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=nt;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Od(a,this.history)),this.removeListeners=Ja(ta(this.contextWindow,"pointermove",this.handlePointerMove),ta(this.contextWindow,"pointerup",this.handlePointerUp),ta(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ni(this.updatePoint)}}function Rd(e,t){return t?{point:t(e.point)}:e}function I0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Od({point:e},t){return{point:e,delta:I0(e,BS(t)),offset:I0(e,XR(t)),velocity:ZR(t,.1)}}function XR(e){return e[0]}function BS(e){return e[e.length-1]}function ZR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=BS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Bn(t)));)n--;if(!r)return{x:0,y:0};const s=Vn(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 JR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function $0(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 eO(e,{top:t,left:n,bottom:r,right:i}){return{x:$0(e.x,n,i),y:$0(e.y,t,r)}}function z0(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 tO(e,t){return{x:z0(e.x,t.x),y:z0(e.y,t.y)}}function nO(e,t){let n=.5;const r=vt(e),i=vt(t);return i>r?n=Ca(t.min,t.max-r,e.min):r>i&&(n=Ca(e.min,e.max-i,t.min)),fr(0,1,n)}function rO(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 Pp=.35;function iO(e=Pp){return e===!1?e=0:e===!0&&(e=Pp),{x:B0(e,"left","right"),y:B0(e,"top","bottom")}}function B0(e,t,n){return{min:V0(e,t),max:V0(e,n)}}function V0(e,t){return typeof e=="number"?e:e[t]||0}const sO=new WeakMap;class oO{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=Ne(),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(el(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nj(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),Xt(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Hn.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[b];w&&(g=vt(w)*(parseFloat(g)/100))}}this.originPoint[b]=g}),h&&we.postRender(()=>h(d,c)),mp(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=c;if(p&&this.currentDirection===null){this.currentDirection=aO(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),m&&m(d,c)},a=(d,c)=>this.stop(d,c),l=()=>Xt(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 zS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:$S(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&&we.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||!Pl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=JR(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&&js(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eO(r.layoutBox,t):this.constraints=!1,this.elastic=iO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!js(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=QR(r,i.root,this.visualElement.getTransformPagePoint());let o=tO(i.layout.layoutBox,s);if(n){const a=n(zR(o));this.hasMutatedConstraints=!!a,a&&(o=DS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Xt(d=>{if(!Pl(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,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,h)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return mp(this.visualElement,t),r.start(Im(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(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){Xt(n=>{const{drag:r}=this.getProps();if(!Pl(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]-Pe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!js(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=nO({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(),Xt(o=>{if(!Pl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Pe(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;sO.set(this.visualElement,this);const t=this.visualElement.current,n=ta(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();js(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()),we.read(r);const o=Fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xt(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=Pp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Pl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lO extends li{constructor(t){super(t),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new oO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}unmount(){this.removeGroupControls(),this.removeListeners()}}const U0=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))};class uO extends li{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(t){this.session=new zS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$S(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:U0(t),onStart:U0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ta(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function H0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const n=H0(e,t.target.x),r=H0(e,t.target.y);return`${n}% ${r}%`}},cO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ri.parse(e);if(i.length>5)return r;const s=ri.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=Pe(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 dO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;jj(fO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||we.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gm.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 VS(e){const[t,n]=_b(),r=v.useContext(sm);return x.jsx(dO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(zb),isPresent:t,safeToRemove:n})}const fO={borderRadius:{...Fo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fo,borderTopRightRadius:Fo,borderBottomLeftRadius:Fo,borderBottomRightRadius:Fo,boxShadow:cO};function pO(e,t,n){const r=ft(e)?e:Pa(e);return r.start(Im("",r,t,n)),r.animation}function hO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mO=(e,t)=>e.depth-t.depth;class gO{constructor(){this.children=[],this.isDirty=!1}add(t){lm(this.children,t),this.isDirty=!0}remove(t){um(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mO),this.isDirty=!1,this.children.forEach(t)}}function vO(e,t){const n=Un.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ni(r),e(s-t))};return we.read(r,!0),()=>ni(r)}const US=["TopLeft","TopRight","BottomLeft","BottomRight"],yO=US.length,W0=e=>typeof e=="string"?parseFloat(e):e,q0=e=>typeof e=="number"||Q.test(e);function xO(e,t,n,r,i,s){i?(e.opacity=Pe(0,n.opacity??1,wO(r)),e.opacityExit=Pe(t.opacity??1,0,bO(r))):s&&(e.opacity=Pe(t.opacity??1,n.opacity??1,r));for(let o=0;o<yO;o++){const a=`border${US[o]}Radius`;let l=K0(t,a),u=K0(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||q0(l)===q0(u)?(e[a]=Math.max(Pe(W0(l),W0(u),r),0),(Hn.test(u)||Hn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function K0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const wO=HS(0,.5,aS),bO=HS(.5,.95,ln);function HS(e,t,n){return r=>r<e?0:r>t?1:n(Ca(e,t,r))}function G0(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){G0(e.x,t.x),G0(e.y,t.y)}function Q0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Y0(e,t,n,r,i){return e-=t,e=Vu(e,1/n,r),i!==void 0&&(e=Vu(e,1/i,r)),e}function SO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Hn.test(t)&&(t=parseFloat(t),t=Pe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Pe(s.min,s.max,r);e===s&&(a-=t),e.min=Y0(e.min,t,n,a,i),e.max=Y0(e.max,t,n,a,i)}function X0(e,t,[n,r,i],s,o){SO(e,t[n],t[r],t[i],t.scale,s,o)}const kO=["x","scaleX","originX"],EO=["y","scaleY","originY"];function Z0(e,t,n,r){X0(e.x,t,kO,n?n.x:void 0,r?r.x:void 0),X0(e.y,t,EO,n?n.y:void 0,r?r.y:void 0)}function J0(e){return e.translate===0&&e.scale===1}function WS(e){return J0(e.x)&&J0(e.y)}function ey(e,t){return e.min===t.min&&e.max===t.max}function TO(e,t){return ey(e.x,t.x)&&ey(e.y,t.y)}function ty(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qS(e,t){return ty(e.x,t.x)&&ty(e.y,t.y)}function ny(e){return vt(e.x)/vt(e.y)}function ry(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CO{constructor(){this.members=[]}add(t){lm(this.members,t),t.scheduleRender()}remove(t){if(um(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 _O(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:h}=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) `),h&&(r+=`skewY(${h}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 Dd=["","X","Y","Z"],PO={visibility:"hidden"},iy=1e3;let jO=0;function Fd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function KS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=eS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&KS(r)}function GS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=jO++,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(OO),this.nodes.forEach(LO),this.nodes.forEach(IO),this.nodes.forEach(DO)},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 gO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new dm),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=hO(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=vO(f,250),Jl.hasAnimatedSinceResize&&(Jl.hasAnimatedSinceResize=!1,this.nodes.forEach(oy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||UO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=d.getProps(),y=!this.targetLayout||!qS(this.targetLayout,h),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,w);const T={...hm(m,"layout"),onPlay:b,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||oy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,ni(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&&KS(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(sy);return}this.isUpdating||this.nodes.forEach(NO),this.isUpdating=!1,this.nodes.forEach(MO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.clearAllSnapshots();const a=Un.now();nt.delta=fr(0,1e3/60,a-nt.timestamp),nt.timestamp=a,nt.isProcessing=!0,Ed.update.process(nt),Ed.preRender.process(nt),Ed.render.process(nt),nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(FO),this.sharedNodes.forEach(zO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(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=Ne(),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&&!WS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||yi(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)),HO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ne();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(WO))){const{scroll:d}=this.root;d&&(Os(a.x,d.offset.x),Os(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ne();if(Qt(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&&Qt(a,o),Os(a.x,c.offset.x),Os(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Ne();Qt(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&&Ds(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yi(d.latestValues)&&Ds(l,d.latestValues)}return yi(this.latestValues)&&Ds(l,this.latestValues),l}removeTransform(o){const a=Ne();Qt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!yi(u.latestValues))continue;Cp(u.latestValues)&&u.updateSnapshot();const d=Ne(),c=u.measurePageBox();Qt(d,c),Z0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yi(this.latestValues)&&Z0(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!==nt.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=nt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),ra(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),LS(this.target,this.targetDelta)):Qt(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=Ne(),this.relativeTargetOrigin=Ne(),ra(this.relativeTargetOrigin,this.target,p.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Cp(this.parent.latestValues)||MS(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 h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===nt.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;Qt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;GR(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=Ne());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Q0(this.prevProjectionDelta.x,this.projectionDelta.x),Q0(this.prevProjectionDelta.y,this.projectionDelta.y)),na(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!ry(this.projectionDelta.x,this.prevProjectionDelta.x)||!ry(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=Rs(),this.projectionDelta=Rs(),this.projectionDeltaWithTransform=Rs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ne(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,b=this.getStack(),g=!b||b.members.length<=1,y=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(VO));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const E=T/1e3;ay(c.x,o.x,E),ay(c.y,o.y,E),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ra(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BO(this.relativeTarget,this.relativeTargetOrigin,f,E),w&&TO(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ne()),Qt(w,this.relativeTarget)),m&&(this.animationValues=d,xO(d,u,this.latestValues,E,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},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&&(ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Jl.hasAnimatedSinceResize=!0,this.currentAnimation=pO(0,iy,{...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(iy),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&&QS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ne();const c=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Qt(a,l),Ds(a,d),na(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CO),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&&Fd("z",o,u,this.animationValues);for(let d=0;d<Dd.length;d++)Fd(`rotate${Dd[d]}`,o,u,this.animationValues),Fd(`skew${Dd[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 PO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Zl(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=Zl(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!yi(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=_O(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 Aa){if(d[p]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:b}=Aa[p],g=a.transform==="none"?d[p]:h(d[p],u);if(m){const y=m.length;for(let w=0;w<y;w++)a[m[w]]=g}else b?this.options.visualElement.renderState.vars[p]=g:a[p]=g}return this.options.layoutId&&(a.pointerEvents=u===this?Zl(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(sy),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function RO(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"?Xt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(f);f.min=r[c].min,f.max=f.min+p}):QS(s,t.layoutBox,r)&&Xt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(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=Rs();na(a,r,t.layoutBox);const l=Rs();o?na(l,e.applyTransform(i,!0),t.measuredBox):na(l,r,t.layoutBox);const u=!WS(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 h=Ne();ra(h,t.layoutBox,f.layoutBox);const m=Ne();ra(m,r,p.layoutBox),qS(h,m)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,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 OO(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 DO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function FO(e){e.clearSnapshot()}function sy(e){e.clearMeasurements()}function NO(e){e.isLayoutDirty=!1}function MO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LO(e){e.resolveTargetDelta()}function IO(e){e.calcProjection()}function $O(e){e.resetSkewAndRotation()}function zO(e){e.removeLeadSnapshot()}function ay(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ly(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function BO(e,t,n,r){ly(e.x,t.x,n.x,r),ly(e.y,t.y,n.y,r)}function VO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const UO={duration:.45,ease:[.4,0,.1,1]},uy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cy=uy("applewebkit/")&&!uy("chrome/")?Math.round:ln;function dy(e){e.min=cy(e.min),e.max=cy(e.max)}function HO(e){dy(e.x),dy(e.y)}function QS(e,t,n){return e==="position"||e==="preserve-aspect"&&!qR(ny(t),ny(n),.2)}function WO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const qO=GS({attachResizeListener:(e,t)=>Fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nd={current:void 0},YS=GS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nd.current){const e=new qO({});e.mount(window),e.setOptions({layoutScroll:!0}),Nd.current=e}return Nd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KO={pan:{Feature:uO},drag:{Feature:lO,ProjectionNode:YS,MeasureLayout:VS}};function fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&we.postRender(()=>s(t,el(t)))}class GO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=ij(t,(n,r)=>(fy(this.node,r,"Start"),i=>fy(this.node,i,"End"))))}unmount(){}}class QO extends li{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=Ja(Fa(this.node.current,"focus",()=>this.onFocus()),Fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function py(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&&we.postRender(()=>s(t,el(t)))}class YO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=lj(t,(n,r)=>(py(this.node,r,"Start"),(i,{success:s})=>py(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jp=new WeakMap,Md=new WeakMap,XO=e=>{const t=jp.get(e.target);t&&t(e)},ZO=e=>{e.forEach(XO)};function JO({root:e,...t}){const n=e||document;Md.has(n)||Md.set(n,{});const r=Md.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ZO,{root:e,...t})),r[i]}function e3(e,t,n){const r=JO(t);return jp.set(e,n),r.observe(e),()=>{jp.delete(e),r.unobserve(e)}}const t3={some:0,all:1};class n3 extends li{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:t3[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 e3(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(r3(t,n))&&this.startObserver()}unmount(){}}function r3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const i3={inView:{Feature:n3},tap:{Feature:YO},focus:{Feature:QO},hover:{Feature:GO}},s3={layout:{ProjectionNode:YS,MeasureLayout:VS}},Ap={current:null},XS={current:!1};function o3(){if(XS.current=!0,!!om)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ap.current=e.matches;e.addListener(t),t()}else Ap.current=!1}const a3=[...SS,ct,ri],l3=e=>a3.find(bS(e)),u3=new WeakMap;function c3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ft(i))e.addValue(r,i);else if(ft(s))e.addValue(r,Pa(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,Pa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const hy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class d3{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=Nm,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=Un.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,we.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=xc(n),this.isVariantNode=Ib(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 h=f[p];l[p]!==void 0&&ft(h)&&h.set(l[p],!1)}}mount(t){this.current=t,u3.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)),XS.current||o3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ap.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ni(this.notifyUpdate),ni(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=ns.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&we.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 uo){const n=uo[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):Ne()}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<hy.length;r++){const i=hy[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=c3(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=Pa(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"&&(xS(r)||uS(r))?r=parseFloat(r):!l3(r)&&ri.test(n)&&(r=gS(t,n)),this.setBaseTarget(t,ft(r)?r.get():r)),ft(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=jm(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&&!ft(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 dm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ZS extends d3{constructor(){super(...arguments),this.KeyframeResolver=kS}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;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function f3(e){return window.getComputedStyle(e)}class p3 extends ZS{constructor(){super(...arguments),this.type="html",this.renderInstance=Qb}readValueFromInstance(t,n){if(ns.has(n))return CA(t,n);{const r=f3(t),i=(bm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return IS(t,n)}build(t,n,r){Em(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Am(t,n,r)}}class h3 extends ZS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Gb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ns.has(n)){const r=mS(n);return r&&r.default||0}return n=Yb.has(n)?n:wm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Zb(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&we.postRender(this.updateDimensions)}build(t,n,r){_m(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Xb(t,n,r,i)}mount(t){this.isSVGTag=Pm(t.tagName),super.mount(t)}}const m3=(e,t)=>Cm(e)?new h3(t):new p3(t,{allowProjection:e!==v.Fragment}),g3=Jj({...IR,...i3,...KO,...s3},m3),Te=mj(g3);class v3{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 y3=()=>new v3;function x3(){return mc(y3)}const w3=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Ft=e=>{const[t,n]=e.split("-");return w3(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var Tr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Tr||{});const JS=v.createContext({}),b3={[Y.Background]:"",[Y.Border]:"initial",[Y.TooltipText]:Ft("blue-700"),[Y.TooltipBackground]:Ft("blue-100"),[Y.TooltipBorder]:Ft("blue-500"),[Y.HeaderBackground]:Ft("blue-600"),[Y.HeaderBorder]:"initial",[Y.HeaderText]:"white",[Y.FooterBackground]:"",[Y.FooterBorder]:"",[Y.FooterText]:"",[Y.MessageAdminBackground]:"",[Y.MessageAdminText]:"",[Y.MessageVisitorBackground]:"",[Y.MessageVisitorText]:"",[Y.GreeterBackground]:"white",[Y.GreeterText]:Ft("slate-700"),[Y.GreeterBorder]:Ft("slate-200"),[Y.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[Y.GreeterTopText]:"white",[Y.GreeterButtonBackground]:Ft("indigo-600"),[Y.GreeterButtonText]:Ft("white"),[Y.ButtonBackground]:Ft("indigo-600"),[Y.ButtonText]:Ft("white"),[Y.InputBackground]:Ft("white"),[Y.InputText]:Ft("slate-800"),[Y.InputBorder]:Ft("slate-200")},S3={[Tr.None]:"0px",[Tr.Sm]:"var(--radius-xs)",[Tr.Md]:"var(--radius-sm)",[Tr.Lg]:"var(--radius-md)",[Tr.Xl]:"var(--radius-lg)",[Tr.Full]:"calc(infinity * 1px)"},k3=e=>{const t={...b3};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 E3({children:e,widget:t}){const n=k3(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Tr.Md,i=o=>n[o],s=()=>S3[r];return x.jsx(JS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const hr=()=>v.useContext(JS);function sn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=Y.ButtonText,bgKey:u=Y.ButtonBackground,animations:d={},withoutTheming:c,...f}){const p=hr();return x.jsx(Te.button,{type:t,className:fe("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,Yv[n]&&Yv[n][r],zP[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:p.getColor(l),backgroundColor:p.getColor(u),...o?{}:{borderRadius:p.getRadius()}},...d,...f,children:e})}function ve(){}ve.Home=function(t){return x.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:x.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"})})};ve.Chat=e=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:x.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"})});ve.Menu=e=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ve.MessageTyping=({className:e="size-5",...t})=>x.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:x.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"})});ve.Check=function(t){return x.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:x.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"})})};ve.Website=function(t){return x.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[x.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"}),x.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"}),x.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"})]})};ve.ArrowDown=e=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ve.XCircle=({className:e="e-5",...t})=>x.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:x.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"})});ve.X=({className:e="e-5",...t})=>x.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:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ve.PaperAirplane=({className:e="e-5",...t})=>x.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:x.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"})});ve.Spin=function(t){return x.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:x.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"})})};const qn=Object.create(null);qn.open="0";qn.close="1";qn.ping="2";qn.pong="3";qn.message="4";qn.upgrade="5";qn.noop="6";const eu=Object.create(null);Object.keys(qn).forEach(e=>{eu[qn[e]]=e});const Rp={type:"error",data:"parser error"},ek=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",tk=typeof ArrayBuffer=="function",nk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$m=({type:e,data:t},n,r)=>ek&&t instanceof Blob?n?r(t):my(t,r):tk&&(t instanceof ArrayBuffer||nk(t))?n?r(t):my(new Blob([t]),r):r(qn[e]+(t||"")),my=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function gy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ld;function T3(e,t){if(ek&&e.data instanceof Blob)return e.data.arrayBuffer().then(gy).then(t);if(tk&&(e.data instanceof ArrayBuffer||nk(e.data)))return t(gy(e.data));$m(e,!1,n=>{Ld||(Ld=new TextEncoder),t(Ld.encode(n))})}const vy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ho=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<vy.length;e++)Ho[vy.charCodeAt(e)]=e;const C3=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=Ho[e.charCodeAt(r)],o=Ho[e.charCodeAt(r+1)],a=Ho[e.charCodeAt(r+2)],l=Ho[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},_3=typeof ArrayBuffer=="function",zm=(e,t)=>{if(typeof e!="string")return{type:"message",data:rk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:P3(e.substring(1),t)}:eu[n]?e.length>1?{type:eu[n],data:e.substring(1)}:{type:eu[n]}:Rp},P3=(e,t)=>{if(_3){const n=C3(e);return rk(n,t)}else return{base64:!0,data:e}},rk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},ik="",j3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{$m(s,!1,a=>{r[o]=a,++i===n&&t(r.join(ik))})})},A3=(e,t)=>{const n=e.split(ik),r=[];for(let i=0;i<n.length;i++){const s=zm(n[i],t);if(r.push(s),s.type==="error")break}return r};function R3(){return new TransformStream({transform(e,t){T3(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 Id;function jl(e){return e.reduce((t,n)=>t+n.length,0)}function Al(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 O3(e,t){Id||(Id=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(jl(n)<1)break;const l=Al(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(jl(n)<2)break;const l=Al(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(jl(n)<8)break;const l=Al(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Rp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(jl(n)<i)break;const l=Al(n,i);a.enqueue(zm(s?l:Id.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Rp);break}}}})}const sk=4;function Ie(e){if(e)return D3(e)}function D3(e){for(var t in Ie.prototype)e[t]=Ie.prototype[t];return e}Ie.prototype.on=Ie.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ie.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ie.prototype.off=Ie.prototype.removeListener=Ie.prototype.removeAllListeners=Ie.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};Ie.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};Ie.prototype.emitReserved=Ie.prototype.emit;Ie.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ie.prototype.hasListeners=function(e){return!!this.listeners(e).length};const bc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),nn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),F3="arraybuffer";function ok(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N3=nn.setTimeout,M3=nn.clearTimeout;function Sc(e,t){t.useNativeTimers?(e.setTimeoutFn=N3.bind(nn),e.clearTimeoutFn=M3.bind(nn)):(e.setTimeoutFn=nn.setTimeout.bind(nn),e.clearTimeoutFn=nn.clearTimeout.bind(nn))}const L3=1.33;function I3(e){return typeof e=="string"?$3(e):Math.ceil((e.byteLength||e.size)*L3)}function $3(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 ak(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function z3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function B3(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 V3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Bm extends Ie{constructor(t){super(),this.writable=!1,Sc(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 V3(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=zm(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=z3(t);return n.length?"?"+n:""}}class U3 extends Bm{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)};A3(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,j3(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]=ak()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let lk=!1;try{lk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const H3=lk;function W3(){}class q3 extends U3{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 Wn extends Ie{constructor(t,n,r){super(),this.createRequest=t,Sc(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=ok(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=Wn.requestsCount++,Wn.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=W3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wn.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()}}Wn.requestsCount=0;Wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",yy);else if(typeof addEventListener=="function"){const e="onpagehide"in nn?"pagehide":"unload";addEventListener(e,yy,!1)}}function yy(){for(let e in Wn.requests)Wn.requests.hasOwnProperty(e)&&Wn.requests[e].abort()}const K3=function(){const e=uk({xdomain:!1});return e&&e.responseType!==null}();class G3 extends q3{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=K3&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Wn(uk,this.uri(),t)}}function uk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||H3))return new XMLHttpRequest}catch{}if(!t)try{return new nn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ck=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Q3 extends Bm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=ck?{}:ok(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;$m(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&bc(()=>{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]=ak()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const $d=nn.WebSocket||nn.MozWebSocket;class Y3 extends Q3{createSocket(t,n,r){return ck?new $d(t,n,r):n?new $d(t,n):new $d(t)}doWrite(t,n){this.ws.send(n)}}class X3 extends Bm{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=O3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=R3();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&&bc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Z3={websocket:Y3,webtransport:X3,polling:G3},J3=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Op(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=J3.exec(e||""),s={},o=14;for(;o--;)s[eD[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=tD(s,s.path),s.queryKey=nD(s,s.query),s}function tD(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 nD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Dp=typeof addEventListener=="function"&&typeof removeEventListener=="function",tu=[];Dp&&addEventListener("offline",()=>{tu.forEach(e=>e())},!1);class Xr extends Ie{constructor(t,n){if(super(),this.binaryType=F3,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=Op(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=Op(n.host).host);Sc(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=B3(this.opts.query)),Dp&&(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"})},tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=sk,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&&Xr.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",Xr.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+=I3(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,bc(()=>{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(Xr.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(),Dp&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=tu.indexOf(this._offlineEventListener);r!==-1&&tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=sk;class rD extends Xr{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;Xr.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;Xr.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 iD=class extends rD{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=>Z3[i]).filter(i=>!!i)),super(t,r)}};function sD(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=Op(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 oD=typeof ArrayBuffer=="function",aD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,dk=Object.prototype.toString,lD=typeof Blob=="function"||typeof Blob<"u"&&dk.call(Blob)==="[object BlobConstructor]",uD=typeof File=="function"||typeof File<"u"&&dk.call(File)==="[object FileConstructor]";function Vm(e){return oD&&(e instanceof ArrayBuffer||aD(e))||lD&&e instanceof Blob||uD&&e instanceof File}function nu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(nu(e[n]))return!0;return!1}if(Vm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return nu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&nu(e[n]))return!0;return!1}function cD(e){const t=[],n=e.data,r=e;return r.data=Fp(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fp(e,t){if(!e)return e;if(Vm(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]=Fp(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]=Fp(e[r],t));return n}return e}function dD(e,t){return e.data=Np(e.data,t),delete e.attachments,e}function Np(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]=Np(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Np(e[n],t));return e}const fD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],pD=5;var le;(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"})(le||(le={}));class hD{constructor(t){this.replacer=t}encode(t){return(t.type===le.EVENT||t.type===le.ACK)&&nu(t)?this.encodeAsBinary({type:t.type===le.EVENT?le.BINARY_EVENT:le.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===le.BINARY_EVENT||t.type===le.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=cD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function xy(e){return Object.prototype.toString.call(e)==="[object Object]"}class Um extends Ie{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===le.BINARY_EVENT;r||n.type===le.BINARY_ACK?(n.type=r?le.EVENT:le.ACK,this.reconstructor=new mD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Vm(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(le[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===le.BINARY_EVENT||r.type===le.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(Um.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 le.CONNECT:return xy(n);case le.DISCONNECT:return n===void 0;case le.CONNECT_ERROR:return typeof n=="string"||xy(n);case le.EVENT:case le.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&fD.indexOf(n[0])===-1);case le.ACK:case le.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class mD{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=dD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Um,Encoder:hD,get PacketType(){return le},protocol:pD},Symbol.toStringTag,{value:"Module"}));function wn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const vD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class fk extends Ie{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=[wn(t,"open",this.onopen.bind(this)),wn(t,"packet",this.onpacket.bind(this)),wn(t,"error",this.onerror.bind(this)),wn(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(vD.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:le.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:le.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 le.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 le.EVENT:case le.BINARY_EVENT:this.onevent(t);break;case le.ACK:case le.BINARY_ACK:this.onack(t);break;case le.DISCONNECT:this.ondisconnect();break;case le.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:le.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:le.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 bo(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}bo.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};bo.prototype.reset=function(){this.attempts=0};bo.prototype.setMin=function(e){this.ms=e};bo.prototype.setMax=function(e){this.max=e};bo.prototype.setJitter=function(e){this.jitter=e};class Mp extends Ie{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,Sc(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 bo({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||gD;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 iD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=wn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=wn(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(wn(t,"ping",this.onping.bind(this)),wn(t,"data",this.ondata.bind(this)),wn(t,"error",this.onerror.bind(this)),wn(t,"close",this.onclose.bind(this)),wn(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){bc(()=>{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 fk(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 No={};function ru(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=sD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=No[i]&&s in No[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Mp(r,t):(No[i]||(No[i]=new Mp(r,t)),l=No[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(ru,{Manager:Mp,Socket:fk,io:ru,connect:ru});const iu=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},pk=v.createContext(null),rs=()=>v.useContext(pk),yD=({children:e})=>{const[t,n]=v.useState(null),[r,i]=v.useState(!1),s=()=>{const c=ru(C2,{transports:["websocket"],auth:{customer_token:Ql(an.CustomerToken)||iu("customer_token"),device_id:Ql(an.DeviceId)||iu("device_id"),customer_refresh_token:Ql(an.CustomerRefreshToken)||iu("customer_refresh_token")}});c.on("error",f=>{console.error("Websocket error",f)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,f)=>{t&&t.on(c,f)},u=(c,f)=>{t&&t.off(c,f)},d=(c,f,p)=>{t&&t.emit(c,f,p)};return x.jsx(pk.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:d},children:e})};var Kn=(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))(Kn||{}),rt=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e))(rt||{});const Hm=e=>{const t=gb(),n=(r,i)=>{var o;const s=((o=U$.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}},xD=e=>({accessToken:localStorage.getItem(`${e}:${an.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${an.CustomerRefreshToken}`)||""}),kc=()=>{const{widget:e}=Wt();return e?xD(e.link_id):null},Na=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 wD(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const bD=()=>tm({mutationFn:e=>vo(`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})})}),SD=e=>vo(`clients/${e}/chats`),Lp=(e,t)=>vo(`clients/${e}/chats`,{method:"DELETE",headers:t}),kD=(e,t,n)=>vo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":Ql(an.DeviceId)||""}}),ED=()=>{const e=kc();return tm({mutationFn:t=>kD(t.rating,t.comment,Na(e))})},TD=e=>{const t=kc();return tm({mutationFn:n=>vo(`clients/${e}/chats/files`,{method:"POST",headers:Na(t),body:A2({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function CD(e){return e&&typeof e=="object"&&"file_urls"in e}const Wm=(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])},So=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function Ip({text:e}){var o,a,l,u;const{widget:t,isHaveChat:n}=Wt(),r=hr(),[i,s]=v.useState(!0);return i?x.jsxs(Te.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:fe("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(Y.TooltipBackground),color:r.getColor(Y.TooltipText)},children:[x.jsx("button",{onClick:()=>s(!1),className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":"Kapat",children:x.jsx(ve.X,{className:"size-3"})}),x.jsx(Te.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:r.getColor(Y.TooltipText)},children:e||(n?(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message_active:(u=(l=t==null?void 0:t.appearance)==null?void 0:l.design)==null?void 0:u.tooltip_message)||"Bizimle sohbet edin!"}),x.jsx("div",{className:fe("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]}):null}const _D="/notify.mp3",PD=async e=>{await new Audio(e||_D).play()};function wy({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=rs(),{isHaveChat:i,open:s,soundPath:o}=Wt(),[a,l]=v.useState(!0),[u,d]=v.useState(0),[c,f]=v.useState(null),p=()=>{PD(o)},h=(m,b)=>{if(c&&clearInterval(c),m||!i||b===0||Number.isNaN(b)){window.document.title=n,f(null);return}const g=setInterval(()=>{if(m||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(g),f(null);return}const y=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==y?window.document.title=y:window.document.title=n},1e3);return f(g),()=>{clearInterval(g),f(null)}};return v.useEffect(()=>h(s&&a,u),[u,s,a]),v.useEffect(()=>{const m=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",m,!1),()=>{document.removeEventListener("visibilitychange",m)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const m=()=>{!i||s&&a||(d(b=>b+1),p())};return r.on(rt.MessageAgentCreate,m),r.on(rt.ChatUserAssignee,p),()=>{r.off(rt.MessageAgentCreate,m),r.off(rt.ChatUserAssignee,p)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:x.jsx(Ip,{text:"Yeni mesajlar var!"})}function jD({children:e,defaultOpen:t,border:n}){var M,H,Z,te;const r=rs(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=Wt(),[u]=v.useState(!0),d=Hm(),c=kc(),f=Ya(),p=hr(),h=So(),[m,b]=v.useState({x:0,y:0}),g=x3(),y=v.useRef(null),w=v.useRef(null),[T,E]=v.useState(!1);v.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),v.useEffect(()=>{a&&f.pathname==="/"&&d.push("chat")},[a]);const _=ne=>{if(!y.current||!w.current)return ne;const W=y.current.getBoundingClientRect(),J={width:window.innerWidth,height:window.innerHeight},O={top:20,right:20,bottom:40,left:20};let L=ne.x,V=ne.y;return W.right+L-m.x>J.width-O.right&&(L=J.width-O.right-W.width-(W.left-m.x)),W.left+L-m.x<O.left&&(L=O.left-(W.left-m.x)),W.bottom+V-m.y>J.height-O.bottom&&(V=J.height-O.bottom-W.height-(W.top-m.y)),W.top+V-m.y<O.top&&(V=O.top-(W.top-m.y)),{x:L,y:V}},C=()=>{s(!0),r&&r.emit(Kn.WidgetOpen,{})},j=()=>{s(!1),r&&r.emit(Kn.WidgetClose,{})},k=()=>{s(!1),o(!1),Lp(l.client_id,Na(c)),d.push("registration")};v.useEffect(()=>{if(t&&!h&&s(!0),!(!r||!l))return r.on(rt.Banned,k),()=>{r.off(rt.Banned,k)}},[]),v.useEffect(()=>(h&&i?document.body.style.setProperty("overflow","hidden","important"):document.body.style.setProperty("overflow","auto","important"),()=>{document.body.style.setProperty("overflow","auto","important")}),[h,i]);function R(ne){T&&g.start(ne)}return x.jsx("section",{className:"relative w-full h-full",ref:w,children:x.jsxs(Yr,{children:[i&&x.jsx(Te.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"100%":((H=(M=l==null?void 0:l.appearance)==null?void 0:M.design)==null?void 0:H.width)||"21rem",height:h?"var(--app-height, 100dvh)":((te=(Z=l==null?void 0:l.appearance)==null?void 0:Z.design)==null?void 0:te.height)||"30rem",left:h?"0":"",right:h?"0px !important":"",maxHeight:h?"var(--app-height, 100dvh)":"",borderColor:p.getColor(Y.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:fe("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"!bottom-0 !right-0":h}),children:e}),!T&&x.jsx("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:x.jsxs(Yr,{children:[x.jsx(wy,{fallback:x.jsx(Ip,{}),fallbackOpen:u}),!i&&x.jsxs(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[x.jsx(Te.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:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:p.getColor(Y.ButtonBackground)}}),x.jsx(ve.Chat,{className:"size-7"})]}),i&&!h&&x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:j,children:x.jsx(ve.X,{className:"size-7"})})]})}),T&&x.jsx(Te.div,{ref:y,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:m.x,y:m.y},drag:T,dragControls:g,dragMomentum:!1,dragElastic:0,onDragEnd:(ne,W)=>{const J={x:m.x+W.offset.x,y:m.y+W.offset.y},O=_(J);b(O)},children:x.jsxs(Yr,{children:[x.jsx(wy,{fallback:x.jsx(Ip,{}),fallbackOpen:u}),!i&&x.jsx("div",{className:"cursor-move",onPointerDown:R,children:x.jsxs(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[x.jsx(Te.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:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:p.getColor(Y.ButtonBackground)}}),x.jsx(ve.Chat,{className:"size-7"})]})}),i&&!h&&x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:j,children:x.jsx(ve.X,{className:"size-7"})})]})})]})})}function hk(e){const{widget:t}=Wt();return x.jsx(E3,{widget:t,children:x.jsx(jD,{...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 AD=/[^.^\]^[]+|(?=\[\]|\.\.)/g,mk=/^\d+$/,RD=/^\d/,OD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,DD=/^\s*(['"]?)(.*?)(\1)\s*$/,qm=512,by=new is(qm),Sy=new is(qm),ky=new is(qm),zi={Cache:is,split:$p,normalizePath:zd,setter:function(e){var t=zd(e);return Sy.get(e)||Sy.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=zd(e);return ky.get(e)||ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(Km(n)||mk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){FD(Array.isArray(e)?e:$p(e),t,n)}};function zd(e){return by.get(e)||by.set(e,$p(e).map(function(t){return t.replace(DD,"$2")}))}function $p(e){return e.match(AD)||[""]}function FD(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=Km(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Km(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function ND(e){return e.match(RD)&&!e.match(mk)}function MD(e){return OD.test(e)}function LD(e){return!Km(e)&&(ND(e)||MD(e))}const ID=/[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,Ec=e=>e.match(ID)||[],Tc=e=>e[0].toUpperCase()+e.slice(1),Gm=(e,t)=>Ec(e).join(t).toLowerCase(),gk=e=>Ec(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),$D=e=>Tc(gk(e)),zD=e=>Gm(e,"_"),BD=e=>Gm(e,"-"),VD=e=>Tc(Gm(e," ")),UD=e=>Ec(e).map(Tc).join(" ");var Bd={words:Ec,upperFirst:Tc,camelCase:gk,pascalCase:$D,snakeCase:zD,kebabCase:BD,sentenceCase:VD,titleCase:UD},Qm={exports:{}};Qm.exports=function(e){return vk(HD(e),e)};Qm.exports.array=vk;function vk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=WD(t),a=qD(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 h=p[--d];l(h,a.get(h),c)}while(d);c.delete(u)}r[--n]=u}}}function HD(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 WD(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 qD(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var KD=Qm.exports;const GD=Yi(KD),QD=Object.prototype.toString,YD=Error.prototype.toString,XD=RegExp.prototype.toString,ZD=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",JD=/^Symbol\((.*)\)(.*)$/;function eF(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Ey(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return eF(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return ZD.call(e).replace(JD,"Symbol($1)");const r=QD.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+YD.call(e)+"]":r==="RegExp"?XD.call(e):null}function Zr(e,t){let n=Ey(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Ey(this[r],t);return s!==null?s:i},2)}function yk(e){return e==null?[]:[].concat(e)}let xk,wk,bk,tF=/\$\{\s*(\w+)\s*\}/g;xk=Symbol.toStringTag;class Ty{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[xk]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],yk(t).forEach(s=>{if(_t.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]}}wk=Symbol.hasInstance;bk=Symbol.toStringTag;class _t 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(tF,(i,s)=>Zr(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 Ty(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[bk]="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,_t)}static[wk](t){return Ty[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Dn={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 \`${Zr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Zr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Zr(n,!0)}\``+i}},St={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"},nF={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"},zp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},rF={isValue:"${path} field must be ${value}"},su={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},iF={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"},sF={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: \`${Zr(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: \`${Zr(n,!0)}\``}return _t.formatError(Dn.notType,e)}};Object.assign(Object.create(null),{mixed:Dn,string:St,number:nF,date:zp,object:su,array:iF,boolean:rF,tuple:sF});const Ym=e=>e&&e.__isYupSchema__;class Uu{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 Uu(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(!Ym(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Rl={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]===Rl.context,this.isValue=this.key[0]===Rl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Rl.context:this.isValue?Rl.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 Pi=e=>e==null;function ms(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:h,context:m,abortEarly:b=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function y(M){return ss.isRef(M)?M.getValue(n,h,m):M}function w(M={}){const H=Object.assign({value:n,originalValue:s,label:o.spec.label,path:M.path||r,spec:o.spec,disableStackTrace:M.disableStackTrace||g},c,M.params);for(const te of Object.keys(H))H[te]=y(H[te]);const Z=new _t(_t.formatError(M.message||f,H),n,H.path,M.type||u,H.disableStackTrace);return Z.params=H,Z}const T=b?a:l;let E={path:r,parent:h,type:u,from:i.from,createError:w,resolve:y,options:i,originalValue:s,schema:o};const _=M=>{_t.isError(M)?T(M):M?l(null):T(w())},C=M=>{_t.isError(M)?T(M):a(M)};if(p&&Pi(n))return _(!0);let k;try{var R;if(k=d.call(E,n,E),typeof((R=k)==null?void 0:R.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(_,C)}}catch(M){C(M);return}_(k)}return t.OPTIONS=e,t}function oF(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 Hu 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 Hu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Fs(e,t=new Map){if(Ym(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]=Fs(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,Fs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Fs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Fs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Gn{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 Hu,this._blacklist=new Hu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Dn.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=Fs(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&&Pi(s))return s;let o=Zr(t),a=Zr(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
95
+ `),()=>{document.head.removeChild(p)}},[t]),x.jsx(VP,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const HP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=mc(WP),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=x.jsx(UP,{isPresent:n,anchorX:a,children:e})),x.jsx(gc.Provider,{value:c,children:e})};function WP(){return new Map}function _b(e=!0){const t=v.useContext(gc);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 Tl=e=>e.key||"";function Yv(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Yr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=_b(o),d=v.useMemo(()=>Yv(e),[e]),c=o&&!l?[]:d.map(Tl),f=v.useRef(!0),p=v.useRef(d),h=mc(()=>new Map),[m,b]=v.useState(d),[g,y]=v.useState(d);Cb(()=>{f.current=!1,p.current=d;for(let E=0;E<g.length;E++){const _=Tl(g[E]);c.includes(_)?h.delete(_):h.get(_)!==!0&&h.set(_,!1)}},[g,c.length,c.join("-")]);const w=[];if(d!==m){let E=[...d];for(let _=0;_<g.length;_++){const C=g[_],j=Tl(C);c.includes(j)||(E.splice(_,0,C),w.push(C))}return s==="wait"&&w.length&&(E=w),y(Yv(E)),b(d),null}const{forceRender:T}=v.useContext(sm);return x.jsx(x.Fragment,{children:g.map(E=>{const _=Tl(E),C=o&&!l?!1:d===g||c.includes(_),j=()=>{if(h.has(_))h.set(_,!0);else return;let k=!0;h.forEach(R=>{R||(k=!1)}),k&&(T==null||T(),y(p.current),o&&(u==null||u()),r&&r())};return x.jsx(HP,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:C?void 0:j,anchorX:a,children:E},_)})})};function lm(e,t){e.indexOf(t)===-1&&e.push(t)}function um(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let dp=()=>{};const fp={skipAnimations:!1,useManualTiming:!1};function cm(e){let t;return()=>(t===void 0&&(t=e()),t)}const an=e=>e,Ca=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class dm{constructor(){this.subscriptions=[]}add(t){return lm(this.subscriptions,t),()=>um(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 zn=e=>e*1e3,Bn=e=>e/1e3;function Pb(e,t){return t?e*(1e3/t):0}const qP=cm(()=>window.ScrollTimeline!==void 0);class KP{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(qP()&&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 GP extends KP{then(t,n){return this.finished.finally(t).then(()=>{})}}const Xv={value:null,addProjectionMetrics:null},fm=e=>Array.isArray(e)&&typeof e[0]=="number",QP={};function YP(e,t){const n=cm(e);return()=>QP[t]??n()}const _a=YP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jb=(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)})`},Vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,pp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vo([0,.65,.55,1]),circOut:Vo([.55,0,1,.45]),backIn:Vo([.31,.01,.66,-.59]),backOut:Vo([.33,1.53,.69,.99])};function Ab(e,t){if(e)return typeof e=="function"&&_a()?jb(e,t):fm(e)?Vo(e):Array.isArray(e)?e.map(n=>Ab(n,t)||pp.easeOut):pp[e]}function XP(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=Ab(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 pm(e){return typeof e=="function"&&"applyToOptions"in e}function hm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Mu=2e4;function mm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mu;)t+=n,r=e.next(t);return t>=Mu?1/0:t}function ZP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(mm(r),Mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Bn(i)}}function Rb(e){return!!(typeof e=="function"&&_a()||!e||typeof e=="string"&&(e in pp||_a())||fm(e)||Array.isArray(e)&&e.every(Rb))}function Zv(e,t){e.timeline=t,e.onfinish=null}const Cl=["read","resolveKeyframes","update","preRender","render","postRender"];function JP(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 m=p&&i?n:r;return f&&o.add(c),m.has(c)||m.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&&Xv.value&&Xv.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const ej=40;function Ob(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Cl.reduce((g,y)=>(g[y]=JP(s,t?y:void 0),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,ej),1),i.timestamp=g,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))},h=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Cl.reduce((g,y)=>{const w=o[y];return g[y]=(T,E=!1,_=!1)=>(n||h(),w.schedule(T,E,_)),g},{}),cancel:g=>{for(let y=0;y<Cl.length;y++)o[Cl[y]].cancel(g)},state:i,steps:o}}const{schedule:gm,cancel:X$}=Ob(queueMicrotask,!1),{schedule:we,cancel:ni,state:nt,steps:kd}=Ob(typeof requestAnimationFrame<"u"?requestAnimationFrame:an,!0);let Yl;function tj(){Yl=void 0}const Vn={now:()=>(Yl===void 0&&Vn.set(nt.isProcessing||fp.useManualTiming?nt.timestamp:performance.now()),Yl),set:e=>{Yl=e,queueMicrotask(tj)}},mn={x:!1,y:!1};function Db(){return mn.x||mn.y}function nj(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function rj(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 Fb(e,t){const n=rj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Jv(e){return!(e.pointerType==="touch"||Db())}function ij(e,t,n={}){const[r,i,s]=Fb(e,n),o=a=>{if(!Jv(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{Jv(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Nb=(e,t)=>t?e===t?!0:Nb(e,t.parentElement):!1,vm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,sj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function oj(e){return sj.has(e.tagName)||e.tabIndex!==-1}const Uo=new WeakSet;function e0(e){return t=>{t.key==="Enter"&&e(t)}}function Ed(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const aj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=e0(()=>{if(Uo.has(n))return;Ed(n,"down");const i=e0(()=>{Ed(n,"up")}),s=()=>Ed(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 t0(e){return vm(e)&&!Db()}function lj(e,t,n={}){const[r,i,s]=Fb(e,n),o=a=>{const l=a.currentTarget;if(!t0(a)||Uo.has(l))return;Uo.add(l);const u=t(l,a),d=(p,h)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!t0(p)||!Uo.has(l))&&(Uo.delete(l),typeof u=="function"&&u(p,{success:h}))},c=p=>{d(p,l===window||l===document||n.useGlobalTarget||Nb(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=>aj(u,i)),!oj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const n0=30,uj=e=>!isNaN(parseFloat(e));class cj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Vn.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=Vn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uj(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 dm);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.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=Vn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>n0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,n0);return Pb(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 Pa(e,t){return new cj(e,t)}const Mb=v.createContext({strict:!1}),r0={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"]},uo={};for(const e in r0)uo[e]={isEnabled:t=>r0[e].some(n=>!!t[n])};function dj(e){for(const t in e)uo[t]={...uo[t],...e[t]}}const fj=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 Lu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fj.has(e)}let Lb=e=>!Lu(e);function pj(e){e&&(Lb=t=>t.startsWith("on")?!Lu(t):e(t))}try{pj(require("@emotion/is-prop-valid").default)}catch{}function hj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Lb(i)||n===!0&&Lu(i)||!t&&!Lu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function mj(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 vc=v.createContext({});function yc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ja(e){return typeof e=="string"||Array.isArray(e)}const ym=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xm=["initial",...ym];function xc(e){return yc(e.animate)||xm.some(t=>ja(e[t]))}function Ib(e){return!!(xc(e)||e.variants)}function gj(e,t){if(xc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ja(n)?n:void 0,animate:ja(r)?r:void 0}}return e.inherit!==!1?t:{}}function vj(e){const{initial:t,animate:n}=gj(e,v.useContext(vc));return v.useMemo(()=>({initial:t,animate:n}),[i0(t),i0(n)])}function i0(e){return Array.isArray(e)?e.join(" "):e}const yj=Symbol.for("motionComponentSymbol");function js(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xj(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):js(n)&&(n.current=r))},[t])}const wm=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wj="framerAppearId",$b="data-"+wm(wj),zb=v.createContext({});function bj(e,t,n,r,i){var m,b;const{visualElement:s}=v.useContext(vc),o=v.useContext(Mb),a=v.useContext(gc),l=v.useContext(am).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(zb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Sj(u.current,n,i,c);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[$b],h=v.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Cb(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),gm.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,p)}),h.current=!1))}),d}function Sj(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:Bb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&js(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function Bb(e){if(e)return e.options.allowProjection!==!1?e.projection:Bb(e.parent)}function kj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&dj(e);function s(a,l){let u;const d={...v.useContext(am),...a,layoutId:Ej(a)},{isStatic:c}=d,f=vj(a),p=r(a,c);if(!c&&om){Tj();const h=Cj(d);u=h.MeasureLayout,f.visualElement=bj(i,p,d,t,h.ProjectionNode)}return x.jsxs(vc.Provider,{value:f,children:[u&&f.visualElement?x.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,xj(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[yj]=i,o}function Ej({layoutId:e}){const t=v.useContext(sm).id;return t&&e!==void 0?t+"-"+e:e}function Tj(e,t){v.useContext(Mb).strict}function Cj(e){const{drag:t,layout:n}=uo;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 Vb=e=>t=>typeof t=="string"&&t.startsWith(e),bm=Vb("--"),_j=Vb("var(--"),Sm=e=>_j(e)?Pj.test(e.split("/*")[0].trim()):!1,Pj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Aa={};function jj(e){for(const t in e)Aa[t]=e[t],bm(t)&&(Aa[t].isCSSVariable=!0)}const xo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ns=new Set(xo);function Ub(e,{layout:t,layoutId:n}){return ns.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Aa[e]||e==="opacity")}const ft=e=>!!(e&&e.getVelocity),Hb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fr=(e,t,n)=>n>t?t:n<e?e:n,wo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ra={...wo,transform:e=>fr(0,1,e)},_l={...wo,default:1},Xa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sr=Xa("deg"),Un=Xa("%"),Q=Xa("px"),Aj=Xa("vh"),Rj=Xa("vw"),s0={...Un,parse:e=>Un.parse(e)/100,transform:e=>Un.transform(e*100)},Oj={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,radius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,backgroundPositionX:Q,backgroundPositionY:Q},Dj={rotate:Sr,rotateX:Sr,rotateY:Sr,rotateZ:Sr,scale:_l,scaleX:_l,scaleY:_l,scaleZ:_l,skew:Sr,skewX:Sr,skewY:Sr,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Ra,originX:s0,originY:s0,originZ:Q},o0={...wo,transform:Math.round},km={...Oj,...Dj,zIndex:o0,size:Q,fillOpacity:Ra,strokeOpacity:Ra,numOctaves:o0},Fj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nj=xo.length;function Mj(e,t,n){let r="",i=!0;for(let s=0;s<Nj;s++){const o=xo[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=Hb(a,km[o]);if(!l){i=!1;const d=Fj[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Em(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(ns.has(l)){o=!0;continue}else if(bm(l)){i[l]=u;continue}else{const d=Hb(u,km[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Mj(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 Tm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wb(e,t,n){for(const r in t)!ft(t[r])&&!Ub(r,n)&&(e[r]=t[r])}function Lj({transformTemplate:e},t){return v.useMemo(()=>{const n=Tm();return Em(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ij(e,t){const n=e.style||{},r={};return Wb(r,n,e),Object.assign(r,Lj(e,t)),r}function $j(e,t){const n={},r=Ij(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 zj=["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 Cm(e){return typeof e!="string"||e.includes("-")?!1:!!(zj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Bj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vj={offset:"strokeDashoffset",array:"strokeDasharray"};function Uj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Bj:Vj;e[s.offset]=Q.transform(-r);const o=Q.transform(t),a=Q.transform(n);e[s.array]=`${o} ${a}`}function a0(e,t,n){return typeof e=="string"?e:Q.transform(t+n*e)}function Hj(e,t,n){const r=a0(t,e.x,e.width),i=a0(n,e.y,e.height);return`${r} ${i}`}function _m(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Em(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:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=Hj(h,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&&Uj(f,o,a,l,!1)}const qb=()=>({...Tm(),attrs:{}}),Pm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Wj(e,t,n,r){const i=v.useMemo(()=>{const s=qb();return _m(s,t,Pm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Wb(s,e.style,e),i.style={...s,...i.style}}return i}function qj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Cm(n)?Wj:$j)(r,s,o,n),u=hj(r,typeof n=="string",e),d=n!==v.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=v.useMemo(()=>ft(c)?c.get():c,[c]);return v.createElement(n,{...d,children:f})}}function l0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function jm(e,t,n,r){if(typeof t=="function"){const[i,s]=l0(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]=l0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const hp=e=>Array.isArray(e),Kj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Gj=e=>hp(e)?e[e.length-1]||0:e;function Xl(e){const t=ft(e)?e.get():e;return Kj(t)?t.toValue():t}function Qj({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:Yj(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Kb=e=>(t,n)=>{const r=v.useContext(vc),i=v.useContext(gc),s=()=>Qj(e,t,r,i);return n?s():mc(s)};function Yj(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=Xl(s[f]);let{initial:o,animate:a}=e;const l=xc(e),u=Ib(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"&&!yc(c)){const f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){const h=jm(e,f[p]);if(h){const{transitionEnd:m,transition:b,...g}=h;for(const y in g){let w=g[y];if(Array.isArray(w)){const T=d?w.length-1:0;w=w[T]}w!==null&&(i[y]=w)}for(const y in m)i[y]=m[y]}}}return i}function Am(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ft(r[o])||t.style&&ft(t.style[o])||Ub(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Xj={useVisualState:Kb({scrapeMotionValuesFromProps:Am,createRenderState:Tm})};function Gb(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 Qb(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 Yb=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 Xb(e,t,n,r){Qb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Yb.has(i)?i:wm(i),t.attrs[i])}function Zb(e,t,n){const r=Am(e,t,n);for(const i in e)if(ft(e[i])||ft(t[i])){const s=xo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const u0=["x","y","width","height","cx","cy","r"],Zj={useVisualState:Kb({scrapeMotionValuesFromProps:Zb,createRenderState:qb,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(ns.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<u0.length;a++){const l=u0[a];e[l]!==t[l]&&(o=!0)}o&&we.read(()=>{Gb(n,r),we.render(()=>{_m(r,i,Pm(n.tagName),e.transformTemplate),Xb(n,r)})})}})};function Jj(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Cm(r)?Zj:Xj,preloadedFeatures:e,useRender:qj(i),createVisualElement:t,Component:r};return kj(o)}}function Oa(e,t,n){const r=e.getProps();return jm(r,t,n!==void 0?n:r.custom,e)}const Jb=new Set(["width","height","top","left","right","bottom",...xo]);function eA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pa(n))}function tA(e,t){const n=Oa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=Gj(s[o]);eA(e,o,a)}}function nA(e){return!!(ft(e)&&e.add)}function mp(e,t){const n=e.getValue("willChange");if(nA(n))return n.add(t);if(!n&&fp.WillChange){const r=new fp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function eS(e){return e.props[$b]}const tS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rA=1e-7,iA=12;function sA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=tS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>rA&&++a<iA);return o}function Za(e,t,n,r){if(e===t&&n===r)return an;const i=s=>sA(s,0,1,e,n);return s=>s===0||s===1?s:tS(i(s),t,r)}const nS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rS=e=>t=>1-e(1-t),iS=Za(.33,1.53,.69,.99),Rm=rS(iS),sS=nS(Rm),oS=e=>(e*=2)<1?.5*Rm(e):.5*(2-Math.pow(2,-10*(e-1))),Om=e=>1-Math.sin(Math.acos(e)),aS=rS(Om),lS=nS(Om),uS=e=>/^0[^.\s]+$/u.test(e);function oA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||uS(e):!0}const ea=e=>Math.round(e*1e5)/1e5,Dm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aA(e){return e==null}const lA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fm=(e,t)=>n=>!!(typeof n=="string"&&lA.test(n)&&n.startsWith(e)||t&&!aA(n)&&Object.prototype.hasOwnProperty.call(n,t)),cS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Dm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},uA=e=>fr(0,255,e),Td={...wo,transform:e=>Math.round(uA(e))},Ci={test:Fm("rgb","red"),parse:cS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Td.transform(e)+", "+Td.transform(t)+", "+Td.transform(n)+", "+ea(Ra.transform(r))+")"};function cA(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 gp={test:Fm("#"),parse:cA,transform:Ci.transform},As={test:Fm("hsl","hue"),parse:cS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Un.transform(ea(t))+", "+Un.transform(ea(n))+", "+ea(Ra.transform(r))+")"},ct={test:e=>Ci.test(e)||gp.test(e)||As.test(e),parse:e=>Ci.test(e)?Ci.parse(e):As.test(e)?As.parse(e):gp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ci.transform(e):As.transform(e)},dA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Dm))==null?void 0:t.length)||0)+(((n=e.match(dA))==null?void 0:n.length)||0)>0}const dS="number",fS="color",pA="var",hA="var(",c0="${}",mA=/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 Da(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(mA,l=>(ct.test(l)?(r.color.push(s),i.push(fS),n.push(ct.parse(l))):l.startsWith(hA)?(r.var.push(s),i.push(pA),n.push(l)):(r.number.push(s),i.push(dS),n.push(parseFloat(l))),++s,c0)).split(c0);return{values:n,split:a,indexes:r,types:i}}function pS(e){return Da(e).values}function hS(e){const{split:t,types:n}=Da(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===dS?s+=ea(i[o]):a===fS?s+=ct.transform(i[o]):s+=i[o]}return s}}const gA=e=>typeof e=="number"?0:e;function vA(e){const t=pS(e);return hS(e)(t.map(gA))}const ri={test:fA,parse:pS,createTransformer:hS,getAnimatableNone:vA},yA=new Set(["brightness","contrast","saturate","opacity"]);function xA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Dm)||[];if(!r)return e;const i=n.replace(r,"");let s=yA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const wA=/\b([a-z-]*)\(.*?\)/gu,vp={...ri,getAnimatableNone:e=>{const t=e.match(wA);return t?t.map(xA).join(" "):e}},bA={...km,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:vp,WebkitFilter:vp},mS=e=>bA[e];function gS(e,t){let n=mS(e);return n!==vp&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SA=new Set(["auto","none","0"]);function kA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!SA.has(s)&&Da(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=gS(n,i)}const _i=e=>e*180/Math.PI,yp=e=>{const t=_i(Math.atan2(e[1],e[0]));return xp(t)},EA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:yp,rotateZ:yp,skewX:e=>_i(Math.atan(e[1])),skewY:e=>_i(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xp=e=>(e=e%360,e<0&&(e+=360),e),d0=yp,f0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),p0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),TA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:f0,scaleY:p0,scale:e=>(f0(e)+p0(e))/2,rotateX:e=>xp(_i(Math.atan2(e[6],e[5]))),rotateY:e=>xp(_i(Math.atan2(-e[2],e[0]))),rotateZ:d0,rotate:d0,skewX:e=>_i(Math.atan(e[4])),skewY:e=>_i(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function h0(e){return e.includes("scale")?1:0}function wp(e,t){if(!e||e==="none")return h0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=TA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=EA,i=a}if(!i)return h0(t);const s=r[t],o=i[1].split(",").map(_A);return typeof s=="function"?s(o):o[s]}const CA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wp(n,t)};function _A(e){return parseFloat(e.trim())}const m0=e=>e===wo||e===Q,PA=new Set(["x","y","z"]),jA=xo.filter(e=>!PA.has(e));function AA(e){const t=[];return jA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const co={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})=>wp(t,"x"),y:(e,{transform:t})=>wp(t,"y")};co.translateX=co.x;co.translateY=co.y;const $i=new Set;let bp=!1,Sp=!1;function vS(){if(Sp){const e=Array.from($i).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=AA(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)})}Sp=!1,bp=!1,$i.forEach(e=>e.complete()),$i.clear()}function yS(){$i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sp=!0)})}function RA(){yS(),vS()}class Nm{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?($i.add(this),bp||(bp=!0,we.read(yS),we.resolveKeyframes(vS))):(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),$i.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$i.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function DA(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function wS(e,t,n=1){const[r,i]=DA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return xS(o)?parseFloat(o):o}return Sm(i)?wS(i,t,n+1):i}const bS=e=>t=>t.test(e),FA={test:e=>e==="auto",parse:e=>e},SS=[wo,Q,Un,Sr,Rj,Aj,FA],g0=e=>SS.find(bS(e));class kS extends Nm{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(),Sm(u))){const d=wS(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Jb.has(r)||t.length!==2)return;const[i,s]=t,o=g0(i),a=g0(s);if(o!==a)if(m0(o)&&m0(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++)oA(t[i])&&r.push(i);r.length&&kA(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=co[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]=co[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 v0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ri.test(e)||e==="0")&&!e.startsWith("url("));function NA(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 MA(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=v0(i,t),a=v0(s,t);return!o||!a?!1:NA(e)||(n==="spring"||pm(n))&&r}const LA=e=>e!==null;function wc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(LA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const IA=40;class ES{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=Vn.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>IA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&RA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Vn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!MA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(wc(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 Pe=(e,t,n)=>e+(t-e)*n;function Cd(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 $A({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=Cd(l,a,e+1/3),s=Cd(l,a,e),o=Cd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Iu(e,t){return n=>n>0?t:e}const _d=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},zA=[gp,Ci,As],BA=e=>zA.find(t=>t.test(e));function y0(e){const t=BA(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=$A(n)),n}const x0=(e,t)=>{const n=y0(e),r=y0(t);if(!n||!r)return Iu(e,t);const i={...n};return s=>(i.red=_d(n.red,r.red,s),i.green=_d(n.green,r.green,s),i.blue=_d(n.blue,r.blue,s),i.alpha=Pe(n.alpha,r.alpha,s),Ci.transform(i))},VA=(e,t)=>n=>t(e(n)),Ja=(...e)=>e.reduce(VA),kp=new Set(["none","hidden"]);function UA(e,t){return kp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function HA(e,t){return n=>Pe(e,t,n)}function Mm(e){return typeof e=="number"?HA:typeof e=="string"?Sm(e)?Iu:ct.test(e)?x0:KA:Array.isArray(e)?TS:typeof e=="object"?ct.test(e)?x0:WA:Iu}function TS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Mm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function WA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Mm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function qA(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 KA=(e,t)=>{const n=ri.createTransformer(t),r=Da(e),i=Da(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?kp.has(e)&&!i.values.length||kp.has(t)&&!r.values.length?UA(e,t):Ja(TS(qA(r,i),i.values),n):Iu(e,t)};function CS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pe(e,t,n):Mm(e)(e,t)}const GA=5;function _S(e,t,n){const r=Math.max(t-GA,0);return Pb(n-e(r),t-r)}const Oe={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},Pd=.001;function QA({duration:e=Oe.duration,bounce:t=Oe.bounce,velocity:n=Oe.velocity,mass:r=Oe.mass}){let i,s,o=1-t;o=fr(Oe.minDamping,Oe.maxDamping,o),e=fr(Oe.minDuration,Oe.maxDuration,Bn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,p=Ep(u,o),h=Math.exp(-c);return Pd-f/p*h},s=u=>{const c=u*o*e,f=c*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-c),m=Ep(Math.pow(u,2),o);return(-i(u)+Pd>0?-1:1)*((f-p)*h)/m}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Pd+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=XA(i,s,a);if(e=zn(e),isNaN(l))return{stiffness:Oe.stiffness,damping:Oe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const YA=12;function XA(e,t,n){let r=n;for(let i=1;i<YA;i++)r=r-e(r)/t(r);return r}function Ep(e,t){return e*Math.sqrt(1-t*t)}const ZA=["duration","bounce"],JA=["stiffness","damping","mass"];function w0(e,t){return t.some(n=>e[n]!==void 0)}function eR(e){let t={velocity:Oe.velocity,stiffness:Oe.stiffness,damping:Oe.damping,mass:Oe.mass,isResolvedFromDuration:!1,...e};if(!w0(e,JA)&&w0(e,ZA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*fr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Oe.mass,stiffness:i,damping:s}}else{const n=QA(e);t={...t,...n,mass:Oe.mass},t.isResolvedFromDuration=!0}return t}function $u(e=Oe.visualDuration,t=Oe.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}=eR({...n,velocity:-Bn(n.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*d)),b=o-s,g=Bn(Math.sqrt(l/d)),y=Math.abs(b)<5;r||(r=y?Oe.restSpeed.granular:Oe.restSpeed.default),i||(i=y?Oe.restDelta.granular:Oe.restDelta.default);let w;if(m<1){const E=Ep(g,m);w=_=>{const C=Math.exp(-m*g*_);return o-C*((h+m*g*b)/E*Math.sin(E*_)+b*Math.cos(E*_))}}else if(m===1)w=E=>o-Math.exp(-g*E)*(b+(h+g*b)*E);else{const E=g*Math.sqrt(m*m-1);w=_=>{const C=Math.exp(-m*g*_),j=Math.min(E*_,300);return o-C*((h+m*g*b)*Math.sinh(j)+E*b*Math.cosh(j))/E}}const T={calculatedDuration:p&&c||null,next:E=>{const _=w(E);if(p)a.done=E>=c;else{let C=0;m<1&&(C=E===0?zn(h):_S(w,E,_));const j=Math.abs(C)<=r,k=Math.abs(o-_)<=i;a.done=j&&k}return a.value=a.done?o:_,a},toString:()=>{const E=Math.min(mm(T),Mu),_=jb(C=>T.next(E*C).value,E,30);return E+"ms "+_},toTransition:()=>{}};return T}$u.applyToOptions=e=>{const t=ZP(e,100,$u);return e.ease=_a()?t.ease:"easeOut",e.duration=zn(t.duration),e.type="keyframes",e};function b0({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=j=>a!==void 0&&j<a||l!==void 0&&j>l,h=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let m=n*t;const b=c+m,g=o===void 0?b:o(b);g!==b&&(m=g-c);const y=j=>-m*Math.exp(-j/r),w=j=>g+y(j),T=j=>{const k=y(j),R=w(j);f.done=Math.abs(k)<=u,f.value=f.done?g:R};let E,_;const C=j=>{p(f.value)&&(E=j,_=$u({keyframes:[f.value,h(f.value)],velocity:_S(w,j,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:j=>{let k=!1;return!_&&E===void 0&&(k=!0,T(j),C(j)),E!==void 0&&j>=E?_.next(j-E):(!k&&T(j),f)}}}const tR=Za(.42,0,1,1),nR=Za(0,0,.58,1),PS=Za(.42,0,.58,1),rR=e=>Array.isArray(e)&&typeof e[0]!="number",S0={linear:an,easeIn:tR,easeInOut:PS,easeOut:nR,circIn:Om,circInOut:lS,circOut:aS,backIn:Rm,backInOut:sS,backOut:iS,anticipate:oS},k0=e=>{if(fm(e)){dp(e.length===4);const[t,n,r,i]=e;return Za(t,n,r,i)}else if(typeof e=="string")return dp(S0[e]!==void 0),S0[e];return e};function iR(e,t,n){const r=[],i=n||CS,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]||an:t;a=Ja(l,a)}r.push(a)}return r}function sR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(dp(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=iR(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=Ca(e[c],e[c+1],d);return a[c](f)};return n?d=>u(fr(e[0],e[s-1],d)):u}function oR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ca(0,t,r);e.push(Pe(n,1,i))}}function aR(e){const t=[0];return oR(t,e.length-1),t}function lR(e,t){return e.map(n=>n*t)}function uR(e,t){return e.map(()=>t||PS).splice(0,e.length-1)}function zu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=rR(r)?r.map(k0):k0(r),s={done:!1,value:t[0]},o=lR(n&&n.length===t.length?n:aR(t),e),a=sR(o,t,{ease:Array.isArray(i)?i:uR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const cR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>we.update(t,!0),stop:()=>ni(t),now:()=>nt.isProcessing?nt.timestamp:Vn.now()}},dR={decay:b0,inertia:b0,tween:zu,keyframes:zu,spring:$u},fR=e=>e/100;class Lm extends ES{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)||Nm,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=pm(n)?n:dR[n]||zu;let l,u;a!==zu&&typeof t[0]!="number"&&(l=Ja(fR,CS(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=mm(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:j}=this.options;return{done:!0,value:j[j.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:h,repeatDelay:m,onUpdate:b}=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 g=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,T=s;if(p){const j=Math.min(this.currentTime,d)/c;let k=Math.floor(j),R=j%1;!R&&j>=1&&(R=1),R===1&&k--,k=Math.min(k,p+1),!!(k%2)&&(h==="reverse"?(R=1-R,m&&(R-=m/c)):h==="mirror"&&(T=o)),w=fr(0,1,R)*c}const E=y?{done:!1,value:l[0]}:T.next(w);a&&(E.value=a(E.value));let{done:_}=E;!y&&u!==null&&(_=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return C&&i!==void 0&&(E.value=wc(l,this.options,i)),b&&b(E.value),C&&this.finish(),E}get duration(){const{resolved:t}=this;return t?Bn(t.calculatedDuration):0}get time(){return Bn(this.currentTime)}set time(t){t=zn(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=Bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=cR,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 pR=new Set(["opacity","clipPath","filter","transform"]),hR=cm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bu=10,mR=2e4;function gR(e){return pm(e.type)||e.type==="spring"||!Rb(e.ease)}function vR(e,t){const n=new Lm({...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<mR;)r=n.sample(s),i.push(r.value),s+=Bu;return{times:void 0,keyframes:i,duration:s-Bu,ease:"linear"}}const jS={anticipate:oS,backInOut:sS,circInOut:lS};function yR(e){return e in jS}class E0 extends ES{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new kS(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"&&_a()&&yR(s)&&(s=jS[s]),gR(this.options)){const{onComplete:c,onUpdate:f,motionValue:p,element:h,...m}=this.options,b=vR(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=XP(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Zv(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(wc(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 Bn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Bn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=zn(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 an;const{animation:r}=n;Zv(r,t)}return an}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,h=new Lm({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=zn(this.time);u.setWithVelocity(h.sample(m-Bu).value,h.sample(m).value,Bu)}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 hR()&&r&&pR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const xR={type:"spring",stiffness:500,damping:25,restSpeed:10},wR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bR={type:"keyframes",duration:.8},SR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kR=(e,{keyframes:t})=>t.length>2?bR:ns.has(e)?e.startsWith("scale")?wR(t[1]):xR:SR;function ER({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 Im=(e,t,n,r={},i,s)=>o=>{const a=hm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-zn(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};ER(a)||(d={...d,...kR(e,d)}),d.duration&&(d.duration=zn(d.duration)),d.repeatDelay&&(d.repeatDelay=zn(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=wc(d.keyframes,a);if(f!==void 0)return we.update(()=>{d.onUpdate(f),d.onComplete()}),new GP([])}return!s&&E0.supports(d)?new E0(d):new Lm(d)};function TR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function AS(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&&TR(u,d))continue;const p={delay:n,...hm(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const b=eS(e);if(b){const g=window.MotionHandoffAnimation(b,d,we);g!==null&&(p.startTime=g,h=!0)}}mp(e,d),c.start(Im(d,c,f,e.shouldReduceMotion&&Jb.has(d)?{type:!1}:p,e,h));const m=c.animation;m&&l.push(m)}return o&&Promise.all(l).then(()=>{we.update(()=>{o&&tA(e,o)})}),l}function Tp(e,t,n={}){var l;const r=Oa(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(AS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return CR(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 CR(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(_R).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Tp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function _R(e,t){return e.sortNodePosition(t)}function PR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Tp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Tp(e,t,n);else{const i=typeof t=="function"?Oa(e,t,n.custom):t;r=Promise.all(AS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function RS(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 jR=xm.length;function OS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?OS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<jR;n++){const r=xm[n],i=e.props[r];(ja(i)||i===!1)&&(t[r]=i)}return t}const AR=[...ym].reverse(),RR=ym.length;function OR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>PR(e,n,r)))}function DR(e){let t=OR(e),n=T0(),r=!0;const i=l=>(u,d)=>{var f;const c=Oa(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:p,transitionEnd:h,...m}=c;u={...u,...m,...h}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=OS(e.parent)||{},c=[],f=new Set;let p={},h=1/0;for(let b=0;b<RR;b++){const g=AR[b],y=n[g],w=u[g]!==void 0?u[g]:d[g],T=ja(w),E=g===l?y.isActive:null;E===!1&&(h=b);let _=w===d[g]&&w!==u[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),y.protectedKeys={...p},!y.isActive&&E===null||!w&&!y.prevProp||yc(w)||typeof w=="boolean")continue;const C=FR(y.prevProp,w);let j=C||g===l&&y.isActive&&!_&&T||b>h&&T,k=!1;const R=Array.isArray(w)?w:[w];let M=R.reduce(i(g),{});E===!1&&(M={});const{prevResolvedValues:H={}}=y,Z={...H,...M},te=J=>{j=!0,f.has(J)&&(k=!0,f.delete(J)),y.needsAnimating[J]=!0;const O=e.getValue(J);O&&(O.liveStyle=!1)};for(const J in Z){const O=M[J],L=H[J];if(p.hasOwnProperty(J))continue;let V=!1;hp(O)&&hp(L)?V=!RS(O,L):V=O!==L,V?O!=null?te(J):f.add(J):O!==void 0&&f.has(J)?te(J):y.protectedKeys[J]=!0}y.prevProp=w,y.prevResolvedValues=M,y.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(j=!1),j&&(!(_&&C)||k)&&c.push(...R.map(J=>({animation:J,options:{type:g}})))}if(f.size){const b={};if(typeof u.initial!="boolean"){const g=Oa(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(b.transition=g.transition)}f.forEach(g=>{const y=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=y??null}),c.push({animation:b})}let m=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?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=T0(),r=!0}}}function FR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!RS(t,e):!1}function hi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function T0(){return{animate:hi(!0),whileInView:hi(),whileHover:hi(),whileTap:hi(),whileDrag:hi(),whileFocus:hi(),exit:hi()}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}class NR extends li{constructor(t){super(t),t.animationState||(t.animationState=DR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();yc(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 MR=0;class LR extends li{constructor(){super(...arguments),this.id=MR++}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 IR={animation:{Feature:NR},exit:{Feature:LR}};function Fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function el(e){return{point:{x:e.pageX,y:e.pageY}}}const $R=e=>t=>vm(t)&&e(t,el(t));function ta(e,t,n,r){return Fa(e,t,$R(n),r)}function DS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BR(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 FS=1e-4,VR=1-FS,UR=1+FS,NS=.01,HR=0-NS,WR=0+NS;function vt(e){return e.max-e.min}function qR(e,t,n){return Math.abs(e-t)<=n}function C0(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=vt(n)/vt(t),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=VR&&e.scale<=UR||isNaN(e.scale))&&(e.scale=1),(e.translate>=HR&&e.translate<=WR||isNaN(e.translate))&&(e.translate=0)}function na(e,t,n,r){C0(e.x,t.x,n.x,r?r.originX:void 0),C0(e.y,t.y,n.y,r?r.originY:void 0)}function _0(e,t,n){e.min=n.min+t.min,e.max=e.min+vt(t)}function KR(e,t,n){_0(e.x,t.x,n.x),_0(e.y,t.y,n.y)}function P0(e,t,n){e.min=t.min-n.min,e.max=e.min+vt(t)}function ra(e,t,n){P0(e.x,t.x,n.x),P0(e.y,t.y,n.y)}const j0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rs=()=>({x:j0(),y:j0()}),A0=()=>({min:0,max:0}),Ne=()=>({x:A0(),y:A0()});function Xt(e){return[e("x"),e("y")]}function jd(e){return e===void 0||e===1}function Cp({scale:e,scaleX:t,scaleY:n}){return!jd(e)||!jd(t)||!jd(n)}function yi(e){return Cp(e)||MS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function MS(e){return R0(e.x)||R0(e.y)}function R0(e){return e&&e!=="0%"}function Vu(e,t,n){const r=e-n,i=t*r;return n+i}function O0(e,t,n,r,i){return i!==void 0&&(e=Vu(e,i,r)),Vu(e,n,r)+t}function _p(e,t=0,n=1,r,i){e.min=O0(e.min,t,n,r,i),e.max=O0(e.max,t,n,r,i)}function LS(e,{x:t,y:n}){_p(e.x,t.translate,t.scale,t.originPoint),_p(e.y,n.translate,n.scale,n.originPoint)}const D0=.999999999999,F0=1.0000000000001;function GR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,LS(e,o)),r&&yi(s.latestValues)&&Ds(e,s.latestValues))}t.x<F0&&t.x>D0&&(t.x=1),t.y<F0&&t.y>D0&&(t.y=1)}function Os(e,t){e.min=e.min+t,e.max=e.max+t}function N0(e,t,n,r,i=.5){const s=Pe(e.min,e.max,i);_p(e,t,n,s,r)}function Ds(e,t){N0(e.x,t.x,t.scaleX,t.scale,t.originX),N0(e.y,t.y,t.scaleY,t.scale,t.originY)}function IS(e,t){return DS(BR(e.getBoundingClientRect(),t))}function QR(e,t,n){const r=IS(e,n),{scroll:i}=t;return i&&(Os(r.x,i.offset.x),Os(r.y,i.offset.y)),r}const $S=({current:e})=>e?e.ownerDocument.defaultView:null,M0=(e,t)=>Math.abs(e-t);function YR(e,t){const n=M0(e.x,t.x),r=M0(e.y,t.y);return Math.sqrt(n**2+r**2)}class zS{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=Rd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=YR(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=c,{timestamp:m}=nt;this.history.push({...h,timestamp:m});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Ad(f,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Rd(c.type==="pointercancel"?this.lastMoveEventInfo:Ad(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,b),h&&h(c,b)},!vm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=el(t),a=Ad(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=nt;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Rd(a,this.history)),this.removeListeners=Ja(ta(this.contextWindow,"pointermove",this.handlePointerMove),ta(this.contextWindow,"pointerup",this.handlePointerUp),ta(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ni(this.updatePoint)}}function Ad(e,t){return t?{point:t(e.point)}:e}function L0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rd({point:e},t){return{point:e,delta:L0(e,BS(t)),offset:L0(e,XR(t)),velocity:ZR(t,.1)}}function XR(e){return e[0]}function BS(e){return e[e.length-1]}function ZR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=BS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>zn(t)));)n--;if(!r)return{x:0,y:0};const s=Bn(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 JR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function I0(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 eO(e,{top:t,left:n,bottom:r,right:i}){return{x:I0(e.x,n,i),y:I0(e.y,t,r)}}function $0(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 tO(e,t){return{x:$0(e.x,t.x),y:$0(e.y,t.y)}}function nO(e,t){let n=.5;const r=vt(e),i=vt(t);return i>r?n=Ca(t.min,t.max-r,e.min):r>i&&(n=Ca(e.min,e.max-i,t.min)),fr(0,1,n)}function rO(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 Pp=.35;function iO(e=Pp){return e===!1?e=0:e===!0&&(e=Pp),{x:z0(e,"left","right"),y:z0(e,"top","bottom")}}function z0(e,t,n){return{min:B0(e,t),max:B0(e,n)}}function B0(e,t){return typeof e=="number"?e:e[t]||0}const sO=new WeakMap;class oO{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=Ne(),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(el(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nj(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),Xt(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Un.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[b];w&&(g=vt(w)*(parseFloat(g)/100))}}this.originPoint[b]=g}),h&&we.postRender(()=>h(d,c)),mp(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=c;if(p&&this.currentDirection===null){this.currentDirection=aO(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),m&&m(d,c)},a=(d,c)=>this.stop(d,c),l=()=>Xt(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 zS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:$S(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&&we.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||!Pl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=JR(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&&js(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eO(r.layoutBox,t):this.constraints=!1,this.elastic=iO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!js(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=QR(r,i.root,this.visualElement.getTransformPagePoint());let o=tO(i.layout.layoutBox,s);if(n){const a=n(zR(o));this.hasMutatedConstraints=!!a,a&&(o=DS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Xt(d=>{if(!Pl(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,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,h)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return mp(this.visualElement,t),r.start(Im(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(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){Xt(n=>{const{drag:r}=this.getProps();if(!Pl(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]-Pe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!js(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=nO({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(),Xt(o=>{if(!Pl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Pe(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;sO.set(this.visualElement,this);const t=this.visualElement.current,n=ta(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();js(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()),we.read(r);const o=Fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xt(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=Pp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Pl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lO extends li{constructor(t){super(t),this.removeGroupControls=an,this.removeListeners=an,this.controls=new oO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||an}unmount(){this.removeGroupControls(),this.removeListeners()}}const V0=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))};class uO extends li{constructor(){super(...arguments),this.removePointerDownListener=an}onPointerDown(t){this.session=new zS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$S(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:V0(t),onStart:V0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ta(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 Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function U0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const n=U0(e,t.target.x),r=U0(e,t.target.y);return`${n}% ${r}%`}},cO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ri.parse(e);if(i.length>5)return r;const s=ri.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=Pe(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 dO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;jj(fO),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()})),Zl.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()||we.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gm.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 VS(e){const[t,n]=_b(),r=v.useContext(sm);return x.jsx(dO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(zb),isPresent:t,safeToRemove:n})}const fO={borderRadius:{...Fo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fo,borderTopRightRadius:Fo,borderBottomLeftRadius:Fo,borderBottomRightRadius:Fo,boxShadow:cO};function pO(e,t,n){const r=ft(e)?e:Pa(e);return r.start(Im("",r,t,n)),r.animation}function hO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mO=(e,t)=>e.depth-t.depth;class gO{constructor(){this.children=[],this.isDirty=!1}add(t){lm(this.children,t),this.isDirty=!0}remove(t){um(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mO),this.isDirty=!1,this.children.forEach(t)}}function vO(e,t){const n=Vn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ni(r),e(s-t))};return we.read(r,!0),()=>ni(r)}const US=["TopLeft","TopRight","BottomLeft","BottomRight"],yO=US.length,H0=e=>typeof e=="string"?parseFloat(e):e,W0=e=>typeof e=="number"||Q.test(e);function xO(e,t,n,r,i,s){i?(e.opacity=Pe(0,n.opacity??1,wO(r)),e.opacityExit=Pe(t.opacity??1,0,bO(r))):s&&(e.opacity=Pe(t.opacity??1,n.opacity??1,r));for(let o=0;o<yO;o++){const a=`border${US[o]}Radius`;let l=q0(t,a),u=q0(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||W0(l)===W0(u)?(e[a]=Math.max(Pe(H0(l),H0(u),r),0),(Un.test(u)||Un.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function q0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const wO=HS(0,.5,aS),bO=HS(.5,.95,an);function HS(e,t,n){return r=>r<e?0:r>t?1:n(Ca(e,t,r))}function K0(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){K0(e.x,t.x),K0(e.y,t.y)}function G0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Q0(e,t,n,r,i){return e-=t,e=Vu(e,1/n,r),i!==void 0&&(e=Vu(e,1/i,r)),e}function SO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Un.test(t)&&(t=parseFloat(t),t=Pe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Pe(s.min,s.max,r);e===s&&(a-=t),e.min=Q0(e.min,t,n,a,i),e.max=Q0(e.max,t,n,a,i)}function Y0(e,t,[n,r,i],s,o){SO(e,t[n],t[r],t[i],t.scale,s,o)}const kO=["x","scaleX","originX"],EO=["y","scaleY","originY"];function X0(e,t,n,r){Y0(e.x,t,kO,n?n.x:void 0,r?r.x:void 0),Y0(e.y,t,EO,n?n.y:void 0,r?r.y:void 0)}function Z0(e){return e.translate===0&&e.scale===1}function WS(e){return Z0(e.x)&&Z0(e.y)}function J0(e,t){return e.min===t.min&&e.max===t.max}function TO(e,t){return J0(e.x,t.x)&&J0(e.y,t.y)}function ey(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qS(e,t){return ey(e.x,t.x)&&ey(e.y,t.y)}function ty(e){return vt(e.x)/vt(e.y)}function ny(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CO{constructor(){this.members=[]}add(t){lm(this.members,t),t.scheduleRender()}remove(t){if(um(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 _O(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:h}=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) `),h&&(r+=`skewY(${h}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 Od=["","X","Y","Z"],PO={visibility:"hidden"},ry=1e3;let jO=0;function Dd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function KS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=eS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&KS(r)}function GS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=jO++,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(OO),this.nodes.forEach(LO),this.nodes.forEach(IO),this.nodes.forEach(DO)},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 gO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new dm),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=hO(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=vO(f,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEach(sy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||UO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=d.getProps(),y=!this.targetLayout||!qS(this.targetLayout,h),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,w);const T={...hm(m,"layout"),onPlay:b,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||sy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,ni(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&&KS(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(iy);return}this.isUpdating||this.nodes.forEach(NO),this.isUpdating=!1,this.nodes.forEach(MO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.clearAllSnapshots();const a=Vn.now();nt.delta=fr(0,1e3/60,a-nt.timestamp),nt.timestamp=a,nt.isProcessing=!0,kd.update.process(nt),kd.preRender.process(nt),kd.render.process(nt),nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(FO),this.sharedNodes.forEach(zO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(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=Ne(),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&&!WS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||yi(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)),HO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ne();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(WO))){const{scroll:d}=this.root;d&&(Os(a.x,d.offset.x),Os(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ne();if(Qt(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&&Qt(a,o),Os(a.x,c.offset.x),Os(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Ne();Qt(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&&Ds(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yi(d.latestValues)&&Ds(l,d.latestValues)}return yi(this.latestValues)&&Ds(l,this.latestValues),l}removeTransform(o){const a=Ne();Qt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!yi(u.latestValues))continue;Cp(u.latestValues)&&u.updateSnapshot();const d=Ne(),c=u.measurePageBox();Qt(d,c),X0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yi(this.latestValues)&&X0(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!==nt.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=nt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),ra(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),LS(this.target,this.targetDelta)):Qt(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=Ne(),this.relativeTargetOrigin=Ne(),ra(this.relativeTargetOrigin,this.target,p.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Cp(this.parent.latestValues)||MS(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 h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===nt.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;Qt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;GR(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=Ne());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(G0(this.prevProjectionDelta.x,this.projectionDelta.x),G0(this.prevProjectionDelta.y,this.projectionDelta.y)),na(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!ny(this.projectionDelta.x,this.prevProjectionDelta.x)||!ny(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=Rs(),this.projectionDelta=Rs(),this.projectionDeltaWithTransform=Rs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ne(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,b=this.getStack(),g=!b||b.members.length<=1,y=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(VO));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const E=T/1e3;oy(c.x,o.x,E),oy(c.y,o.y,E),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ra(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BO(this.relativeTarget,this.relativeTargetOrigin,f,E),w&&TO(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ne()),Qt(w,this.relativeTarget)),m&&(this.animationValues=d,xO(d,u,this.latestValues,E,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},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&&(ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Zl.hasAnimatedSinceResize=!0,this.currentAnimation=pO(0,ry,{...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(ry),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&&QS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ne();const c=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Qt(a,l),Ds(a,d),na(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CO),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&&Dd("z",o,u,this.animationValues);for(let d=0;d<Od.length;d++)Dd(`rotate${Od[d]}`,o,u,this.animationValues),Dd(`skew${Od[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 PO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Xl(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=Xl(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!yi(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=_O(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 Aa){if(d[p]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:b}=Aa[p],g=a.transform==="none"?d[p]:h(d[p],u);if(m){const y=m.length;for(let w=0;w<y;w++)a[m[w]]=g}else b?this.options.visualElement.renderState.vars[p]=g:a[p]=g}return this.options.layoutId&&(a.pointerEvents=u===this?Xl(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(iy),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function RO(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"?Xt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(f);f.min=r[c].min,f.max=f.min+p}):QS(s,t.layoutBox,r)&&Xt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(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=Rs();na(a,r,t.layoutBox);const l=Rs();o?na(l,e.applyTransform(i,!0),t.measuredBox):na(l,r,t.layoutBox);const u=!WS(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 h=Ne();ra(h,t.layoutBox,f.layoutBox);const m=Ne();ra(m,r,p.layoutBox),qS(h,m)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,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 OO(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 DO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function FO(e){e.clearSnapshot()}function iy(e){e.clearMeasurements()}function NO(e){e.isLayoutDirty=!1}function MO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function sy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LO(e){e.resolveTargetDelta()}function IO(e){e.calcProjection()}function $O(e){e.resetSkewAndRotation()}function zO(e){e.removeLeadSnapshot()}function oy(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ay(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function BO(e,t,n,r){ay(e.x,t.x,n.x,r),ay(e.y,t.y,n.y,r)}function VO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const UO={duration:.45,ease:[.4,0,.1,1]},ly=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),uy=ly("applewebkit/")&&!ly("chrome/")?Math.round:an;function cy(e){e.min=uy(e.min),e.max=uy(e.max)}function HO(e){cy(e.x),cy(e.y)}function QS(e,t,n){return e==="position"||e==="preserve-aspect"&&!qR(ty(t),ty(n),.2)}function WO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const qO=GS({attachResizeListener:(e,t)=>Fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fd={current:void 0},YS=GS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fd.current){const e=new qO({});e.mount(window),e.setOptions({layoutScroll:!0}),Fd.current=e}return Fd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KO={pan:{Feature:uO},drag:{Feature:lO,ProjectionNode:YS,MeasureLayout:VS}};function dy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&we.postRender(()=>s(t,el(t)))}class GO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=ij(t,(n,r)=>(dy(this.node,r,"Start"),i=>dy(this.node,i,"End"))))}unmount(){}}class QO extends li{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=Ja(Fa(this.node.current,"focus",()=>this.onFocus()),Fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&we.postRender(()=>s(t,el(t)))}class YO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=lj(t,(n,r)=>(fy(this.node,r,"Start"),(i,{success:s})=>fy(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jp=new WeakMap,Nd=new WeakMap,XO=e=>{const t=jp.get(e.target);t&&t(e)},ZO=e=>{e.forEach(XO)};function JO({root:e,...t}){const n=e||document;Nd.has(n)||Nd.set(n,{});const r=Nd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ZO,{root:e,...t})),r[i]}function e3(e,t,n){const r=JO(t);return jp.set(e,n),r.observe(e),()=>{jp.delete(e),r.unobserve(e)}}const t3={some:0,all:1};class n3 extends li{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:t3[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 e3(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(r3(t,n))&&this.startObserver()}unmount(){}}function r3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const i3={inView:{Feature:n3},tap:{Feature:YO},focus:{Feature:QO},hover:{Feature:GO}},s3={layout:{ProjectionNode:YS,MeasureLayout:VS}},Ap={current:null},XS={current:!1};function o3(){if(XS.current=!0,!!om)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ap.current=e.matches;e.addListener(t),t()}else Ap.current=!1}const a3=[...SS,ct,ri],l3=e=>a3.find(bS(e)),u3=new WeakMap;function c3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ft(i))e.addValue(r,i);else if(ft(s))e.addValue(r,Pa(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,Pa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const py=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class d3{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=Nm,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=Vn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,we.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=xc(n),this.isVariantNode=Ib(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 h=f[p];l[p]!==void 0&&ft(h)&&h.set(l[p],!1)}}mount(t){this.current=t,u3.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)),XS.current||o3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ap.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ni(this.notifyUpdate),ni(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=ns.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&we.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 uo){const n=uo[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):Ne()}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<py.length;r++){const i=py[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=c3(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=Pa(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"&&(xS(r)||uS(r))?r=parseFloat(r):!l3(r)&&ri.test(n)&&(r=gS(t,n)),this.setBaseTarget(t,ft(r)?r.get():r)),ft(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=jm(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&&!ft(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 dm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ZS extends d3{constructor(){super(...arguments),this.KeyframeResolver=kS}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;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function f3(e){return window.getComputedStyle(e)}class p3 extends ZS{constructor(){super(...arguments),this.type="html",this.renderInstance=Qb}readValueFromInstance(t,n){if(ns.has(n))return CA(t,n);{const r=f3(t),i=(bm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return IS(t,n)}build(t,n,r){Em(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Am(t,n,r)}}class h3 extends ZS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Gb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ns.has(n)){const r=mS(n);return r&&r.default||0}return n=Yb.has(n)?n:wm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Zb(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&we.postRender(this.updateDimensions)}build(t,n,r){_m(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Xb(t,n,r,i)}mount(t){this.isSVGTag=Pm(t.tagName),super.mount(t)}}const m3=(e,t)=>Cm(e)?new h3(t):new p3(t,{allowProjection:e!==v.Fragment}),g3=Jj({...IR,...i3,...KO,...s3},m3),Te=mj(g3);class v3{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 y3=()=>new v3;function x3(){return mc(y3)}const w3=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Nt=e=>{const[t,n]=e.split("-");return w3(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var Tr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Tr||{});const JS=v.createContext({}),b3={[Y.Background]:"",[Y.Border]:"initial",[Y.TooltipText]:Nt("blue-700"),[Y.TooltipBackground]:Nt("blue-100"),[Y.TooltipBorder]:Nt("blue-500"),[Y.HeaderBackground]:Nt("blue-600"),[Y.HeaderBorder]:"initial",[Y.HeaderText]:"white",[Y.FooterBackground]:"",[Y.FooterBorder]:"",[Y.FooterText]:"",[Y.MessageAdminBackground]:"",[Y.MessageAdminText]:"",[Y.MessageVisitorBackground]:"",[Y.MessageVisitorText]:"",[Y.GreeterBackground]:"white",[Y.GreeterText]:Nt("slate-700"),[Y.GreeterBorder]:Nt("slate-200"),[Y.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[Y.GreeterTopText]:"white",[Y.GreeterButtonBackground]:Nt("indigo-600"),[Y.GreeterButtonText]:Nt("white"),[Y.ButtonBackground]:Nt("indigo-600"),[Y.ButtonText]:Nt("white"),[Y.InputBackground]:Nt("white"),[Y.InputText]:Nt("slate-800"),[Y.InputBorder]:Nt("slate-200")},S3={[Tr.None]:"0px",[Tr.Sm]:"var(--radius-xs)",[Tr.Md]:"var(--radius-sm)",[Tr.Lg]:"var(--radius-md)",[Tr.Xl]:"var(--radius-lg)",[Tr.Full]:"calc(infinity * 1px)"},k3=e=>{const t={...b3};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 E3({children:e,widget:t}){const n=k3(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Tr.Md,i=o=>n[o],s=()=>S3[r];return x.jsx(JS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const hr=()=>v.useContext(JS);function sn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=Y.ButtonText,bgKey:u=Y.ButtonBackground,animations:d={},withoutTheming:c,...f}){const p=hr();return x.jsx(Te.button,{type:t,className:fe("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,Qv[n]&&Qv[n][r],zP[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:p.getColor(l),backgroundColor:p.getColor(u),...o?{}:{borderRadius:p.getRadius()}},...d,...f,children:e})}function ve(){}ve.Home=function(t){return x.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:x.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"})})};ve.Chat=e=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:x.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"})});ve.Menu=e=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ve.MessageTyping=({className:e="size-5",...t})=>x.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:x.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"})});ve.Check=function(t){return x.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:x.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"})})};ve.Website=function(t){return x.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[x.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"}),x.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"}),x.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"})]})};ve.ArrowDown=e=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ve.XCircle=({className:e="e-5",...t})=>x.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:x.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"})});ve.X=({className:e="e-5",...t})=>x.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:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ve.PaperAirplane=({className:e="e-5",...t})=>x.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:x.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"})});ve.Spin=function(t){return x.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:x.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"})})};const qn=Object.create(null);qn.open="0";qn.close="1";qn.ping="2";qn.pong="3";qn.message="4";qn.upgrade="5";qn.noop="6";const Jl=Object.create(null);Object.keys(qn).forEach(e=>{Jl[qn[e]]=e});const Rp={type:"error",data:"parser error"},ek=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",tk=typeof ArrayBuffer=="function",nk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$m=({type:e,data:t},n,r)=>ek&&t instanceof Blob?n?r(t):hy(t,r):tk&&(t instanceof ArrayBuffer||nk(t))?n?r(t):hy(new Blob([t]),r):r(qn[e]+(t||"")),hy=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function my(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Md;function T3(e,t){if(ek&&e.data instanceof Blob)return e.data.arrayBuffer().then(my).then(t);if(tk&&(e.data instanceof ArrayBuffer||nk(e.data)))return t(my(e.data));$m(e,!1,n=>{Md||(Md=new TextEncoder),t(Md.encode(n))})}const gy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ho=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<gy.length;e++)Ho[gy.charCodeAt(e)]=e;const C3=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=Ho[e.charCodeAt(r)],o=Ho[e.charCodeAt(r+1)],a=Ho[e.charCodeAt(r+2)],l=Ho[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},_3=typeof ArrayBuffer=="function",zm=(e,t)=>{if(typeof e!="string")return{type:"message",data:rk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:P3(e.substring(1),t)}:Jl[n]?e.length>1?{type:Jl[n],data:e.substring(1)}:{type:Jl[n]}:Rp},P3=(e,t)=>{if(_3){const n=C3(e);return rk(n,t)}else return{base64:!0,data:e}},rk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},ik="",j3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{$m(s,!1,a=>{r[o]=a,++i===n&&t(r.join(ik))})})},A3=(e,t)=>{const n=e.split(ik),r=[];for(let i=0;i<n.length;i++){const s=zm(n[i],t);if(r.push(s),s.type==="error")break}return r};function R3(){return new TransformStream({transform(e,t){T3(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 Ld;function jl(e){return e.reduce((t,n)=>t+n.length,0)}function Al(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 O3(e,t){Ld||(Ld=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(jl(n)<1)break;const l=Al(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(jl(n)<2)break;const l=Al(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(jl(n)<8)break;const l=Al(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Rp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(jl(n)<i)break;const l=Al(n,i);a.enqueue(zm(s?l:Ld.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Rp);break}}}})}const sk=4;function Ie(e){if(e)return D3(e)}function D3(e){for(var t in Ie.prototype)e[t]=Ie.prototype[t];return e}Ie.prototype.on=Ie.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ie.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ie.prototype.off=Ie.prototype.removeListener=Ie.prototype.removeAllListeners=Ie.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};Ie.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};Ie.prototype.emitReserved=Ie.prototype.emit;Ie.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ie.prototype.hasListeners=function(e){return!!this.listeners(e).length};const bc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),nn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),F3="arraybuffer";function ok(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const N3=nn.setTimeout,M3=nn.clearTimeout;function Sc(e,t){t.useNativeTimers?(e.setTimeoutFn=N3.bind(nn),e.clearTimeoutFn=M3.bind(nn)):(e.setTimeoutFn=nn.setTimeout.bind(nn),e.clearTimeoutFn=nn.clearTimeout.bind(nn))}const L3=1.33;function I3(e){return typeof e=="string"?$3(e):Math.ceil((e.byteLength||e.size)*L3)}function $3(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 ak(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function z3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function B3(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 V3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Bm extends Ie{constructor(t){super(),this.writable=!1,Sc(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 V3(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=zm(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=z3(t);return n.length?"?"+n:""}}class U3 extends Bm{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)};A3(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,j3(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]=ak()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let lk=!1;try{lk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const H3=lk;function W3(){}class q3 extends U3{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 Hn extends Ie{constructor(t,n,r){super(),this.createRequest=t,Sc(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=ok(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=Hn.requestsCount++,Hn.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=W3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Hn.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()}}Hn.requestsCount=0;Hn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vy);else if(typeof addEventListener=="function"){const e="onpagehide"in nn?"pagehide":"unload";addEventListener(e,vy,!1)}}function vy(){for(let e in Hn.requests)Hn.requests.hasOwnProperty(e)&&Hn.requests[e].abort()}const K3=function(){const e=uk({xdomain:!1});return e&&e.responseType!==null}();class G3 extends q3{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=K3&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Hn(uk,this.uri(),t)}}function uk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||H3))return new XMLHttpRequest}catch{}if(!t)try{return new nn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ck=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Q3 extends Bm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=ck?{}:ok(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;$m(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&bc(()=>{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]=ak()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Id=nn.WebSocket||nn.MozWebSocket;class Y3 extends Q3{createSocket(t,n,r){return ck?new Id(t,n,r):n?new Id(t,n):new Id(t)}doWrite(t,n){this.ws.send(n)}}class X3 extends Bm{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=O3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=R3();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&&bc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Z3={websocket:Y3,webtransport:X3,polling:G3},J3=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Op(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=J3.exec(e||""),s={},o=14;for(;o--;)s[eD[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=tD(s,s.path),s.queryKey=nD(s,s.query),s}function tD(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 nD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Dp=typeof addEventListener=="function"&&typeof removeEventListener=="function",eu=[];Dp&&addEventListener("offline",()=>{eu.forEach(e=>e())},!1);class Xr extends Ie{constructor(t,n){if(super(),this.binaryType=F3,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=Op(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=Op(n.host).host);Sc(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=B3(this.opts.query)),Dp&&(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"})},eu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=sk,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&&Xr.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",Xr.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+=I3(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,bc(()=>{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(Xr.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(),Dp&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=eu.indexOf(this._offlineEventListener);r!==-1&&eu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=sk;class rD extends Xr{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;Xr.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;Xr.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 iD=class extends rD{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=>Z3[i]).filter(i=>!!i)),super(t,r)}};function sD(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=Op(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 oD=typeof ArrayBuffer=="function",aD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,dk=Object.prototype.toString,lD=typeof Blob=="function"||typeof Blob<"u"&&dk.call(Blob)==="[object BlobConstructor]",uD=typeof File=="function"||typeof File<"u"&&dk.call(File)==="[object FileConstructor]";function Vm(e){return oD&&(e instanceof ArrayBuffer||aD(e))||lD&&e instanceof Blob||uD&&e instanceof File}function tu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(tu(e[n]))return!0;return!1}if(Vm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return tu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&tu(e[n]))return!0;return!1}function cD(e){const t=[],n=e.data,r=e;return r.data=Fp(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fp(e,t){if(!e)return e;if(Vm(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]=Fp(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]=Fp(e[r],t));return n}return e}function dD(e,t){return e.data=Np(e.data,t),delete e.attachments,e}function Np(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]=Np(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Np(e[n],t));return e}const fD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],pD=5;var le;(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"})(le||(le={}));class hD{constructor(t){this.replacer=t}encode(t){return(t.type===le.EVENT||t.type===le.ACK)&&tu(t)?this.encodeAsBinary({type:t.type===le.EVENT?le.BINARY_EVENT:le.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===le.BINARY_EVENT||t.type===le.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=cD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function yy(e){return Object.prototype.toString.call(e)==="[object Object]"}class Um extends Ie{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===le.BINARY_EVENT;r||n.type===le.BINARY_ACK?(n.type=r?le.EVENT:le.ACK,this.reconstructor=new mD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Vm(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(le[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===le.BINARY_EVENT||r.type===le.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(Um.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 le.CONNECT:return yy(n);case le.DISCONNECT:return n===void 0;case le.CONNECT_ERROR:return typeof n=="string"||yy(n);case le.EVENT:case le.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&fD.indexOf(n[0])===-1);case le.ACK:case le.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class mD{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=dD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Um,Encoder:hD,get PacketType(){return le},protocol:pD},Symbol.toStringTag,{value:"Module"}));function xn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const vD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class fk extends Ie{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=[xn(t,"open",this.onopen.bind(this)),xn(t,"packet",this.onpacket.bind(this)),xn(t,"error",this.onerror.bind(this)),xn(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(vD.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:le.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:le.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 le.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 le.EVENT:case le.BINARY_EVENT:this.onevent(t);break;case le.ACK:case le.BINARY_ACK:this.onack(t);break;case le.DISCONNECT:this.ondisconnect();break;case le.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:le.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:le.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 bo(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}bo.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};bo.prototype.reset=function(){this.attempts=0};bo.prototype.setMin=function(e){this.ms=e};bo.prototype.setMax=function(e){this.max=e};bo.prototype.setJitter=function(e){this.jitter=e};class Mp extends Ie{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,Sc(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 bo({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||gD;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 iD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=xn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=xn(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(xn(t,"ping",this.onping.bind(this)),xn(t,"data",this.ondata.bind(this)),xn(t,"error",this.onerror.bind(this)),xn(t,"close",this.onclose.bind(this)),xn(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){bc(()=>{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 fk(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 No={};function nu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=sD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=No[i]&&s in No[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Mp(r,t):(No[i]||(No[i]=new Mp(r,t)),l=No[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(nu,{Manager:Mp,Socket:fk,io:nu,connect:nu});const ru=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Wn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Wn||{});const $d=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},iu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},xy=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},pk=v.createContext(null),rs=()=>v.useContext(pk),yD=({children:e})=>{const{widget:t}=Ot(),[n,r]=v.useState(null),[i,s]=v.useState(!1),o=()=>{const f=nu(C2,{transports:["websocket"],auth:{customer_token:iu(Wn.CustomerToken,(t==null?void 0:t.link_id)||"")||ru("customer_token"),device_id:iu(Wn.DeviceId,(t==null?void 0:t.link_id)||"")||ru("device_id"),customer_refresh_token:iu(Wn.CustomerRefreshToken,(t==null?void 0:t.link_id)||"")||ru("customer_refresh_token")}});f.on("error",p=>{console.error("Websocket error",p)}),f.on("connect",()=>{r(f),s(!0)})},a=()=>{n&&(n.connect(),s(!0))},l=()=>{n&&(n.disconnect(),s(!1))},u=(f,p)=>{n&&n.on(f,p)},d=(f,p)=>{n&&n.off(f,p)},c=(f,p,h)=>{n&&n.emit(f,p,h)};return x.jsx(pk.Provider,{value:{socket:n,connected:i,connect:o,reconnect:a,disconnect:l,on:u,off:d,emit:c},children:e})};var Kn=(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))(Kn||{}),rt=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e))(rt||{});const Hm=e=>{const t=gb(),n=(r,i)=>{var o;const s=((o=U$.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}},xD=e=>({accessToken:localStorage.getItem(`${e}:${Wn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${Wn.CustomerRefreshToken}`)||""}),kc=()=>{const{widget:e}=Ot();return e?xD(e.link_id):null},Na=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 wD(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const bD=()=>tm({mutationFn:e=>vo(`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})})}),SD=e=>vo(`clients/${e}/chats`),Lp=(e,t)=>vo(`clients/${e}/chats`,{method:"DELETE",headers:t}),kD=(e,t,n)=>vo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":iu(Wn.DeviceId,"")||""}}),ED=()=>{const e=kc();return tm({mutationFn:t=>kD(t.rating,t.comment,Na(e))})},TD=e=>{const t=kc();return tm({mutationFn:n=>vo(`clients/${e}/chats/files`,{method:"POST",headers:Na(t),body:A2({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function CD(e){return e&&typeof e=="object"&&"file_urls"in e}const Wm=(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])},So=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function Ip({text:e}){var o,a,l,u;const{widget:t,isHaveChat:n}=Ot(),r=hr(),[i,s]=v.useState(!0);return i?x.jsxs(Te.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:fe("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(Y.TooltipBackground),color:r.getColor(Y.TooltipText)},children:[x.jsx("button",{onClick:()=>s(!1),className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":"Kapat",children:x.jsx(ve.X,{className:"size-3"})}),x.jsx(Te.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:r.getColor(Y.TooltipText)},children:e||(n?(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message_active:(u=(l=t==null?void 0:t.appearance)==null?void 0:l.design)==null?void 0:u.tooltip_message)||"Bizimle sohbet edin!"}),x.jsx("div",{className:fe("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]}):null}const _D="/notify.mp3",PD=async e=>{await new Audio(e||_D).play()};function wy({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=rs(),{isHaveChat:i,open:s,soundPath:o}=Ot(),[a,l]=v.useState(!0),[u,d]=v.useState(0),[c,f]=v.useState(null),p=()=>{PD(o)},h=(m,b)=>{if(c&&clearInterval(c),m||!i||b===0||Number.isNaN(b)){window.document.title=n,f(null);return}const g=setInterval(()=>{if(m||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(g),f(null);return}const y=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==y?window.document.title=y:window.document.title=n},1e3);return f(g),()=>{clearInterval(g),f(null)}};return v.useEffect(()=>h(s&&a,u),[u,s,a]),v.useEffect(()=>{const m=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",m,!1),()=>{document.removeEventListener("visibilitychange",m)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const m=()=>{!i||s&&a||(d(b=>b+1),p())};return r.on(rt.MessageAgentCreate,m),r.on(rt.ChatUserAssignee,p),()=>{r.off(rt.MessageAgentCreate,m),r.off(rt.ChatUserAssignee,p)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:x.jsx(Ip,{text:"Yeni mesajlar var!"})}function jD({children:e,defaultOpen:t,border:n}){var M,H,Z,te;const r=rs(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=Ot(),[u]=v.useState(!0),d=Hm(),c=kc(),f=Ya(),p=hr(),h=So(),[m,b]=v.useState({x:0,y:0}),g=x3(),y=v.useRef(null),w=v.useRef(null),[T,E]=v.useState(!1);v.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),v.useEffect(()=>{a&&f.pathname==="/"&&d.push("chat")},[a]);const _=ne=>{if(!y.current||!w.current)return ne;const W=y.current.getBoundingClientRect(),J={width:window.innerWidth,height:window.innerHeight},O={top:20,right:20,bottom:40,left:20};let L=ne.x,V=ne.y;return W.right+L-m.x>J.width-O.right&&(L=J.width-O.right-W.width-(W.left-m.x)),W.left+L-m.x<O.left&&(L=O.left-(W.left-m.x)),W.bottom+V-m.y>J.height-O.bottom&&(V=J.height-O.bottom-W.height-(W.top-m.y)),W.top+V-m.y<O.top&&(V=O.top-(W.top-m.y)),{x:L,y:V}},C=()=>{s(!0),r&&r.emit(Kn.WidgetOpen,{})},j=()=>{s(!1),r&&r.emit(Kn.WidgetClose,{})},k=()=>{s(!1),o(!1),Lp(l.client_id,Na(c)),d.push("registration")};v.useEffect(()=>{if(t&&!h&&s(!0),!(!r||!l))return r.on(rt.Banned,k),()=>{r.off(rt.Banned,k)}},[]),v.useEffect(()=>(h&&i?document.body.style.setProperty("overflow","hidden","important"):document.body.style.setProperty("overflow","auto","important"),()=>{document.body.style.setProperty("overflow","auto","important")}),[h,i]);function R(ne){T&&g.start(ne)}return x.jsx("section",{className:"relative w-full h-full",ref:w,children:x.jsxs(Yr,{children:[i&&x.jsx(Te.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"100%":((H=(M=l==null?void 0:l.appearance)==null?void 0:M.design)==null?void 0:H.width)||"21rem",height:h?"var(--app-height, 100dvh)":((te=(Z=l==null?void 0:l.appearance)==null?void 0:Z.design)==null?void 0:te.height)||"30rem",left:h?"0":"",right:h?"0px !important":"",maxHeight:h?"var(--app-height, 100dvh)":"",borderColor:p.getColor(Y.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:fe("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"!bottom-0 !right-0":h}),children:e}),!T&&x.jsx("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:x.jsxs(Yr,{children:[x.jsx(wy,{fallback:x.jsx(Ip,{}),fallbackOpen:u}),!i&&x.jsxs(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[x.jsx(Te.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:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:p.getColor(Y.ButtonBackground)}}),x.jsx(ve.Chat,{className:"size-7"})]}),i&&!h&&x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:j,children:x.jsx(ve.X,{className:"size-7"})})]})}),T&&x.jsx(Te.div,{ref:y,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:m.x,y:m.y},drag:T,dragControls:g,dragMomentum:!1,dragElastic:0,onDragEnd:(ne,W)=>{const J={x:m.x+W.offset.x,y:m.y+W.offset.y},O=_(J);b(O)},children:x.jsxs(Yr,{children:[x.jsx(wy,{fallback:x.jsx(Ip,{}),fallbackOpen:u}),!i&&x.jsx("div",{className:"cursor-move",onPointerDown:R,children:x.jsxs(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[x.jsx(Te.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:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:p.getColor(Y.ButtonBackground)}}),x.jsx(ve.Chat,{className:"size-7"})]})}),i&&!h&&x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:j,children:x.jsx(ve.X,{className:"size-7"})})]})})]})})}function hk(e){const{widget:t}=Ot();return x.jsx(E3,{widget:t,children:x.jsx(jD,{...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 AD=/[^.^\]^[]+|(?=\[\]|\.\.)/g,mk=/^\d+$/,RD=/^\d/,OD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,DD=/^\s*(['"]?)(.*?)(\1)\s*$/,qm=512,by=new is(qm),Sy=new is(qm),ky=new is(qm),zi={Cache:is,split:$p,normalizePath:zd,setter:function(e){var t=zd(e);return Sy.get(e)||Sy.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=zd(e);return ky.get(e)||ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(Km(n)||mk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){FD(Array.isArray(e)?e:$p(e),t,n)}};function zd(e){return by.get(e)||by.set(e,$p(e).map(function(t){return t.replace(DD,"$2")}))}function $p(e){return e.match(AD)||[""]}function FD(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=Km(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Km(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function ND(e){return e.match(RD)&&!e.match(mk)}function MD(e){return OD.test(e)}function LD(e){return!Km(e)&&(ND(e)||MD(e))}const ID=/[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,Ec=e=>e.match(ID)||[],Tc=e=>e[0].toUpperCase()+e.slice(1),Gm=(e,t)=>Ec(e).join(t).toLowerCase(),gk=e=>Ec(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),$D=e=>Tc(gk(e)),zD=e=>Gm(e,"_"),BD=e=>Gm(e,"-"),VD=e=>Tc(Gm(e," ")),UD=e=>Ec(e).map(Tc).join(" ");var Bd={words:Ec,upperFirst:Tc,camelCase:gk,pascalCase:$D,snakeCase:zD,kebabCase:BD,sentenceCase:VD,titleCase:UD},Qm={exports:{}};Qm.exports=function(e){return vk(HD(e),e)};Qm.exports.array=vk;function vk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=WD(t),a=qD(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 h=p[--d];l(h,a.get(h),c)}while(d);c.delete(u)}r[--n]=u}}}function HD(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 WD(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 qD(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var KD=Qm.exports;const GD=Yi(KD),QD=Object.prototype.toString,YD=Error.prototype.toString,XD=RegExp.prototype.toString,ZD=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",JD=/^Symbol\((.*)\)(.*)$/;function eF(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Ey(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return eF(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return ZD.call(e).replace(JD,"Symbol($1)");const r=QD.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+YD.call(e)+"]":r==="RegExp"?XD.call(e):null}function Zr(e,t){let n=Ey(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Ey(this[r],t);return s!==null?s:i},2)}function yk(e){return e==null?[]:[].concat(e)}let xk,wk,bk,tF=/\$\{\s*(\w+)\s*\}/g;xk=Symbol.toStringTag;class Ty{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[xk]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],yk(t).forEach(s=>{if(_t.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]}}wk=Symbol.hasInstance;bk=Symbol.toStringTag;class _t 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(tF,(i,s)=>Zr(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 Ty(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[bk]="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,_t)}static[wk](t){return Ty[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let On={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 \`${Zr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Zr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Zr(n,!0)}\``+i}},St={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"},nF={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"},zp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},rF={isValue:"${path} field must be ${value}"},su={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},iF={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"},sF={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: \`${Zr(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: \`${Zr(n,!0)}\``}return _t.formatError(On.notType,e)}};Object.assign(Object.create(null),{mixed:On,string:St,number:nF,date:zp,object:su,array:iF,boolean:rF,tuple:sF});const Ym=e=>e&&e.__isYupSchema__;class Uu{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 Uu(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(!Ym(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Rl={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]===Rl.context,this.isValue=this.key[0]===Rl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Rl.context:this.isValue?Rl.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 Pi=e=>e==null;function ms(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:h,context:m,abortEarly:b=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function y(M){return ss.isRef(M)?M.getValue(n,h,m):M}function w(M={}){const H=Object.assign({value:n,originalValue:s,label:o.spec.label,path:M.path||r,spec:o.spec,disableStackTrace:M.disableStackTrace||g},c,M.params);for(const te of Object.keys(H))H[te]=y(H[te]);const Z=new _t(_t.formatError(M.message||f,H),n,H.path,M.type||u,H.disableStackTrace);return Z.params=H,Z}const T=b?a:l;let E={path:r,parent:h,type:u,from:i.from,createError:w,resolve:y,options:i,originalValue:s,schema:o};const _=M=>{_t.isError(M)?T(M):M?l(null):T(w())},C=M=>{_t.isError(M)?T(M):a(M)};if(p&&Pi(n))return _(!0);let k;try{var R;if(k=d.call(E,n,E),typeof((R=k)==null?void 0:R.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(_,C)}}catch(M){C(M);return}_(k)}return t.OPTIONS=e,t}function oF(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 Hu 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 Hu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Fs(e,t=new Map){if(Ym(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]=Fs(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,Fs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Fs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Fs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Gn{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 Hu,this._blacklist=new Hu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(On.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=Fs(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&&Pi(s))return s;let o=Zr(t),a=Zr(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
- `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let 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=m=>{i||(i=!0,n(m,o))},c=m=>{i||(i=!0,r(m,o))},f=s.length,p=[];if(!f)return c([]);let h={value:o,originalValue:a,path:l,options:u,schema:this};for(let m=0;m<s.length;m++){const b=s[m];b(h,d,function(y){y&&(Array.isArray(y)?p.push(...y):p.push(y)),--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)=>{_t.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new _t(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 _t.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new _t(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(_t.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(_t.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Fs(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=ms({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=ms({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Dn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Dn.notNull){return this.nullability(!1,t)}required(t=Dn.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=Dn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ms(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=yk(t).map(s=>new ss(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Uu(i,n):Uu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ms({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=Dn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ms({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=Dn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ms({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)}}}Gn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Gn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=oF(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Gn.prototype[e]=Gn.prototype.oneOf;for(const e of["not","nope"])Gn.prototype[e]=Gn.prototype.notOneOf;const aF=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function lF(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=aF.exec(e);return r?{year:Xn(r[1]),month:Xn(r[2],1)-1,day:Xn(r[3],1),hour:Xn(r[4]),minute:Xn(r[5]),second:Xn(r[6]),millisecond:r[7]?Xn(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:Xn(r[10]),minuteOffset:Xn(r[11])}:null}function Xn(e,t=0){return Number(e)||t}let uF=/^[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])?)*$/,cF=/^((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,dF=/^(?:[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,fF="^\\d{4}-\\d{2}-\\d{2}",pF="\\d{2}:\\d{2}:\\d{2}",hF="(([+-]\\d{2}(:?\\d{2})?)|Z)",mF=new RegExp(`${fF}T${pF}(\\.\\d+)?${hF}$`),gF=e=>Pi(e)||e===e.trim(),vF={}.toString();function Wu(){return new Sk}class Sk extends Gn{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===vF?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Dn.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=St.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=St.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=St.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||St.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=St.email){return this.matches(uF,{name:"email",message:t,excludeEmptyString:!0})}url(t=St.url){return this.matches(cF,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=St.uuid){return this.matches(dF,{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(mF,{name:"datetime",message:n||St.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||St.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||St.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=St.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:gF})}lowercase(t=St.lowercase){return this.transform(n=>Pi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toLowerCase()})}uppercase(t=St.uppercase){return this.transform(n=>Pi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toUpperCase()})}}Wu.prototype=Sk.prototype;let yF=new Date(""),xF=e=>Object.prototype.toString.call(e)==="[object Date]";class Cc extends Gn{constructor(){super({type:"date",check(t){return xF(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=lF(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=zp.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=zp.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=yF;Cc.prototype;function wF(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):Ym(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return GD.array(Array.from(r),n).reverse()}function Cy(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 kk(e){return(t,n)=>Cy(e,t)-Cy(e,n)}const bF=(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 ou(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ou(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ou(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ou)}):"optional"in e?e.optional():e}const SF=(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 _y=e=>Object.prototype.toString.call(e)==="[object Object]";function Py(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const kF=kk([]);function Xm(e){return new Ek(e)}class Ek extends Gn{constructor(t){super({type:"object",check(n){return _y(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=kF,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 h,m=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:m,context:n.context,parent:l});let b=f instanceof Gn?f.spec:void 0,g=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||c in i;continue}h=!n.__validating||!g?f.cast(i[c],u):i[c],h!==void 0&&(l[c]=h)}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||!_y(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=wF(t,n),r._sortErrors=kk(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 ou(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 SF(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(bF)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||su.exact,test(n){if(n==null)return!0;const r=Py(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=su.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=Py(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=su.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(Bd.camelCase)}snakeCase(){return this.transformKeys(Bd.snakeCase)}constantCase(){return this.transformKeys(t=>Bd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Xm.prototype=Ek.prototype;var EF=function(t){return TF(t)&&!CF(t)};function TF(e){return!!e&&typeof e=="object"}function CF(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||jF(e)}var _F=typeof Symbol=="function"&&Symbol.for,PF=_F?Symbol.for("react.element"):60103;function jF(e){return e.$$typeof===PF}function AF(e){return Array.isArray(e)?[]:{}}function qu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ma(AF(e),e,t):e}function RF(e,t,n){return e.concat(t).map(function(r){return qu(r,n)})}function OF(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=qu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=qu(t[i],n):r[i]=Ma(e[i],t[i],n)}),r}function Ma(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||RF,n.isMergeableObject=n.isMergeableObject||EF;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):OF(e,t,n):qu(t,n)}Ma.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ma(r,i,n)},{})};var Vp=Ma,Tk=typeof global=="object"&&global&&global.Object===Object&&global,DF=typeof self=="object"&&self&&self.Object===Object&&self,Qn=Tk||DF||Function("return this")(),ii=Qn.Symbol,Ck=Object.prototype,FF=Ck.hasOwnProperty,NF=Ck.toString,Mo=ii?ii.toStringTag:void 0;function MF(e){var t=FF.call(e,Mo),n=e[Mo];try{e[Mo]=void 0;var r=!0}catch{}var i=NF.call(e);return r&&(t?e[Mo]=n:delete e[Mo]),i}var LF=Object.prototype,IF=LF.toString;function $F(e){return IF.call(e)}var zF="[object Null]",BF="[object Undefined]",jy=ii?ii.toStringTag:void 0;function os(e){return e==null?e===void 0?BF:zF:jy&&jy in Object(e)?MF(e):$F(e)}function _k(e,t){return function(n){return e(t(n))}}var Zm=_k(Object.getPrototypeOf,Object);function as(e){return e!=null&&typeof e=="object"}var VF="[object Object]",UF=Function.prototype,HF=Object.prototype,Pk=UF.toString,WF=HF.hasOwnProperty,qF=Pk.call(Object);function Ay(e){if(!as(e)||os(e)!=VF)return!1;var t=Zm(e);if(t===null)return!0;var n=WF.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pk.call(n)==qF}function KF(){this.__data__=[],this.size=0}function jk(e,t){return e===t||e!==e&&t!==t}function _c(e,t){for(var n=e.length;n--;)if(jk(e[n][0],t))return n;return-1}var GF=Array.prototype,QF=GF.splice;function YF(e){var t=this.__data__,n=_c(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():QF.call(t,n,1),--this.size,!0}function XF(e){var t=this.__data__,n=_c(t,e);return n<0?void 0:t[n][1]}function ZF(e){return _c(this.__data__,e)>-1}function JF(e,t){var n=this.__data__,r=_c(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function mr(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])}}mr.prototype.clear=KF;mr.prototype.delete=YF;mr.prototype.get=XF;mr.prototype.has=ZF;mr.prototype.set=JF;function eN(){this.__data__=new mr,this.size=0}function tN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nN(e){return this.__data__.get(e)}function rN(e){return this.__data__.has(e)}function tl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var iN="[object AsyncFunction]",sN="[object Function]",oN="[object GeneratorFunction]",aN="[object Proxy]";function Ak(e){if(!tl(e))return!1;var t=os(e);return t==sN||t==oN||t==iN||t==aN}var Vd=Qn["__core-js_shared__"],Ry=function(){var e=/[^.]+$/.exec(Vd&&Vd.keys&&Vd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lN(e){return!!Ry&&Ry in e}var uN=Function.prototype,cN=uN.toString;function ls(e){if(e!=null){try{return cN.call(e)}catch{}try{return e+""}catch{}}return""}var dN=/[\\^$.*+?()[\]{}|]/g,fN=/^\[object .+?Constructor\]$/,pN=Function.prototype,hN=Object.prototype,mN=pN.toString,gN=hN.hasOwnProperty,vN=RegExp("^"+mN.call(gN).replace(dN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yN(e){if(!tl(e)||lN(e))return!1;var t=Ak(e)?vN:fN;return t.test(ls(e))}function xN(e,t){return e==null?void 0:e[t]}function us(e,t){var n=xN(e,t);return yN(n)?n:void 0}var La=us(Qn,"Map"),Ia=us(Object,"create");function wN(){this.__data__=Ia?Ia(null):{},this.size=0}function bN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var SN="__lodash_hash_undefined__",kN=Object.prototype,EN=kN.hasOwnProperty;function TN(e){var t=this.__data__;if(Ia){var n=t[e];return n===SN?void 0:n}return EN.call(t,e)?t[e]:void 0}var CN=Object.prototype,_N=CN.hasOwnProperty;function PN(e){var t=this.__data__;return Ia?t[e]!==void 0:_N.call(t,e)}var jN="__lodash_hash_undefined__";function AN(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ia&&t===void 0?jN:t,this}function Qi(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])}}Qi.prototype.clear=wN;Qi.prototype.delete=bN;Qi.prototype.get=TN;Qi.prototype.has=PN;Qi.prototype.set=AN;function RN(){this.size=0,this.__data__={hash:new Qi,map:new(La||mr),string:new Qi}}function ON(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pc(e,t){var n=e.__data__;return ON(t)?n[typeof t=="string"?"string":"hash"]:n.map}function DN(e){var t=Pc(this,e).delete(e);return this.size-=t?1:0,t}function FN(e){return Pc(this,e).get(e)}function NN(e){return Pc(this,e).has(e)}function MN(e,t){var n=Pc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ui(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])}}ui.prototype.clear=RN;ui.prototype.delete=DN;ui.prototype.get=FN;ui.prototype.has=NN;ui.prototype.set=MN;var LN=200;function IN(e,t){var n=this.__data__;if(n instanceof mr){var r=n.__data__;if(!La||r.length<LN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ui(r)}return n.set(e,t),this.size=n.size,this}function ko(e){var t=this.__data__=new mr(e);this.size=t.size}ko.prototype.clear=eN;ko.prototype.delete=tN;ko.prototype.get=nN;ko.prototype.has=rN;ko.prototype.set=IN;function $N(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Oy=function(){try{var e=us(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Rk(e,t,n){t=="__proto__"&&Oy?Oy(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var zN=Object.prototype,BN=zN.hasOwnProperty;function Ok(e,t,n){var r=e[t];(!(BN.call(e,t)&&jk(r,n))||n===void 0&&!(t in e))&&Rk(e,t,n)}function jc(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?Rk(n,a,l):Ok(n,a,l)}return n}function VN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var UN="[object Arguments]";function Dy(e){return as(e)&&os(e)==UN}var Dk=Object.prototype,HN=Dk.hasOwnProperty,WN=Dk.propertyIsEnumerable,qN=Dy(function(){return arguments}())?Dy:function(e){return as(e)&&HN.call(e,"callee")&&!WN.call(e,"callee")},nl=Array.isArray;function KN(){return!1}var Fk=typeof $t=="object"&&$t&&!$t.nodeType&&$t,Fy=Fk&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,GN=Fy&&Fy.exports===Fk,Ny=GN?Qn.Buffer:void 0,QN=Ny?Ny.isBuffer:void 0,Nk=QN||KN,YN=9007199254740991,XN=/^(?:0|[1-9]\d*)$/;function ZN(e,t){var n=typeof e;return t=t??YN,!!t&&(n=="number"||n!="symbol"&&XN.test(e))&&e>-1&&e%1==0&&e<t}var JN=9007199254740991;function Mk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JN}var eM="[object Arguments]",tM="[object Array]",nM="[object Boolean]",rM="[object Date]",iM="[object Error]",sM="[object Function]",oM="[object Map]",aM="[object Number]",lM="[object Object]",uM="[object RegExp]",cM="[object Set]",dM="[object String]",fM="[object WeakMap]",pM="[object ArrayBuffer]",hM="[object DataView]",mM="[object Float32Array]",gM="[object Float64Array]",vM="[object Int8Array]",yM="[object Int16Array]",xM="[object Int32Array]",wM="[object Uint8Array]",bM="[object Uint8ClampedArray]",SM="[object Uint16Array]",kM="[object Uint32Array]",Se={};Se[mM]=Se[gM]=Se[vM]=Se[yM]=Se[xM]=Se[wM]=Se[bM]=Se[SM]=Se[kM]=!0;Se[eM]=Se[tM]=Se[pM]=Se[nM]=Se[hM]=Se[rM]=Se[iM]=Se[sM]=Se[oM]=Se[aM]=Se[lM]=Se[uM]=Se[cM]=Se[dM]=Se[fM]=!1;function EM(e){return as(e)&&Mk(e.length)&&!!Se[os(e)]}function Jm(e){return function(t){return e(t)}}var Lk=typeof $t=="object"&&$t&&!$t.nodeType&&$t,ia=Lk&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,TM=ia&&ia.exports===Lk,Ud=TM&&Tk.process,fo=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ud&&Ud.binding&&Ud.binding("util")}catch{}}(),My=fo&&fo.isTypedArray,CM=My?Jm(My):EM,_M=Object.prototype,PM=_M.hasOwnProperty;function Ik(e,t){var n=nl(e),r=!n&&qN(e),i=!n&&!r&&Nk(e),s=!n&&!r&&!i&&CM(e),o=n||r||i||s,a=o?VN(e.length,String):[],l=a.length;for(var u in e)(t||PM.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ZN(u,l)))&&a.push(u);return a}var jM=Object.prototype;function eg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jM;return e===n}var AM=_k(Object.keys,Object),RM=Object.prototype,OM=RM.hasOwnProperty;function DM(e){if(!eg(e))return AM(e);var t=[];for(var n in Object(e))OM.call(e,n)&&n!="constructor"&&t.push(n);return t}function $k(e){return e!=null&&Mk(e.length)&&!Ak(e)}function tg(e){return $k(e)?Ik(e):DM(e)}function FM(e,t){return e&&jc(t,tg(t),e)}function NM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var MM=Object.prototype,LM=MM.hasOwnProperty;function IM(e){if(!tl(e))return NM(e);var t=eg(e),n=[];for(var r in e)r=="constructor"&&(t||!LM.call(e,r))||n.push(r);return n}function ng(e){return $k(e)?Ik(e,!0):IM(e)}function $M(e,t){return e&&jc(t,ng(t),e)}var zk=typeof $t=="object"&&$t&&!$t.nodeType&&$t,Ly=zk&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,zM=Ly&&Ly.exports===zk,Iy=zM?Qn.Buffer:void 0,$y=Iy?Iy.allocUnsafe:void 0;function BM(e,t){if(t)return e.slice();var n=e.length,r=$y?$y(n):new e.constructor(n);return e.copy(r),r}function Bk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function VM(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 Vk(){return[]}var UM=Object.prototype,HM=UM.propertyIsEnumerable,zy=Object.getOwnPropertySymbols,rg=zy?function(e){return e==null?[]:(e=Object(e),VM(zy(e),function(t){return HM.call(e,t)}))}:Vk;function WM(e,t){return jc(e,rg(e),t)}function Uk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var qM=Object.getOwnPropertySymbols,Hk=qM?function(e){for(var t=[];e;)Uk(t,rg(e)),e=Zm(e);return t}:Vk;function KM(e,t){return jc(e,Hk(e),t)}function Wk(e,t,n){var r=t(e);return nl(e)?r:Uk(r,n(e))}function GM(e){return Wk(e,tg,rg)}function QM(e){return Wk(e,ng,Hk)}var Up=us(Qn,"DataView"),Hp=us(Qn,"Promise"),Wp=us(Qn,"Set"),qp=us(Qn,"WeakMap"),By="[object Map]",YM="[object Object]",Vy="[object Promise]",Uy="[object Set]",Hy="[object WeakMap]",Wy="[object DataView]",XM=ls(Up),ZM=ls(La),JM=ls(Hp),e5=ls(Wp),t5=ls(qp),tr=os;(Up&&tr(new Up(new ArrayBuffer(1)))!=Wy||La&&tr(new La)!=By||Hp&&tr(Hp.resolve())!=Vy||Wp&&tr(new Wp)!=Uy||qp&&tr(new qp)!=Hy)&&(tr=function(e){var t=os(e),n=t==YM?e.constructor:void 0,r=n?ls(n):"";if(r)switch(r){case XM:return Wy;case ZM:return By;case JM:return Vy;case e5:return Uy;case t5:return Hy}return t});var n5=Object.prototype,r5=n5.hasOwnProperty;function i5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&r5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var qy=Qn.Uint8Array;function ig(e){var t=new e.constructor(e.byteLength);return new qy(t).set(new qy(e)),t}function s5(e,t){var n=t?ig(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var o5=/\w*$/;function a5(e){var t=new e.constructor(e.source,o5.exec(e));return t.lastIndex=e.lastIndex,t}var Ky=ii?ii.prototype:void 0,Gy=Ky?Ky.valueOf:void 0;function l5(e){return Gy?Object(Gy.call(e)):{}}function u5(e,t){var n=t?ig(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var c5="[object Boolean]",d5="[object Date]",f5="[object Map]",p5="[object Number]",h5="[object RegExp]",m5="[object Set]",g5="[object String]",v5="[object Symbol]",y5="[object ArrayBuffer]",x5="[object DataView]",w5="[object Float32Array]",b5="[object Float64Array]",S5="[object Int8Array]",k5="[object Int16Array]",E5="[object Int32Array]",T5="[object Uint8Array]",C5="[object Uint8ClampedArray]",_5="[object Uint16Array]",P5="[object Uint32Array]";function j5(e,t,n){var r=e.constructor;switch(t){case y5:return ig(e);case c5:case d5:return new r(+e);case x5:return s5(e,n);case w5:case b5:case S5:case k5:case E5:case T5:case C5:case _5:case P5:return u5(e,n);case f5:return new r;case p5:case g5:return new r(e);case h5:return a5(e);case m5:return new r;case v5:return l5(e)}}var Qy=Object.create,A5=function(){function e(){}return function(t){if(!tl(t))return{};if(Qy)return Qy(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function R5(e){return typeof e.constructor=="function"&&!eg(e)?A5(Zm(e)):{}}var O5="[object Map]";function D5(e){return as(e)&&tr(e)==O5}var Yy=fo&&fo.isMap,F5=Yy?Jm(Yy):D5,N5="[object Set]";function M5(e){return as(e)&&tr(e)==N5}var Xy=fo&&fo.isSet,L5=Xy?Jm(Xy):M5,I5=1,$5=2,z5=4,qk="[object Arguments]",B5="[object Array]",V5="[object Boolean]",U5="[object Date]",H5="[object Error]",Kk="[object Function]",W5="[object GeneratorFunction]",q5="[object Map]",K5="[object Number]",Gk="[object Object]",G5="[object RegExp]",Q5="[object Set]",Y5="[object String]",X5="[object Symbol]",Z5="[object WeakMap]",J5="[object ArrayBuffer]",e4="[object DataView]",t4="[object Float32Array]",n4="[object Float64Array]",r4="[object Int8Array]",i4="[object Int16Array]",s4="[object Int32Array]",o4="[object Uint8Array]",a4="[object Uint8ClampedArray]",l4="[object Uint16Array]",u4="[object Uint32Array]",ye={};ye[qk]=ye[B5]=ye[J5]=ye[e4]=ye[V5]=ye[U5]=ye[t4]=ye[n4]=ye[r4]=ye[i4]=ye[s4]=ye[q5]=ye[K5]=ye[Gk]=ye[G5]=ye[Q5]=ye[Y5]=ye[X5]=ye[o4]=ye[a4]=ye[l4]=ye[u4]=!0;ye[H5]=ye[Kk]=ye[Z5]=!1;function sa(e,t,n,r,i,s){var o,a=t&I5,l=t&$5,u=t&z5;if(o!==void 0)return o;if(!tl(e))return e;var d=nl(e);if(d){if(o=i5(e),!a)return Bk(e,o)}else{var c=tr(e),f=c==Kk||c==W5;if(Nk(e))return BM(e,a);if(c==Gk||c==qk||f&&!i){if(o=l||f?{}:R5(e),!a)return l?KM(e,$M(o,e)):WM(e,FM(o,e))}else{if(!ye[c])return i?e:{};o=j5(e,c,a)}}s||(s=new ko);var p=s.get(e);if(p)return p;s.set(e,o),L5(e)?e.forEach(function(b){o.add(sa(b,t,n,b,e,s))}):F5(e)&&e.forEach(function(b,g){o.set(g,sa(b,t,n,g,e,s))});var h=u?l?QM:GM:l?ng:tg,m=d?void 0:h(e);return $N(m||e,function(b,g){m&&(g=b,b=e[g]),Ok(o,g,sa(b,t,n,g,e,s))}),o}var c4=1,d4=4;function Ol(e){return sa(e,c4|d4)}var Zy=Array.isArray,Jy=Object.keys,f4=Object.prototype.hasOwnProperty,p4=typeof Element<"u";function Kp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Zy(e),r=Zy(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Kp(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=Jy(e);if(s=c.length,s!==Jy(t).length)return!1;for(i=s;i--!==0;)if(!f4.call(t,c[i]))return!1;if(p4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Kp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var h4=function(t,n){try{return Kp(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 xi=Yi(h4);var m4=4;function ex(e){return sa(e,m4)}function Qk(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 g4="[object Symbol]";function sg(e){return typeof e=="symbol"||as(e)&&os(e)==g4}var v4="Expected a function";function og(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(v4);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(og.Cache||ui),n}og.Cache=ui;var y4=500;function x4(e){var t=og(e,function(r){return n.size===y4&&n.clear(),r}),n=t.cache;return t}var w4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b4=/\\(\\)?/g,S4=x4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(w4,function(n,r,i,s){t.push(i?s.replace(b4,"$1"):r||n)}),t}),k4=1/0;function E4(e){if(typeof e=="string"||sg(e))return e;var t=e+"";return t=="0"&&1/e==-k4?"-0":t}var T4=1/0,tx=ii?ii.prototype:void 0,nx=tx?tx.toString:void 0;function Yk(e){if(typeof e=="string")return e;if(nl(e))return Qk(e,Yk)+"";if(sg(e))return nx?nx.call(e):"";var t=e+"";return t=="0"&&1/e==-T4?"-0":t}function C4(e){return e==null?"":Yk(e)}function Xk(e){return nl(e)?Qk(e,E4):sg(e)?[e]:Bk(S4(C4(e)))}var Zk={exports:{}},he={};/** @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=m=>{i||(i=!0,n(m,o))},c=m=>{i||(i=!0,r(m,o))},f=s.length,p=[];if(!f)return c([]);let h={value:o,originalValue:a,path:l,options:u,schema:this};for(let m=0;m<s.length;m++){const b=s[m];b(h,d,function(y){y&&(Array.isArray(y)?p.push(...y):p.push(y)),--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)=>{_t.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new _t(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 _t.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new _t(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(_t.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(_t.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Fs(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=ms({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=ms({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.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=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ms(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=yk(t).map(s=>new ss(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Uu(i,n):Uu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ms({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=On.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ms({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=On.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ms({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)}}}Gn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Gn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=oF(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Gn.prototype[e]=Gn.prototype.oneOf;for(const e of["not","nope"])Gn.prototype[e]=Gn.prototype.notOneOf;const aF=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function lF(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=aF.exec(e);return r?{year:Xn(r[1]),month:Xn(r[2],1)-1,day:Xn(r[3],1),hour:Xn(r[4]),minute:Xn(r[5]),second:Xn(r[6]),millisecond:r[7]?Xn(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:Xn(r[10]),minuteOffset:Xn(r[11])}:null}function Xn(e,t=0){return Number(e)||t}let uF=/^[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])?)*$/,cF=/^((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,dF=/^(?:[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,fF="^\\d{4}-\\d{2}-\\d{2}",pF="\\d{2}:\\d{2}:\\d{2}",hF="(([+-]\\d{2}(:?\\d{2})?)|Z)",mF=new RegExp(`${fF}T${pF}(\\.\\d+)?${hF}$`),gF=e=>Pi(e)||e===e.trim(),vF={}.toString();function Wu(){return new Sk}class Sk extends Gn{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===vF?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.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=St.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=St.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=St.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||St.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=St.email){return this.matches(uF,{name:"email",message:t,excludeEmptyString:!0})}url(t=St.url){return this.matches(cF,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=St.uuid){return this.matches(dF,{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(mF,{name:"datetime",message:n||St.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||St.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||St.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=St.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:gF})}lowercase(t=St.lowercase){return this.transform(n=>Pi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toLowerCase()})}uppercase(t=St.uppercase){return this.transform(n=>Pi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toUpperCase()})}}Wu.prototype=Sk.prototype;let yF=new Date(""),xF=e=>Object.prototype.toString.call(e)==="[object Date]";class Cc extends Gn{constructor(){super({type:"date",check(t){return xF(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=lF(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=zp.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=zp.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=yF;Cc.prototype;function wF(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):Ym(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return GD.array(Array.from(r),n).reverse()}function Cy(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 kk(e){return(t,n)=>Cy(e,t)-Cy(e,n)}const bF=(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 ou(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ou(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ou(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ou)}):"optional"in e?e.optional():e}const SF=(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 _y=e=>Object.prototype.toString.call(e)==="[object Object]";function Py(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const kF=kk([]);function Xm(e){return new Ek(e)}class Ek extends Gn{constructor(t){super({type:"object",check(n){return _y(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=kF,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 h,m=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:m,context:n.context,parent:l});let b=f instanceof Gn?f.spec:void 0,g=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||c in i;continue}h=!n.__validating||!g?f.cast(i[c],u):i[c],h!==void 0&&(l[c]=h)}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||!_y(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=wF(t,n),r._sortErrors=kk(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 ou(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 SF(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(bF)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||su.exact,test(n){if(n==null)return!0;const r=Py(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=su.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=Py(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=su.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(Bd.camelCase)}snakeCase(){return this.transformKeys(Bd.snakeCase)}constantCase(){return this.transformKeys(t=>Bd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Xm.prototype=Ek.prototype;var EF=function(t){return TF(t)&&!CF(t)};function TF(e){return!!e&&typeof e=="object"}function CF(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||jF(e)}var _F=typeof Symbol=="function"&&Symbol.for,PF=_F?Symbol.for("react.element"):60103;function jF(e){return e.$$typeof===PF}function AF(e){return Array.isArray(e)?[]:{}}function qu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ma(AF(e),e,t):e}function RF(e,t,n){return e.concat(t).map(function(r){return qu(r,n)})}function OF(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=qu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=qu(t[i],n):r[i]=Ma(e[i],t[i],n)}),r}function Ma(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||RF,n.isMergeableObject=n.isMergeableObject||EF;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):OF(e,t,n):qu(t,n)}Ma.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ma(r,i,n)},{})};var Vp=Ma,Tk=typeof global=="object"&&global&&global.Object===Object&&global,DF=typeof self=="object"&&self&&self.Object===Object&&self,Qn=Tk||DF||Function("return this")(),ii=Qn.Symbol,Ck=Object.prototype,FF=Ck.hasOwnProperty,NF=Ck.toString,Mo=ii?ii.toStringTag:void 0;function MF(e){var t=FF.call(e,Mo),n=e[Mo];try{e[Mo]=void 0;var r=!0}catch{}var i=NF.call(e);return r&&(t?e[Mo]=n:delete e[Mo]),i}var LF=Object.prototype,IF=LF.toString;function $F(e){return IF.call(e)}var zF="[object Null]",BF="[object Undefined]",jy=ii?ii.toStringTag:void 0;function os(e){return e==null?e===void 0?BF:zF:jy&&jy in Object(e)?MF(e):$F(e)}function _k(e,t){return function(n){return e(t(n))}}var Zm=_k(Object.getPrototypeOf,Object);function as(e){return e!=null&&typeof e=="object"}var VF="[object Object]",UF=Function.prototype,HF=Object.prototype,Pk=UF.toString,WF=HF.hasOwnProperty,qF=Pk.call(Object);function Ay(e){if(!as(e)||os(e)!=VF)return!1;var t=Zm(e);if(t===null)return!0;var n=WF.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pk.call(n)==qF}function KF(){this.__data__=[],this.size=0}function jk(e,t){return e===t||e!==e&&t!==t}function _c(e,t){for(var n=e.length;n--;)if(jk(e[n][0],t))return n;return-1}var GF=Array.prototype,QF=GF.splice;function YF(e){var t=this.__data__,n=_c(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():QF.call(t,n,1),--this.size,!0}function XF(e){var t=this.__data__,n=_c(t,e);return n<0?void 0:t[n][1]}function ZF(e){return _c(this.__data__,e)>-1}function JF(e,t){var n=this.__data__,r=_c(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function mr(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])}}mr.prototype.clear=KF;mr.prototype.delete=YF;mr.prototype.get=XF;mr.prototype.has=ZF;mr.prototype.set=JF;function eN(){this.__data__=new mr,this.size=0}function tN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nN(e){return this.__data__.get(e)}function rN(e){return this.__data__.has(e)}function tl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var iN="[object AsyncFunction]",sN="[object Function]",oN="[object GeneratorFunction]",aN="[object Proxy]";function Ak(e){if(!tl(e))return!1;var t=os(e);return t==sN||t==oN||t==iN||t==aN}var Vd=Qn["__core-js_shared__"],Ry=function(){var e=/[^.]+$/.exec(Vd&&Vd.keys&&Vd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lN(e){return!!Ry&&Ry in e}var uN=Function.prototype,cN=uN.toString;function ls(e){if(e!=null){try{return cN.call(e)}catch{}try{return e+""}catch{}}return""}var dN=/[\\^$.*+?()[\]{}|]/g,fN=/^\[object .+?Constructor\]$/,pN=Function.prototype,hN=Object.prototype,mN=pN.toString,gN=hN.hasOwnProperty,vN=RegExp("^"+mN.call(gN).replace(dN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yN(e){if(!tl(e)||lN(e))return!1;var t=Ak(e)?vN:fN;return t.test(ls(e))}function xN(e,t){return e==null?void 0:e[t]}function us(e,t){var n=xN(e,t);return yN(n)?n:void 0}var La=us(Qn,"Map"),Ia=us(Object,"create");function wN(){this.__data__=Ia?Ia(null):{},this.size=0}function bN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var SN="__lodash_hash_undefined__",kN=Object.prototype,EN=kN.hasOwnProperty;function TN(e){var t=this.__data__;if(Ia){var n=t[e];return n===SN?void 0:n}return EN.call(t,e)?t[e]:void 0}var CN=Object.prototype,_N=CN.hasOwnProperty;function PN(e){var t=this.__data__;return Ia?t[e]!==void 0:_N.call(t,e)}var jN="__lodash_hash_undefined__";function AN(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ia&&t===void 0?jN:t,this}function Qi(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])}}Qi.prototype.clear=wN;Qi.prototype.delete=bN;Qi.prototype.get=TN;Qi.prototype.has=PN;Qi.prototype.set=AN;function RN(){this.size=0,this.__data__={hash:new Qi,map:new(La||mr),string:new Qi}}function ON(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pc(e,t){var n=e.__data__;return ON(t)?n[typeof t=="string"?"string":"hash"]:n.map}function DN(e){var t=Pc(this,e).delete(e);return this.size-=t?1:0,t}function FN(e){return Pc(this,e).get(e)}function NN(e){return Pc(this,e).has(e)}function MN(e,t){var n=Pc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ui(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])}}ui.prototype.clear=RN;ui.prototype.delete=DN;ui.prototype.get=FN;ui.prototype.has=NN;ui.prototype.set=MN;var LN=200;function IN(e,t){var n=this.__data__;if(n instanceof mr){var r=n.__data__;if(!La||r.length<LN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ui(r)}return n.set(e,t),this.size=n.size,this}function ko(e){var t=this.__data__=new mr(e);this.size=t.size}ko.prototype.clear=eN;ko.prototype.delete=tN;ko.prototype.get=nN;ko.prototype.has=rN;ko.prototype.set=IN;function $N(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Oy=function(){try{var e=us(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Rk(e,t,n){t=="__proto__"&&Oy?Oy(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var zN=Object.prototype,BN=zN.hasOwnProperty;function Ok(e,t,n){var r=e[t];(!(BN.call(e,t)&&jk(r,n))||n===void 0&&!(t in e))&&Rk(e,t,n)}function jc(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?Rk(n,a,l):Ok(n,a,l)}return n}function VN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var UN="[object Arguments]";function Dy(e){return as(e)&&os(e)==UN}var Dk=Object.prototype,HN=Dk.hasOwnProperty,WN=Dk.propertyIsEnumerable,qN=Dy(function(){return arguments}())?Dy:function(e){return as(e)&&HN.call(e,"callee")&&!WN.call(e,"callee")},nl=Array.isArray;function KN(){return!1}var Fk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,Fy=Fk&&typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,GN=Fy&&Fy.exports===Fk,Ny=GN?Qn.Buffer:void 0,QN=Ny?Ny.isBuffer:void 0,Nk=QN||KN,YN=9007199254740991,XN=/^(?:0|[1-9]\d*)$/;function ZN(e,t){var n=typeof e;return t=t??YN,!!t&&(n=="number"||n!="symbol"&&XN.test(e))&&e>-1&&e%1==0&&e<t}var JN=9007199254740991;function Mk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JN}var eM="[object Arguments]",tM="[object Array]",nM="[object Boolean]",rM="[object Date]",iM="[object Error]",sM="[object Function]",oM="[object Map]",aM="[object Number]",lM="[object Object]",uM="[object RegExp]",cM="[object Set]",dM="[object String]",fM="[object WeakMap]",pM="[object ArrayBuffer]",hM="[object DataView]",mM="[object Float32Array]",gM="[object Float64Array]",vM="[object Int8Array]",yM="[object Int16Array]",xM="[object Int32Array]",wM="[object Uint8Array]",bM="[object Uint8ClampedArray]",SM="[object Uint16Array]",kM="[object Uint32Array]",Se={};Se[mM]=Se[gM]=Se[vM]=Se[yM]=Se[xM]=Se[wM]=Se[bM]=Se[SM]=Se[kM]=!0;Se[eM]=Se[tM]=Se[pM]=Se[nM]=Se[hM]=Se[rM]=Se[iM]=Se[sM]=Se[oM]=Se[aM]=Se[lM]=Se[uM]=Se[cM]=Se[dM]=Se[fM]=!1;function EM(e){return as(e)&&Mk(e.length)&&!!Se[os(e)]}function Jm(e){return function(t){return e(t)}}var Lk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,ia=Lk&&typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,TM=ia&&ia.exports===Lk,Ud=TM&&Tk.process,fo=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ud&&Ud.binding&&Ud.binding("util")}catch{}}(),My=fo&&fo.isTypedArray,CM=My?Jm(My):EM,_M=Object.prototype,PM=_M.hasOwnProperty;function Ik(e,t){var n=nl(e),r=!n&&qN(e),i=!n&&!r&&Nk(e),s=!n&&!r&&!i&&CM(e),o=n||r||i||s,a=o?VN(e.length,String):[],l=a.length;for(var u in e)(t||PM.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ZN(u,l)))&&a.push(u);return a}var jM=Object.prototype;function eg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jM;return e===n}var AM=_k(Object.keys,Object),RM=Object.prototype,OM=RM.hasOwnProperty;function DM(e){if(!eg(e))return AM(e);var t=[];for(var n in Object(e))OM.call(e,n)&&n!="constructor"&&t.push(n);return t}function $k(e){return e!=null&&Mk(e.length)&&!Ak(e)}function tg(e){return $k(e)?Ik(e):DM(e)}function FM(e,t){return e&&jc(t,tg(t),e)}function NM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var MM=Object.prototype,LM=MM.hasOwnProperty;function IM(e){if(!tl(e))return NM(e);var t=eg(e),n=[];for(var r in e)r=="constructor"&&(t||!LM.call(e,r))||n.push(r);return n}function ng(e){return $k(e)?Ik(e,!0):IM(e)}function $M(e,t){return e&&jc(t,ng(t),e)}var zk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,Ly=zk&&typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,zM=Ly&&Ly.exports===zk,Iy=zM?Qn.Buffer:void 0,$y=Iy?Iy.allocUnsafe:void 0;function BM(e,t){if(t)return e.slice();var n=e.length,r=$y?$y(n):new e.constructor(n);return e.copy(r),r}function Bk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function VM(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 Vk(){return[]}var UM=Object.prototype,HM=UM.propertyIsEnumerable,zy=Object.getOwnPropertySymbols,rg=zy?function(e){return e==null?[]:(e=Object(e),VM(zy(e),function(t){return HM.call(e,t)}))}:Vk;function WM(e,t){return jc(e,rg(e),t)}function Uk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var qM=Object.getOwnPropertySymbols,Hk=qM?function(e){for(var t=[];e;)Uk(t,rg(e)),e=Zm(e);return t}:Vk;function KM(e,t){return jc(e,Hk(e),t)}function Wk(e,t,n){var r=t(e);return nl(e)?r:Uk(r,n(e))}function GM(e){return Wk(e,tg,rg)}function QM(e){return Wk(e,ng,Hk)}var Up=us(Qn,"DataView"),Hp=us(Qn,"Promise"),Wp=us(Qn,"Set"),qp=us(Qn,"WeakMap"),By="[object Map]",YM="[object Object]",Vy="[object Promise]",Uy="[object Set]",Hy="[object WeakMap]",Wy="[object DataView]",XM=ls(Up),ZM=ls(La),JM=ls(Hp),e5=ls(Wp),t5=ls(qp),tr=os;(Up&&tr(new Up(new ArrayBuffer(1)))!=Wy||La&&tr(new La)!=By||Hp&&tr(Hp.resolve())!=Vy||Wp&&tr(new Wp)!=Uy||qp&&tr(new qp)!=Hy)&&(tr=function(e){var t=os(e),n=t==YM?e.constructor:void 0,r=n?ls(n):"";if(r)switch(r){case XM:return Wy;case ZM:return By;case JM:return Vy;case e5:return Uy;case t5:return Hy}return t});var n5=Object.prototype,r5=n5.hasOwnProperty;function i5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&r5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var qy=Qn.Uint8Array;function ig(e){var t=new e.constructor(e.byteLength);return new qy(t).set(new qy(e)),t}function s5(e,t){var n=t?ig(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var o5=/\w*$/;function a5(e){var t=new e.constructor(e.source,o5.exec(e));return t.lastIndex=e.lastIndex,t}var Ky=ii?ii.prototype:void 0,Gy=Ky?Ky.valueOf:void 0;function l5(e){return Gy?Object(Gy.call(e)):{}}function u5(e,t){var n=t?ig(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var c5="[object Boolean]",d5="[object Date]",f5="[object Map]",p5="[object Number]",h5="[object RegExp]",m5="[object Set]",g5="[object String]",v5="[object Symbol]",y5="[object ArrayBuffer]",x5="[object DataView]",w5="[object Float32Array]",b5="[object Float64Array]",S5="[object Int8Array]",k5="[object Int16Array]",E5="[object Int32Array]",T5="[object Uint8Array]",C5="[object Uint8ClampedArray]",_5="[object Uint16Array]",P5="[object Uint32Array]";function j5(e,t,n){var r=e.constructor;switch(t){case y5:return ig(e);case c5:case d5:return new r(+e);case x5:return s5(e,n);case w5:case b5:case S5:case k5:case E5:case T5:case C5:case _5:case P5:return u5(e,n);case f5:return new r;case p5:case g5:return new r(e);case h5:return a5(e);case m5:return new r;case v5:return l5(e)}}var Qy=Object.create,A5=function(){function e(){}return function(t){if(!tl(t))return{};if(Qy)return Qy(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function R5(e){return typeof e.constructor=="function"&&!eg(e)?A5(Zm(e)):{}}var O5="[object Map]";function D5(e){return as(e)&&tr(e)==O5}var Yy=fo&&fo.isMap,F5=Yy?Jm(Yy):D5,N5="[object Set]";function M5(e){return as(e)&&tr(e)==N5}var Xy=fo&&fo.isSet,L5=Xy?Jm(Xy):M5,I5=1,$5=2,z5=4,qk="[object Arguments]",B5="[object Array]",V5="[object Boolean]",U5="[object Date]",H5="[object Error]",Kk="[object Function]",W5="[object GeneratorFunction]",q5="[object Map]",K5="[object Number]",Gk="[object Object]",G5="[object RegExp]",Q5="[object Set]",Y5="[object String]",X5="[object Symbol]",Z5="[object WeakMap]",J5="[object ArrayBuffer]",e4="[object DataView]",t4="[object Float32Array]",n4="[object Float64Array]",r4="[object Int8Array]",i4="[object Int16Array]",s4="[object Int32Array]",o4="[object Uint8Array]",a4="[object Uint8ClampedArray]",l4="[object Uint16Array]",u4="[object Uint32Array]",ye={};ye[qk]=ye[B5]=ye[J5]=ye[e4]=ye[V5]=ye[U5]=ye[t4]=ye[n4]=ye[r4]=ye[i4]=ye[s4]=ye[q5]=ye[K5]=ye[Gk]=ye[G5]=ye[Q5]=ye[Y5]=ye[X5]=ye[o4]=ye[a4]=ye[l4]=ye[u4]=!0;ye[H5]=ye[Kk]=ye[Z5]=!1;function sa(e,t,n,r,i,s){var o,a=t&I5,l=t&$5,u=t&z5;if(o!==void 0)return o;if(!tl(e))return e;var d=nl(e);if(d){if(o=i5(e),!a)return Bk(e,o)}else{var c=tr(e),f=c==Kk||c==W5;if(Nk(e))return BM(e,a);if(c==Gk||c==qk||f&&!i){if(o=l||f?{}:R5(e),!a)return l?KM(e,$M(o,e)):WM(e,FM(o,e))}else{if(!ye[c])return i?e:{};o=j5(e,c,a)}}s||(s=new ko);var p=s.get(e);if(p)return p;s.set(e,o),L5(e)?e.forEach(function(b){o.add(sa(b,t,n,b,e,s))}):F5(e)&&e.forEach(function(b,g){o.set(g,sa(b,t,n,g,e,s))});var h=u?l?QM:GM:l?ng:tg,m=d?void 0:h(e);return $N(m||e,function(b,g){m&&(g=b,b=e[g]),Ok(o,g,sa(b,t,n,g,e,s))}),o}var c4=1,d4=4;function Ol(e){return sa(e,c4|d4)}var Zy=Array.isArray,Jy=Object.keys,f4=Object.prototype.hasOwnProperty,p4=typeof Element<"u";function Kp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Zy(e),r=Zy(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Kp(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=Jy(e);if(s=c.length,s!==Jy(t).length)return!1;for(i=s;i--!==0;)if(!f4.call(t,c[i]))return!1;if(p4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Kp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var h4=function(t,n){try{return Kp(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 xi=Yi(h4);var m4=4;function ex(e){return sa(e,m4)}function Qk(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 g4="[object Symbol]";function sg(e){return typeof e=="symbol"||as(e)&&os(e)==g4}var v4="Expected a function";function og(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(v4);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(og.Cache||ui),n}og.Cache=ui;var y4=500;function x4(e){var t=og(e,function(r){return n.size===y4&&n.clear(),r}),n=t.cache;return t}var w4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b4=/\\(\\)?/g,S4=x4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(w4,function(n,r,i,s){t.push(i?s.replace(b4,"$1"):r||n)}),t}),k4=1/0;function E4(e){if(typeof e=="string"||sg(e))return e;var t=e+"";return t=="0"&&1/e==-k4?"-0":t}var T4=1/0,tx=ii?ii.prototype:void 0,nx=tx?tx.toString:void 0;function Yk(e){if(typeof e=="string")return e;if(nl(e))return Qk(e,Yk)+"";if(sg(e))return nx?nx.call(e):"";var t=e+"";return t=="0"&&1/e==-T4?"-0":t}function C4(e){return e==null?"":Yk(e)}function Xk(e){return nl(e)?Qk(e,E4):sg(e)?[e]:Bk(S4(C4(e)))}var Zk={exports:{}},he={};/** @license React v16.13.1
99
99
  * react-is.production.min.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var Qe=typeof Symbol=="function"&&Symbol.for,ag=Qe?Symbol.for("react.element"):60103,lg=Qe?Symbol.for("react.portal"):60106,Ac=Qe?Symbol.for("react.fragment"):60107,Rc=Qe?Symbol.for("react.strict_mode"):60108,Oc=Qe?Symbol.for("react.profiler"):60114,Dc=Qe?Symbol.for("react.provider"):60109,Fc=Qe?Symbol.for("react.context"):60110,ug=Qe?Symbol.for("react.async_mode"):60111,Nc=Qe?Symbol.for("react.concurrent_mode"):60111,Mc=Qe?Symbol.for("react.forward_ref"):60112,Lc=Qe?Symbol.for("react.suspense"):60113,_4=Qe?Symbol.for("react.suspense_list"):60120,Ic=Qe?Symbol.for("react.memo"):60115,$c=Qe?Symbol.for("react.lazy"):60116,P4=Qe?Symbol.for("react.block"):60121,j4=Qe?Symbol.for("react.fundamental"):60117,A4=Qe?Symbol.for("react.responder"):60118,R4=Qe?Symbol.for("react.scope"):60119;function qt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ag:switch(e=e.type,e){case ug:case Nc:case Ac:case Oc:case Rc:case Lc:return e;default:switch(e=e&&e.$$typeof,e){case Fc:case Mc:case $c:case Ic:case Dc:return e;default:return t}}case lg:return t}}}function Jk(e){return qt(e)===Nc}he.AsyncMode=ug;he.ConcurrentMode=Nc;he.ContextConsumer=Fc;he.ContextProvider=Dc;he.Element=ag;he.ForwardRef=Mc;he.Fragment=Ac;he.Lazy=$c;he.Memo=Ic;he.Portal=lg;he.Profiler=Oc;he.StrictMode=Rc;he.Suspense=Lc;he.isAsyncMode=function(e){return Jk(e)||qt(e)===ug};he.isConcurrentMode=Jk;he.isContextConsumer=function(e){return qt(e)===Fc};he.isContextProvider=function(e){return qt(e)===Dc};he.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ag};he.isForwardRef=function(e){return qt(e)===Mc};he.isFragment=function(e){return qt(e)===Ac};he.isLazy=function(e){return qt(e)===$c};he.isMemo=function(e){return qt(e)===Ic};he.isPortal=function(e){return qt(e)===lg};he.isProfiler=function(e){return qt(e)===Oc};he.isStrictMode=function(e){return qt(e)===Rc};he.isSuspense=function(e){return qt(e)===Lc};he.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ac||e===Nc||e===Oc||e===Rc||e===Lc||e===_4||typeof e=="object"&&e!==null&&(e.$$typeof===$c||e.$$typeof===Ic||e.$$typeof===Dc||e.$$typeof===Fc||e.$$typeof===Mc||e.$$typeof===j4||e.$$typeof===A4||e.$$typeof===R4||e.$$typeof===P4)};he.typeOf=qt;Zk.exports=he;var O4=Zk.exports,eE=O4,D4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tE={};tE[eE.ForwardRef]=D4;tE[eE.Memo]=F4;function qe(){return qe=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},qe.apply(this,arguments)}function nE(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 zc=v.createContext(void 0);zc.displayName="FormikContext";zc.Provider;zc.Consumer;function N4(){var e=v.useContext(zc);return e}var mn=function(t){return typeof t=="function"},Bc=function(t){return t!==null&&typeof t=="object"},M4=function(t){return String(Math.floor(Number(t)))===t},Hd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Wd=function(t){return Bc(t)&&mn(t.then)};function Nt(e,t,n,r){r===void 0&&(r=0);for(var i=Xk(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Bi(e,t,n){for(var r=ex(e),i=r,s=0,o=Xk(t);s<o.length-1;s++){var a=o[s],l=Nt(e,o.slice(0,s+1));if(l&&(Bc(l)||Array.isArray(l)))i=i[a]=ex(l);else{var u=o[s+1];i=i[a]=M4(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 rE(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];Bc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},rE(a,t,n,r[o])):r[o]=t}return r}function L4(e,t){switch(t.type){case"SET_VALUES":return qe({},e,{values:t.payload});case"SET_TOUCHED":return qe({},e,{touched:t.payload});case"SET_ERRORS":return xi(e.errors,t.payload)?e:qe({},e,{errors:t.payload});case"SET_STATUS":return qe({},e,{status:t.payload});case"SET_ISSUBMITTING":return qe({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qe({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qe({},e,{values:Bi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qe({},e,{touched:Bi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qe({},e,{errors:Bi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qe({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qe({},e,{touched:rE(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return qe({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return qe({},e,{isSubmitting:!1});default:return e}}var mi={},Dl={};function I4(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=nE(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=qe({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),p=v.useRef(f.initialValues),h=v.useRef(f.initialErrors||mi),m=v.useRef(f.initialTouched||Dl),b=v.useRef(f.initialStatus),g=v.useRef(!1),y=v.useRef({});v.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var w=v.useState(0),T=w[1],E=v.useRef({values:Ol(f.initialValues),errors:Ol(f.initialErrors)||mi,touched:Ol(f.initialTouched)||Dl,status:Ol(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=E.current,C=v.useCallback(function(P){var I=E.current;E.current=L4(I,P),I!==E.current&&T(function(A){return A+1})},[]),j=v.useCallback(function(P,I){return new Promise(function(A,D){var B=f.validate(P,I);B==null?A(mi):Wd(B)?B.then(function(G){A(G||mi)},function(G){D(G)}):A(B)})},[f.validate]),k=v.useCallback(function(P,I){var A=f.validationSchema,D=mn(A)?A(I):A,B=I&&D.validateAt?D.validateAt(I,P):z4(P,D);return new Promise(function(G,oe){B.then(function(){G(mi)},function($e){$e.name==="ValidationError"?G($4($e)):oe($e)})})},[f.validationSchema]),R=v.useCallback(function(P,I){return new Promise(function(A){return A(y.current[P].validate(I))})},[]),M=v.useCallback(function(P){var I=Object.keys(y.current).filter(function(D){return mn(y.current[D].validate)}),A=I.length>0?I.map(function(D){return R(D,Nt(P,D))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(D){return D.reduce(function(B,G,oe){return G==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||G&&(B=Bi(B,I[oe],G)),B},{})})},[R]),H=v.useCallback(function(P){return Promise.all([M(P),f.validationSchema?k(P):{},f.validate?j(P):{}]).then(function(I){var A=I[0],D=I[1],B=I[2],G=Vp.all([A,D,B],{arrayMerge:B4});return G})},[f.validate,f.validationSchema,M,j,k]),Z=Yt(function(P){return P===void 0&&(P=_.values),C({type:"SET_ISVALIDATING",payload:!0}),H(P).then(function(I){return g.current&&(C({type:"SET_ISVALIDATING",payload:!1}),C({type:"SET_ERRORS",payload:I})),I})});v.useEffect(function(){o&&g.current===!0&&xi(p.current,f.initialValues)&&Z(p.current)},[o,Z]);var te=v.useCallback(function(P){var I=P&&P.values?P.values:p.current,A=P&&P.errors?P.errors:h.current?h.current:f.initialErrors||{},D=P&&P.touched?P.touched:m.current?m.current:f.initialTouched||{},B=P&&P.status?P.status:b.current?b.current:f.initialStatus;p.current=I,h.current=A,m.current=D,b.current=B;var G=function(){C({type:"RESET_FORM",payload:{isSubmitting:!!P&&!!P.isSubmitting,errors:A,touched:D,status:B,values:I,isValidating:!!P&&!!P.isValidating,submitCount:P&&P.submitCount&&typeof P.submitCount=="number"?P.submitCount:0}})};if(f.onReset){var oe=f.onReset(_.values,ci);Wd(oe)?oe.then(G):G()}else G()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){g.current===!0&&!xi(p.current,f.initialValues)&&u&&(p.current=f.initialValues,te(),o&&Z(p.current))},[u,f.initialValues,te,o,Z]),v.useEffect(function(){u&&g.current===!0&&!xi(h.current,f.initialErrors)&&(h.current=f.initialErrors||mi,C({type:"SET_ERRORS",payload:f.initialErrors||mi}))},[u,f.initialErrors]),v.useEffect(function(){u&&g.current===!0&&!xi(m.current,f.initialTouched)&&(m.current=f.initialTouched||Dl,C({type:"SET_TOUCHED",payload:f.initialTouched||Dl}))},[u,f.initialTouched]),v.useEffect(function(){u&&g.current===!0&&!xi(b.current,f.initialStatus)&&(b.current=f.initialStatus,C({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var ne=Yt(function(P){if(y.current[P]&&mn(y.current[P].validate)){var I=Nt(_.values,P),A=y.current[P].validate(I);return Wd(A)?(C({type:"SET_ISVALIDATING",payload:!0}),A.then(function(D){return D}).then(function(D){C({type:"SET_FIELD_ERROR",payload:{field:P,value:D}}),C({type:"SET_ISVALIDATING",payload:!1})})):(C({type:"SET_FIELD_ERROR",payload:{field:P,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return C({type:"SET_ISVALIDATING",payload:!0}),k(_.values,P).then(function(D){return D}).then(function(D){C({type:"SET_FIELD_ERROR",payload:{field:P,value:Nt(D,P)}}),C({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),W=v.useCallback(function(P,I){var A=I.validate;y.current[P]={validate:A}},[]),J=v.useCallback(function(P){delete y.current[P]},[]),O=Yt(function(P,I){C({type:"SET_TOUCHED",payload:P});var A=I===void 0?i:I;return A?Z(_.values):Promise.resolve()}),L=v.useCallback(function(P){C({type:"SET_ERRORS",payload:P})},[]),V=Yt(function(P,I){var A=mn(P)?P(_.values):P;C({type:"SET_VALUES",payload:A});var D=I===void 0?n:I;return D?Z(A):Promise.resolve()}),U=v.useCallback(function(P,I){C({type:"SET_FIELD_ERROR",payload:{field:P,value:I}})},[]),q=Yt(function(P,I,A){C({type:"SET_FIELD_VALUE",payload:{field:P,value:I}});var D=A===void 0?n:A;return D?Z(Bi(_.values,P,I)):Promise.resolve()}),X=v.useCallback(function(P,I){var A=I,D=P,B;if(!Hd(P)){P.persist&&P.persist();var G=P.target?P.target:P.currentTarget,oe=G.type,$e=G.name,Ze=G.id,_n=G.value,Kt=G.checked,fs=G.outerHTML,Yn=G.options,xr=G.multiple;A=I||$e||Ze,D=/number|range/.test(oe)?(B=parseFloat(_n),isNaN(B)?"":B):/checkbox/.test(oe)?U4(Nt(_.values,A),Kt,_n):Yn&&xr?V4(Yn):_n}A&&q(A,D)},[q,_.values]),ue=Yt(function(P){if(Hd(P))return function(I){return X(I,P)};X(P)}),me=Yt(function(P,I,A){I===void 0&&(I=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:P,value:I}});var D=A===void 0?i:A;return D?Z(_.values):Promise.resolve()}),ee=v.useCallback(function(P,I){P.persist&&P.persist();var A=P.target,D=A.name,B=A.id,G=A.outerHTML,oe=I||D||B;me(oe,!0)},[me]),Fe=Yt(function(P){if(Hd(P))return function(I){return ee(I,P)};ee(P)}),Ye=v.useCallback(function(P){mn(P)?C({type:"SET_FORMIK_STATE",payload:P}):C({type:"SET_FORMIK_STATE",payload:function(){return P}})},[]),Xe=v.useCallback(function(P){C({type:"SET_STATUS",payload:P})},[]),Ot=v.useCallback(function(P){C({type:"SET_ISSUBMITTING",payload:P})},[]),Cn=Yt(function(){return C({type:"SUBMIT_ATTEMPT"}),Z().then(function(P){var I=P instanceof Error,A=!I&&Object.keys(P).length===0;if(A){var D;try{if(D=gr(),D===void 0)return}catch(B){throw B}return Promise.resolve(D).then(function(B){return g.current&&C({type:"SUBMIT_SUCCESS"}),B}).catch(function(B){if(g.current)throw C({type:"SUBMIT_FAILURE"}),B})}else if(g.current&&(C({type:"SUBMIT_FAILURE"}),I))throw P})}),dn=Yt(function(P){P&&P.preventDefault&&mn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&mn(P.stopPropagation)&&P.stopPropagation(),Cn().catch(function(I){console.warn("Warning: An unhandled error was caught from submitForm()",I)})}),ci={resetForm:te,validateForm:Z,validateField:ne,setErrors:L,setFieldError:U,setFieldTouched:me,setFieldValue:q,setStatus:Xe,setSubmitting:Ot,setTouched:O,setValues:V,setFormikState:Ye,submitForm:Cn},gr=Yt(function(){return d(_.values,ci)}),ds=Yt(function(P){P&&P.preventDefault&&mn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&mn(P.stopPropagation)&&P.stopPropagation(),te()}),di=v.useCallback(function(P){return{value:Nt(_.values,P),error:Nt(_.errors,P),touched:!!Nt(_.touched,P),initialValue:Nt(p.current,P),initialTouched:!!Nt(m.current,P),initialError:Nt(h.current,P)}},[_.errors,_.touched,_.values]),bt=v.useCallback(function(P){return{setValue:function(A,D){return q(P,A,D)},setTouched:function(A,D){return me(P,A,D)},setError:function(A){return U(P,A)}}},[q,me,U]),vr=v.useCallback(function(P){var I=Bc(P),A=I?P.name:P,D=Nt(_.values,A),B={name:A,value:D,onChange:ue,onBlur:Fe};if(I){var G=P.type,oe=P.value,$e=P.as,Ze=P.multiple;G==="checkbox"?oe===void 0?B.checked=!!D:(B.checked=!!(Array.isArray(D)&&~D.indexOf(oe)),B.value=oe):G==="radio"?(B.checked=D===oe,B.value=oe):$e==="select"&&Ze&&(B.value=B.value||[],B.multiple=!0)}return B},[Fe,ue,_.values]),He=v.useMemo(function(){return!xi(p.current,_.values)},[p.current,_.values]),yr=v.useMemo(function(){return typeof a<"u"?He?_.errors&&Object.keys(_.errors).length===0:a!==!1&&mn(a)?a(f):a:_.errors&&Object.keys(_.errors).length===0},[a,He,_.errors,f]),Eo=qe({},_,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:b.current,handleBlur:Fe,handleChange:ue,handleReset:ds,handleSubmit:dn,resetForm:te,setErrors:L,setFormikState:Ye,setFieldTouched:me,setFieldValue:q,setFieldError:U,setStatus:Xe,setSubmitting:Ot,setTouched:O,setValues:V,submitForm:Cn,validateForm:Z,validateField:ne,isValid:yr,dirty:He,unregisterField:J,registerField:W,getFieldProps:vr,getFieldMeta:di,getFieldHelpers:bt,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Eo}function $4(e){var t={};if(e.inner){if(e.inner.length===0)return Bi(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;Nt(t,o.path)||(t=Bi(t,o.path,o.message))}}return t}function z4(e,t,n,r){n===void 0&&(n=!1);var i=Gp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Gp(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||Ay(i)?Gp(i):i!==""?i:void 0}):Ay(e[r])?t[r]=Gp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function B4(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?Vp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Vp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function V4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function U4(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 H4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Yt(e){var t=v.useRef(e);return H4(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 W4=v.forwardRef(function(e,t){var n=e.action,r=nE(e,["action"]),i=n??"#",s=N4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",qe({onSubmit:a,ref:t,onReset:o,action:i},r))});W4.displayName="Form";const iE=({init:e,schema:t,action:n})=>I4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function q4(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 K4=e=>{switch(e){case"success":return Y4;case"info":return Z4;case"warning":return X4;case"error":return J4;default:return null}},G4=Array(12).fill(0),Q4=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},G4.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Y4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),X4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.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"})),Z4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),J4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),eL=F.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"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),tL=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Qp=1;class nL{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:Qp++,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],F.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(iL(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)||Qp++;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 Tt=new nL,rL=(e,t)=>{const n=(t==null?void 0:t.id)||Qp++;return Tt.addToast({title:e,...t,id:n}),n},iL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sL=rL,oL=()=>Tt.toasts,aL=()=>Tt.getActiveToasts(),sE=Object.assign(sL,{success:Tt.success,info:Tt.info,warning:Tt.warning,error:Tt.error,custom:Tt.custom,message:Tt.message,promise:Tt.promise,dismiss:Tt.dismiss,loading:Tt.loading},{getHistory:oL,getToasts:aL});q4("[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 Fl(e){return e.label!==void 0}const lL=3,uL="24px",cL="16px",rx=4e3,dL=356,fL=14,pL=45,hL=200;function An(...e){return e.filter(Boolean).join(" ")}function mL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const gL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:d,toast:c,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:b,index:g,toasts:y,expanded:w,removeToast:T,defaultRichColors:E,closeButton:_,style:C,cancelButtonStyle:j,actionButtonStyle:k,className:R="",descriptionClassName:M="",duration:H,position:Z,gap:te,expandByDefault:ne,classNames:W,icons:J,closeButtonAriaLabel:O="Close toast"}=e,[L,V]=F.useState(null),[U,q]=F.useState(null),[X,ue]=F.useState(!1),[me,ee]=F.useState(!1),[Fe,Ye]=F.useState(!1),[Xe,Ot]=F.useState(!1),[Cn,dn]=F.useState(!1),[ci,gr]=F.useState(0),[ds,di]=F.useState(0),bt=F.useRef(c.duration||H||rx),vr=F.useRef(null),He=F.useRef(null),yr=g===0,Eo=g+1<=m,P=c.type,I=c.dismissible!==!1,A=c.className||"",D=c.descriptionClassName||"",B=F.useMemo(()=>b.findIndex(re=>re.toastId===c.id)||0,[b,c.id]),G=F.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:_},[c.closeButton,_]),oe=F.useMemo(()=>c.duration||H||rx,[c.duration,H]),$e=F.useRef(0),Ze=F.useRef(0),_n=F.useRef(0),Kt=F.useRef(null),[fs,Yn]=Z.split("-"),xr=F.useMemo(()=>b.reduce((re,We,ot)=>ot>=B?re:re+We.height,0),[b,B]),ps=tL(),To=c.invert||d,fi=P==="loading";Ze.current=F.useMemo(()=>B*te+xr,[B,xr]),F.useEffect(()=>{bt.current=oe},[oe]),F.useEffect(()=>{ue(!0)},[]),F.useEffect(()=>{const re=He.current;if(re){const We=re.getBoundingClientRect().height;return di(We),h(ot=>[{toastId:c.id,height:We,position:c.position},...ot]),()=>h(ot=>ot.filter(Dt=>Dt.toastId!==c.id))}},[h,c.id]),F.useLayoutEffect(()=>{if(!X)return;const re=He.current,We=re.style.height;re.style.height="auto";const ot=re.getBoundingClientRect().height;re.style.height=We,di(ot),h(Dt=>Dt.find(Je=>Je.toastId===c.id)?Dt.map(Je=>Je.toastId===c.id?{...Je,height:ot}:Je):[{toastId:c.id,height:ot,position:c.position},...Dt])},[X,c.title,c.description,h,c.id]);const Pn=F.useCallback(()=>{ee(!0),gr(Ze.current),h(re=>re.filter(We=>We.toastId!==c.id)),setTimeout(()=>{T(c)},hL)},[c,T,h,Ze]);F.useEffect(()=>{if(c.promise&&P==="loading"||c.duration===1/0||c.type==="loading")return;let re;return w||p||ps?(()=>{if(_n.current<$e.current){const Dt=new Date().getTime()-$e.current;bt.current=bt.current-Dt}_n.current=new Date().getTime()})():(()=>{bt.current!==1/0&&($e.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Pn()},bt.current))})(),()=>clearTimeout(re)},[w,p,c,P,ps,Pn]),F.useEffect(()=>{c.delete&&Pn()},[Pn,c.delete]);function zE(){var re;if(J!=null&&J.loading){var We;return F.createElement("div",{className:An(W==null?void 0:W.loader,c==null||(We=c.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":P==="loading"},J.loading)}return F.createElement(Q4,{className:An(W==null?void 0:W.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:P==="loading"})}var gg,vg;return F.createElement("li",{tabIndex:0,ref:He,className:An(R,A,W==null?void 0:W.toast,c==null||(t=c.classNames)==null?void 0:t.toast,W==null?void 0:W.default,W==null?void 0:W[P],c==null||(n=c.classNames)==null?void 0:n[P]),"data-sonner-toast":"","data-rich-colors":(gg=c.richColors)!=null?gg:E,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":X,"data-promise":!!c.promise,"data-swiped":Cn,"data-removed":me,"data-visible":Eo,"data-y-position":fs,"data-x-position":Yn,"data-index":g,"data-front":yr,"data-swiping":Fe,"data-dismissible":I,"data-type":P,"data-invert":To,"data-swipe-out":Xe,"data-swipe-direction":U,"data-expanded":!!(w||ne&&X),style:{"--index":g,"--toasts-before":g,"--z-index":y.length-g,"--offset":`${me?ci:Ze.current}px`,"--initial-height":ne?"auto":`${ds}px`,...C,...c.style},onDragEnd:()=>{Ye(!1),V(null),Kt.current=null},onPointerDown:re=>{fi||!I||(vr.current=new Date,gr(Ze.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Ye(!0),Kt.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,We,ot;if(Xe||!I)return;Kt.current=null;const Dt=Number(((re=He.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),il=Number(((We=He.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Je=new Date().getTime()-((ot=vr.current)==null?void 0:ot.getTime()),Gt=L==="x"?Dt:il,sl=Math.abs(Gt)/Je;if(Math.abs(Gt)>=pL||sl>.11){gr(Ze.current),c.onDismiss==null||c.onDismiss.call(c,c),q(L==="x"?Dt>0?"right":"left":il>0?"down":"up"),Pn(),Ot(!0);return}else{var fn,pn;(fn=He.current)==null||fn.style.setProperty("--swipe-amount-x","0px"),(pn=He.current)==null||pn.style.setProperty("--swipe-amount-y","0px")}dn(!1),Ye(!1),V(null)},onPointerMove:re=>{var We,ot,Dt;if(!Kt.current||!I||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const Je=re.clientY-Kt.current.y,Gt=re.clientX-Kt.current.x;var sl;const fn=(sl=e.swipeDirections)!=null?sl:mL(Z);!L&&(Math.abs(Gt)>1||Math.abs(Je)>1)&&V(Math.abs(Gt)>Math.abs(Je)?"x":"y");let pn={x:0,y:0};const yg=pi=>1/(1.5+Math.abs(pi)/20);if(L==="y"){if(fn.includes("top")||fn.includes("bottom"))if(fn.includes("top")&&Je<0||fn.includes("bottom")&&Je>0)pn.y=Je;else{const pi=Je*yg(Je);pn.y=Math.abs(pi)<Math.abs(Je)?pi:Je}}else if(L==="x"&&(fn.includes("left")||fn.includes("right")))if(fn.includes("left")&&Gt<0||fn.includes("right")&&Gt>0)pn.x=Gt;else{const pi=Gt*yg(Gt);pn.x=Math.abs(pi)<Math.abs(Gt)?pi:Gt}(Math.abs(pn.x)>0||Math.abs(pn.y)>0)&&dn(!0),(ot=He.current)==null||ot.style.setProperty("--swipe-amount-x",`${pn.x}px`),(Dt=He.current)==null||Dt.style.setProperty("--swipe-amount-y",`${pn.y}px`)}},G&&!c.jsx&&P!=="loading"?F.createElement("button",{"aria-label":O,"data-disabled":fi,"data-close-button":!0,onClick:fi||!I?()=>{}:()=>{Pn(),c.onDismiss==null||c.onDismiss.call(c,c)},className:An(W==null?void 0:W.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(vg=J==null?void 0:J.close)!=null?vg:eL):null,P||c.icon||c.promise?F.createElement("div",{"data-icon":"",className:An(W==null?void 0:W.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||zE():null,c.type!=="loading"?c.icon||(J==null?void 0:J[P])||K4(P):null):null,F.createElement("div",{"data-content":"",className:An(W==null?void 0:W.content,c==null||(s=c.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:An(W==null?void 0:W.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?F.createElement("div",{"data-description":"",className:An(M,D,W==null?void 0:W.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&Fl(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||j,onClick:re=>{Fl(c.cancel)&&I&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),Pn())},className:An(W==null?void 0:W.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&Fl(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||k,onClick:re=>{Fl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&Pn())},className:An(W==null?void 0:W.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ix(){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 vL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?cL:uL;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 yL=F.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:h,visibleToasts:m=lL,toastOptions:b,dir:g=ix(),gap:y=fL,icons:w,containerAriaLabel:T="Notifications"}=t,[E,_]=F.useState([]),C=F.useMemo(()=>Array.from(new Set([i].concat(E.filter(U=>U.position).map(U=>U.position)))),[E,i]),[j,k]=F.useState([]),[R,M]=F.useState(!1),[H,Z]=F.useState(!1),[te,ne]=F.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),J=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=F.useRef(null),L=F.useRef(!1),V=F.useCallback(U=>{_(q=>{var X;return(X=q.find(ue=>ue.id===U.id))!=null&&X.delete||Tt.dismiss(U.id),q.filter(({id:ue})=>ue!==U.id)})},[]);return F.useEffect(()=>Tt.subscribe(U=>{if(U.dismiss){const q=E.map(X=>X.id===U.id?{...X,delete:!0}:X);requestAnimationFrame(()=>{_(q)});return}setTimeout(()=>{h2.flushSync(()=>{_(q=>{const X=q.findIndex(ue=>ue.id===U.id);return X!==-1?[...q.slice(0,X),{...q[X],...U},...q.slice(X+1)]:[U,...q]})})})}),[E]),F.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:q})=>{ne(q?"dark":"light")})}catch{U.addListener(({matches:X})=>{try{ne(X?"dark":"light")}catch(ue){console.error(ue)}})}},[c]),F.useEffect(()=>{E.length<=1&&M(!1)},[E]),F.useEffect(()=>{const U=q=>{var X;if(s.every(ee=>q[ee]||q.code===ee)){var me;M(!0),(me=W.current)==null||me.focus()}q.code==="Escape"&&(document.activeElement===W.current||(X=W.current)!=null&&X.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),F.useEffect(()=>{if(W.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[W.current]),F.createElement("section",{ref:n,"aria-label":`${T} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((U,q)=>{var X;const[ue,me]=U.split("-");return E.length?F.createElement("ol",{key:U,dir:g==="auto"?ix():g,tabIndex:-1,ref:W,className:l,"data-sonner-toaster":!0,"data-sonner-theme":te,"data-y-position":ue,"data-lifted":R&&E.length>1&&!o,"data-x-position":me,style:{"--front-toast-height":`${((X=j[0])==null?void 0:X.height)||0}px`,"--width":`${dL}px`,"--gap":`${y}px`,...h,...vL(u,d)},onBlur:ee=>{L.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=ee.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{H||M(!1)},onDragEnd:()=>M(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},E.filter(ee=>!ee.position&&q===0||ee.position===U).map((ee,Fe)=>{var Ye,Xe;return F.createElement(gL,{key:ee.id,icons:w,index:Fe,toast:ee,defaultRichColors:f,duration:(Ye=b==null?void 0:b.duration)!=null?Ye:p,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:m,closeButton:(Xe=b==null?void 0:b.closeButton)!=null?Xe:a,interacting:H,position:U,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:V,toasts:E.filter(Ot=>Ot.position==ee.position),heights:j.filter(Ot=>Ot.position==ee.position),setHeights:k,expandByDefault:o,gap:y,expanded:R,swipeDirections:t.swipeDirections})})):null}))});function sx(e){return sE.custom(t=>x.jsx(xL,{id:t,title:e.title,description:e.description,variant:e.variant}))}const qd={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 xL(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return x.jsxs("div",{className:fe("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",qd[s||"info"].bg),children:[x.jsx("div",{className:"flex flex-1 items-center",children:x.jsxs("div",{className:"w-full",children:[t&&x.jsx("p",{className:fe("text-sm font-medium",qd[s||"info"].text),children:t}),x.jsx("p",{className:fe("text-sm",qd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&x.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:x.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(),sE.dismiss(i)},children:r.label})})]})}function wL(e){return Array.isArray(e)&&e[0].field!==void 0}const oE=(e,t)=>{var n;if(wL(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||sx({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||sx({description:e.error,variant:"error"});return}};function bL(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 cg({id:e,text:t,className:n,required:r}){return t?x.jsxs("label",{htmlFor:e,className:fe("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&x.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Kd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function SL({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,...h}){const m=hr();return x.jsxs("div",{className:fe({"mb-2":!o},d),children:[x.jsx(cg,{id:e,text:t,required:a}),x.jsxs("div",{className:"flex items-center",children:[r&&x.jsx("span",{className:fe("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Kd[i],{"border-red-500!":!!l}),children:r}),x.jsx("input",{id:e,className:fe("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Kd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{color:m.getColor(Y.InputText),backgroundColor:m.getColor(Y.InputBackground),borderColor:m.getColor(Y.InputBorder),borderRadius:m.getRadius()},...h}),n&&x.jsx("span",{className:fe("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Kd[i],{"border-red-500!":!!l}),children:n})]}),!!l&&x.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const kL=(e,t)=>{document.cookie=`${e}=${t}`},aE=v.createContext({}),EL=()=>`${window.location.pathname}_$$_${document.title}`,TL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},CL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function _L({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(CL());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 x.jsx(aE.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function dg(){return v.useContext(aE)}function PL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return x.jsxs("div",{className:r||"",children:[e&&x.jsx(cg,{id:t,required:o,text:e}),x.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&&x.jsx("p",{className:"1 texm text-r500",children:a})]})}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:""}},jL={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"},AL={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"},RL={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,...h}){return x.jsxs("div",{children:[x.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${ox[d].label}`,children:[x.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[x.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 ${jL[f]} ${AL[u]} ${ox[d].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),x.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:x.jsx(ve.Check,{className:RL[u]})})]}),x.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&&x.jsx("small",{className:"text-xs text-red-500",children:a}),p&&x.jsx("small",{className:"text-xs text-red-500",children:p})]})}function DL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return x.jsxs("label",{htmlFor:e,className:fe("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[x.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}),x.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function FL({id:e,label:t,children:n,required:r,className:i,error:s}){return x.jsxs("fieldset",{id:e,className:i,children:[t&&x.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&x.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),x.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&x.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const ax=Object.assign(DL,{Group:FL});function fg({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,...h}){const m=hr();return x.jsxs("div",{className:fe({"mb-2":!s},i),children:[t&&x.jsx(cg,{id:e,text:t,required:l}),x.jsx("textarea",{className:fe("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":d,...h,ref:c,autoFocus:f,style:{...p,color:m.getColor(Y.InputText),backgroundColor:m.getColor(Y.InputBackground),borderColor:m.getColor(Y.InputBorder),borderRadius:m.getRadius()}}),!!u&&x.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function NL({onOk:e,clientId:t,widgetId:n,appearance:r}){var g,y,w,T,E,_,C,j;const i=hr(),{defaultValues:s,widget:o}=Wt(),[a,l]=v.useState(!1),u=dg(),d=bD(),c=!!s&&"username"in s,f=(y=(g=r==null?void 0:r.body)==null?void 0:g.inputs)==null?void 0:y.reduce((k,R)=>{let M=R.remember?iu(R.name):s==null?void 0:s[R.name];return R.options&&M&&!R.options.includes(M)&&(M=void 0),R.name==="username"&&c&&(M=s.username),k[R.name]=M||"",k},{}),p=(T=(w=r==null?void 0:r.body)==null?void 0:w.inputs)==null?void 0:T.reduce((k,R)=>(k[R.name]="",k),{}),h=Xm((_=(E=r==null?void 0:r.body)==null?void 0:E.inputs)==null?void 0:_.reduce((k,R)=>(k[R.name]=R.required?Wu().required(`${R.label} alanı zorunludur`):Wu(),k),{})),m=iE({init:{...f},schema:h,action:async k=>{var H;if(a)return;l(!0),c&&(k.username=s.username);const[R,M]=await d.mutateAsync({inputs:k,history:u.history,client_id:t,widget_id:n});if(fc(M)){wD(R)&&(wd(an.CustomerToken,R.customer_token,(o==null?void 0:o.link_id)||""),wd(an.CustomerRefreshToken,R.customer_refresh_token,(o==null?void 0:o.link_id)||""),wd(an.DeviceId,R.device_id,(o==null?void 0:o.link_id)||"")),u.clearHistory();for(const Z of((H=r==null?void 0:r.body)==null?void 0:H.inputs)||[])Z.remember&&kL(Z.name,k[Z.name]);l(!1),e==null||e();return}l(!1),oE(R,{form:m})}}),b=!bL(p||{},(m==null?void 0:m.values)||{});return x.jsx("section",{className:"h-full overflow-y-auto px-4 py-3 bg-white",style:{backgroundColor:i.getColor(Y.GreeterBackground)},children:x.jsxs("form",{className:"grid grid-cols-1 gap-2",onSubmit:k=>{k.preventDefault(),m.handleSubmit()},children:[(j=(C=r==null?void 0:r.body)==null?void 0:C.inputs)==null?void 0:j.map(k=>{var R,M;if(["text","email","phone"].includes(k.type))return x.jsx(SL,{id:k.name,name:k.name,type:k.type,label:k.label,value:m.values[k.name],onChange:m.handleChange,onBlur:m.handleBlur,disabled:k.name==="username"&&c,readOnly:k.name==="username"&&c,autoComplete:"off",placeholder:k.placeholder,error:m.errors[k.name],ariaInvalid:m.errors.name?!0:void 0,required:k.required,noMargin:!0},k.name);if(k.type==="select")return x.jsx(PL,{id:k.name,name:k.name,value:m.values[k.name],onChange:m.handleChange,label:k.label,error:m.errors[k.name],required:k.required,children:(R=k.options)==null?void 0:R.map(H=>x.jsx("option",{value:H,children:H},H))},k.name);if(k.type==="checkbox")return x.jsx(OL,{id:k.name,name:k.name,value:m.values[k.name],checked:m.values[k.name]==="true",onChange:m.handleChange,required:k.required,error:m.errors[k.name],children:k.label},k.name);if(k.type==="radio")return x.jsx(ax.Group,{id:k.name,label:k.label,required:k.required,error:m.errors[k.name],children:(M=k.options)==null?void 0:M.map(H=>x.jsx(ax,{onChange:Z=>{Z?m.setFieldValue(k.name,H):m.setFieldValue(k.name,"")},id:H,name:k.name,value:H===m.values[k.name],children:H},H))},k.name);if(k.type==="textarea")return x.jsx(fg,{id:k.name,name:k.name,value:m.values[k.name],onChange:m.handleChange,placeholder:k.placeholder,error:m.errors[k.name],required:k.required,label:k.label},k.name)}),x.jsx(sn,{textKey:Y.GreeterButtonText,bgKey:Y.GreeterButtonBackground,type:"submit",disabled:!b||a,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:a?"Yükleniyor...":"Sohbet Oluştur"})]})})}function ML({onClose:e}){return x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:x.jsx(ve.X,{className:"size-5"})})}function LL({image_url:e,name:t,size:n="size-9"}){return e?x.jsx("img",{src:e,alt:t,className:fe("rounded-md",n)}):x.jsx("div",{className:"flex items-center justify-center gap-1",children:x.jsx(ve.Website,{className:fe("text-slate-500",n)})})}function IL(){const e=dg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Wm("popstate",t),null}function $L(){const e=rs(),t=dg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Kn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Wm("popstate",n),v.useEffect(()=>{if(!e)return;const r=TL(),i=EL();r!==i&&(e.emit(Kn.PageChange,{page:i}),t.setPage(i))},[e]),null}function zL({children:e}){const t=hr(),{widget:n}=Wt();return n?x.jsx(Yr,{children:x.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[x.jsx(Te.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(Y.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function BL(){return IL(),null}const Gd=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function VL(){var c,f,p,h,m,b;const e=hr(),{widget:t,setOpen:n}=Wt(),[r,i]=v.useState(!0),s=Hm(),o=So();if(!t)return null;const a=()=>{n(!1)};if(v.useEffect(()=>{SD(t.client_id).then(([g,y])=>{fc(y)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Gd(((f=(c=t.appearance)==null?void 0:c.head)==null?void 0:f.elements)||[],"text"),u=Gd(((h=(p=t.appearance)==null?void 0:p.head)==null?void 0:h.elements)||[],"title"),d=Gd(((b=(m=t.appearance)==null?void 0:m.head)==null?void 0:b.elements)||[],"logo");return x.jsxs(zL,{children:[x.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&x.jsx(ML,{onClose:a}),d&&x.jsx(Te.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:x.jsx(LL,{name:t.name,image_url:d,size:"size-20"})}),u&&x.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&x.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),x.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:o?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:x.jsx(NL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function UL(){return x.jsxs(x.Fragment,{children:[x.jsx(hk,{border:!0,children:x.jsx(VL,{})}),x.jsx(BL,{})]})}const HL=[{path:"/",component:UL,name:"registration"}];var gs=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(gs||{}),bi=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(bi||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function WL({name:e,avatar:t,className:n="text-neutral-500"}){return x.jsxs(Te.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[x.jsx("div",{className:"min-w-max",children:x.jsxs("span",{children:[t&&x.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&x.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),x.jsx("div",{className:"flex flex-col",children:x.jsx("span",{className:fe("line-clamp-1 font-medium",n),children:e})})]})}var qL=Object.defineProperty,KL=(e,t,n)=>t in e?qL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(KL(e,typeof t!="symbol"?t+"":t,n),n);let GL=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(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"}},au=new GL;function QL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Vc(){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 QL(()=>{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=Vc();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 lE(){let[e]=v.useState(Vc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let Jr=(e,t)=>{au.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function uE(e){let t=v.useRef(e);return Jr(()=>{t.current=e},[e]),t}let sr=function(e){let t=uE(e);return F.useCallback((...n)=>t.current(...n),[t])};function Yp(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Uc(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,Uc),r}var cE=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(cE||{}),zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(zr||{});function dE(){let e=XL();return v.useCallback(t=>YL({mergeRefs:e,...t}),[e])}function YL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??ZL;let l=fE(t,e);if(s)return Nl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return Nl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Uc(d?0:1,{0(){return null},1(){return Nl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Nl(l,n,r,o,a)}function Nl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Yd(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[h,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&p.push(h.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let h of p)c[`data-${h}`]=""}}if(s===v.Fragment&&(Object.keys(wi(l)).length>0||Object.keys(wi(c)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(wi(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(wi(l)).concat(Object.keys(wi(c))).map(f=>` - ${f}`).join(`
105
+ */var Qe=typeof Symbol=="function"&&Symbol.for,ag=Qe?Symbol.for("react.element"):60103,lg=Qe?Symbol.for("react.portal"):60106,Ac=Qe?Symbol.for("react.fragment"):60107,Rc=Qe?Symbol.for("react.strict_mode"):60108,Oc=Qe?Symbol.for("react.profiler"):60114,Dc=Qe?Symbol.for("react.provider"):60109,Fc=Qe?Symbol.for("react.context"):60110,ug=Qe?Symbol.for("react.async_mode"):60111,Nc=Qe?Symbol.for("react.concurrent_mode"):60111,Mc=Qe?Symbol.for("react.forward_ref"):60112,Lc=Qe?Symbol.for("react.suspense"):60113,_4=Qe?Symbol.for("react.suspense_list"):60120,Ic=Qe?Symbol.for("react.memo"):60115,$c=Qe?Symbol.for("react.lazy"):60116,P4=Qe?Symbol.for("react.block"):60121,j4=Qe?Symbol.for("react.fundamental"):60117,A4=Qe?Symbol.for("react.responder"):60118,R4=Qe?Symbol.for("react.scope"):60119;function qt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ag:switch(e=e.type,e){case ug:case Nc:case Ac:case Oc:case Rc:case Lc:return e;default:switch(e=e&&e.$$typeof,e){case Fc:case Mc:case $c:case Ic:case Dc:return e;default:return t}}case lg:return t}}}function Jk(e){return qt(e)===Nc}he.AsyncMode=ug;he.ConcurrentMode=Nc;he.ContextConsumer=Fc;he.ContextProvider=Dc;he.Element=ag;he.ForwardRef=Mc;he.Fragment=Ac;he.Lazy=$c;he.Memo=Ic;he.Portal=lg;he.Profiler=Oc;he.StrictMode=Rc;he.Suspense=Lc;he.isAsyncMode=function(e){return Jk(e)||qt(e)===ug};he.isConcurrentMode=Jk;he.isContextConsumer=function(e){return qt(e)===Fc};he.isContextProvider=function(e){return qt(e)===Dc};he.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ag};he.isForwardRef=function(e){return qt(e)===Mc};he.isFragment=function(e){return qt(e)===Ac};he.isLazy=function(e){return qt(e)===$c};he.isMemo=function(e){return qt(e)===Ic};he.isPortal=function(e){return qt(e)===lg};he.isProfiler=function(e){return qt(e)===Oc};he.isStrictMode=function(e){return qt(e)===Rc};he.isSuspense=function(e){return qt(e)===Lc};he.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ac||e===Nc||e===Oc||e===Rc||e===Lc||e===_4||typeof e=="object"&&e!==null&&(e.$$typeof===$c||e.$$typeof===Ic||e.$$typeof===Dc||e.$$typeof===Fc||e.$$typeof===Mc||e.$$typeof===j4||e.$$typeof===A4||e.$$typeof===R4||e.$$typeof===P4)};he.typeOf=qt;Zk.exports=he;var O4=Zk.exports,eE=O4,D4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tE={};tE[eE.ForwardRef]=D4;tE[eE.Memo]=F4;function qe(){return qe=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},qe.apply(this,arguments)}function nE(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 zc=v.createContext(void 0);zc.displayName="FormikContext";zc.Provider;zc.Consumer;function N4(){var e=v.useContext(zc);return e}var hn=function(t){return typeof t=="function"},Bc=function(t){return t!==null&&typeof t=="object"},M4=function(t){return String(Math.floor(Number(t)))===t},Hd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Wd=function(t){return Bc(t)&&hn(t.then)};function Mt(e,t,n,r){r===void 0&&(r=0);for(var i=Xk(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Bi(e,t,n){for(var r=ex(e),i=r,s=0,o=Xk(t);s<o.length-1;s++){var a=o[s],l=Mt(e,o.slice(0,s+1));if(l&&(Bc(l)||Array.isArray(l)))i=i[a]=ex(l);else{var u=o[s+1];i=i[a]=M4(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 rE(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];Bc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},rE(a,t,n,r[o])):r[o]=t}return r}function L4(e,t){switch(t.type){case"SET_VALUES":return qe({},e,{values:t.payload});case"SET_TOUCHED":return qe({},e,{touched:t.payload});case"SET_ERRORS":return xi(e.errors,t.payload)?e:qe({},e,{errors:t.payload});case"SET_STATUS":return qe({},e,{status:t.payload});case"SET_ISSUBMITTING":return qe({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qe({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qe({},e,{values:Bi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qe({},e,{touched:Bi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qe({},e,{errors:Bi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qe({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qe({},e,{touched:rE(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return qe({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return qe({},e,{isSubmitting:!1});default:return e}}var mi={},Dl={};function I4(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=nE(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=qe({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),p=v.useRef(f.initialValues),h=v.useRef(f.initialErrors||mi),m=v.useRef(f.initialTouched||Dl),b=v.useRef(f.initialStatus),g=v.useRef(!1),y=v.useRef({});v.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var w=v.useState(0),T=w[1],E=v.useRef({values:Ol(f.initialValues),errors:Ol(f.initialErrors)||mi,touched:Ol(f.initialTouched)||Dl,status:Ol(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=E.current,C=v.useCallback(function(P){var I=E.current;E.current=L4(I,P),I!==E.current&&T(function(A){return A+1})},[]),j=v.useCallback(function(P,I){return new Promise(function(A,D){var B=f.validate(P,I);B==null?A(mi):Wd(B)?B.then(function(G){A(G||mi)},function(G){D(G)}):A(B)})},[f.validate]),k=v.useCallback(function(P,I){var A=f.validationSchema,D=hn(A)?A(I):A,B=I&&D.validateAt?D.validateAt(I,P):z4(P,D);return new Promise(function(G,oe){B.then(function(){G(mi)},function($e){$e.name==="ValidationError"?G($4($e)):oe($e)})})},[f.validationSchema]),R=v.useCallback(function(P,I){return new Promise(function(A){return A(y.current[P].validate(I))})},[]),M=v.useCallback(function(P){var I=Object.keys(y.current).filter(function(D){return hn(y.current[D].validate)}),A=I.length>0?I.map(function(D){return R(D,Mt(P,D))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(D){return D.reduce(function(B,G,oe){return G==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||G&&(B=Bi(B,I[oe],G)),B},{})})},[R]),H=v.useCallback(function(P){return Promise.all([M(P),f.validationSchema?k(P):{},f.validate?j(P):{}]).then(function(I){var A=I[0],D=I[1],B=I[2],G=Vp.all([A,D,B],{arrayMerge:B4});return G})},[f.validate,f.validationSchema,M,j,k]),Z=Yt(function(P){return P===void 0&&(P=_.values),C({type:"SET_ISVALIDATING",payload:!0}),H(P).then(function(I){return g.current&&(C({type:"SET_ISVALIDATING",payload:!1}),C({type:"SET_ERRORS",payload:I})),I})});v.useEffect(function(){o&&g.current===!0&&xi(p.current,f.initialValues)&&Z(p.current)},[o,Z]);var te=v.useCallback(function(P){var I=P&&P.values?P.values:p.current,A=P&&P.errors?P.errors:h.current?h.current:f.initialErrors||{},D=P&&P.touched?P.touched:m.current?m.current:f.initialTouched||{},B=P&&P.status?P.status:b.current?b.current:f.initialStatus;p.current=I,h.current=A,m.current=D,b.current=B;var G=function(){C({type:"RESET_FORM",payload:{isSubmitting:!!P&&!!P.isSubmitting,errors:A,touched:D,status:B,values:I,isValidating:!!P&&!!P.isValidating,submitCount:P&&P.submitCount&&typeof P.submitCount=="number"?P.submitCount:0}})};if(f.onReset){var oe=f.onReset(_.values,ci);Wd(oe)?oe.then(G):G()}else G()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){g.current===!0&&!xi(p.current,f.initialValues)&&u&&(p.current=f.initialValues,te(),o&&Z(p.current))},[u,f.initialValues,te,o,Z]),v.useEffect(function(){u&&g.current===!0&&!xi(h.current,f.initialErrors)&&(h.current=f.initialErrors||mi,C({type:"SET_ERRORS",payload:f.initialErrors||mi}))},[u,f.initialErrors]),v.useEffect(function(){u&&g.current===!0&&!xi(m.current,f.initialTouched)&&(m.current=f.initialTouched||Dl,C({type:"SET_TOUCHED",payload:f.initialTouched||Dl}))},[u,f.initialTouched]),v.useEffect(function(){u&&g.current===!0&&!xi(b.current,f.initialStatus)&&(b.current=f.initialStatus,C({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var ne=Yt(function(P){if(y.current[P]&&hn(y.current[P].validate)){var I=Mt(_.values,P),A=y.current[P].validate(I);return Wd(A)?(C({type:"SET_ISVALIDATING",payload:!0}),A.then(function(D){return D}).then(function(D){C({type:"SET_FIELD_ERROR",payload:{field:P,value:D}}),C({type:"SET_ISVALIDATING",payload:!1})})):(C({type:"SET_FIELD_ERROR",payload:{field:P,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return C({type:"SET_ISVALIDATING",payload:!0}),k(_.values,P).then(function(D){return D}).then(function(D){C({type:"SET_FIELD_ERROR",payload:{field:P,value:Mt(D,P)}}),C({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),W=v.useCallback(function(P,I){var A=I.validate;y.current[P]={validate:A}},[]),J=v.useCallback(function(P){delete y.current[P]},[]),O=Yt(function(P,I){C({type:"SET_TOUCHED",payload:P});var A=I===void 0?i:I;return A?Z(_.values):Promise.resolve()}),L=v.useCallback(function(P){C({type:"SET_ERRORS",payload:P})},[]),V=Yt(function(P,I){var A=hn(P)?P(_.values):P;C({type:"SET_VALUES",payload:A});var D=I===void 0?n:I;return D?Z(A):Promise.resolve()}),U=v.useCallback(function(P,I){C({type:"SET_FIELD_ERROR",payload:{field:P,value:I}})},[]),q=Yt(function(P,I,A){C({type:"SET_FIELD_VALUE",payload:{field:P,value:I}});var D=A===void 0?n:A;return D?Z(Bi(_.values,P,I)):Promise.resolve()}),X=v.useCallback(function(P,I){var A=I,D=P,B;if(!Hd(P)){P.persist&&P.persist();var G=P.target?P.target:P.currentTarget,oe=G.type,$e=G.name,Ze=G.id,Cn=G.value,Kt=G.checked,fs=G.outerHTML,Yn=G.options,xr=G.multiple;A=I||$e||Ze,D=/number|range/.test(oe)?(B=parseFloat(Cn),isNaN(B)?"":B):/checkbox/.test(oe)?U4(Mt(_.values,A),Kt,Cn):Yn&&xr?V4(Yn):Cn}A&&q(A,D)},[q,_.values]),ue=Yt(function(P){if(Hd(P))return function(I){return X(I,P)};X(P)}),me=Yt(function(P,I,A){I===void 0&&(I=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:P,value:I}});var D=A===void 0?i:A;return D?Z(_.values):Promise.resolve()}),ee=v.useCallback(function(P,I){P.persist&&P.persist();var A=P.target,D=A.name,B=A.id,G=A.outerHTML,oe=I||D||B;me(oe,!0)},[me]),Fe=Yt(function(P){if(Hd(P))return function(I){return ee(I,P)};ee(P)}),Ye=v.useCallback(function(P){hn(P)?C({type:"SET_FORMIK_STATE",payload:P}):C({type:"SET_FORMIK_STATE",payload:function(){return P}})},[]),Xe=v.useCallback(function(P){C({type:"SET_STATUS",payload:P})},[]),Dt=v.useCallback(function(P){C({type:"SET_ISSUBMITTING",payload:P})},[]),Tn=Yt(function(){return C({type:"SUBMIT_ATTEMPT"}),Z().then(function(P){var I=P instanceof Error,A=!I&&Object.keys(P).length===0;if(A){var D;try{if(D=gr(),D===void 0)return}catch(B){throw B}return Promise.resolve(D).then(function(B){return g.current&&C({type:"SUBMIT_SUCCESS"}),B}).catch(function(B){if(g.current)throw C({type:"SUBMIT_FAILURE"}),B})}else if(g.current&&(C({type:"SUBMIT_FAILURE"}),I))throw P})}),cn=Yt(function(P){P&&P.preventDefault&&hn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&hn(P.stopPropagation)&&P.stopPropagation(),Tn().catch(function(I){console.warn("Warning: An unhandled error was caught from submitForm()",I)})}),ci={resetForm:te,validateForm:Z,validateField:ne,setErrors:L,setFieldError:U,setFieldTouched:me,setFieldValue:q,setStatus:Xe,setSubmitting:Dt,setTouched:O,setValues:V,setFormikState:Ye,submitForm:Tn},gr=Yt(function(){return d(_.values,ci)}),ds=Yt(function(P){P&&P.preventDefault&&hn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&hn(P.stopPropagation)&&P.stopPropagation(),te()}),di=v.useCallback(function(P){return{value:Mt(_.values,P),error:Mt(_.errors,P),touched:!!Mt(_.touched,P),initialValue:Mt(p.current,P),initialTouched:!!Mt(m.current,P),initialError:Mt(h.current,P)}},[_.errors,_.touched,_.values]),bt=v.useCallback(function(P){return{setValue:function(A,D){return q(P,A,D)},setTouched:function(A,D){return me(P,A,D)},setError:function(A){return U(P,A)}}},[q,me,U]),vr=v.useCallback(function(P){var I=Bc(P),A=I?P.name:P,D=Mt(_.values,A),B={name:A,value:D,onChange:ue,onBlur:Fe};if(I){var G=P.type,oe=P.value,$e=P.as,Ze=P.multiple;G==="checkbox"?oe===void 0?B.checked=!!D:(B.checked=!!(Array.isArray(D)&&~D.indexOf(oe)),B.value=oe):G==="radio"?(B.checked=D===oe,B.value=oe):$e==="select"&&Ze&&(B.value=B.value||[],B.multiple=!0)}return B},[Fe,ue,_.values]),He=v.useMemo(function(){return!xi(p.current,_.values)},[p.current,_.values]),yr=v.useMemo(function(){return typeof a<"u"?He?_.errors&&Object.keys(_.errors).length===0:a!==!1&&hn(a)?a(f):a:_.errors&&Object.keys(_.errors).length===0},[a,He,_.errors,f]),Eo=qe({},_,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:b.current,handleBlur:Fe,handleChange:ue,handleReset:ds,handleSubmit:cn,resetForm:te,setErrors:L,setFormikState:Ye,setFieldTouched:me,setFieldValue:q,setFieldError:U,setStatus:Xe,setSubmitting:Dt,setTouched:O,setValues:V,submitForm:Tn,validateForm:Z,validateField:ne,isValid:yr,dirty:He,unregisterField:J,registerField:W,getFieldProps:vr,getFieldMeta:di,getFieldHelpers:bt,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Eo}function $4(e){var t={};if(e.inner){if(e.inner.length===0)return Bi(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;Mt(t,o.path)||(t=Bi(t,o.path,o.message))}}return t}function z4(e,t,n,r){n===void 0&&(n=!1);var i=Gp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Gp(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||Ay(i)?Gp(i):i!==""?i:void 0}):Ay(e[r])?t[r]=Gp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function B4(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?Vp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Vp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function V4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function U4(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 H4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Yt(e){var t=v.useRef(e);return H4(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 W4=v.forwardRef(function(e,t){var n=e.action,r=nE(e,["action"]),i=n??"#",s=N4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",qe({onSubmit:a,ref:t,onReset:o,action:i},r))});W4.displayName="Form";const iE=({init:e,schema:t,action:n})=>I4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function q4(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 K4=e=>{switch(e){case"success":return Y4;case"info":return Z4;case"warning":return X4;case"error":return J4;default:return null}},G4=Array(12).fill(0),Q4=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},G4.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Y4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),X4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.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"})),Z4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),J4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),eL=F.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"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),tL=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Qp=1;class nL{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:Qp++,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],F.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(iL(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)||Qp++;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 Tt=new nL,rL=(e,t)=>{const n=(t==null?void 0:t.id)||Qp++;return Tt.addToast({title:e,...t,id:n}),n},iL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sL=rL,oL=()=>Tt.toasts,aL=()=>Tt.getActiveToasts(),sE=Object.assign(sL,{success:Tt.success,info:Tt.info,warning:Tt.warning,error:Tt.error,custom:Tt.custom,message:Tt.message,promise:Tt.promise,dismiss:Tt.dismiss,loading:Tt.loading},{getHistory:oL,getToasts:aL});q4("[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 Fl(e){return e.label!==void 0}const lL=3,uL="24px",cL="16px",rx=4e3,dL=356,fL=14,pL=45,hL=200;function jn(...e){return e.filter(Boolean).join(" ")}function mL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const gL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:d,toast:c,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:b,index:g,toasts:y,expanded:w,removeToast:T,defaultRichColors:E,closeButton:_,style:C,cancelButtonStyle:j,actionButtonStyle:k,className:R="",descriptionClassName:M="",duration:H,position:Z,gap:te,expandByDefault:ne,classNames:W,icons:J,closeButtonAriaLabel:O="Close toast"}=e,[L,V]=F.useState(null),[U,q]=F.useState(null),[X,ue]=F.useState(!1),[me,ee]=F.useState(!1),[Fe,Ye]=F.useState(!1),[Xe,Dt]=F.useState(!1),[Tn,cn]=F.useState(!1),[ci,gr]=F.useState(0),[ds,di]=F.useState(0),bt=F.useRef(c.duration||H||rx),vr=F.useRef(null),He=F.useRef(null),yr=g===0,Eo=g+1<=m,P=c.type,I=c.dismissible!==!1,A=c.className||"",D=c.descriptionClassName||"",B=F.useMemo(()=>b.findIndex(re=>re.toastId===c.id)||0,[b,c.id]),G=F.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:_},[c.closeButton,_]),oe=F.useMemo(()=>c.duration||H||rx,[c.duration,H]),$e=F.useRef(0),Ze=F.useRef(0),Cn=F.useRef(0),Kt=F.useRef(null),[fs,Yn]=Z.split("-"),xr=F.useMemo(()=>b.reduce((re,We,ot)=>ot>=B?re:re+We.height,0),[b,B]),ps=tL(),To=c.invert||d,fi=P==="loading";Ze.current=F.useMemo(()=>B*te+xr,[B,xr]),F.useEffect(()=>{bt.current=oe},[oe]),F.useEffect(()=>{ue(!0)},[]),F.useEffect(()=>{const re=He.current;if(re){const We=re.getBoundingClientRect().height;return di(We),h(ot=>[{toastId:c.id,height:We,position:c.position},...ot]),()=>h(ot=>ot.filter(Ft=>Ft.toastId!==c.id))}},[h,c.id]),F.useLayoutEffect(()=>{if(!X)return;const re=He.current,We=re.style.height;re.style.height="auto";const ot=re.getBoundingClientRect().height;re.style.height=We,di(ot),h(Ft=>Ft.find(Je=>Je.toastId===c.id)?Ft.map(Je=>Je.toastId===c.id?{...Je,height:ot}:Je):[{toastId:c.id,height:ot,position:c.position},...Ft])},[X,c.title,c.description,h,c.id]);const _n=F.useCallback(()=>{ee(!0),gr(Ze.current),h(re=>re.filter(We=>We.toastId!==c.id)),setTimeout(()=>{T(c)},hL)},[c,T,h,Ze]);F.useEffect(()=>{if(c.promise&&P==="loading"||c.duration===1/0||c.type==="loading")return;let re;return w||p||ps?(()=>{if(Cn.current<$e.current){const Ft=new Date().getTime()-$e.current;bt.current=bt.current-Ft}Cn.current=new Date().getTime()})():(()=>{bt.current!==1/0&&($e.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),_n()},bt.current))})(),()=>clearTimeout(re)},[w,p,c,P,ps,_n]),F.useEffect(()=>{c.delete&&_n()},[_n,c.delete]);function zE(){var re;if(J!=null&&J.loading){var We;return F.createElement("div",{className:jn(W==null?void 0:W.loader,c==null||(We=c.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":P==="loading"},J.loading)}return F.createElement(Q4,{className:jn(W==null?void 0:W.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:P==="loading"})}var gg,vg;return F.createElement("li",{tabIndex:0,ref:He,className:jn(R,A,W==null?void 0:W.toast,c==null||(t=c.classNames)==null?void 0:t.toast,W==null?void 0:W.default,W==null?void 0:W[P],c==null||(n=c.classNames)==null?void 0:n[P]),"data-sonner-toast":"","data-rich-colors":(gg=c.richColors)!=null?gg:E,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":X,"data-promise":!!c.promise,"data-swiped":Tn,"data-removed":me,"data-visible":Eo,"data-y-position":fs,"data-x-position":Yn,"data-index":g,"data-front":yr,"data-swiping":Fe,"data-dismissible":I,"data-type":P,"data-invert":To,"data-swipe-out":Xe,"data-swipe-direction":U,"data-expanded":!!(w||ne&&X),style:{"--index":g,"--toasts-before":g,"--z-index":y.length-g,"--offset":`${me?ci:Ze.current}px`,"--initial-height":ne?"auto":`${ds}px`,...C,...c.style},onDragEnd:()=>{Ye(!1),V(null),Kt.current=null},onPointerDown:re=>{fi||!I||(vr.current=new Date,gr(Ze.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Ye(!0),Kt.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,We,ot;if(Xe||!I)return;Kt.current=null;const Ft=Number(((re=He.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),il=Number(((We=He.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Je=new Date().getTime()-((ot=vr.current)==null?void 0:ot.getTime()),Gt=L==="x"?Ft:il,sl=Math.abs(Gt)/Je;if(Math.abs(Gt)>=pL||sl>.11){gr(Ze.current),c.onDismiss==null||c.onDismiss.call(c,c),q(L==="x"?Ft>0?"right":"left":il>0?"down":"up"),_n(),Dt(!0);return}else{var dn,fn;(dn=He.current)==null||dn.style.setProperty("--swipe-amount-x","0px"),(fn=He.current)==null||fn.style.setProperty("--swipe-amount-y","0px")}cn(!1),Ye(!1),V(null)},onPointerMove:re=>{var We,ot,Ft;if(!Kt.current||!I||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const Je=re.clientY-Kt.current.y,Gt=re.clientX-Kt.current.x;var sl;const dn=(sl=e.swipeDirections)!=null?sl:mL(Z);!L&&(Math.abs(Gt)>1||Math.abs(Je)>1)&&V(Math.abs(Gt)>Math.abs(Je)?"x":"y");let fn={x:0,y:0};const yg=pi=>1/(1.5+Math.abs(pi)/20);if(L==="y"){if(dn.includes("top")||dn.includes("bottom"))if(dn.includes("top")&&Je<0||dn.includes("bottom")&&Je>0)fn.y=Je;else{const pi=Je*yg(Je);fn.y=Math.abs(pi)<Math.abs(Je)?pi:Je}}else if(L==="x"&&(dn.includes("left")||dn.includes("right")))if(dn.includes("left")&&Gt<0||dn.includes("right")&&Gt>0)fn.x=Gt;else{const pi=Gt*yg(Gt);fn.x=Math.abs(pi)<Math.abs(Gt)?pi:Gt}(Math.abs(fn.x)>0||Math.abs(fn.y)>0)&&cn(!0),(ot=He.current)==null||ot.style.setProperty("--swipe-amount-x",`${fn.x}px`),(Ft=He.current)==null||Ft.style.setProperty("--swipe-amount-y",`${fn.y}px`)}},G&&!c.jsx&&P!=="loading"?F.createElement("button",{"aria-label":O,"data-disabled":fi,"data-close-button":!0,onClick:fi||!I?()=>{}:()=>{_n(),c.onDismiss==null||c.onDismiss.call(c,c)},className:jn(W==null?void 0:W.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(vg=J==null?void 0:J.close)!=null?vg:eL):null,P||c.icon||c.promise?F.createElement("div",{"data-icon":"",className:jn(W==null?void 0:W.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||zE():null,c.type!=="loading"?c.icon||(J==null?void 0:J[P])||K4(P):null):null,F.createElement("div",{"data-content":"",className:jn(W==null?void 0:W.content,c==null||(s=c.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:jn(W==null?void 0:W.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?F.createElement("div",{"data-description":"",className:jn(M,D,W==null?void 0:W.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&Fl(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||j,onClick:re=>{Fl(c.cancel)&&I&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),_n())},className:jn(W==null?void 0:W.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&Fl(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||k,onClick:re=>{Fl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&_n())},className:jn(W==null?void 0:W.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ix(){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 vL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?cL:uL;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 yL=F.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:h,visibleToasts:m=lL,toastOptions:b,dir:g=ix(),gap:y=fL,icons:w,containerAriaLabel:T="Notifications"}=t,[E,_]=F.useState([]),C=F.useMemo(()=>Array.from(new Set([i].concat(E.filter(U=>U.position).map(U=>U.position)))),[E,i]),[j,k]=F.useState([]),[R,M]=F.useState(!1),[H,Z]=F.useState(!1),[te,ne]=F.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),J=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=F.useRef(null),L=F.useRef(!1),V=F.useCallback(U=>{_(q=>{var X;return(X=q.find(ue=>ue.id===U.id))!=null&&X.delete||Tt.dismiss(U.id),q.filter(({id:ue})=>ue!==U.id)})},[]);return F.useEffect(()=>Tt.subscribe(U=>{if(U.dismiss){const q=E.map(X=>X.id===U.id?{...X,delete:!0}:X);requestAnimationFrame(()=>{_(q)});return}setTimeout(()=>{h2.flushSync(()=>{_(q=>{const X=q.findIndex(ue=>ue.id===U.id);return X!==-1?[...q.slice(0,X),{...q[X],...U},...q.slice(X+1)]:[U,...q]})})})}),[E]),F.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:q})=>{ne(q?"dark":"light")})}catch{U.addListener(({matches:X})=>{try{ne(X?"dark":"light")}catch(ue){console.error(ue)}})}},[c]),F.useEffect(()=>{E.length<=1&&M(!1)},[E]),F.useEffect(()=>{const U=q=>{var X;if(s.every(ee=>q[ee]||q.code===ee)){var me;M(!0),(me=W.current)==null||me.focus()}q.code==="Escape"&&(document.activeElement===W.current||(X=W.current)!=null&&X.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),F.useEffect(()=>{if(W.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[W.current]),F.createElement("section",{ref:n,"aria-label":`${T} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((U,q)=>{var X;const[ue,me]=U.split("-");return E.length?F.createElement("ol",{key:U,dir:g==="auto"?ix():g,tabIndex:-1,ref:W,className:l,"data-sonner-toaster":!0,"data-sonner-theme":te,"data-y-position":ue,"data-lifted":R&&E.length>1&&!o,"data-x-position":me,style:{"--front-toast-height":`${((X=j[0])==null?void 0:X.height)||0}px`,"--width":`${dL}px`,"--gap":`${y}px`,...h,...vL(u,d)},onBlur:ee=>{L.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=ee.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{H||M(!1)},onDragEnd:()=>M(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},E.filter(ee=>!ee.position&&q===0||ee.position===U).map((ee,Fe)=>{var Ye,Xe;return F.createElement(gL,{key:ee.id,icons:w,index:Fe,toast:ee,defaultRichColors:f,duration:(Ye=b==null?void 0:b.duration)!=null?Ye:p,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:m,closeButton:(Xe=b==null?void 0:b.closeButton)!=null?Xe:a,interacting:H,position:U,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:V,toasts:E.filter(Dt=>Dt.position==ee.position),heights:j.filter(Dt=>Dt.position==ee.position),setHeights:k,expandByDefault:o,gap:y,expanded:R,swipeDirections:t.swipeDirections})})):null}))});function sx(e){return sE.custom(t=>x.jsx(xL,{id:t,title:e.title,description:e.description,variant:e.variant}))}const qd={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 xL(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return x.jsxs("div",{className:fe("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",qd[s||"info"].bg),children:[x.jsx("div",{className:"flex flex-1 items-center",children:x.jsxs("div",{className:"w-full",children:[t&&x.jsx("p",{className:fe("text-sm font-medium",qd[s||"info"].text),children:t}),x.jsx("p",{className:fe("text-sm",qd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&x.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:x.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(),sE.dismiss(i)},children:r.label})})]})}function wL(e){return Array.isArray(e)&&e[0].field!==void 0}const oE=(e,t)=>{var n;if(wL(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||sx({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||sx({description:e.error,variant:"error"});return}};function bL(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 cg({id:e,text:t,className:n,required:r}){return t?x.jsxs("label",{htmlFor:e,className:fe("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&x.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Kd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function SL({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,...h}){const m=hr();return x.jsxs("div",{className:fe({"mb-2":!o},d),children:[x.jsx(cg,{id:e,text:t,required:a}),x.jsxs("div",{className:"flex items-center",children:[r&&x.jsx("span",{className:fe("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Kd[i],{"border-red-500!":!!l}),children:r}),x.jsx("input",{id:e,className:fe("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Kd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{color:m.getColor(Y.InputText),backgroundColor:m.getColor(Y.InputBackground),borderColor:m.getColor(Y.InputBorder),borderRadius:m.getRadius()},...h}),n&&x.jsx("span",{className:fe("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Kd[i],{"border-red-500!":!!l}),children:n})]}),!!l&&x.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const kL=(e,t)=>{document.cookie=`${e}=${t}`},aE=v.createContext({}),EL=()=>`${window.location.pathname}_$$_${document.title}`,TL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},CL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function _L({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(CL());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 x.jsx(aE.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function dg(){return v.useContext(aE)}function PL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return x.jsxs("div",{className:r||"",children:[e&&x.jsx(cg,{id:t,required:o,text:e}),x.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&&x.jsx("p",{className:"1 texm text-r500",children:a})]})}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:""}},jL={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"},AL={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"},RL={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,...h}){return x.jsxs("div",{children:[x.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${ox[d].label}`,children:[x.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[x.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 ${jL[f]} ${AL[u]} ${ox[d].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),x.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:x.jsx(ve.Check,{className:RL[u]})})]}),x.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&&x.jsx("small",{className:"text-xs text-red-500",children:a}),p&&x.jsx("small",{className:"text-xs text-red-500",children:p})]})}function DL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return x.jsxs("label",{htmlFor:e,className:fe("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[x.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}),x.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function FL({id:e,label:t,children:n,required:r,className:i,error:s}){return x.jsxs("fieldset",{id:e,className:i,children:[t&&x.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&x.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),x.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&x.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const ax=Object.assign(DL,{Group:FL});function fg({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,...h}){const m=hr();return x.jsxs("div",{className:fe({"mb-2":!s},i),children:[t&&x.jsx(cg,{id:e,text:t,required:l}),x.jsx("textarea",{className:fe("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":d,...h,ref:c,autoFocus:f,style:{...p,color:m.getColor(Y.InputText),backgroundColor:m.getColor(Y.InputBackground),borderColor:m.getColor(Y.InputBorder),borderRadius:m.getRadius()}}),!!u&&x.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function NL({onOk:e,clientId:t,widgetId:n,appearance:r}){var g,y,w,T,E,_,C,j;const i=hr(),{defaultValues:s,widget:o}=Ot(),[a,l]=v.useState(!1),u=dg(),d=bD(),c=!!s&&"username"in s,f=(y=(g=r==null?void 0:r.body)==null?void 0:g.inputs)==null?void 0:y.reduce((k,R)=>{let M=R.remember?ru(R.name):s==null?void 0:s[R.name];return R.options&&M&&!R.options.includes(M)&&(M=void 0),R.name==="username"&&c&&(M=s.username),k[R.name]=M||"",k},{}),p=(T=(w=r==null?void 0:r.body)==null?void 0:w.inputs)==null?void 0:T.reduce((k,R)=>(k[R.name]="",k),{}),h=Xm((_=(E=r==null?void 0:r.body)==null?void 0:E.inputs)==null?void 0:_.reduce((k,R)=>(k[R.name]=R.required?Wu().required(`${R.label} alanı zorunludur`):Wu(),k),{})),m=iE({init:{...f},schema:h,action:async k=>{var H;if(a)return;l(!0),c&&(k.username=s.username);const[R,M]=await d.mutateAsync({inputs:k,history:u.history,client_id:t,widget_id:n});if(fc(M)){wD(R)&&($d(Wn.CustomerToken,R.customer_token,(o==null?void 0:o.link_id)||""),$d(Wn.CustomerRefreshToken,R.customer_refresh_token,(o==null?void 0:o.link_id)||""),$d(Wn.DeviceId,R.device_id,(o==null?void 0:o.link_id)||"")),u.clearHistory();for(const Z of((H=r==null?void 0:r.body)==null?void 0:H.inputs)||[])Z.remember&&kL(Z.name,k[Z.name]);l(!1),e==null||e();return}l(!1),oE(R,{form:m})}}),b=!bL(p||{},(m==null?void 0:m.values)||{});return x.jsx("section",{className:"h-full overflow-y-auto px-4 py-3 bg-white",style:{backgroundColor:i.getColor(Y.GreeterBackground)},children:x.jsxs("form",{className:"grid grid-cols-1 gap-2",onSubmit:k=>{k.preventDefault(),m.handleSubmit()},children:[(j=(C=r==null?void 0:r.body)==null?void 0:C.inputs)==null?void 0:j.map(k=>{var R,M;if(["text","email","phone"].includes(k.type))return x.jsx(SL,{id:k.name,name:k.name,type:k.type,label:k.label,value:m.values[k.name],onChange:m.handleChange,onBlur:m.handleBlur,disabled:k.name==="username"&&c,readOnly:k.name==="username"&&c,autoComplete:"off",placeholder:k.placeholder,error:m.errors[k.name],ariaInvalid:m.errors.name?!0:void 0,required:k.required,noMargin:!0},k.name);if(k.type==="select")return x.jsx(PL,{id:k.name,name:k.name,value:m.values[k.name],onChange:m.handleChange,label:k.label,error:m.errors[k.name],required:k.required,children:(R=k.options)==null?void 0:R.map(H=>x.jsx("option",{value:H,children:H},H))},k.name);if(k.type==="checkbox")return x.jsx(OL,{id:k.name,name:k.name,value:m.values[k.name],checked:m.values[k.name]==="true",onChange:m.handleChange,required:k.required,error:m.errors[k.name],children:k.label},k.name);if(k.type==="radio")return x.jsx(ax.Group,{id:k.name,label:k.label,required:k.required,error:m.errors[k.name],children:(M=k.options)==null?void 0:M.map(H=>x.jsx(ax,{onChange:Z=>{Z?m.setFieldValue(k.name,H):m.setFieldValue(k.name,"")},id:H,name:k.name,value:H===m.values[k.name],children:H},H))},k.name);if(k.type==="textarea")return x.jsx(fg,{id:k.name,name:k.name,value:m.values[k.name],onChange:m.handleChange,placeholder:k.placeholder,error:m.errors[k.name],required:k.required,label:k.label},k.name)}),x.jsx(sn,{textKey:Y.GreeterButtonText,bgKey:Y.GreeterButtonBackground,type:"submit",disabled:!b||a,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:a?"Yükleniyor...":"Sohbet Oluştur"})]})})}function ML({onClose:e}){return x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:x.jsx(ve.X,{className:"size-5"})})}function LL({image_url:e,name:t,size:n="size-9"}){return e?x.jsx("img",{src:e,alt:t,className:fe("rounded-md",n)}):x.jsx("div",{className:"flex items-center justify-center gap-1",children:x.jsx(ve.Website,{className:fe("text-slate-500",n)})})}function IL(){const e=dg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Wm("popstate",t),null}function $L(){const e=rs(),t=dg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Kn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Wm("popstate",n),v.useEffect(()=>{if(!e)return;const r=TL(),i=EL();r!==i&&(e.emit(Kn.PageChange,{page:i}),t.setPage(i))},[e]),null}function zL({children:e}){const t=hr(),{widget:n}=Ot();return n?x.jsx(Yr,{children:x.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[x.jsx(Te.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(Y.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function BL(){return IL(),null}const Gd=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function VL(){var c,f,p,h,m,b;const e=hr(),{widget:t,setOpen:n}=Ot(),[r,i]=v.useState(!0),s=Hm(),o=So();if(!t)return null;const a=()=>{n(!1)};if(v.useEffect(()=>{SD(t.client_id).then(([g,y])=>{fc(y)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Gd(((f=(c=t.appearance)==null?void 0:c.head)==null?void 0:f.elements)||[],"text"),u=Gd(((h=(p=t.appearance)==null?void 0:p.head)==null?void 0:h.elements)||[],"title"),d=Gd(((b=(m=t.appearance)==null?void 0:m.head)==null?void 0:b.elements)||[],"logo");return x.jsxs(zL,{children:[x.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&x.jsx(ML,{onClose:a}),d&&x.jsx(Te.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:x.jsx(LL,{name:t.name,image_url:d,size:"size-20"})}),u&&x.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&x.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),x.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:o?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:x.jsx(NL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function UL(){return x.jsxs(x.Fragment,{children:[x.jsx(hk,{border:!0,children:x.jsx(VL,{})}),x.jsx(BL,{})]})}const HL=[{path:"/",component:UL,name:"registration"}];var gs=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(gs||{}),bi=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(bi||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function WL({name:e,avatar:t,className:n="text-neutral-500"}){return x.jsxs(Te.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[x.jsx("div",{className:"min-w-max",children:x.jsxs("span",{children:[t&&x.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&x.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),x.jsx("div",{className:"flex flex-col",children:x.jsx("span",{className:fe("line-clamp-1 font-medium",n),children:e})})]})}var qL=Object.defineProperty,KL=(e,t,n)=>t in e?qL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(KL(e,typeof t!="symbol"?t+"":t,n),n);let GL=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(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"}},au=new GL;function QL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Vc(){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 QL(()=>{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=Vc();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 lE(){let[e]=v.useState(Vc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let Jr=(e,t)=>{au.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function uE(e){let t=v.useRef(e);return Jr(()=>{t.current=e},[e]),t}let sr=function(e){let t=uE(e);return F.useCallback((...n)=>t.current(...n),[t])};function Yp(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Uc(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,Uc),r}var cE=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(cE||{}),zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(zr||{});function dE(){let e=XL();return v.useCallback(t=>YL({mergeRefs:e,...t}),[e])}function YL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??ZL;let l=fE(t,e);if(s)return Nl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return Nl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Uc(d?0:1,{0(){return null},1(){return Nl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Nl(l,n,r,o,a)}function Nl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Yd(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[h,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&p.push(h.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let h of p)c[`data-${h}`]=""}}if(s===v.Fragment&&(Object.keys(wi(l)).length>0||Object.keys(wi(c)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(wi(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(wi(l)).concat(Object.keys(wi(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
108
  `))}else{let f=d.props,p=f==null?void 0:f.className,h=typeof p=="function"?(...g)=>Yp(p(...g),l.className):Yp(p,l.className),m=h?{className:h}:{},b=fE(d.props,wi(Yd(l,["ref"])));for(let g in c)g in b&&delete c[g];return v.cloneElement(d,Object.assign({},b,c,u,{ref:i(JL(d),u.ref)},m))}return v.createElement(s,Object.assign({},Yd(l,["ref"]),s!==v.Fragment&&u,s!==v.Fragment&&c),d)}function XL(){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 ZL(...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 fE(...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 pg(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function wi(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function JL(e){return F.version.split(".")[0]>="19"?e.props.ref:e.ref}let eI=Symbol();function pE(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=sr(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[eI]))?void 0:n}function tI(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 nI={},lx,ux;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((lx=process==null?void 0:nI)==null?void 0:lx.NODE_ENV)==="test"&&typeof((ux=Element==null?void 0:Element.prototype)==null?void 0:ux.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 rI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(rI||{});function iI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function sI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=tI(e&&i?3:0),u=v.useRef(!1),d=v.useRef(!1),c=lE();return Jr(()=>{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),oI(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 oI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Vc();return lI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(aI(e,r))})}),s.dispose}function aI(e,t){var n,r;let i=Vc();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 lI(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 hg=v.createContext(null);hg.displayName="OpenClosedContext";var ji=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ji||{});function hE(){return v.useContext(hg)}function uI({value:e,children:t}){return F.createElement(hg.Provider,{value:e},t)}function cI(){let e=typeof document>"u";return"useSyncExternalStore"in Jd?(t=>t.useSyncExternalStore)(Jd)(()=>()=>{},()=>!1,()=>!e):!1}function mE(){let e=cI(),[t,n]=v.useState(au.isHandoffComplete);return t&&au.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>au.handoff(),[]),e?!1:t}function dI(){let e=v.useRef(!1);return Jr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function gE(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:yE)!==v.Fragment||F.Children.count(e.children)===1}let Hc=v.createContext(null);Hc.displayName="TransitionContext";var fI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fI||{});function pI(){let e=v.useContext(Hc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function hI(){let e=v.useContext(Wc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Wc=v.createContext(null);Wc.displayName="NestingContext";function qc(e){return"children"in e?qc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function vE(e,t){let n=uE(e),r=v.useRef([]),i=dI(),s=lE(),o=sr((p,h=zr.Hidden)=>{let m=r.current.findIndex(({el:b})=>b===p);m!==-1&&(Uc(h,{[zr.Unmount](){r.current.splice(m,1)},[zr.Hidden](){r.current[m].state="hidden"}}),s.microTask(()=>{var b;!qc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=sr(p=>{let h=r.current.find(({el:m})=>m===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,zr.Unmount)}),l=v.useRef([]),u=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),c=sr((p,h,m)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==p)),t==null||t.chains.current[h].push([p,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[h].push([p,new Promise(b=>{Promise.all(d.current[h].map(([g,y])=>y)).then(()=>b())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),f=sr((p,h,m)=>{Promise.all(d.current[h].splice(0).map(([b,g])=>g)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>m(h))});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 yE=v.Fragment,xE=cE.RenderStrategy;function mI(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:h,leaveTo:m,...b}=e,[g,y]=v.useState(null),w=v.useRef(null),T=gE(e),E=pE(...T?[w,t,y]:t===null?[]:[t]),_=(n=b.unmount)==null||n?zr.Unmount:zr.Hidden,{show:C,appear:j,initial:k}=pI(),[R,M]=v.useState(C?"visible":"hidden"),H=hI(),{register:Z,unregister:te}=H;Jr(()=>Z(w),[Z,w]),Jr(()=>{if(_===zr.Hidden&&w.current){if(C&&R!=="visible"){M("visible");return}return Uc(R,{hidden:()=>te(w),visible:()=>Z(w)})}},[R,w,Z,te,C,_]);let ne=mE();Jr(()=>{if(T&&ne&&R==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,R,ne,T]);let W=k&&!j,J=j&&C&&k,O=v.useRef(!1),L=vE(()=>{O.current||(M("hidden"),te(w))},H),V=sr(Fe=>{O.current=!0;let Ye=Fe?"enter":"leave";L.onStart(w,Ye,Xe=>{Xe==="enter"?s==null||s():Xe==="leave"&&(a==null||a())})}),U=sr(Fe=>{let Ye=Fe?"enter":"leave";O.current=!1,L.onStop(w,Ye,Xe=>{Xe==="enter"?o==null||o():Xe==="leave"&&(l==null||l())}),Ye==="leave"&&!qc(L)&&(M("hidden"),te(w))});v.useEffect(()=>{T&&i||(V(C),U(C))},[C,T,i]);let q=!(!i||!T||!ne||W),[,X]=sI(q,g,C,{start:V,end:U}),ue=wi({ref:E,className:((r=Yp(b.className,J&&u,J&&d,X.enter&&u,X.enter&&X.closed&&d,X.enter&&!X.closed&&c,X.leave&&p,X.leave&&!X.closed&&h,X.leave&&X.closed&&m,!X.transition&&C&&f))==null?void 0:r.trim())||void 0,...iI(X)}),me=0;R==="visible"&&(me|=ji.Open),R==="hidden"&&(me|=ji.Closed),C&&R==="hidden"&&(me|=ji.Opening),!C&&R==="visible"&&(me|=ji.Closing);let ee=dE();return F.createElement(Wc.Provider,{value:L},F.createElement(uI,{value:me},ee({ourProps:ue,theirProps:b,defaultTag:yE,features:xE,visible:R==="visible",name:"Transition.Child"})))}function gI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=gE(e),l=pE(...a?[o,t]:t===null?[]:[t]);mE();let u=hE();if(n===void 0&&u!==null&&(n=(u&ji.Open)===ji.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=vE(()=>{n||c("hidden")}),[p,h]=v.useState(!0),m=v.useRef([n]);Jr(()=>{p!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),h(!1))},[m,n]);let b=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);Jr(()=>{n?c("visible"):!qc(f)&&o.current!==null&&c("hidden")},[n,f]);let g={unmount:i},y=sr(()=>{var E;p&&h(!1),(E=e.beforeEnter)==null||E.call(e)}),w=sr(()=>{var E;p&&h(!1),(E=e.beforeLeave)==null||E.call(e)}),T=dE();return F.createElement(Wc.Provider,{value:f},F.createElement(Hc.Provider,{value:b},T({ourProps:{...g,as:v.Fragment,children:F.createElement(wE,{ref:l,...g,...s,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:v.Fragment,features:xE,visible:d==="visible",name:"Transition"})))}function vI(e,t){let n=v.useContext(Hc)!==null,r=hE()!==null;return F.createElement(F.Fragment,null,!n&&r?F.createElement(Xp,{ref:t,...e}):F.createElement(wE,{ref:t,...e}))}let Xp=pg(gI),wE=pg(mI),yI=pg(vI),xI=Object.assign(Xp,{Child:yI,Root:Xp});const mg=v.createContext(void 0),oa=({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]),x.jsx(mg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:x.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},wI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=v.useContext(mg),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return x.jsx("div",{children:e==="a"?x.jsx(dP,{id:r,to:"/#",onClick:d=>{d.preventDefault(),o()},className:u+(s?" show":""),children:t}):x.jsx("button",{id:r,onClick:d=>{d.stopPropagation(),d.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},bI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=v.useContext(mg),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=v.useState("right-end");v.useEffect(()=>{r&&l(r)},[r]);const u=v.useRef(null),d=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const f=u.current;f.style.position="absolute",d==="rtl"?f.style.inset="0px auto auto 0px":f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto 0px 0px auto",f.style.margin="0px",f.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto auto 0px 0px",f.style.margin="0px",f.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.right="0px",f.style.transform="translate(0px, -20px)"}return{}};return x.jsx(xI,{as:F.Fragment,show:i,children:f=>x.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${f==="entered"?"transition-all":""}`,style:c(),children:n})})};oa.Trigger=wI;oa.Content=bI;const SI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function kI({onChatClose:e}){const[t,n]=v.useState(!1),r=rs(),i=()=>{r==null||r.emit(Kn.ChatClose,{}),e()};return x.jsxs(x.Fragment,{children:[x.jsx(Yr,{children:t&&x.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 bg-slate-900/40 z-50 flex items-center justify-center p-4",children:x.jsxs(Te.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[x.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),x.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),x.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[x.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),x.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),x.jsxs(oa,{className:"relative flex items-center h-full",children:[x.jsx(oa.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:x.jsx(ve.Menu,{className:"size-5 text-slate-600"})}),x.jsx(Yr,{children:!t&&x.jsx(Te.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:x.jsxs(oa.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[x.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),x.jsx("ul",{className:"py-2 px-2",children:x.jsx("li",{children:x.jsxs("button",{className:fe("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",SI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[x.jsx(ve.X,{className:"w-4 h-4"}),x.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function EI({text:e}){const n=(r=>{const i=/(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,s=r.split(/(<[^>]*>)/g);let o="",a=!1;for(let l=0;l<s.length;l++){const u=s[l];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))o+=u;else{const d=u.replace(/^(<a\s[^>]*)(>)$/i,'$1 style="color: #f97316; text-decoration: underline;"$2');o+=d}a=!0}else u.match(/^<\/a>/i)?(o+=u,a=!1):o+=u;else if(!a&&u.trim()){const d=u.replace(i,c=>{const f=c.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(f)?f:`https://${f}`}" target="_blank" rel="noopener noreferrer" style="color: #f97316; text-decoration: underline;">${f}</a>`});o+=d}else o+=u}return o})(e);return x.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:n}})}const cx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function bE({files:e,className:t,onDelete:n,hideName:r}){const i=So(),[s,o]=v.useState(new Map);v.useEffect(()=>{const h=new Map;for(let m=0;m<e.length;m++){const b=e[m];if(b instanceof File){const g=URL.createObjectURL(b);h.set(m,g)}}return o(h),()=>{for(const m of h.values())URL.revokeObjectURL(m)}},[e]);const a=h=>{var b;return((b=(h instanceof File?h.name:h).split(".").pop())==null?void 0:b.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,u=h=>{const[m,b]=h.split(".");return m.length>10?`${m.slice(0,10)}...${b}`:h},d=h=>{const m=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(h);return m.includes(b)},c=(h,m)=>{if(h instanceof File){const b=s.get(m);b&&window.open(b,"_blank")}else window.open(h,"_blank")},f=(h,m)=>{h.stopPropagation(),n==null||n(m)},p=(h,m)=>h instanceof File?s.get(m)||"":h;return x.jsx("div",{className:fe("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,m)=>{const b=l(h),g=a(h),y=d(h),w=p(h,m);return x.jsxs("div",{onClick:()=>c(h,m),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&&x.jsx("button",{onClick:T=>f(T,m),className:fe("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:x.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:x.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"})})}),y?x.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:x.jsx("img",{src:w,alt:b,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):x.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:x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:x.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:x.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"})})}),x.jsx("div",{className:fe("text-[10px] font-medium text-gray-600 uppercase",{[cx]:r}),children:g||"file"})]})}),x.jsx("div",{className:fe("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[cx]:r}),title:b,children:u(b)})]},m)})})}const TI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},dx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function CI({messages:e,isTyping:t}){var d,c,f,p;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=Wt(),a=So(),l=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},u=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:b}=r.current,g=m-h<=b+10;s(g)}};return v.useEffect(()=>{(i||t)&&l()},[e,i,t]),x.jsxs("section",{onScroll:u,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_message)&&x.jsx("div",{className:"flex w-full items-center justify-start",children:x.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(p=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:p.greeting_message})}),x.jsx(Yr,{children:e.filter(h=>!!h.content&&h.content!==`
109
+ `)),[]});var rI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(rI||{});function iI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function sI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=tI(e&&i?3:0),u=v.useRef(!1),d=v.useRef(!1),c=lE();return Jr(()=>{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),oI(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 oI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Vc();return lI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(aI(e,r))})}),s.dispose}function aI(e,t){var n,r;let i=Vc();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 lI(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 hg=v.createContext(null);hg.displayName="OpenClosedContext";var ji=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ji||{});function hE(){return v.useContext(hg)}function uI({value:e,children:t}){return F.createElement(hg.Provider,{value:e},t)}function cI(){let e=typeof document>"u";return"useSyncExternalStore"in Jd?(t=>t.useSyncExternalStore)(Jd)(()=>()=>{},()=>!1,()=>!e):!1}function mE(){let e=cI(),[t,n]=v.useState(au.isHandoffComplete);return t&&au.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>au.handoff(),[]),e?!1:t}function dI(){let e=v.useRef(!1);return Jr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function gE(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:yE)!==v.Fragment||F.Children.count(e.children)===1}let Hc=v.createContext(null);Hc.displayName="TransitionContext";var fI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fI||{});function pI(){let e=v.useContext(Hc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function hI(){let e=v.useContext(Wc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Wc=v.createContext(null);Wc.displayName="NestingContext";function qc(e){return"children"in e?qc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function vE(e,t){let n=uE(e),r=v.useRef([]),i=dI(),s=lE(),o=sr((p,h=zr.Hidden)=>{let m=r.current.findIndex(({el:b})=>b===p);m!==-1&&(Uc(h,{[zr.Unmount](){r.current.splice(m,1)},[zr.Hidden](){r.current[m].state="hidden"}}),s.microTask(()=>{var b;!qc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=sr(p=>{let h=r.current.find(({el:m})=>m===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,zr.Unmount)}),l=v.useRef([]),u=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),c=sr((p,h,m)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==p)),t==null||t.chains.current[h].push([p,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[h].push([p,new Promise(b=>{Promise.all(d.current[h].map(([g,y])=>y)).then(()=>b())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),f=sr((p,h,m)=>{Promise.all(d.current[h].splice(0).map(([b,g])=>g)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>m(h))});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 yE=v.Fragment,xE=cE.RenderStrategy;function mI(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:h,leaveTo:m,...b}=e,[g,y]=v.useState(null),w=v.useRef(null),T=gE(e),E=pE(...T?[w,t,y]:t===null?[]:[t]),_=(n=b.unmount)==null||n?zr.Unmount:zr.Hidden,{show:C,appear:j,initial:k}=pI(),[R,M]=v.useState(C?"visible":"hidden"),H=hI(),{register:Z,unregister:te}=H;Jr(()=>Z(w),[Z,w]),Jr(()=>{if(_===zr.Hidden&&w.current){if(C&&R!=="visible"){M("visible");return}return Uc(R,{hidden:()=>te(w),visible:()=>Z(w)})}},[R,w,Z,te,C,_]);let ne=mE();Jr(()=>{if(T&&ne&&R==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,R,ne,T]);let W=k&&!j,J=j&&C&&k,O=v.useRef(!1),L=vE(()=>{O.current||(M("hidden"),te(w))},H),V=sr(Fe=>{O.current=!0;let Ye=Fe?"enter":"leave";L.onStart(w,Ye,Xe=>{Xe==="enter"?s==null||s():Xe==="leave"&&(a==null||a())})}),U=sr(Fe=>{let Ye=Fe?"enter":"leave";O.current=!1,L.onStop(w,Ye,Xe=>{Xe==="enter"?o==null||o():Xe==="leave"&&(l==null||l())}),Ye==="leave"&&!qc(L)&&(M("hidden"),te(w))});v.useEffect(()=>{T&&i||(V(C),U(C))},[C,T,i]);let q=!(!i||!T||!ne||W),[,X]=sI(q,g,C,{start:V,end:U}),ue=wi({ref:E,className:((r=Yp(b.className,J&&u,J&&d,X.enter&&u,X.enter&&X.closed&&d,X.enter&&!X.closed&&c,X.leave&&p,X.leave&&!X.closed&&h,X.leave&&X.closed&&m,!X.transition&&C&&f))==null?void 0:r.trim())||void 0,...iI(X)}),me=0;R==="visible"&&(me|=ji.Open),R==="hidden"&&(me|=ji.Closed),C&&R==="hidden"&&(me|=ji.Opening),!C&&R==="visible"&&(me|=ji.Closing);let ee=dE();return F.createElement(Wc.Provider,{value:L},F.createElement(uI,{value:me},ee({ourProps:ue,theirProps:b,defaultTag:yE,features:xE,visible:R==="visible",name:"Transition.Child"})))}function gI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=gE(e),l=pE(...a?[o,t]:t===null?[]:[t]);mE();let u=hE();if(n===void 0&&u!==null&&(n=(u&ji.Open)===ji.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=vE(()=>{n||c("hidden")}),[p,h]=v.useState(!0),m=v.useRef([n]);Jr(()=>{p!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),h(!1))},[m,n]);let b=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);Jr(()=>{n?c("visible"):!qc(f)&&o.current!==null&&c("hidden")},[n,f]);let g={unmount:i},y=sr(()=>{var E;p&&h(!1),(E=e.beforeEnter)==null||E.call(e)}),w=sr(()=>{var E;p&&h(!1),(E=e.beforeLeave)==null||E.call(e)}),T=dE();return F.createElement(Wc.Provider,{value:f},F.createElement(Hc.Provider,{value:b},T({ourProps:{...g,as:v.Fragment,children:F.createElement(wE,{ref:l,...g,...s,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:v.Fragment,features:xE,visible:d==="visible",name:"Transition"})))}function vI(e,t){let n=v.useContext(Hc)!==null,r=hE()!==null;return F.createElement(F.Fragment,null,!n&&r?F.createElement(Xp,{ref:t,...e}):F.createElement(wE,{ref:t,...e}))}let Xp=pg(gI),wE=pg(mI),yI=pg(vI),xI=Object.assign(Xp,{Child:yI,Root:Xp});const mg=v.createContext(void 0),oa=({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]),x.jsx(mg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:x.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},wI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=v.useContext(mg),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return x.jsx("div",{children:e==="a"?x.jsx(dP,{id:r,to:"/#",onClick:d=>{d.preventDefault(),o()},className:u+(s?" show":""),children:t}):x.jsx("button",{id:r,onClick:d=>{d.stopPropagation(),d.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},bI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=v.useContext(mg),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=v.useState("right-end");v.useEffect(()=>{r&&l(r)},[r]);const u=v.useRef(null),d=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const f=u.current;f.style.position="absolute",d==="rtl"?f.style.inset="0px auto auto 0px":f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto 0px 0px auto",f.style.margin="0px",f.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto auto 0px 0px",f.style.margin="0px",f.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.right="0px",f.style.transform="translate(0px, -20px)"}return{}};return x.jsx(xI,{as:F.Fragment,show:i,children:f=>x.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${f==="entered"?"transition-all":""}`,style:c(),children:n})})};oa.Trigger=wI;oa.Content=bI;const SI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function kI({onChatClose:e}){const[t,n]=v.useState(!1),r=rs(),i=()=>{r==null||r.emit(Kn.ChatClose,{}),e()};return x.jsxs(x.Fragment,{children:[x.jsx(Yr,{children:t&&x.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 bg-slate-900/40 z-50 flex items-center justify-center p-4",children:x.jsxs(Te.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[x.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),x.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),x.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[x.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),x.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),x.jsxs(oa,{className:"relative flex items-center h-full",children:[x.jsx(oa.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:x.jsx(ve.Menu,{className:"size-5 text-slate-600"})}),x.jsx(Yr,{children:!t&&x.jsx(Te.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:x.jsxs(oa.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[x.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),x.jsx("ul",{className:"py-2 px-2",children:x.jsx("li",{children:x.jsxs("button",{className:fe("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",SI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[x.jsx(ve.X,{className:"w-4 h-4"}),x.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function EI({text:e}){const n=(r=>{const i=/(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,s=r.split(/(<[^>]*>)/g);let o="",a=!1;for(let l=0;l<s.length;l++){const u=s[l];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))o+=u;else{const d=u.replace(/^(<a\s[^>]*)(>)$/i,'$1 style="color: #f97316; text-decoration: underline;"$2');o+=d}a=!0}else u.match(/^<\/a>/i)?(o+=u,a=!1):o+=u;else if(!a&&u.trim()){const d=u.replace(i,c=>{const f=c.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(f)?f:`https://${f}`}" target="_blank" rel="noopener noreferrer" style="color: #f97316; text-decoration: underline;">${f}</a>`});o+=d}else o+=u}return o})(e);return x.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:n}})}const cx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function bE({files:e,className:t,onDelete:n,hideName:r}){const i=So(),[s,o]=v.useState(new Map);v.useEffect(()=>{const h=new Map;for(let m=0;m<e.length;m++){const b=e[m];if(b instanceof File){const g=URL.createObjectURL(b);h.set(m,g)}}return o(h),()=>{for(const m of h.values())URL.revokeObjectURL(m)}},[e]);const a=h=>{var b;return((b=(h instanceof File?h.name:h).split(".").pop())==null?void 0:b.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,u=h=>{const[m,b]=h.split(".");return m.length>10?`${m.slice(0,10)}...${b}`:h},d=h=>{const m=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(h);return m.includes(b)},c=(h,m)=>{if(h instanceof File){const b=s.get(m);b&&window.open(b,"_blank")}else window.open(h,"_blank")},f=(h,m)=>{h.stopPropagation(),n==null||n(m)},p=(h,m)=>h instanceof File?s.get(m)||"":h;return x.jsx("div",{className:fe("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,m)=>{const b=l(h),g=a(h),y=d(h),w=p(h,m);return x.jsxs("div",{onClick:()=>c(h,m),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&&x.jsx("button",{onClick:T=>f(T,m),className:fe("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:x.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:x.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"})})}),y?x.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:x.jsx("img",{src:w,alt:b,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):x.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:x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:x.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:x.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"})})}),x.jsx("div",{className:fe("text-[10px] font-medium text-gray-600 uppercase",{[cx]:r}),children:g||"file"})]})}),x.jsx("div",{className:fe("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[cx]:r}),title:b,children:u(b)})]},m)})})}const TI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},dx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function CI({messages:e,isTyping:t}){var d,c,f,p;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=Ot(),a=So(),l=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},u=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:b}=r.current,g=m-h<=b+10;s(g)}};return v.useEffect(()=>{(i||t)&&l()},[e,i,t]),x.jsxs("section",{onScroll:u,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_message)&&x.jsx("div",{className:"flex w-full items-center justify-start",children:x.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(p=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:p.greeting_message})}),x.jsx(Yr,{children:e.filter(h=>!!h.content&&h.content!==`
110
110
  `).map((h,m)=>x.jsxs(Te.div,{custom:m,initial:"hidden",animate:"visible",variants:TI,className:fe("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer||h.activity_type===bi.ChatCreated,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&x.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),([et.Customer,et.User].includes(h.sender_type)||h.activity_type===bi.ChatCreated)&&x.jsxs(Te.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:fe("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer||h.activity_type===bi.ChatCreated,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.files&&h.files.length>0&&x.jsx(bE,{files:h.files,className:"mb-1",hideName:!0}),h.sender_type===et.User?x.jsx(EI,{text:h.content}):h.content,h.created_at&&x.jsx("div",{className:fe("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer||h.activity_type===bi.ChatCreated,"text-blue-100":h.sender_type===et.User}),children:dx(h.created_at)})]}),h.sender_type===et.Activity&&h.activity_type!==bi.ChatCreated&&(h.content.split("_").length===3?x.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):x.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&x.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&dx(h.created_at)})]},h.id||m))}),t&&x.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:x.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:x.jsxs("div",{className:"flex space-x-1",children:[x.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),x.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),x.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&x.jsx("div",{className:fe("fixed",{"bottom-40 right-14":!a,"bottom-28 right-4":a}),children:x.jsx(sn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:x.jsx(ve.ArrowDown,{className:"size-4"})})}),x.jsx("div",{ref:n})]})}/**
111
111
  * @license lucide-react v0.511.0 - ISC
112
112
  *
@@ -134,6 +134,6 @@ attempted value: ${o}
134
134
  * See the LICENSE file in the root directory of this source tree.
135
135
  */const DI=[["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"}]],kE=OI("cloud-upload",DI);var EE={exports:{}},FI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",NI=FI,MI=NI;function TE(){}function CE(){}CE.resetWarningCache=TE;var LI=function(){function e(r,i,s,o,a,l){if(l!==MI){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:CE,resetWarningCache:TE};return n.PropTypes=n,n};EE.exports=LI();var II=EE.exports;const ge=Yi(II);function cs(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 $I=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 po(e,t,n){const r=zI(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&px(r,"path",s),px(r,"relativePath",s),r}function zI(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=$I.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function px(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const BI=[".DS_Store","Thumbs.db"];function VI(e){return cs(this,void 0,void 0,function*(){return Ku(e)&&UI(e.dataTransfer)?KI(e.dataTransfer,e.type):HI(e)?WI(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?qI(e):[]})}function UI(e){return Ku(e)}function HI(e){return Ku(e)&&Ku(e.target)}function Ku(e){return typeof e=="object"&&e!==null}function WI(e){return Zp(e.target.files).map(t=>po(t))}function qI(e){return cs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>po(n))})}function KI(e,t){return cs(this,void 0,void 0,function*(){if(e.items){const n=Zp(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(GI));return hx(_E(r))}return hx(Zp(e.files).map(n=>po(n)))})}function hx(e){return e.filter(t=>BI.indexOf(t.name)===-1)}function Zp(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 GI(e){if(typeof e.webkitGetAsEntry!="function")return mx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?PE(t):mx(e,t)}function _E(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?_E(n):[n]],[])}function mx(e,t){return cs(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,po(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return po(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function QI(e){return cs(this,void 0,void 0,function*(){return e.isDirectory?PE(e):YI(e)})}function PE(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>cs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(QI));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function YI(e){return cs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=po(r,e.fullPath);t(i)},r=>{n(r)})})})}var Xd=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 gx(e){return JI(e)||ZI(e)||AE(e)||XI()}function XI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
136
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JI(e){if(Array.isArray(e))return Jp(e)}function vx(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 yx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vx(Object(n),!0).forEach(function(r){jE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $a(e,t){return n$(e)||t$(e,t)||AE(e,t)||e$()}function e$(){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 AE(e,t){if(e){if(typeof e=="string")return Jp(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 Jp(e,t)}}function Jp(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 t$(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 n$(e){if(Array.isArray(e))return e}var r$=typeof Xd=="function"?Xd:Xd.default,i$="file-invalid-type",s$="file-too-large",o$="file-too-small",a$="too-many-files",l$=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:i$,message:"File type must be ".concat(r)}},xx=function(t){return{code:s$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},wx=function(t){return{code:o$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},u$={code:a$,message:"Too many files"};function RE(e,t){var n=e.type==="application/x-moz-file"||r$(e,t);return[n,n?null:l$(t)]}function OE(e,t,n){if(Si(e.size))if(Si(t)&&Si(n)){if(e.size>n)return[!1,xx(n)];if(e.size<t)return[!1,wx(t)]}else{if(Si(t)&&e.size<t)return[!1,wx(t)];if(Si(n)&&e.size>n)return[!1,xx(n)]}return[!0,null]}function Si(e){return e!=null}function c$(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=RE(l,n),d=$a(u,1),c=d[0],f=OE(l,r,i),p=$a(f,1),h=p[0],m=a?a(l):null;return c&&h&&!m})}function Gu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ml(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 bx(e){e.preventDefault()}function d$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function f$(e){return e.indexOf("Edge/")!==-1}function p$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return d$(e)||f$(e)}function Rn(){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!Gu(r)&&a&&a.apply(void 0,[r].concat(s)),Gu(r)})}}function h$(){return"showOpenFilePicker"in window}function m$(e){if(Si(e)){var t=Object.entries(e).filter(function(n){var r=$a(n,2),i=r[0],s=r[1],o=!0;return DE(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(FE))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=$a(r,2),s=i[0],o=i[1];return yx(yx({},n),{},jE({},s,o))},{});return[{description:"Files",accept:t}]}return e}function g$(e){if(Si(e))return Object.entries(e).reduce(function(t,n){var r=$a(n,2),i=r[0],s=r[1];return[].concat(gx(t),[i],gx(s))},[]).filter(function(t){return DE(t)||FE(t)}).join(",")}function v$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function y$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function DE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function FE(e){return/^.*\.[\w]+$/.test(e)}var x$=["children"],w$=["open"],b$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],S$=["refKey","onChange","onClick"];function k$(e){return C$(e)||T$(e)||NE(e)||E$()}function E$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
137
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AE(e,t){if(e){if(typeof e=="string")return Jp(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 Jp(e,t)}}function Jp(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 t$(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 n$(e){if(Array.isArray(e))return e}var r$=typeof Xd=="function"?Xd:Xd.default,i$="file-invalid-type",s$="file-too-large",o$="file-too-small",a$="too-many-files",l$=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:i$,message:"File type must be ".concat(r)}},xx=function(t){return{code:s$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},wx=function(t){return{code:o$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},u$={code:a$,message:"Too many files"};function RE(e,t){var n=e.type==="application/x-moz-file"||r$(e,t);return[n,n?null:l$(t)]}function OE(e,t,n){if(Si(e.size))if(Si(t)&&Si(n)){if(e.size>n)return[!1,xx(n)];if(e.size<t)return[!1,wx(t)]}else{if(Si(t)&&e.size<t)return[!1,wx(t)];if(Si(n)&&e.size>n)return[!1,xx(n)]}return[!0,null]}function Si(e){return e!=null}function c$(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=RE(l,n),d=$a(u,1),c=d[0],f=OE(l,r,i),p=$a(f,1),h=p[0],m=a?a(l):null;return c&&h&&!m})}function Gu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ml(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 bx(e){e.preventDefault()}function d$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function f$(e){return e.indexOf("Edge/")!==-1}function p$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return d$(e)||f$(e)}function An(){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!Gu(r)&&a&&a.apply(void 0,[r].concat(s)),Gu(r)})}}function h$(){return"showOpenFilePicker"in window}function m$(e){if(Si(e)){var t=Object.entries(e).filter(function(n){var r=$a(n,2),i=r[0],s=r[1],o=!0;return DE(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(FE))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=$a(r,2),s=i[0],o=i[1];return yx(yx({},n),{},jE({},s,o))},{});return[{description:"Files",accept:t}]}return e}function g$(e){if(Si(e))return Object.entries(e).reduce(function(t,n){var r=$a(n,2),i=r[0],s=r[1];return[].concat(gx(t),[i],gx(s))},[]).filter(function(t){return DE(t)||FE(t)}).join(",")}function v$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function y$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function DE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function FE(e){return/^.*\.[\w]+$/.test(e)}var x$=["children"],w$=["open"],b$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],S$=["refKey","onChange","onClick"];function k$(e){return C$(e)||T$(e)||NE(e)||E$()}function E$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
138
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function C$(e){if(Array.isArray(e))return eh(e)}function Zd(e,t){return j$(e)||P$(e,t)||NE(e,t)||_$()}function _$(){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 NE(e,t){if(e){if(typeof e=="string")return eh(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 eh(e,t)}}function eh(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 P$(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 j$(e){if(Array.isArray(e))return e}function Sx(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 Ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sx(Object(n),!0).forEach(function(r){th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qu(e,t){if(e==null)return{};var n=A$(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 A$(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 rl=v.forwardRef(function(e,t){var n=e.children,r=Qu(e,x$),i=R$(r),s=i.open,o=Qu(i,w$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(v.Fragment,null,n(Ce(Ce({},o),{},{open:s})))});rl.displayName="Dropzone";var ME={disabled:!1,getFilesFromEvent:VI,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};rl.defaultProps=ME;rl.propTypes={children:ge.func,accept:ge.objectOf(ge.arrayOf(ge.string)),multiple:ge.bool,preventDropOnDocument:ge.bool,noClick:ge.bool,noKeyboard:ge.bool,noDrag:ge.bool,noDragEventsBubbling:ge.bool,minSize:ge.number,maxSize:ge.number,maxFiles:ge.number,disabled:ge.bool,getFilesFromEvent:ge.func,onFileDialogCancel:ge.func,onFileDialogOpen:ge.func,useFsAccessApi:ge.bool,autoFocus:ge.bool,onDragEnter:ge.func,onDragLeave:ge.func,onDragOver:ge.func,onDrop:ge.func,onDropAccepted:ge.func,onDropRejected:ge.func,onError:ge.func,validator:ge.func};var nh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function R$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ce(Ce({},ME),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,h=t.onDropRejected,m=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,_=t.noDrag,C=t.noDragEventsBubbling,j=t.onError,k=t.validator,R=v.useMemo(function(){return g$(n)},[n]),M=v.useMemo(function(){return m$(n)},[n]),H=v.useMemo(function(){return typeof b=="function"?b:kx},[b]),Z=v.useMemo(function(){return typeof m=="function"?m:kx},[m]),te=v.useRef(null),ne=v.useRef(null),W=v.useReducer(O$,nh),J=Zd(W,2),O=J[0],L=J[1],V=O.isFocused,U=O.isFileDialogActive,q=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&h$()),X=function(){!q.current&&U&&setTimeout(function(){if(ne.current){var D=ne.current.files;D.length||(L({type:"closeDialog"}),Z())}},300)};v.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[ne,U,Z,q]);var ue=v.useRef([]),me=function(D){te.current&&te.current.contains(D.target)||(D.preventDefault(),ue.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",bx,!1),document.addEventListener("drop",me,!1)),function(){w&&(document.removeEventListener("dragover",bx),document.removeEventListener("drop",me))}},[te,w]),v.useEffect(function(){return!r&&y&&te.current&&te.current.focus(),function(){}},[te,y,r]);var ee=v.useCallback(function(A){j?j(A):console.error(A)},[j]),Fe=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[].concat(k$(ue.current),[A.target]),Ml(A)&&Promise.resolve(i(A)).then(function(D){if(!(Gu(A)&&!C)){var B=D.length,G=B>0&&c$({files:D,accept:R,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:k}),oe=B>0&&!G;L({isDragAccept:G,isDragReject:oe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(A)}}).catch(function(D){return ee(D)})},[i,u,ee,C,R,o,s,a,l,k]),Ye=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=Ml(A);if(D&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return D&&c&&c(A),!1},[c,C]),Xe=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=ue.current.filter(function(G){return te.current&&te.current.contains(G)}),B=D.indexOf(A.target);B!==-1&&D.splice(B,1),ue.current=D,!(D.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ml(A)&&d&&d(A))},[te,d,C]),Ot=v.useCallback(function(A,D){var B=[],G=[];A.forEach(function(oe){var $e=RE(oe,R),Ze=Zd($e,2),_n=Ze[0],Kt=Ze[1],fs=OE(oe,o,s),Yn=Zd(fs,2),xr=Yn[0],ps=Yn[1],To=k?k(oe):null;if(_n&&xr&&!To)B.push(oe);else{var fi=[Kt,ps];To&&(fi=fi.concat(To)),G.push({file:oe,errors:fi.filter(function(Pn){return Pn})})}}),(!a&&B.length>1||a&&l>=1&&B.length>l)&&(B.forEach(function(oe){G.push({file:oe,errors:[u$]})}),B.splice(0)),L({acceptedFiles:B,fileRejections:G,isDragReject:G.length>0,type:"setFiles"}),f&&f(B,G,D),G.length>0&&h&&h(G,D),B.length>0&&p&&p(B,D)},[L,a,R,o,s,l,f,p,h,k]),Cn=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[],Ml(A)&&Promise.resolve(i(A)).then(function(D){Gu(A)&&!C||Ot(D,A)}).catch(function(D){return ee(D)}),L({type:"reset"})},[i,Ot,ee,C]),dn=v.useCallback(function(){if(q.current){L({type:"openDialog"}),H();var A={multiple:a,types:M};window.showOpenFilePicker(A).then(function(D){return i(D)}).then(function(D){Ot(D,null),L({type:"closeDialog"})}).catch(function(D){v$(D)?(Z(D),L({type:"closeDialog"})):y$(D)?(q.current=!1,ne.current?(ne.current.value=null,ne.current.click()):ee(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."))):ee(D)});return}ne.current&&(L({type:"openDialog"}),H(),ne.current.value=null,ne.current.click())},[L,H,Z,g,Ot,ee,M,a]),ci=v.useCallback(function(A){!te.current||!te.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[te,dn]),gr=v.useCallback(function(){L({type:"focus"})},[]),ds=v.useCallback(function(){L({type:"blur"})},[]),di=v.useCallback(function(){T||(p$()?setTimeout(dn,0):dn())},[T,dn]),bt=function(D){return r?null:D},vr=function(D){return E?null:bt(D)},He=function(D){return _?null:bt(D)},yr=function(D){C&&D.stopPropagation()},Eo=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,B=D===void 0?"ref":D,G=A.role,oe=A.onKeyDown,$e=A.onFocus,Ze=A.onBlur,_n=A.onClick,Kt=A.onDragEnter,fs=A.onDragOver,Yn=A.onDragLeave,xr=A.onDrop,ps=Qu(A,b$);return Ce(Ce(th({onKeyDown:vr(Rn(oe,ci)),onFocus:vr(Rn($e,gr)),onBlur:vr(Rn(Ze,ds)),onClick:bt(Rn(_n,di)),onDragEnter:He(Rn(Kt,Fe)),onDragOver:He(Rn(fs,Ye)),onDragLeave:He(Rn(Yn,Xe)),onDrop:He(Rn(xr,Cn)),role:typeof G=="string"&&G!==""?G:"presentation"},B,te),!r&&!E?{tabIndex:0}:{}),ps)}},[te,ci,gr,ds,di,Fe,Ye,Xe,Cn,E,_,r]),P=v.useCallback(function(A){A.stopPropagation()},[]),I=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,B=D===void 0?"ref":D,G=A.onChange,oe=A.onClick,$e=Qu(A,S$),Ze=th({accept:R,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:bt(Rn(G,Cn)),onClick:bt(Rn(oe,P)),tabIndex:-1},B,ne);return Ce(Ce({},Ze),$e)}},[ne,n,a,Cn,r]);return Ce(Ce({},O),{},{isFocused:V&&!r,getRootProps:Eo,getInputProps:I,rootRef:te,inputRef:ne,open:bt(dn)})}function O$(e,t){switch(t.type){case"focus":return Ce(Ce({},e),{},{isFocused:!0});case"blur":return Ce(Ce({},e),{},{isFocused:!1});case"openDialog":return Ce(Ce({},nh),{},{isFileDialogActive:!0});case"closeDialog":return Ce(Ce({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ce(Ce({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ce(Ce({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ce({},nh);default:return e}}function kx(){}function LE({onDrop:e}){return x.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:x.jsx(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>x.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...t(),children:[x.jsx("input",{...n()}),x.jsx("div",{className:"mb-3",children:x.jsx(kE,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),x.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",x.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}LE.Button=({onDrop:e})=>x.jsx(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>x.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",...t(),children:[x.jsx("input",{...n()}),x.jsx(kE,{className:"size-6 text-slate-500 fill-slate-200"})]})});function D$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=rs(),o=TD(t),[a,l]=v.useState(""),[u,d]=v.useState("3rem"),[c,f]=v.useState(!1),[p,h]=v.useState([]),[m,b]=v.useState(0),[g,y]=v.useState(!1),[w,T]=v.useState(0),[E,_]=v.useState(null);v.useEffect(()=>{if(r.length>0){const k=r[r.length-1];k.id!==E&&(_(k.id),k.sender_type===et.User&&(b(0),y(!1)))}},[r,E]),v.useEffect(()=>{let k;return g&&w>0&&(k=window.setTimeout(()=>{T(R=>R<=1?(y(!1),b(0),0):R-1)},1e3)),()=>clearTimeout(k)},[g,w]),Wm("paste",k=>{if(!n)return;const R=k.clipboardData.items;for(const M of R)if(M.type.startsWith("image/")){const H=M.getAsFile();H&&h([...p,H])}});const C=async()=>{if(!a.trim())return;if(m>5&&!g){y(!0),T(3);return}if(g)return;f(!0);let k;if(n&&p.length>0){const[R,M]=await o.mutateAsync(p);fc(M)&&CD(R)&&(k=R.file_urls)}s==null||s.emit(Kn.MessageCreate,{content:a,files:k},R=>{l(""),e(R),f(!1),h([]),b(M=>M+1),i.current&&(i.current.style.height="3rem",d("3rem"))})},j=k=>{s==null||s.emit(Kn.MessageTyping,{content:k})};return x.jsxs(x.Fragment,{children:[g&&x.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] bg-red-100 border border-red-200 p-2 flex items-center justify-center",children:[x.jsx(ve.XCircle,{className:"size-4 mr-2 text-red-600"}),x.jsxs("span",{className:"text-sm font-medium text-red-800",children:["Çok fazla mesaj gönderdiniz. Lütfen ",w," saniye bekleyin."]})]}),x.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl relative",onSubmit:k=>{k.preventDefault(),C(),k.currentTarget.reset()},children:[n&&p&&p.length>0&&x.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:x.jsx(bE,{files:p,onDelete:k=>{h(p.filter((R,M)=>M!==k))}})}),x.jsx("div",{className:"grow relative",children:x.jsx(fg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:u,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:k=>{if(l(k.target.value),j(k.target.value),k.target.value.length>0&&k.currentTarget.scrollHeight>k.currentTarget.clientHeight){const R=`${k.currentTarget.scrollHeight}px`;k.currentTarget.style.height=R,d(R)}else k.currentTarget.style.height="3rem",d("3rem")},onKeyDown:k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),k.stopPropagation(),k.currentTarget.value="",C())}})}),x.jsxs(Te.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&x.jsx(LE.Button,{onDrop:k=>{k.length&&h([...p,...k])}}),x.jsx(sn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:c||!a.trim()||g,children:c?x.jsx(ve.Spin,{className:"size-6 animate-spin"}):g?x.jsx("span",{className:"text-xs font-bold",children:w}):x.jsx(ve.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function F$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var d,c;const{widget:o,setOpen:a}=Wt(),l=hr(),u=So();return x.jsxs(x.Fragment,{children:[x.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(Y.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?x.jsx(WL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):x.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(kI,{onChatClose:s}),u&&x.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:x.jsx(ve.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),x.jsx(CI,{messages:r,isTyping:t||n.length>0}),x.jsx(D$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:f=>{i(f)}}),x.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[x.jsx("span",{children:"Powered by"}),x.jsx("span",{className:"font-medium",children:"Alfatek"}),x.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function N$({rating:e,onChange:t}){return x.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return x.jsxs("div",{className:"relative w-10 h-10",children:[x.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:x.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&&x.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:x.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&x.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:x.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"})}),x.jsxs("div",{className:"absolute inset-0 flex",children:[x.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),x.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function M$({onOk:e}){const[t,n]=v.useState(0),[r,i]=v.useState(!1),[s,o]=v.useState(10),a=ED(),[l,u]=v.useState(!1);v.useEffect(()=>{if(r){const p=setInterval(()=>{o(h=>h<=1?(clearInterval(p),e(!0),0):h-1)},1e3);return()=>clearInterval(p)}},[r]);const d=Xm({comment:Wu()}),c=iE({init:{comment:""},schema:d,action:async p=>{const[h,m]=await a.mutateAsync({rating:t,comment:p.comment});if(fc(m)){i(!0);return}oE(h,{form:c})}}),f=()=>{e(!0)};return x.jsxs("div",{className:"flex flex-col h-full",children:[x.jsxs("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[x.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"}),x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:x.jsx(ve.X,{className:"size-4"})})]}),x.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?x.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[x.jsx("div",{className:"text-green-500 mb-4",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),x.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),x.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),x.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),x.jsx(sn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):x.jsxs(Te.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[x.jsx("div",{className:"text-center mb-6",children:x.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),x.jsxs("div",{className:"mb-6",children:[x.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),x.jsx(N$,{rating:t,onChange:p=>{n(p),p>=1&&u(!1)}}),t>0&&x.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]}),t>0&&t<1||l?x.jsx("p",{className:"text-center text-sm text-red-500 mt-1",children:"Lütfen en az 1 yıldız seçiniz."}):null]}),x.jsxs("form",{onSubmit:c.handleSubmit,className:"space-y-5",children:[x.jsxs("div",{children:[x.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),x.jsx(fg,{id:"comment",onChange:c.handleChange,onBlur:c.handleBlur,value:c.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm",error:c.errors.comment})]}),x.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[x.jsx(sn,{type:"submit",onClick:p=>{t<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),x.jsx(sn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),x.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[x.jsx("span",{children:"Powered by"}),x.jsx("span",{className:"font-medium",children:"Alfatek"}),x.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function L$({children:e}){const{widget:t}=Wt();return t?x.jsx("section",{className:"h-full w-full relative",children:e}):null}function I$({children:e}){const t=rs();return v.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function $$(){const{widget:e,setOpen:t,setIsHaveChat:n}=Wt(),r=rs(),i=kc(),s=Hm(),o=So(),[a,l]=v.useState(null),[u,d]=v.useState([]),[c,f]=v.useState(!1),[p,h]=v.useState([]),m=()=>{if(a){l({...a,status:gs.Closed});return}b()},b=y=>{y||(t(!1),jv((e==null?void 0:e.link_id)||"")),n(!1),l(null),d([]),h([]),Lp(e.client_id,Na(i)).then(()=>{r==null||r.disconnect(),s.push("registration")})};v.useEffect(()=>{r==null||r.emit(Kn.ChatView,{},y=>{if(y===null){t(!1),n(!1),Lp(e.client_id,Na(i)),d([]),h([]),jv((e==null?void 0:e.link_id)||""),s.push("registration");return}l(y),n(!0)})},[]);const g=v.useCallback(y=>{a&&![gs.Closed,gs.Deleted].includes(a.status)&&d([...u,y])},[u,a]);return v.useEffect(()=>{if(!r)return;const y=C=>{const j={content:C.content,created_at:C.created_at,files:C.files,id:C._id,sender_type:C.sender_type,answers:C.answers,reply_id:C.reply_id};if(p.length>0){h(k=>[...k,j]);return}C.is_shortcut?h([j]):g(j),f(!1)},w=C=>{l({...a,agent_name:C.name,agent_avatar:C.avatar,is_customer_uploadable:(a==null?void 0:a.is_customer_uploadable)??!1,status:(a==null?void 0:a.status)??gs.Open}),g({content:` _ _${C.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:bi.AdminJoin,sender_name:C.name})},T=()=>{f(!0)},E=()=>{m()},_=({is_customer_uploadable:C})=>{l(a?{...a,is_customer_uploadable:C}:null)};return r.on(rt.MessageAgentCreate,y),r.on(rt.ChatUserAssignee,w),r.on(rt.MessageAgentTyping,T),r.on(rt.ChatUserClose,E),r.on(rt.ChatToggleUpload,_),()=>{r.off(rt.MessageAgentCreate,y),r.off(rt.ChatUserAssignee,w),r.off(rt.MessageAgentTyping,T),r.off(rt.ChatUserClose,E),r.off(rt.ChatToggleUpload,_)}},[g]),v.useEffect(()=>{!r||!a||r.emit(Kn.MessageList,{},y=>{d(y)})},[r,a]),v.useEffect(()=>{const y=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(y)},[c]),v.useEffect(()=>{if(!e||p.length===0)return;let y=0;e.writing_timeout&&(y=[...p[0].content].length/e.writing_timeout,y<0&&(y=0));const w=setTimeout(()=>{g(p[0]),h(p.slice(1))},y*1e3);return()=>clearTimeout(w)},[p,e]),a?x.jsxs(x.Fragment,{children:[x.jsx("div",{id:"chat-alert-portal"}),x.jsx(Yr,{children:x.jsx(Te.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},style:{height:o?"100%":"",minHeight:o?"var(--app-height, 100dvh)":"",maxHeight:o?"var(--app-height, 100dvh)":""},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:a.status===gs.Closed?x.jsx(M$,{onOk:b}):x.jsx(F$,{chat:a,isTyping:c,messages:u,shortcutMessages:p,onNewMessage:g,onChatClose:m})})})]}):null}function z$(){return $L(),null}function B$(){return x.jsxs(I$,{children:[x.jsx(hk,{defaultOpen:!0,children:x.jsx(L$,{children:x.jsx($$,{})})}),x.jsx(z$,{})]})}const V$=[{path:"/chat",component:B$,name:"chat"}],IE=[...V$],$E=[...HL],U$=[...IE,...$E];function H$(){return x.jsx(tP,{future:{v7_startTransition:!0},children:x.jsxs(rP,{children:[IE.map((e,t)=>x.jsx(lp,{path:e.path,element:x.jsx(e.component,{})},t)),$E.map((e,t)=>x.jsx(lp,{path:e.path,element:x.jsx(e.component,{})},t))]})})}function W$({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=Wt(),{data:a,isLoading:l}=u_(e);return v.useEffect(()=>{Array.isArray(a)&&d_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:x.jsx(_L,{children:x.jsx(yD,{children:x.jsx(H$,{})})})}const q$=new W2;function K$({container:e,link_id:t,defaultValues:n,soundPath:r}){Kw(e).render(x.jsxs(Y2,{client:q$,children:[x.jsx(W$,{link_id:t,defaultValues:n,soundPath:r}),x.jsx(yL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]}))}window.widget=K$});export default G$();
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NE(e,t){if(e){if(typeof e=="string")return eh(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 eh(e,t)}}function eh(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 P$(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 j$(e){if(Array.isArray(e))return e}function Sx(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 Ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sx(Object(n),!0).forEach(function(r){th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qu(e,t){if(e==null)return{};var n=A$(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 A$(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 rl=v.forwardRef(function(e,t){var n=e.children,r=Qu(e,x$),i=R$(r),s=i.open,o=Qu(i,w$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(v.Fragment,null,n(Ce(Ce({},o),{},{open:s})))});rl.displayName="Dropzone";var ME={disabled:!1,getFilesFromEvent:VI,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};rl.defaultProps=ME;rl.propTypes={children:ge.func,accept:ge.objectOf(ge.arrayOf(ge.string)),multiple:ge.bool,preventDropOnDocument:ge.bool,noClick:ge.bool,noKeyboard:ge.bool,noDrag:ge.bool,noDragEventsBubbling:ge.bool,minSize:ge.number,maxSize:ge.number,maxFiles:ge.number,disabled:ge.bool,getFilesFromEvent:ge.func,onFileDialogCancel:ge.func,onFileDialogOpen:ge.func,useFsAccessApi:ge.bool,autoFocus:ge.bool,onDragEnter:ge.func,onDragLeave:ge.func,onDragOver:ge.func,onDrop:ge.func,onDropAccepted:ge.func,onDropRejected:ge.func,onError:ge.func,validator:ge.func};var nh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function R$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ce(Ce({},ME),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,h=t.onDropRejected,m=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,_=t.noDrag,C=t.noDragEventsBubbling,j=t.onError,k=t.validator,R=v.useMemo(function(){return g$(n)},[n]),M=v.useMemo(function(){return m$(n)},[n]),H=v.useMemo(function(){return typeof b=="function"?b:kx},[b]),Z=v.useMemo(function(){return typeof m=="function"?m:kx},[m]),te=v.useRef(null),ne=v.useRef(null),W=v.useReducer(O$,nh),J=Zd(W,2),O=J[0],L=J[1],V=O.isFocused,U=O.isFileDialogActive,q=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&h$()),X=function(){!q.current&&U&&setTimeout(function(){if(ne.current){var D=ne.current.files;D.length||(L({type:"closeDialog"}),Z())}},300)};v.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[ne,U,Z,q]);var ue=v.useRef([]),me=function(D){te.current&&te.current.contains(D.target)||(D.preventDefault(),ue.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",bx,!1),document.addEventListener("drop",me,!1)),function(){w&&(document.removeEventListener("dragover",bx),document.removeEventListener("drop",me))}},[te,w]),v.useEffect(function(){return!r&&y&&te.current&&te.current.focus(),function(){}},[te,y,r]);var ee=v.useCallback(function(A){j?j(A):console.error(A)},[j]),Fe=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[].concat(k$(ue.current),[A.target]),Ml(A)&&Promise.resolve(i(A)).then(function(D){if(!(Gu(A)&&!C)){var B=D.length,G=B>0&&c$({files:D,accept:R,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:k}),oe=B>0&&!G;L({isDragAccept:G,isDragReject:oe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(A)}}).catch(function(D){return ee(D)})},[i,u,ee,C,R,o,s,a,l,k]),Ye=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=Ml(A);if(D&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return D&&c&&c(A),!1},[c,C]),Xe=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=ue.current.filter(function(G){return te.current&&te.current.contains(G)}),B=D.indexOf(A.target);B!==-1&&D.splice(B,1),ue.current=D,!(D.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ml(A)&&d&&d(A))},[te,d,C]),Dt=v.useCallback(function(A,D){var B=[],G=[];A.forEach(function(oe){var $e=RE(oe,R),Ze=Zd($e,2),Cn=Ze[0],Kt=Ze[1],fs=OE(oe,o,s),Yn=Zd(fs,2),xr=Yn[0],ps=Yn[1],To=k?k(oe):null;if(Cn&&xr&&!To)B.push(oe);else{var fi=[Kt,ps];To&&(fi=fi.concat(To)),G.push({file:oe,errors:fi.filter(function(_n){return _n})})}}),(!a&&B.length>1||a&&l>=1&&B.length>l)&&(B.forEach(function(oe){G.push({file:oe,errors:[u$]})}),B.splice(0)),L({acceptedFiles:B,fileRejections:G,isDragReject:G.length>0,type:"setFiles"}),f&&f(B,G,D),G.length>0&&h&&h(G,D),B.length>0&&p&&p(B,D)},[L,a,R,o,s,l,f,p,h,k]),Tn=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[],Ml(A)&&Promise.resolve(i(A)).then(function(D){Gu(A)&&!C||Dt(D,A)}).catch(function(D){return ee(D)}),L({type:"reset"})},[i,Dt,ee,C]),cn=v.useCallback(function(){if(q.current){L({type:"openDialog"}),H();var A={multiple:a,types:M};window.showOpenFilePicker(A).then(function(D){return i(D)}).then(function(D){Dt(D,null),L({type:"closeDialog"})}).catch(function(D){v$(D)?(Z(D),L({type:"closeDialog"})):y$(D)?(q.current=!1,ne.current?(ne.current.value=null,ne.current.click()):ee(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."))):ee(D)});return}ne.current&&(L({type:"openDialog"}),H(),ne.current.value=null,ne.current.click())},[L,H,Z,g,Dt,ee,M,a]),ci=v.useCallback(function(A){!te.current||!te.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),cn())},[te,cn]),gr=v.useCallback(function(){L({type:"focus"})},[]),ds=v.useCallback(function(){L({type:"blur"})},[]),di=v.useCallback(function(){T||(p$()?setTimeout(cn,0):cn())},[T,cn]),bt=function(D){return r?null:D},vr=function(D){return E?null:bt(D)},He=function(D){return _?null:bt(D)},yr=function(D){C&&D.stopPropagation()},Eo=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,B=D===void 0?"ref":D,G=A.role,oe=A.onKeyDown,$e=A.onFocus,Ze=A.onBlur,Cn=A.onClick,Kt=A.onDragEnter,fs=A.onDragOver,Yn=A.onDragLeave,xr=A.onDrop,ps=Qu(A,b$);return Ce(Ce(th({onKeyDown:vr(An(oe,ci)),onFocus:vr(An($e,gr)),onBlur:vr(An(Ze,ds)),onClick:bt(An(Cn,di)),onDragEnter:He(An(Kt,Fe)),onDragOver:He(An(fs,Ye)),onDragLeave:He(An(Yn,Xe)),onDrop:He(An(xr,Tn)),role:typeof G=="string"&&G!==""?G:"presentation"},B,te),!r&&!E?{tabIndex:0}:{}),ps)}},[te,ci,gr,ds,di,Fe,Ye,Xe,Tn,E,_,r]),P=v.useCallback(function(A){A.stopPropagation()},[]),I=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,B=D===void 0?"ref":D,G=A.onChange,oe=A.onClick,$e=Qu(A,S$),Ze=th({accept:R,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:bt(An(G,Tn)),onClick:bt(An(oe,P)),tabIndex:-1},B,ne);return Ce(Ce({},Ze),$e)}},[ne,n,a,Tn,r]);return Ce(Ce({},O),{},{isFocused:V&&!r,getRootProps:Eo,getInputProps:I,rootRef:te,inputRef:ne,open:bt(cn)})}function O$(e,t){switch(t.type){case"focus":return Ce(Ce({},e),{},{isFocused:!0});case"blur":return Ce(Ce({},e),{},{isFocused:!1});case"openDialog":return Ce(Ce({},nh),{},{isFileDialogActive:!0});case"closeDialog":return Ce(Ce({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ce(Ce({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ce(Ce({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ce({},nh);default:return e}}function kx(){}function LE({onDrop:e}){return x.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:x.jsx(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>x.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...t(),children:[x.jsx("input",{...n()}),x.jsx("div",{className:"mb-3",children:x.jsx(kE,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),x.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",x.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}LE.Button=({onDrop:e})=>x.jsx(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>x.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",...t(),children:[x.jsx("input",{...n()}),x.jsx(kE,{className:"size-6 text-slate-500 fill-slate-200"})]})});function D$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=rs(),o=TD(t),[a,l]=v.useState(""),[u,d]=v.useState("3rem"),[c,f]=v.useState(!1),[p,h]=v.useState([]),[m,b]=v.useState(0),[g,y]=v.useState(!1),[w,T]=v.useState(0),[E,_]=v.useState(null);v.useEffect(()=>{if(r.length>0){const k=r[r.length-1];k.id!==E&&(_(k.id),k.sender_type===et.User&&(b(0),y(!1)))}},[r,E]),v.useEffect(()=>{let k;return g&&w>0&&(k=window.setTimeout(()=>{T(R=>R<=1?(y(!1),b(0),0):R-1)},1e3)),()=>clearTimeout(k)},[g,w]),Wm("paste",k=>{if(!n)return;const R=k.clipboardData.items;for(const M of R)if(M.type.startsWith("image/")){const H=M.getAsFile();H&&h([...p,H])}});const C=async()=>{if(!a.trim())return;if(m>5&&!g){y(!0),T(3);return}if(g)return;f(!0);let k;if(n&&p.length>0){const[R,M]=await o.mutateAsync(p);fc(M)&&CD(R)&&(k=R.file_urls)}s==null||s.emit(Kn.MessageCreate,{content:a,files:k},R=>{l(""),e(R),f(!1),h([]),b(M=>M+1),i.current&&(i.current.style.height="3rem",d("3rem"))})},j=k=>{s==null||s.emit(Kn.MessageTyping,{content:k})};return x.jsxs(x.Fragment,{children:[g&&x.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] bg-red-100 border border-red-200 p-2 flex items-center justify-center",children:[x.jsx(ve.XCircle,{className:"size-4 mr-2 text-red-600"}),x.jsxs("span",{className:"text-sm font-medium text-red-800",children:["Çok fazla mesaj gönderdiniz. Lütfen ",w," saniye bekleyin."]})]}),x.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl relative",onSubmit:k=>{k.preventDefault(),C(),k.currentTarget.reset()},children:[n&&p&&p.length>0&&x.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:x.jsx(bE,{files:p,onDelete:k=>{h(p.filter((R,M)=>M!==k))}})}),x.jsx("div",{className:"grow relative",children:x.jsx(fg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:u,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:k=>{if(l(k.target.value),j(k.target.value),k.target.value.length>0&&k.currentTarget.scrollHeight>k.currentTarget.clientHeight){const R=`${k.currentTarget.scrollHeight}px`;k.currentTarget.style.height=R,d(R)}else k.currentTarget.style.height="3rem",d("3rem")},onKeyDown:k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),k.stopPropagation(),k.currentTarget.value="",C())}})}),x.jsxs(Te.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&x.jsx(LE.Button,{onDrop:k=>{k.length&&h([...p,...k])}}),x.jsx(sn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:c||!a.trim()||g,children:c?x.jsx(ve.Spin,{className:"size-6 animate-spin"}):g?x.jsx("span",{className:"text-xs font-bold",children:w}):x.jsx(ve.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function F$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var d,c;const{widget:o,setOpen:a}=Ot(),l=hr(),u=So();return x.jsxs(x.Fragment,{children:[x.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(Y.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?x.jsx(WL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):x.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(kI,{onChatClose:s}),u&&x.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:x.jsx(ve.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),x.jsx(CI,{messages:r,isTyping:t||n.length>0}),x.jsx(D$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:f=>{i(f)}}),x.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[x.jsx("span",{children:"Powered by"}),x.jsx("span",{className:"font-medium",children:"Alfatek"}),x.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function N$({rating:e,onChange:t}){return x.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return x.jsxs("div",{className:"relative w-10 h-10",children:[x.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:x.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&&x.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:x.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&x.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:x.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"})}),x.jsxs("div",{className:"absolute inset-0 flex",children:[x.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),x.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function M$({onOk:e}){const[t,n]=v.useState(0),[r,i]=v.useState(!1),[s,o]=v.useState(10),a=ED(),[l,u]=v.useState(!1);v.useEffect(()=>{if(r){const p=setInterval(()=>{o(h=>h<=1?(clearInterval(p),e(!0),0):h-1)},1e3);return()=>clearInterval(p)}},[r]);const d=Xm({comment:Wu()}),c=iE({init:{comment:""},schema:d,action:async p=>{const[h,m]=await a.mutateAsync({rating:t,comment:p.comment});if(fc(m)){i(!0);return}oE(h,{form:c})}}),f=()=>{e(!0)};return x.jsxs("div",{className:"flex flex-col h-full",children:[x.jsxs("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[x.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"}),x.jsx(sn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:x.jsx(ve.X,{className:"size-4"})})]}),x.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?x.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[x.jsx("div",{className:"text-green-500 mb-4",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),x.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),x.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),x.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),x.jsx(sn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):x.jsxs(Te.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[x.jsx("div",{className:"text-center mb-6",children:x.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),x.jsxs("div",{className:"mb-6",children:[x.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),x.jsx(N$,{rating:t,onChange:p=>{n(p),p>=1&&u(!1)}}),t>0&&x.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]}),t>0&&t<1||l?x.jsx("p",{className:"text-center text-sm text-red-500 mt-1",children:"Lütfen en az 1 yıldız seçiniz."}):null]}),x.jsxs("form",{onSubmit:c.handleSubmit,className:"space-y-5",children:[x.jsxs("div",{children:[x.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),x.jsx(fg,{id:"comment",onChange:c.handleChange,onBlur:c.handleBlur,value:c.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm",error:c.errors.comment})]}),x.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[x.jsx(sn,{type:"submit",onClick:p=>{t<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),x.jsx(sn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),x.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[x.jsx("span",{children:"Powered by"}),x.jsx("span",{className:"font-medium",children:"Alfatek"}),x.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function L$({children:e}){const{widget:t}=Ot();return t?x.jsx("section",{className:"h-full w-full relative",children:e}):null}function I$({children:e}){const t=rs();return v.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function $$(){const{widget:e,setOpen:t,setIsHaveChat:n}=Ot(),r=rs(),i=kc(),s=Hm(),o=So(),[a,l]=v.useState(null),[u,d]=v.useState([]),[c,f]=v.useState(!1),[p,h]=v.useState([]),m=()=>{if(a){l({...a,status:gs.Closed});return}b()},b=y=>{y||(t(!1),xy((e==null?void 0:e.link_id)||"")),n(!1),l(null),d([]),h([]),Lp(e.client_id,Na(i)).then(()=>{r==null||r.disconnect(),s.push("registration")})};v.useEffect(()=>{r==null||r.emit(Kn.ChatView,{},y=>{if(y===null){t(!1),n(!1),Lp(e.client_id,Na(i)),d([]),h([]),xy((e==null?void 0:e.link_id)||""),s.push("registration");return}l(y),n(!0)})},[]);const g=v.useCallback(y=>{a&&![gs.Closed,gs.Deleted].includes(a.status)&&d([...u,y])},[u,a]);return v.useEffect(()=>{if(!r)return;const y=C=>{const j={content:C.content,created_at:C.created_at,files:C.files,id:C._id,sender_type:C.sender_type,answers:C.answers,reply_id:C.reply_id};if(p.length>0){h(k=>[...k,j]);return}C.is_shortcut?h([j]):g(j),f(!1)},w=C=>{l({...a,agent_name:C.name,agent_avatar:C.avatar,is_customer_uploadable:(a==null?void 0:a.is_customer_uploadable)??!1,status:(a==null?void 0:a.status)??gs.Open}),g({content:` _ _${C.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:bi.AdminJoin,sender_name:C.name})},T=()=>{f(!0)},E=()=>{m()},_=({is_customer_uploadable:C})=>{l(a?{...a,is_customer_uploadable:C}:null)};return r.on(rt.MessageAgentCreate,y),r.on(rt.ChatUserAssignee,w),r.on(rt.MessageAgentTyping,T),r.on(rt.ChatUserClose,E),r.on(rt.ChatToggleUpload,_),()=>{r.off(rt.MessageAgentCreate,y),r.off(rt.ChatUserAssignee,w),r.off(rt.MessageAgentTyping,T),r.off(rt.ChatUserClose,E),r.off(rt.ChatToggleUpload,_)}},[g]),v.useEffect(()=>{!r||!a||r.emit(Kn.MessageList,{},y=>{d(y)})},[r,a]),v.useEffect(()=>{const y=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(y)},[c]),v.useEffect(()=>{if(!e||p.length===0)return;let y=0;e.writing_timeout&&(y=[...p[0].content].length/e.writing_timeout,y<0&&(y=0));const w=setTimeout(()=>{g(p[0]),h(p.slice(1))},y*1e3);return()=>clearTimeout(w)},[p,e]),a?x.jsxs(x.Fragment,{children:[x.jsx("div",{id:"chat-alert-portal"}),x.jsx(Yr,{children:x.jsx(Te.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},style:{height:o?"100%":"",minHeight:o?"var(--app-height, 100dvh)":"",maxHeight:o?"var(--app-height, 100dvh)":""},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:a.status===gs.Closed?x.jsx(M$,{onOk:b}):x.jsx(F$,{chat:a,isTyping:c,messages:u,shortcutMessages:p,onNewMessage:g,onChatClose:m})})})]}):null}function z$(){return $L(),null}function B$(){return x.jsxs(I$,{children:[x.jsx(hk,{defaultOpen:!0,children:x.jsx(L$,{children:x.jsx($$,{})})}),x.jsx(z$,{})]})}const V$=[{path:"/chat",component:B$,name:"chat"}],IE=[...V$],$E=[...HL],U$=[...IE,...$E];function H$(){return x.jsx(tP,{future:{v7_startTransition:!0},children:x.jsxs(rP,{children:[IE.map((e,t)=>x.jsx(lp,{path:e.path,element:x.jsx(e.component,{})},t)),$E.map((e,t)=>x.jsx(lp,{path:e.path,element:x.jsx(e.component,{})},t))]})})}function W$({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=Ot(),{data:a,isLoading:l}=u_(e);return v.useEffect(()=>{Array.isArray(a)&&d_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:x.jsx(_L,{children:x.jsx(yD,{children:x.jsx(H$,{})})})}const q$=new W2;function K$({container:e,link_id:t,defaultValues:n,soundPath:r}){Kw(e).render(x.jsxs(Y2,{client:q$,children:[x.jsx(W$,{link_id:t,defaultValues:n,soundPath:r}),x.jsx(yL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]}))}window.widget=K$});export default G$();