chatnext-assistant 0.24.71 → 0.25.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var y3=Object.defineProperty,v3=Object.defineProperties;var w3=Object.getOwnPropertyDescriptors;var Ia=Object.getOwnPropertySymbols;var $y=Object.prototype.hasOwnProperty,qy=Object.prototype.propertyIsEnumerable;var Ma=Math.pow,Td=(e,t,n)=>t in e?y3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))$y.call(t,n)&&Td(e,n,t[n]);if(Ia)for(var n of Ia(t))qy.call(t,n)&&Td(e,n,t[n]);return e},q=(e,t)=>v3(e,w3(t));var Lt=(e,t)=>{var n={};for(var r in e)$y.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ia)for(var r of Ia(e))t.indexOf(r)<0&&qy.call(e,r)&&(n[r]=e[r]);return n};var x3=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Da=(e,t,n)=>(Td(e,typeof t!="symbol"?t+"":t,n),n);var ct=(e,t,n)=>new Promise((r,o)=>{var u=f=>{try{c(n.next(f))}catch(d){o(d)}},a=f=>{try{c(n.throw(f))}catch(d){o(d)}},c=f=>f.done?r(f.value):Promise.resolve(f.value).then(u,a);c((n=n.apply(e,t)).next())});var C8=x3(Ft=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const a of u.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(o){if(o.ep)return;o.ep=!0;const u=n(o);fetch(o.href,u)}})();var Os=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function A3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kw={exports:{}},we={};/**
1
+ var w3=Object.defineProperty,x3=Object.defineProperties;var A3=Object.getOwnPropertyDescriptors;var Ma=Object.getOwnPropertySymbols;var qy=Object.prototype.hasOwnProperty,Yy=Object.prototype.propertyIsEnumerable;var Da=Math.pow,Rd=(e,t,n)=>t in e?w3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&Rd(e,n,t[n]);if(Ma)for(var n of Ma(t))Yy.call(t,n)&&Rd(e,n,t[n]);return e},q=(e,t)=>x3(e,A3(t));var bt=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ma)for(var r of Ma(e))t.indexOf(r)<0&&Yy.call(e,r)&&(n[r]=e[r]);return n};var S3=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Na=(e,t,n)=>(Rd(e,typeof t!="symbol"?t+"":t,n),n);var ct=(e,t,n)=>new Promise((r,o)=>{var u=f=>{try{c(n.next(f))}catch(d){o(d)}},a=f=>{try{c(n.throw(f))}catch(d){o(d)}},c=f=>f.done?r(f.value):Promise.resolve(f.value).then(u,a);c((n=n.apply(e,t)).next())});var P8=S3(Ft=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const a of u.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(o){if(o.ep)return;o.ep=!0;const u=n(o);fetch(o.href,u)}})();var bs=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function C3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $w={exports:{}},we={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var y3=Object.defineProperty,v3=Object.defineProperties;var w3=Object.getOwnProp
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var bu=Symbol.for("react.element"),S3=Symbol.for("react.portal"),C3=Symbol.for("react.fragment"),E3=Symbol.for("react.strict_mode"),P3=Symbol.for("react.profiler"),_3=Symbol.for("react.provider"),T3=Symbol.for("react.context"),k3=Symbol.for("react.forward_ref"),R3=Symbol.for("react.suspense"),O3=Symbol.for("react.memo"),L3=Symbol.for("react.lazy"),Yy=Symbol.iterator;function b3(e){return e===null||typeof e!="object"?null:(e=Yy&&e[Yy]||e["@@iterator"],typeof e=="function"?e:null)}var $w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qw=Object.assign,Yw={};function ss(e,t,n){this.props=e,this.context=t,this.refs=Yw,this.updater=n||$w}ss.prototype.isReactComponent={};ss.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ss.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jw(){}Jw.prototype=ss.prototype;function Fp(e,t,n){this.props=e,this.context=t,this.refs=Yw,this.updater=n||$w}var Bp=Fp.prototype=new Jw;Bp.constructor=Fp;qw(Bp,ss.prototype);Bp.isPureReactComponent=!0;var Jy=Array.isArray,Xw=Object.prototype.hasOwnProperty,Vp={current:null},Zw={key:!0,ref:!0,__self:!0,__source:!0};function ex(e,t,n){var r,o={},u=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(u=""+t.key),t)Xw.call(t,r)&&!Zw.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(c===1)o.children=n;else if(1<c){for(var f=Array(c),d=0;d<c;d++)f[d]=arguments[d+2];o.children=f}if(e&&e.defaultProps)for(r in c=e.defaultProps,c)o[r]===void 0&&(o[r]=c[r]);return{$$typeof:bu,type:e,key:u,ref:a,props:o,_owner:Vp.current}}function I3(e,t){return{$$typeof:bu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Up(e){return typeof e=="object"&&e!==null&&e.$$typeof===bu}function M3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Xy=/\/+/g;function kd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?M3(""+e.key):t.toString(36)}function ol(e,t,n,r,o){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(u){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case bu:case S3:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+kd(a,0):r,Jy(o)?(n="",e!=null&&(n=e.replace(Xy,"$&/")+"/"),ol(o,t,n,"",function(d){return d})):o!=null&&(Up(o)&&(o=I3(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Xy,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",Jy(e))for(var c=0;c<e.length;c++){u=e[c];var f=r+kd(u,c);a+=ol(u,t,n,f,o)}else if(f=b3(e),typeof f=="function")for(e=f.call(e),c=0;!(u=e.next()).done;)u=u.value,f=r+kd(u,c++),a+=ol(u,t,n,f,o);else if(u==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Na(e,t,n){if(e==null)return e;var r=[],o=0;return ol(e,r,"","",function(u){return t.call(n,u,o++)}),r}function D3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ht={current:null},sl={transition:null},N3={ReactCurrentDispatcher:Ht,ReactCurrentBatchConfig:sl,ReactCurrentOwner:Vp};we.Children={map:Na,forEach:function(e,t,n){Na(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Na(e,function(){t++}),t},toArray:function(e){return Na(e,function(t){return t})||[]},only:function(e){if(!Up(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=ss;we.Fragment=C3;we.Profiler=P3;we.PureComponent=Fp;we.StrictMode=E3;we.Suspense=R3;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N3;we.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=qw({},e.props),o=e.key,u=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(u=t.ref,a=Vp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(f in t)Xw.call(t,f)&&!Zw.hasOwnProperty(f)&&(r[f]=t[f]===void 0&&c!==void 0?c[f]:t[f])}var f=arguments.length-2;if(f===1)r.children=n;else if(1<f){c=Array(f);for(var d=0;d<f;d++)c[d]=arguments[d+2];r.children=c}return{$$typeof:bu,type:e.type,key:o,ref:u,props:r,_owner:a}};we.createContext=function(e){return e={$$typeof:T3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_3,_context:e},e.Consumer=e};we.createElement=ex;we.createFactory=function(e){var t=ex.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:k3,render:e}};we.isValidElement=Up;we.lazy=function(e){return{$$typeof:L3,_payload:{_status:-1,_result:e},_init:D3}};we.memo=function(e,t){return{$$typeof:O3,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=sl.transition;sl.transition={};try{e()}finally{sl.transition=t}};we.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};we.useCallback=function(e,t){return Ht.current.useCallback(e,t)};we.useContext=function(e){return Ht.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return Ht.current.useDeferredValue(e)};we.useEffect=function(e,t){return Ht.current.useEffect(e,t)};we.useId=function(){return Ht.current.useId()};we.useImperativeHandle=function(e,t,n){return Ht.current.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return Ht.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Ht.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Ht.current.useMemo(e,t)};we.useReducer=function(e,t,n){return Ht.current.useReducer(e,t,n)};we.useRef=function(e){return Ht.current.useRef(e)};we.useState=function(e){return Ht.current.useState(e)};we.useSyncExternalStore=function(e,t,n){return Ht.current.useSyncExternalStore(e,t,n)};we.useTransition=function(){return Ht.current.useTransition()};we.version="18.2.0";Kw.exports=we;var B=Kw.exports;const Jn=A3(B);var Sl={},tx={exports:{}},xn={},nx={exports:{}},rx={};/**
9
+ */var Iu=Symbol.for("react.element"),E3=Symbol.for("react.portal"),P3=Symbol.for("react.fragment"),_3=Symbol.for("react.strict_mode"),T3=Symbol.for("react.profiler"),R3=Symbol.for("react.provider"),k3=Symbol.for("react.context"),O3=Symbol.for("react.forward_ref"),b3=Symbol.for("react.suspense"),L3=Symbol.for("react.memo"),I3=Symbol.for("react.lazy"),Jy=Symbol.iterator;function M3(e){return e===null||typeof e!="object"?null:(e=Jy&&e[Jy]||e["@@iterator"],typeof e=="function"?e:null)}var qw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yw=Object.assign,Jw={};function as(e,t,n){this.props=e,this.context=t,this.refs=Jw,this.updater=n||qw}as.prototype.isReactComponent={};as.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};as.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Xw(){}Xw.prototype=as.prototype;function Bp(e,t,n){this.props=e,this.context=t,this.refs=Jw,this.updater=n||qw}var Vp=Bp.prototype=new Xw;Vp.constructor=Bp;Yw(Vp,as.prototype);Vp.isPureReactComponent=!0;var Xy=Array.isArray,Zw=Object.prototype.hasOwnProperty,Up={current:null},ex={key:!0,ref:!0,__self:!0,__source:!0};function tx(e,t,n){var r,o={},u=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(u=""+t.key),t)Zw.call(t,r)&&!ex.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(c===1)o.children=n;else if(1<c){for(var f=Array(c),d=0;d<c;d++)f[d]=arguments[d+2];o.children=f}if(e&&e.defaultProps)for(r in c=e.defaultProps,c)o[r]===void 0&&(o[r]=c[r]);return{$$typeof:Iu,type:e,key:u,ref:a,props:o,_owner:Up.current}}function D3(e,t){return{$$typeof:Iu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Iu}function N3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Zy=/\/+/g;function kd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?N3(""+e.key):t.toString(36)}function sl(e,t,n,r,o){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(u){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Iu:case E3:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+kd(a,0):r,Xy(o)?(n="",e!=null&&(n=e.replace(Zy,"$&/")+"/"),sl(o,t,n,"",function(d){return d})):o!=null&&(jp(o)&&(o=D3(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Zy,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",Xy(e))for(var c=0;c<e.length;c++){u=e[c];var f=r+kd(u,c);a+=sl(u,t,n,f,o)}else if(f=M3(e),typeof f=="function")for(e=f.call(e),c=0;!(u=e.next()).done;)u=u.value,f=r+kd(u,c++),a+=sl(u,t,n,f,o);else if(u==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Fa(e,t,n){if(e==null)return e;var r=[],o=0;return sl(e,r,"","",function(u){return t.call(n,u,o++)}),r}function F3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Gt={current:null},ul={transition:null},B3={ReactCurrentDispatcher:Gt,ReactCurrentBatchConfig:ul,ReactCurrentOwner:Up};we.Children={map:Fa,forEach:function(e,t,n){Fa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fa(e,function(){t++}),t},toArray:function(e){return Fa(e,function(t){return t})||[]},only:function(e){if(!jp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=as;we.Fragment=P3;we.Profiler=T3;we.PureComponent=Bp;we.StrictMode=_3;we.Suspense=b3;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B3;we.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Yw({},e.props),o=e.key,u=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(u=t.ref,a=Up.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(f in t)Zw.call(t,f)&&!ex.hasOwnProperty(f)&&(r[f]=t[f]===void 0&&c!==void 0?c[f]:t[f])}var f=arguments.length-2;if(f===1)r.children=n;else if(1<f){c=Array(f);for(var d=0;d<f;d++)c[d]=arguments[d+2];r.children=c}return{$$typeof:Iu,type:e.type,key:o,ref:u,props:r,_owner:a}};we.createContext=function(e){return e={$$typeof:k3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:R3,_context:e},e.Consumer=e};we.createElement=tx;we.createFactory=function(e){var t=tx.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:O3,render:e}};we.isValidElement=jp;we.lazy=function(e){return{$$typeof:I3,_payload:{_status:-1,_result:e},_init:F3}};we.memo=function(e,t){return{$$typeof:L3,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=ul.transition;ul.transition={};try{e()}finally{ul.transition=t}};we.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};we.useCallback=function(e,t){return Gt.current.useCallback(e,t)};we.useContext=function(e){return Gt.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return Gt.current.useDeferredValue(e)};we.useEffect=function(e,t){return Gt.current.useEffect(e,t)};we.useId=function(){return Gt.current.useId()};we.useImperativeHandle=function(e,t,n){return Gt.current.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return Gt.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Gt.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Gt.current.useMemo(e,t)};we.useReducer=function(e,t,n){return Gt.current.useReducer(e,t,n)};we.useRef=function(e){return Gt.current.useRef(e)};we.useState=function(e){return Gt.current.useState(e)};we.useSyncExternalStore=function(e,t,n){return Gt.current.useSyncExternalStore(e,t,n)};we.useTransition=function(){return Gt.current.useTransition()};we.version="18.2.0";$w.exports=we;var B=$w.exports;const Jn=C3(B);var Cl={},nx={exports:{}},xn={},rx={exports:{}},ix={};/**
10
10
  * @license React
11
11
  * scheduler.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var y3=Object.defineProperty,v3=Object.defineProperties;var w3=Object.getOwnProp
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
- */(function(e){function t(H,ee){var se=H.length;H.push(ee);e:for(;0<se;){var me=se-1>>>1,Fe=H[me];if(0<o(Fe,ee))H[me]=ee,H[se]=Fe,se=me;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ee=H[0],se=H.pop();if(se!==ee){H[0]=se;e:for(var me=0,Fe=H.length,Se=Fe>>>1;me<Se;){var xt=2*(me+1)-1,kt=H[xt],ht=xt+1,Kt=H[ht];if(0>o(kt,se))ht<Fe&&0>o(Kt,kt)?(H[me]=Kt,H[ht]=se,me=ht):(H[me]=kt,H[xt]=se,me=xt);else if(ht<Fe&&0>o(Kt,se))H[me]=Kt,H[ht]=se,me=ht;else break e}}return ee}function o(H,ee){var se=H.sortIndex-ee.sortIndex;return se!==0?se:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],d=[],p=1,m=null,g=3,x=!1,E=!1,P=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(H){for(var ee=n(d);ee!==null;){if(ee.callback===null)r(d);else if(ee.startTime<=H)r(d),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(d)}}function k(H){if(P=!1,C(H),!E)if(n(f)!==null)E=!0,ye(b);else{var ee=n(d);ee!==null&&ze(k,ee.startTime-H)}}function b(H,ee){E=!1,P&&(P=!1,w(D),D=-1),x=!0;var se=g;try{for(C(ee),m=n(f);m!==null&&(!(m.expirationTime>ee)||H&&!le());){var me=m.callback;if(typeof me=="function"){m.callback=null,g=m.priorityLevel;var Fe=me(m.expirationTime<=ee);ee=e.unstable_now(),typeof Fe=="function"?m.callback=Fe:m===n(f)&&r(f),C(ee)}else r(f);m=n(f)}if(m!==null)var Se=!0;else{var xt=n(d);xt!==null&&ze(k,xt.startTime-ee),Se=!1}return Se}finally{m=null,g=se,x=!1}}var I=!1,N=null,D=-1,$=5,G=-1;function le(){return!(e.unstable_now()-G<$)}function Ge(){if(N!==null){var H=e.unstable_now();G=H;var ee=!0;try{ee=N(!0,H)}finally{ee?ot():(I=!1,N=null)}}else I=!1}var ot;if(typeof A=="function")ot=function(){A(Ge)};else if(typeof MessageChannel!="undefined"){var wt=new MessageChannel,_e=wt.port2;wt.port1.onmessage=Ge,ot=function(){_e.postMessage(null)}}else ot=function(){R(Ge,0)};function ye(H){N=H,I||(I=!0,ot())}function ze(H,ee){D=R(function(){H(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){E||x||(E=!0,ye(b))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(H){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var se=g;g=ee;try{return H()}finally{g=se}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,ee){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var se=g;g=H;try{return ee()}finally{g=se}},e.unstable_scheduleCallback=function(H,ee,se){var me=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?me+se:me):se=me,H){case 1:var Fe=-1;break;case 2:Fe=250;break;case 5:Fe=1073741823;break;case 4:Fe=1e4;break;default:Fe=5e3}return Fe=se+Fe,H={id:p++,callback:ee,priorityLevel:H,startTime:se,expirationTime:Fe,sortIndex:-1},se>me?(H.sortIndex=se,t(d,H),n(f)===null&&H===n(d)&&(P?(w(D),D=-1):P=!0,ze(k,se-me))):(H.sortIndex=Fe,t(f,H),E||x||(E=!0,ye(b))),H},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(H){var ee=g;return function(){var se=g;g=ee;try{return H.apply(this,arguments)}finally{g=se}}}})(rx);nx.exports=rx;var F3=nx.exports;/**
17
+ */(function(e){function t(H,ee){var se=H.length;H.push(ee);e:for(;0<se;){var me=se-1>>>1,Fe=H[me];if(0<o(Fe,ee))H[me]=ee,H[se]=Fe,se=me;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ee=H[0],se=H.pop();if(se!==ee){H[0]=se;e:for(var me=0,Fe=H.length,Se=Fe>>>1;me<Se;){var xt=2*(me+1)-1,Rt=H[xt],ht=xt+1,$t=H[ht];if(0>o(Rt,se))ht<Fe&&0>o($t,Rt)?(H[me]=$t,H[ht]=se,me=ht):(H[me]=Rt,H[xt]=se,me=xt);else if(ht<Fe&&0>o($t,se))H[me]=$t,H[ht]=se,me=ht;else break e}}return ee}function o(H,ee){var se=H.sortIndex-ee.sortIndex;return se!==0?se:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],d=[],p=1,m=null,g=3,w=!1,E=!1,P=!1,k=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(H){for(var ee=n(d);ee!==null;){if(ee.callback===null)r(d);else if(ee.startTime<=H)r(d),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(d)}}function T(H){if(P=!1,C(H),!E)if(n(f)!==null)E=!0,ye(L);else{var ee=n(d);ee!==null&&ze(T,ee.startTime-H)}}function L(H,ee){E=!1,P&&(P=!1,x(N),N=-1),w=!0;var se=g;try{for(C(ee),m=n(f);m!==null&&(!(m.expirationTime>ee)||H&&!le());){var me=m.callback;if(typeof me=="function"){m.callback=null,g=m.priorityLevel;var Fe=me(m.expirationTime<=ee);ee=e.unstable_now(),typeof Fe=="function"?m.callback=Fe:m===n(f)&&r(f),C(ee)}else r(f);m=n(f)}if(m!==null)var Se=!0;else{var xt=n(d);xt!==null&&ze(T,xt.startTime-ee),Se=!1}return Se}finally{m=null,g=se,w=!1}}var I=!1,D=null,N=-1,$=5,G=-1;function le(){return!(e.unstable_now()-G<$)}function Ge(){if(D!==null){var H=e.unstable_now();G=H;var ee=!0;try{ee=D(!0,H)}finally{ee?ot():(I=!1,D=null)}}else I=!1}var ot;if(typeof A=="function")ot=function(){A(Ge)};else if(typeof MessageChannel!="undefined"){var wt=new MessageChannel,_e=wt.port2;wt.port1.onmessage=Ge,ot=function(){_e.postMessage(null)}}else ot=function(){k(Ge,0)};function ye(H){D=H,I||(I=!0,ot())}function ze(H,ee){N=k(function(){H(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){E||w||(E=!0,ye(L))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(H){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var se=g;g=ee;try{return H()}finally{g=se}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,ee){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var se=g;g=H;try{return ee()}finally{g=se}},e.unstable_scheduleCallback=function(H,ee,se){var me=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?me+se:me):se=me,H){case 1:var Fe=-1;break;case 2:Fe=250;break;case 5:Fe=1073741823;break;case 4:Fe=1e4;break;default:Fe=5e3}return Fe=se+Fe,H={id:p++,callback:ee,priorityLevel:H,startTime:se,expirationTime:Fe,sortIndex:-1},se>me?(H.sortIndex=se,t(d,H),n(f)===null&&H===n(d)&&(P?(x(N),N=-1):P=!0,ze(T,se-me))):(H.sortIndex=Fe,t(f,H),E||w||(E=!0,ye(L))),H},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(H){var ee=g;return function(){var se=g;g=ee;try{return H.apply(this,arguments)}finally{g=se}}}})(ix);rx.exports=ix;var V3=rx.exports;/**
18
18
  * @license React
19
19
  * react-dom.production.min.js
20
20
  *
@@ -22,14 +22,14 @@ var y3=Object.defineProperty,v3=Object.defineProperties;var w3=Object.getOwnProp
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var ix=B,yn=F3;function Q(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 ox=new Set,uu={};function no(e,t){qo(e,t),qo(e+"Capture",t)}function qo(e,t){for(uu[e]=t,e=0;e<t.length;e++)ox.add(t[e])}var Rr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),Sh=Object.prototype.hasOwnProperty,B3=/^[: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]*$/,Zy={},ev={};function V3(e){return Sh.call(ev,e)?!0:Sh.call(Zy,e)?!1:B3.test(e)?ev[e]=!0:(Zy[e]=!0,!1)}function U3(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 j3(e,t,n,r){if(t===null||typeof t=="undefined"||U3(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 Gt(e,t,n,r,o,u,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=a}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Gt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Gt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Gt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Gt(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){Tt[e]=new Gt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Gt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Gt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Gt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Gt(e,5,!1,e.toLowerCase(),null,!1,!1)});var jp=/[\-:]([a-z])/g;function zp(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(jp,zp);Tt[t]=new Gt(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(jp,zp);Tt[t]=new Gt(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(jp,zp);Tt[t]=new Gt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Gt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Gt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wp(e,t,n,r){var o=Tt.hasOwnProperty(t)?Tt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(j3(t,n,o,r)&&(n=null),r||o===null?V3(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Nr=ix.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fa=Symbol.for("react.element"),Po=Symbol.for("react.portal"),_o=Symbol.for("react.fragment"),Qp=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),sx=Symbol.for("react.provider"),ux=Symbol.for("react.context"),Hp=Symbol.for("react.forward_ref"),Eh=Symbol.for("react.suspense"),Ph=Symbol.for("react.suspense_list"),Gp=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),ax=Symbol.for("react.offscreen"),tv=Symbol.iterator;function Ls(e){return e===null||typeof e!="object"?null:(e=tv&&e[tv]||e["@@iterator"],typeof e=="function"?e:null)}var Je=Object.assign,Rd;function js(e){if(Rd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rd=t&&t[1]||""}return`
26
- `+Rd+e}var Od=!1;function Ld(e,t){if(!e||Od)return"";Od=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var o=d.stack.split(`
25
+ */var ox=B,yn=V3;function Q(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 sx=new Set,au={};function ro(e,t){Yo(e,t),Yo(e+"Capture",t)}function Yo(e,t){for(au[e]=t,e=0;e<t.length;e++)sx.add(t[e])}var kr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),Eh=Object.prototype.hasOwnProperty,U3=/^[: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]*$/,ev={},tv={};function j3(e){return Eh.call(tv,e)?!0:Eh.call(ev,e)?!1:U3.test(e)?tv[e]=!0:(ev[e]=!0,!1)}function z3(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 W3(e,t,n,r){if(t===null||typeof t=="undefined"||z3(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 Kt(e,t,n,r,o,u,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=a}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Kt(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){Tt[e]=new Kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var zp=/[\-:]([a-z])/g;function Wp(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(zp,Wp);Tt[t]=new Kt(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(zp,Wp);Tt[t]=new Kt(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(zp,Wp);Tt[t]=new Kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Kt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qp(e,t,n,r){var o=Tt.hasOwnProperty(t)?Tt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(W3(t,n,o,r)&&(n=null),r||o===null?j3(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Nr=ox.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ba=Symbol.for("react.element"),_o=Symbol.for("react.portal"),To=Symbol.for("react.fragment"),Hp=Symbol.for("react.strict_mode"),Ph=Symbol.for("react.profiler"),ux=Symbol.for("react.provider"),ax=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),_h=Symbol.for("react.suspense"),Th=Symbol.for("react.suspense_list"),Kp=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),lx=Symbol.for("react.offscreen"),nv=Symbol.iterator;function Ls(e){return e===null||typeof e!="object"?null:(e=nv&&e[nv]||e["@@iterator"],typeof e=="function"?e:null)}var Je=Object.assign,Od;function zs(e){if(Od===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Od=t&&t[1]||""}return`
26
+ `+Od+e}var bd=!1;function Ld(e,t){if(!e||bd)return"";bd=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var o=d.stack.split(`
27
27
  `),u=r.stack.split(`
28
28
  `),a=o.length-1,c=u.length-1;1<=a&&0<=c&&o[a]!==u[c];)c--;for(;1<=a&&0<=c;a--,c--)if(o[a]!==u[c]){if(a!==1||c!==1)do if(a--,c--,0>c||o[a]!==u[c]){var f=`
29
- `+o[a].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=a&&0<=c);break}}}finally{Od=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?js(e):""}function z3(e){switch(e.tag){case 5:return js(e.type);case 16:return js("Lazy");case 13:return js("Suspense");case 19:return js("SuspenseList");case 0:case 2:case 15:return e=Ld(e.type,!1),e;case 11:return e=Ld(e.type.render,!1),e;case 1:return e=Ld(e.type,!0),e;default:return""}}function _h(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 _o:return"Fragment";case Po:return"Portal";case Ch:return"Profiler";case Qp:return"StrictMode";case Eh:return"Suspense";case Ph:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ux:return(e.displayName||"Context")+".Consumer";case sx:return(e._context.displayName||"Context")+".Provider";case Hp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gp:return t=e.displayName||null,t!==null?t:_h(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return _h(e(t))}catch(n){}}return null}function W3(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 _h(t);case 8:return t===Qp?"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 gi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Q3(e){var t=lx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,u.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ba(e){e._valueTracker||(e._valueTracker=Q3(e))}function cx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Cl(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Th(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function nv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gi(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 fx(e,t){t=t.checked,t!=null&&Wp(e,"checked",t,!1)}function kh(e,t){fx(e,t);var n=gi(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")?Rh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rh(e,t.type,gi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rv(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 Rh(e,t,n){(t!=="number"||Cl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zs=Array.isArray;function jo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+gi(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Oh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function iv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(zs(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gi(n)}}function dx(e,t){var n=gi(t.value),r=gi(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 ov(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hx(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 Lh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Va,px=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Va=Va||document.createElement("div"),Va.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Va.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function au(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $s={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},H3=["Webkit","ms","Moz","O"];Object.keys($s).forEach(function(e){H3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$s[t]=$s[e]})});function mx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$s.hasOwnProperty(e)&&$s[e]?(""+t).trim():t+"px"}function gx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var G3=Je({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 bh(e,t){if(t){if(G3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Ih(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 Mh=null;function Kp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dh=null,zo=null,Wo=null;function sv(e){if(e=Du(e)){if(typeof Dh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=yc(t),Dh(e.stateNode,e.type,t))}}function yx(e){zo?Wo?Wo.push(e):Wo=[e]:zo=e}function vx(){if(zo){var e=zo,t=Wo;if(Wo=zo=null,sv(e),t)for(e=0;e<t.length;e++)sv(t[e])}}function wx(e,t){return e(t)}function xx(){}var bd=!1;function Ax(e,t,n){if(bd)return e(t,n);bd=!0;try{return wx(e,t,n)}finally{bd=!1,(zo!==null||Wo!==null)&&(xx(),vx())}}function lu(e,t){var n=e.stateNode;if(n===null)return null;var r=yc(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(Q(231,t,typeof n));return n}var Nh=!1;if(Rr)try{var bs={};Object.defineProperty(bs,"passive",{get:function(){Nh=!0}}),window.addEventListener("test",bs,bs),window.removeEventListener("test",bs,bs)}catch(e){Nh=!1}function K3(e,t,n,r,o,u,a,c,f){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(p){this.onError(p)}}var qs=!1,El=null,Pl=!1,Fh=null,$3={onError:function(e){qs=!0,El=e}};function q3(e,t,n,r,o,u,a,c,f){qs=!1,El=null,K3.apply($3,arguments)}function Y3(e,t,n,r,o,u,a,c,f){if(q3.apply(this,arguments),qs){if(qs){var d=El;qs=!1,El=null}else throw Error(Q(198));Pl||(Pl=!0,Fh=d)}}function ro(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 Sx(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 uv(e){if(ro(e)!==e)throw Error(Q(188))}function J3(e){var t=e.alternate;if(!t){if(t=ro(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return uv(o),e;if(u===r)return uv(o),t;u=u.sibling}throw Error(Q(188))}if(n.return!==r.return)n=o,r=u;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=u;break}if(c===r){a=!0,r=o,n=u;break}c=c.sibling}if(!a){for(c=u.child;c;){if(c===n){a=!0,n=u,r=o;break}if(c===r){a=!0,r=u,n=o;break}c=c.sibling}if(!a)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function Cx(e){return e=J3(e),e!==null?Ex(e):null}function Ex(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ex(e);if(t!==null)return t;e=e.sibling}return null}var Px=yn.unstable_scheduleCallback,av=yn.unstable_cancelCallback,X3=yn.unstable_shouldYield,Z3=yn.unstable_requestPaint,it=yn.unstable_now,e4=yn.unstable_getCurrentPriorityLevel,$p=yn.unstable_ImmediatePriority,_x=yn.unstable_UserBlockingPriority,_l=yn.unstable_NormalPriority,t4=yn.unstable_LowPriority,Tx=yn.unstable_IdlePriority,hc=null,ar=null;function n4(e){if(ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(hc,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Xn=Math.clz32?Math.clz32:o4,r4=Math.log,i4=Math.LN2;function o4(e){return e>>>=0,e===0?32:31-(r4(e)/i4|0)|0}var Ua=64,ja=4194304;function Ws(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 Tl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,u=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~o;c!==0?r=Ws(c):(u&=a,u!==0&&(r=Ws(u)))}else a=n&~o,a!==0?r=Ws(a):u!==0&&(r=Ws(u));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,u=t&-t,o>=u||o===16&&(u&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-Xn(t),o=1<<n,r|=e[n],t&=~o;return r}function s4(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 u4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var a=31-Xn(u),c=1<<a,f=o[a];f===-1?(!(c&n)||c&r)&&(o[a]=s4(c,t)):f<=t&&(e.expiredLanes|=c),u&=~c}}function Bh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kx(){var e=Ua;return Ua<<=1,!(Ua&4194240)&&(Ua=64),e}function Id(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Iu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xn(t),e[t]=n}function a4(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 o=31-Xn(n),u=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~u}}function qp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Re=0;function Rx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ox,Yp,Lx,bx,Ix,Vh=!1,za=[],ri=null,ii=null,oi=null,cu=new Map,fu=new Map,Xr=[],l4="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 lv(e,t){switch(e){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":cu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fu.delete(t.pointerId)}}function Is(e,t,n,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Du(t),t!==null&&Yp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function c4(e,t,n,r,o){switch(t){case"focusin":return ri=Is(ri,e,t,n,r,o),!0;case"dragenter":return ii=Is(ii,e,t,n,r,o),!0;case"mouseover":return oi=Is(oi,e,t,n,r,o),!0;case"pointerover":var u=o.pointerId;return cu.set(u,Is(cu.get(u)||null,e,t,n,r,o)),!0;case"gotpointercapture":return u=o.pointerId,fu.set(u,Is(fu.get(u)||null,e,t,n,r,o)),!0}return!1}function Mx(e){var t=zi(e.target);if(t!==null){var n=ro(t);if(n!==null){if(t=n.tag,t===13){if(t=Sx(n),t!==null){e.blockedOn=t,Ix(e.priority,function(){Lx(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 ul(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Uh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Mh=r,n.target.dispatchEvent(r),Mh=null}else return t=Du(n),t!==null&&Yp(t),e.blockedOn=n,!1;t.shift()}return!0}function cv(e,t,n){ul(e)&&n.delete(t)}function f4(){Vh=!1,ri!==null&&ul(ri)&&(ri=null),ii!==null&&ul(ii)&&(ii=null),oi!==null&&ul(oi)&&(oi=null),cu.forEach(cv),fu.forEach(cv)}function Ms(e,t){e.blockedOn===t&&(e.blockedOn=null,Vh||(Vh=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,f4)))}function du(e){function t(o){return Ms(o,e)}if(0<za.length){Ms(za[0],e);for(var n=1;n<za.length;n++){var r=za[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ri!==null&&Ms(ri,e),ii!==null&&Ms(ii,e),oi!==null&&Ms(oi,e),cu.forEach(t),fu.forEach(t),n=0;n<Xr.length;n++)r=Xr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xr.length&&(n=Xr[0],n.blockedOn===null);)Mx(n),n.blockedOn===null&&Xr.shift()}var Qo=Nr.ReactCurrentBatchConfig,kl=!0;function d4(e,t,n,r){var o=Re,u=Qo.transition;Qo.transition=null;try{Re=1,Jp(e,t,n,r)}finally{Re=o,Qo.transition=u}}function h4(e,t,n,r){var o=Re,u=Qo.transition;Qo.transition=null;try{Re=4,Jp(e,t,n,r)}finally{Re=o,Qo.transition=u}}function Jp(e,t,n,r){if(kl){var o=Uh(e,t,n,r);if(o===null)Wd(e,t,r,Rl,n),lv(e,r);else if(c4(o,e,t,n,r))r.stopPropagation();else if(lv(e,r),t&4&&-1<l4.indexOf(e)){for(;o!==null;){var u=Du(o);if(u!==null&&Ox(u),u=Uh(e,t,n,r),u===null&&Wd(e,t,r,Rl,n),u===o)break;o=u}o!==null&&r.stopPropagation()}else Wd(e,t,r,null,n)}}var Rl=null;function Uh(e,t,n,r){if(Rl=null,e=Kp(r),e=zi(e),e!==null)if(t=ro(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Sx(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 Rl=e,null}function Dx(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(e4()){case $p:return 1;case _x:return 4;case _l:case t4:return 16;case Tx:return 536870912;default:return 16}default:return 16}}var ti=null,Xp=null,al=null;function Nx(){if(al)return al;var e,t=Xp,n=t.length,r,o="value"in ti?ti.value:ti.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[u-r];r++);return al=o.slice(e,1<r?1-r:void 0)}function ll(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 Wa(){return!0}function fv(){return!1}function An(e){function t(n,r,o,u,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=a,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(u):u[c]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Wa:fv,this.isPropagationStopped=fv,this}return Je(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=Wa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wa)},persist:function(){},isPersistent:Wa}),t}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zp=An(us),Mu=Je({},us,{view:0,detail:0}),p4=An(Mu),Md,Dd,Ds,pc=Je({},Mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:em,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!==Ds&&(Ds&&e.type==="mousemove"?(Md=e.screenX-Ds.screenX,Dd=e.screenY-Ds.screenY):Dd=Md=0,Ds=e),Md)},movementY:function(e){return"movementY"in e?e.movementY:Dd}}),dv=An(pc),m4=Je({},pc,{dataTransfer:0}),g4=An(m4),y4=Je({},Mu,{relatedTarget:0}),Nd=An(y4),v4=Je({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),w4=An(v4),x4=Je({},us,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),A4=An(x4),S4=Je({},us,{data:0}),hv=An(S4),C4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E4={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"},P4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=P4[e])?!!t[e]:!1}function em(){return _4}var T4=Je({},Mu,{key:function(e){if(e.key){var t=C4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:em,charCode:function(e){return e.type==="keypress"?ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k4=An(T4),R4=Je({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pv=An(R4),O4=Je({},Mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:em}),L4=An(O4),b4=Je({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),I4=An(b4),M4=Je({},pc,{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}),D4=An(M4),N4=[9,13,27,32],tm=Rr&&"CompositionEvent"in window,Ys=null;Rr&&"documentMode"in document&&(Ys=document.documentMode);var F4=Rr&&"TextEvent"in window&&!Ys,Fx=Rr&&(!tm||Ys&&8<Ys&&11>=Ys),mv=String.fromCharCode(32),gv=!1;function Bx(e,t){switch(e){case"keyup":return N4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var To=!1;function B4(e,t){switch(e){case"compositionend":return Vx(t);case"keypress":return t.which!==32?null:(gv=!0,mv);case"textInput":return e=t.data,e===mv&&gv?null:e;default:return null}}function V4(e,t){if(To)return e==="compositionend"||!tm&&Bx(e,t)?(e=Nx(),al=Xp=ti=null,To=!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 Fx&&t.locale!=="ko"?null:t.data;default:return null}}var U4={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 yv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!U4[e.type]:t==="textarea"}function Ux(e,t,n,r){yx(r),t=Ol(t,"onChange"),0<t.length&&(n=new Zp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Js=null,hu=null;function j4(e){Jx(e,0)}function mc(e){var t=Oo(e);if(cx(t))return e}function z4(e,t){if(e==="change")return t}var jx=!1;if(Rr){var Fd;if(Rr){var Bd="oninput"in document;if(!Bd){var vv=document.createElement("div");vv.setAttribute("oninput","return;"),Bd=typeof vv.oninput=="function"}Fd=Bd}else Fd=!1;jx=Fd&&(!document.documentMode||9<document.documentMode)}function wv(){Js&&(Js.detachEvent("onpropertychange",zx),hu=Js=null)}function zx(e){if(e.propertyName==="value"&&mc(hu)){var t=[];Ux(t,hu,e,Kp(e)),Ax(j4,t)}}function W4(e,t,n){e==="focusin"?(wv(),Js=t,hu=n,Js.attachEvent("onpropertychange",zx)):e==="focusout"&&wv()}function Q4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mc(hu)}function H4(e,t){if(e==="click")return mc(t)}function G4(e,t){if(e==="input"||e==="change")return mc(t)}function K4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var er=typeof Object.is=="function"?Object.is:K4;function pu(e,t){if(er(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 o=n[r];if(!Sh.call(t,o)||!er(e[o],t[o]))return!1}return!0}function xv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Av(e,t){var n=xv(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=xv(n)}}function Wx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qx(){for(var e=window,t=Cl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=Cl(e.document)}return t}function nm(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 $4(e){var t=Qx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Wx(n.ownerDocument.documentElement,n)){if(r!==null&&nm(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 o=n.textContent.length,u=Math.min(r.start,o);r=r.end===void 0?u:Math.min(r.end,o),!e.extend&&u>r&&(o=r,r=u,u=o),o=Av(n,u);var a=Av(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)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 q4=Rr&&"documentMode"in document&&11>=document.documentMode,ko=null,jh=null,Xs=null,zh=!1;function Sv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zh||ko==null||ko!==Cl(r)||(r=ko,"selectionStart"in r&&nm(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}),Xs&&pu(Xs,r)||(Xs=r,r=Ol(jh,"onSelect"),0<r.length&&(t=new Zp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ko)))}function Qa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ro={animationend:Qa("Animation","AnimationEnd"),animationiteration:Qa("Animation","AnimationIteration"),animationstart:Qa("Animation","AnimationStart"),transitionend:Qa("Transition","TransitionEnd")},Vd={},Hx={};Rr&&(Hx=document.createElement("div").style,"AnimationEvent"in window||(delete Ro.animationend.animation,delete Ro.animationiteration.animation,delete Ro.animationstart.animation),"TransitionEvent"in window||delete Ro.transitionend.transition);function gc(e){if(Vd[e])return Vd[e];if(!Ro[e])return e;var t=Ro[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hx)return Vd[e]=t[n];return e}var Gx=gc("animationend"),Kx=gc("animationiteration"),$x=gc("animationstart"),qx=gc("transitionend"),Yx=new Map,Cv="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){Yx.set(e,t),no(t,[e])}for(var Ud=0;Ud<Cv.length;Ud++){var jd=Cv[Ud],Y4=jd.toLowerCase(),J4=jd[0].toUpperCase()+jd.slice(1);Si(Y4,"on"+J4)}Si(Gx,"onAnimationEnd");Si(Kx,"onAnimationIteration");Si($x,"onAnimationStart");Si("dblclick","onDoubleClick");Si("focusin","onFocus");Si("focusout","onBlur");Si(qx,"onTransitionEnd");qo("onMouseEnter",["mouseout","mouseover"]);qo("onMouseLeave",["mouseout","mouseover"]);qo("onPointerEnter",["pointerout","pointerover"]);qo("onPointerLeave",["pointerout","pointerover"]);no("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));no("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));no("onBeforeInput",["compositionend","keypress","textInput","paste"]);no("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));no("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));no("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qs="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(" "),X4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qs));function Ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Y3(r,t,void 0,e),e.currentTarget=null}function Jx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var a=r.length-1;0<=a;a--){var c=r[a],f=c.instance,d=c.currentTarget;if(c=c.listener,f!==u&&o.isPropagationStopped())break e;Ev(o,c,d),u=f}else for(a=0;a<r.length;a++){if(c=r[a],f=c.instance,d=c.currentTarget,c=c.listener,f!==u&&o.isPropagationStopped())break e;Ev(o,c,d),u=f}}}if(Pl)throw e=Fh,Pl=!1,Fh=null,e}function Ve(e,t){var n=t[Kh];n===void 0&&(n=t[Kh]=new Set);var r=e+"__bubble";n.has(r)||(Xx(t,e,2,!1),n.add(r))}function zd(e,t,n){var r=0;t&&(r|=4),Xx(n,e,r,t)}var Ha="_reactListening"+Math.random().toString(36).slice(2);function mu(e){if(!e[Ha]){e[Ha]=!0,ox.forEach(function(n){n!=="selectionchange"&&(X4.has(n)||zd(n,!1,e),zd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ha]||(t[Ha]=!0,zd("selectionchange",!1,t))}}function Xx(e,t,n,r){switch(Dx(t)){case 1:var o=d4;break;case 4:o=h4;break;default:o=Jp}n=o.bind(null,t,n,e),o=void 0,!Nh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Wd(e,t,n,r,o){var u=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var c=r.stateNode.containerInfo;if(c===o||c.nodeType===8&&c.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var f=a.tag;if((f===3||f===4)&&(f=a.stateNode.containerInfo,f===o||f.nodeType===8&&f.parentNode===o))return;a=a.return}for(;c!==null;){if(a=zi(c),a===null)return;if(f=a.tag,f===5||f===6){r=u=a;continue e}c=c.parentNode}}r=r.return}Ax(function(){var d=u,p=Kp(n),m=[];e:{var g=Yx.get(e);if(g!==void 0){var x=Zp,E=e;switch(e){case"keypress":if(ll(n)===0)break e;case"keydown":case"keyup":x=k4;break;case"focusin":E="focus",x=Nd;break;case"focusout":E="blur",x=Nd;break;case"beforeblur":case"afterblur":x=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":x=dv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=g4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=L4;break;case Gx:case Kx:case $x:x=w4;break;case qx:x=I4;break;case"scroll":x=p4;break;case"wheel":x=D4;break;case"copy":case"cut":case"paste":x=A4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=pv}var P=(t&4)!==0,R=!P&&e==="scroll",w=P?g!==null?g+"Capture":null:g;P=[];for(var A=d,C;A!==null;){C=A;var k=C.stateNode;if(C.tag===5&&k!==null&&(C=k,w!==null&&(k=lu(A,w),k!=null&&P.push(gu(A,k,C)))),R)break;A=A.return}0<P.length&&(g=new x(g,E,null,n,p),m.push({event:g,listeners:P}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",g&&n!==Mh&&(E=n.relatedTarget||n.fromElement)&&(zi(E)||E[Or]))break e;if((x||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,x?(E=n.relatedTarget||n.toElement,x=d,E=E?zi(E):null,E!==null&&(R=ro(E),E!==R||E.tag!==5&&E.tag!==6)&&(E=null)):(x=null,E=d),x!==E)){if(P=dv,k="onMouseLeave",w="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(P=pv,k="onPointerLeave",w="onPointerEnter",A="pointer"),R=x==null?g:Oo(x),C=E==null?g:Oo(E),g=new P(k,A+"leave",x,n,p),g.target=R,g.relatedTarget=C,k=null,zi(p)===d&&(P=new P(w,A+"enter",E,n,p),P.target=C,P.relatedTarget=R,k=P),R=k,x&&E)t:{for(P=x,w=E,A=0,C=P;C;C=Eo(C))A++;for(C=0,k=w;k;k=Eo(k))C++;for(;0<A-C;)P=Eo(P),A--;for(;0<C-A;)w=Eo(w),C--;for(;A--;){if(P===w||w!==null&&P===w.alternate)break t;P=Eo(P),w=Eo(w)}P=null}else P=null;x!==null&&Pv(m,g,x,P,!1),E!==null&&R!==null&&Pv(m,R,E,P,!0)}}e:{if(g=d?Oo(d):window,x=g.nodeName&&g.nodeName.toLowerCase(),x==="select"||x==="input"&&g.type==="file")var b=z4;else if(yv(g))if(jx)b=G4;else{b=Q4;var I=W4}else(x=g.nodeName)&&x.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(b=H4);if(b&&(b=b(e,d))){Ux(m,b,n,p);break e}I&&I(e,g,d),e==="focusout"&&(I=g._wrapperState)&&I.controlled&&g.type==="number"&&Rh(g,"number",g.value)}switch(I=d?Oo(d):window,e){case"focusin":(yv(I)||I.contentEditable==="true")&&(ko=I,jh=d,Xs=null);break;case"focusout":Xs=jh=ko=null;break;case"mousedown":zh=!0;break;case"contextmenu":case"mouseup":case"dragend":zh=!1,Sv(m,n,p);break;case"selectionchange":if(q4)break;case"keydown":case"keyup":Sv(m,n,p)}var N;if(tm)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else To?Bx(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Fx&&n.locale!=="ko"&&(To||D!=="onCompositionStart"?D==="onCompositionEnd"&&To&&(N=Nx()):(ti=p,Xp="value"in ti?ti.value:ti.textContent,To=!0)),I=Ol(d,D),0<I.length&&(D=new hv(D,e,null,n,p),m.push({event:D,listeners:I}),N?D.data=N:(N=Vx(n),N!==null&&(D.data=N)))),(N=F4?B4(e,n):V4(e,n))&&(d=Ol(d,"onBeforeInput"),0<d.length&&(p=new hv("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:d}),p.data=N))}Jx(m,t)})}function gu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ol(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;o.tag===5&&u!==null&&(o=u,u=lu(e,n),u!=null&&r.unshift(gu(e,u,o)),u=lu(e,t),u!=null&&r.push(gu(e,u,o))),e=e.return}return r}function Eo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Pv(e,t,n,r,o){for(var u=t._reactName,a=[];n!==null&&n!==r;){var c=n,f=c.alternate,d=c.stateNode;if(f!==null&&f===r)break;c.tag===5&&d!==null&&(c=d,o?(f=lu(n,u),f!=null&&a.unshift(gu(n,f,c))):o||(f=lu(n,u),f!=null&&a.push(gu(n,f,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Z4=/\r\n?/g,eL=/\u0000|\uFFFD/g;function _v(e){return(typeof e=="string"?e:""+e).replace(Z4,`
30
- `).replace(eL,"")}function Ga(e,t,n){if(t=_v(t),_v(e)!==t&&n)throw Error(Q(425))}function Ll(){}var Wh=null,Qh=null;function Hh(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 Gh=typeof setTimeout=="function"?setTimeout:void 0,tL=typeof clearTimeout=="function"?clearTimeout:void 0,Tv=typeof Promise=="function"?Promise:void 0,nL=typeof queueMicrotask=="function"?queueMicrotask:typeof Tv!="undefined"?function(e){return Tv.resolve(null).then(e).catch(rL)}:Gh;function rL(e){setTimeout(function(){throw e})}function Qd(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),du(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);du(t)}function si(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 kv(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 as=Math.random().toString(36).slice(2),ur="__reactFiber$"+as,yu="__reactProps$"+as,Or="__reactContainer$"+as,Kh="__reactEvents$"+as,iL="__reactListeners$"+as,oL="__reactHandles$"+as;function zi(e){var t=e[ur];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Or]||n[ur]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kv(e);e!==null;){if(n=e[ur])return n;e=kv(e)}return t}e=n,n=e.parentNode}return null}function Du(e){return e=e[ur]||e[Or],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Oo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function yc(e){return e[yu]||null}var $h=[],Lo=-1;function Ci(e){return{current:e}}function Ue(e){0>Lo||(e.current=$h[Lo],$h[Lo]=null,Lo--)}function Ne(e,t){Lo++,$h[Lo]=e.current,e.current=t}var yi={},Bt=Ci(yi),nn=Ci(!1),qi=yi;function Yo(e,t){var n=e.type.contextTypes;if(!n)return yi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in n)o[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function rn(e){return e=e.childContextTypes,e!=null}function bl(){Ue(nn),Ue(Bt)}function Rv(e,t,n){if(Bt.current!==yi)throw Error(Q(168));Ne(Bt,t),Ne(nn,n)}function Zx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Q(108,W3(e)||"Unknown",o));return Je({},n,r)}function Il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yi,qi=Bt.current,Ne(Bt,e),Ne(nn,nn.current),!0}function Ov(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=Zx(e,t,qi),r.__reactInternalMemoizedMergedChildContext=e,Ue(nn),Ue(Bt),Ne(Bt,e)):Ue(nn),Ne(nn,n)}var Sr=null,vc=!1,Hd=!1;function eA(e){Sr===null?Sr=[e]:Sr.push(e)}function sL(e){vc=!0,eA(e)}function Ei(){if(!Hd&&Sr!==null){Hd=!0;var e=0,t=Re;try{var n=Sr;for(Re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sr=null,vc=!1}catch(o){throw Sr!==null&&(Sr=Sr.slice(e+1)),Px($p,Ei),o}finally{Re=t,Hd=!1}}return null}var bo=[],Io=0,Ml=null,Dl=0,Mn=[],Dn=0,Yi=null,Cr=1,Er="";function Fi(e,t){bo[Io++]=Dl,bo[Io++]=Ml,Ml=e,Dl=t}function tA(e,t,n){Mn[Dn++]=Cr,Mn[Dn++]=Er,Mn[Dn++]=Yi,Yi=e;var r=Cr;e=Er;var o=32-Xn(r)-1;r&=~(1<<o),n+=1;var u=32-Xn(t)+o;if(30<u){var a=o-o%5;u=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Cr=1<<32-Xn(t)+o|n<<o|r,Er=u+e}else Cr=1<<u|n<<o|r,Er=e}function rm(e){e.return!==null&&(Fi(e,1),tA(e,1,0))}function im(e){for(;e===Ml;)Ml=bo[--Io],bo[Io]=null,Dl=bo[--Io],bo[Io]=null;for(;e===Yi;)Yi=Mn[--Dn],Mn[Dn]=null,Er=Mn[--Dn],Mn[Dn]=null,Cr=Mn[--Dn],Mn[Dn]=null}var mn=null,pn=null,He=!1,qn=null;function nA(e,t){var n=Nn(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 Lv(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,mn=e,pn=si(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mn=e,pn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yi!==null?{id:Cr,overflow:Er}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,mn=e,pn=null,!0):!1;default:return!1}}function qh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yh(e){if(He){var t=pn;if(t){var n=t;if(!Lv(e,t)){if(qh(e))throw Error(Q(418));t=si(n.nextSibling);var r=mn;t&&Lv(e,t)?nA(r,n):(e.flags=e.flags&-4097|2,He=!1,mn=e)}}else{if(qh(e))throw Error(Q(418));e.flags=e.flags&-4097|2,He=!1,mn=e}}}function bv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function Ka(e){if(e!==mn)return!1;if(!He)return bv(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Hh(e.type,e.memoizedProps)),t&&(t=pn)){if(qh(e))throw rA(),Error(Q(418));for(;t;)nA(e,t),t=si(t.nextSibling)}if(bv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){pn=si(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}pn=null}}else pn=mn?si(e.stateNode.nextSibling):null;return!0}function rA(){for(var e=pn;e;)e=si(e.nextSibling)}function Jo(){pn=mn=null,He=!1}function om(e){qn===null?qn=[e]:qn.push(e)}var uL=Nr.ReactCurrentBatchConfig;function Kn(e,t){if(e&&e.defaultProps){t=Je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Nl=Ci(null),Fl=null,Mo=null,sm=null;function um(){sm=Mo=Fl=null}function am(e){var t=Nl.current;Ue(Nl),e._currentValue=t}function Jh(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 Ho(e,t){Fl=e,sm=Mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tn=!0),e.firstContext=null)}function Bn(e){var t=e._currentValue;if(sm!==e)if(e={context:e,memoizedValue:t,next:null},Mo===null){if(Fl===null)throw Error(Q(308));Mo=e,Fl.dependencies={lanes:0,firstContext:e}}else Mo=Mo.next=e;return t}var Wi=null;function lm(e){Wi===null?Wi=[e]:Wi.push(e)}function iA(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,lm(t)):(n.next=o.next,o.next=n),t.interleaved=n,Lr(e,r)}function Lr(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 qr=!1;function cm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oA(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 _r(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ui(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Lr(e,n)}return o=r.interleaved,o===null?(t.next=t,lm(r)):(t.next=o.next,o.next=t),r.interleaved=t,Lr(e,n)}function cl(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,qp(e,n)}}function Iv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?o=u=a:u=u.next=a,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,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 Bl(e,t,n,r){var o=e.updateQueue;qr=!1;var u=o.firstBaseUpdate,a=o.lastBaseUpdate,c=o.shared.pending;if(c!==null){o.shared.pending=null;var f=c,d=f.next;f.next=null,a===null?u=d:a.next=d,a=f;var p=e.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==a&&(c===null?p.firstBaseUpdate=d:c.next=d,p.lastBaseUpdate=f))}if(u!==null){var m=o.baseState;a=0,p=d=f=null,c=u;do{var g=c.lane,x=c.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:x,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var E=e,P=c;switch(g=t,x=n,P.tag){case 1:if(E=P.payload,typeof E=="function"){m=E.call(x,m,g);break e}m=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=P.payload,g=typeof E=="function"?E.call(x,m,g):E,g==null)break e;m=Je({},m,g);break e;case 2:qr=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,g=o.effects,g===null?o.effects=[c]:g.push(c))}else x={eventTime:x,lane:g,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(d=p=x,f=m):p=p.next=x,a|=g;if(c=c.next,c===null){if(c=o.shared.pending,c===null)break;g=c,c=g.next,g.next=null,o.lastBaseUpdate=g,o.shared.pending=null}}while(1);if(p===null&&(f=m),o.baseState=f,o.firstBaseUpdate=d,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else u===null&&(o.shared.lanes=0);Xi|=a,e.lanes=a,e.memoizedState=m}}function Mv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(Q(191,o));o.call(r)}}}var sA=new ix.Component().refs;function Xh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wc={isMounted:function(e){return(e=e._reactInternals)?ro(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qt(),o=li(e),u=_r(r,o);u.payload=t,n!=null&&(u.callback=n),t=ui(e,u,o),t!==null&&(Zn(t,e,o,r),cl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qt(),o=li(e),u=_r(r,o);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=ui(e,u,o),t!==null&&(Zn(t,e,o,r),cl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qt(),r=li(e),o=_r(n,r);o.tag=2,t!=null&&(o.callback=t),t=ui(e,o,r),t!==null&&(Zn(t,e,r,n),cl(t,e,r))}};function Dv(e,t,n,r,o,u,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,a):t.prototype&&t.prototype.isPureReactComponent?!pu(n,r)||!pu(o,u):!0}function uA(e,t,n){var r=!1,o=yi,u=t.contextType;return typeof u=="object"&&u!==null?u=Bn(u):(o=rn(t)?qi:Bt.current,r=t.contextTypes,u=(r=r!=null)?Yo(e,o):yi),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),t}function Nv(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&&wc.enqueueReplaceState(t,t.state,null)}function Zh(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=sA,cm(e);var u=t.contextType;typeof u=="object"&&u!==null?o.context=Bn(u):(u=rn(t)?qi:Bt.current,o.context=Yo(e,u)),o.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Xh(e,t,u,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&wc.enqueueReplaceState(o,o.state,null),Bl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Ns(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(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var o=r,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(a){var c=o.refs;c===sA&&(c=o.refs={}),a===null?delete c[u]:c[u]=a},t._stringRef=u,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function $a(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fv(e){var t=e._init;return t(e._payload)}function aA(e){function t(w,A){if(e){var C=w.deletions;C===null?(w.deletions=[A],w.flags|=16):C.push(A)}}function n(w,A){if(!e)return null;for(;A!==null;)t(w,A),A=A.sibling;return null}function r(w,A){for(w=new Map;A!==null;)A.key!==null?w.set(A.key,A):w.set(A.index,A),A=A.sibling;return w}function o(w,A){return w=ci(w,A),w.index=0,w.sibling=null,w}function u(w,A,C){return w.index=C,e?(C=w.alternate,C!==null?(C=C.index,C<A?(w.flags|=2,A):C):(w.flags|=2,A)):(w.flags|=1048576,A)}function a(w){return e&&w.alternate===null&&(w.flags|=2),w}function c(w,A,C,k){return A===null||A.tag!==6?(A=Xd(C,w.mode,k),A.return=w,A):(A=o(A,C),A.return=w,A)}function f(w,A,C,k){var b=C.type;return b===_o?p(w,A,C.props.children,k,C.key):A!==null&&(A.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===$r&&Fv(b)===A.type)?(k=o(A,C.props),k.ref=Ns(w,A,C),k.return=w,k):(k=gl(C.type,C.key,C.props,null,w.mode,k),k.ref=Ns(w,A,C),k.return=w,k)}function d(w,A,C,k){return A===null||A.tag!==4||A.stateNode.containerInfo!==C.containerInfo||A.stateNode.implementation!==C.implementation?(A=Zd(C,w.mode,k),A.return=w,A):(A=o(A,C.children||[]),A.return=w,A)}function p(w,A,C,k,b){return A===null||A.tag!==7?(A=$i(C,w.mode,k,b),A.return=w,A):(A=o(A,C),A.return=w,A)}function m(w,A,C){if(typeof A=="string"&&A!==""||typeof A=="number")return A=Xd(""+A,w.mode,C),A.return=w,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Fa:return C=gl(A.type,A.key,A.props,null,w.mode,C),C.ref=Ns(w,null,A),C.return=w,C;case Po:return A=Zd(A,w.mode,C),A.return=w,A;case $r:var k=A._init;return m(w,k(A._payload),C)}if(zs(A)||Ls(A))return A=$i(A,w.mode,C,null),A.return=w,A;$a(w,A)}return null}function g(w,A,C,k){var b=A!==null?A.key:null;if(typeof C=="string"&&C!==""||typeof C=="number")return b!==null?null:c(w,A,""+C,k);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Fa:return C.key===b?f(w,A,C,k):null;case Po:return C.key===b?d(w,A,C,k):null;case $r:return b=C._init,g(w,A,b(C._payload),k)}if(zs(C)||Ls(C))return b!==null?null:p(w,A,C,k,null);$a(w,C)}return null}function x(w,A,C,k,b){if(typeof k=="string"&&k!==""||typeof k=="number")return w=w.get(C)||null,c(A,w,""+k,b);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Fa:return w=w.get(k.key===null?C:k.key)||null,f(A,w,k,b);case Po:return w=w.get(k.key===null?C:k.key)||null,d(A,w,k,b);case $r:var I=k._init;return x(w,A,C,I(k._payload),b)}if(zs(k)||Ls(k))return w=w.get(C)||null,p(A,w,k,b,null);$a(A,k)}return null}function E(w,A,C,k){for(var b=null,I=null,N=A,D=A=0,$=null;N!==null&&D<C.length;D++){N.index>D?($=N,N=null):$=N.sibling;var G=g(w,N,C[D],k);if(G===null){N===null&&(N=$);break}e&&N&&G.alternate===null&&t(w,N),A=u(G,A,D),I===null?b=G:I.sibling=G,I=G,N=$}if(D===C.length)return n(w,N),He&&Fi(w,D),b;if(N===null){for(;D<C.length;D++)N=m(w,C[D],k),N!==null&&(A=u(N,A,D),I===null?b=N:I.sibling=N,I=N);return He&&Fi(w,D),b}for(N=r(w,N);D<C.length;D++)$=x(N,w,D,C[D],k),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?D:$.key),A=u($,A,D),I===null?b=$:I.sibling=$,I=$);return e&&N.forEach(function(le){return t(w,le)}),He&&Fi(w,D),b}function P(w,A,C,k){var b=Ls(C);if(typeof b!="function")throw Error(Q(150));if(C=b.call(C),C==null)throw Error(Q(151));for(var I=b=null,N=A,D=A=0,$=null,G=C.next();N!==null&&!G.done;D++,G=C.next()){N.index>D?($=N,N=null):$=N.sibling;var le=g(w,N,G.value,k);if(le===null){N===null&&(N=$);break}e&&N&&le.alternate===null&&t(w,N),A=u(le,A,D),I===null?b=le:I.sibling=le,I=le,N=$}if(G.done)return n(w,N),He&&Fi(w,D),b;if(N===null){for(;!G.done;D++,G=C.next())G=m(w,G.value,k),G!==null&&(A=u(G,A,D),I===null?b=G:I.sibling=G,I=G);return He&&Fi(w,D),b}for(N=r(w,N);!G.done;D++,G=C.next())G=x(N,w,D,G.value,k),G!==null&&(e&&G.alternate!==null&&N.delete(G.key===null?D:G.key),A=u(G,A,D),I===null?b=G:I.sibling=G,I=G);return e&&N.forEach(function(Ge){return t(w,Ge)}),He&&Fi(w,D),b}function R(w,A,C,k){if(typeof C=="object"&&C!==null&&C.type===_o&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Fa:e:{for(var b=C.key,I=A;I!==null;){if(I.key===b){if(b=C.type,b===_o){if(I.tag===7){n(w,I.sibling),A=o(I,C.props.children),A.return=w,w=A;break e}}else if(I.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===$r&&Fv(b)===I.type){n(w,I.sibling),A=o(I,C.props),A.ref=Ns(w,I,C),A.return=w,w=A;break e}n(w,I);break}else t(w,I);I=I.sibling}C.type===_o?(A=$i(C.props.children,w.mode,k,C.key),A.return=w,w=A):(k=gl(C.type,C.key,C.props,null,w.mode,k),k.ref=Ns(w,A,C),k.return=w,w=k)}return a(w);case Po:e:{for(I=C.key;A!==null;){if(A.key===I)if(A.tag===4&&A.stateNode.containerInfo===C.containerInfo&&A.stateNode.implementation===C.implementation){n(w,A.sibling),A=o(A,C.children||[]),A.return=w,w=A;break e}else{n(w,A);break}else t(w,A);A=A.sibling}A=Zd(C,w.mode,k),A.return=w,w=A}return a(w);case $r:return I=C._init,R(w,A,I(C._payload),k)}if(zs(C))return E(w,A,C,k);if(Ls(C))return P(w,A,C,k);$a(w,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,A!==null&&A.tag===6?(n(w,A.sibling),A=o(A,C),A.return=w,w=A):(n(w,A),A=Xd(C,w.mode,k),A.return=w,w=A),a(w)):n(w,A)}return R}var Xo=aA(!0),lA=aA(!1),Nu={},lr=Ci(Nu),vu=Ci(Nu),wu=Ci(Nu);function Qi(e){if(e===Nu)throw Error(Q(174));return e}function fm(e,t){switch(Ne(wu,t),Ne(vu,e),Ne(lr,Nu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lh(t,e)}Ue(lr),Ne(lr,t)}function Zo(){Ue(lr),Ue(vu),Ue(wu)}function cA(e){Qi(wu.current);var t=Qi(lr.current),n=Lh(t,e.type);t!==n&&(Ne(vu,e),Ne(lr,n))}function dm(e){vu.current===e&&(Ue(lr),Ue(vu))}var $e=Ci(0);function Vl(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 Gd=[];function hm(){for(var e=0;e<Gd.length;e++)Gd[e]._workInProgressVersionPrimary=null;Gd.length=0}var fl=Nr.ReactCurrentDispatcher,Kd=Nr.ReactCurrentBatchConfig,Ji=0,Ye=null,ft=null,gt=null,Ul=!1,Zs=!1,xu=0,aL=0;function bt(){throw Error(Q(321))}function pm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function mm(e,t,n,r,o,u){if(Ji=u,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fl.current=e===null||e.memoizedState===null?dL:hL,e=n(r,o),Zs){u=0;do{if(Zs=!1,xu=0,25<=u)throw Error(Q(301));u+=1,gt=ft=null,t.updateQueue=null,fl.current=pL,e=n(r,o)}while(Zs)}if(fl.current=jl,t=ft!==null&&ft.next!==null,Ji=0,gt=ft=Ye=null,Ul=!1,t)throw Error(Q(300));return e}function gm(){var e=xu!==0;return xu=0,e}function sr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ye.memoizedState=gt=e:gt=gt.next=e,gt}function Vn(){if(ft===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=gt===null?Ye.memoizedState:gt.next;if(t!==null)gt=t,ft=e;else{if(e===null)throw Error(Q(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},gt===null?Ye.memoizedState=gt=e:gt=gt.next=e}return gt}function Au(e,t){return typeof t=="function"?t(e):t}function $d(e){var t=Vn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=ft,o=r.baseQueue,u=n.pending;if(u!==null){if(o!==null){var a=o.next;o.next=u.next,u.next=a}r.baseQueue=o=u,n.pending=null}if(o!==null){u=o.next,r=r.baseState;var c=a=null,f=null,d=u;do{var p=d.lane;if((Ji&p)===p)f!==null&&(f=f.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var m={lane:p,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};f===null?(c=f=m,a=r):f=f.next=m,Ye.lanes|=p,Xi|=p}d=d.next}while(d!==null&&d!==u);f===null?a=r:f.next=c,er(r,t.memoizedState)||(tn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do u=o.lane,Ye.lanes|=u,Xi|=u,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qd(e){var t=Vn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do u=e(u,a.action),a=a.next;while(a!==o);er(u,t.memoizedState)||(tn=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function fA(){}function dA(e,t){var n=Ye,r=Vn(),o=t(),u=!er(r.memoizedState,o);if(u&&(r.memoizedState=o,tn=!0),r=r.queue,ym(mA.bind(null,n,r,e),[e]),r.getSnapshot!==t||u||gt!==null&&gt.memoizedState.tag&1){if(n.flags|=2048,Su(9,pA.bind(null,n,r,o,t),void 0,null),yt===null)throw Error(Q(349));Ji&30||hA(n,t,o)}return o}function hA(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function pA(e,t,n,r){t.value=n,t.getSnapshot=r,gA(t)&&yA(e)}function mA(e,t,n){return n(function(){gA(t)&&yA(e)})}function gA(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function yA(e){var t=Lr(e,1);t!==null&&Zn(t,e,1,-1)}function Bv(e){var t=sr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Au,lastRenderedState:e},t.queue=e,e=e.dispatch=fL.bind(null,Ye,e),[t.memoizedState,e]}function Su(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.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 vA(){return Vn().memoizedState}function dl(e,t,n,r){var o=sr();Ye.flags|=e,o.memoizedState=Su(1|t,n,void 0,r===void 0?null:r)}function xc(e,t,n,r){var o=Vn();r=r===void 0?null:r;var u=void 0;if(ft!==null){var a=ft.memoizedState;if(u=a.destroy,r!==null&&pm(r,a.deps)){o.memoizedState=Su(t,n,u,r);return}}Ye.flags|=e,o.memoizedState=Su(1|t,n,u,r)}function Vv(e,t){return dl(8390656,8,e,t)}function ym(e,t){return xc(2048,8,e,t)}function wA(e,t){return xc(4,2,e,t)}function xA(e,t){return xc(4,4,e,t)}function AA(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 SA(e,t,n){return n=n!=null?n.concat([e]):null,xc(4,4,AA.bind(null,t,e),n)}function vm(){}function CA(e,t){var n=Vn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function EA(e,t){var n=Vn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function PA(e,t,n){return Ji&21?(er(n,t)||(n=kx(),Ye.lanes|=n,Xi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,tn=!0),e.memoizedState=n)}function lL(e,t){var n=Re;Re=n!==0&&4>n?n:4,e(!0);var r=Kd.transition;Kd.transition={};try{e(!1),t()}finally{Re=n,Kd.transition=r}}function _A(){return Vn().memoizedState}function cL(e,t,n){var r=li(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},TA(e))kA(t,n);else if(n=iA(e,t,n,r),n!==null){var o=Qt();Zn(n,e,r,o),RA(n,t,r)}}function fL(e,t,n){var r=li(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(TA(e))kA(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var a=t.lastRenderedState,c=u(a,n);if(o.hasEagerState=!0,o.eagerState=c,er(c,a)){var f=t.interleaved;f===null?(o.next=o,lm(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch(d){}finally{}n=iA(e,t,o,r),n!==null&&(o=Qt(),Zn(n,e,r,o),RA(n,t,r))}}function TA(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function kA(e,t){Zs=Ul=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qp(e,n)}}var jl={readContext:Bn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},dL={readContext:Bn,useCallback:function(e,t){return sr().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:Vv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dl(4194308,4,AA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return dl(4,2,e,t)},useMemo:function(e,t){var n=sr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sr();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=cL.bind(null,Ye,e),[r.memoizedState,e]},useRef:function(e){var t=sr();return e={current:e},t.memoizedState=e},useState:Bv,useDebugValue:vm,useDeferredValue:function(e){return sr().memoizedState=e},useTransition:function(){var e=Bv(!1),t=e[0];return e=lL.bind(null,e[1]),sr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ye,o=sr();if(He){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),yt===null)throw Error(Q(349));Ji&30||hA(r,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,Vv(mA.bind(null,r,u,e),[e]),r.flags|=2048,Su(9,pA.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=sr(),t=yt.identifierPrefix;if(He){var n=Er,r=Cr;n=(r&~(1<<32-Xn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xu++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=aL++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},hL={readContext:Bn,useCallback:CA,useContext:Bn,useEffect:ym,useImperativeHandle:SA,useInsertionEffect:wA,useLayoutEffect:xA,useMemo:EA,useReducer:$d,useRef:vA,useState:function(){return $d(Au)},useDebugValue:vm,useDeferredValue:function(e){var t=Vn();return PA(t,ft.memoizedState,e)},useTransition:function(){var e=$d(Au)[0],t=Vn().memoizedState;return[e,t]},useMutableSource:fA,useSyncExternalStore:dA,useId:_A,unstable_isNewReconciler:!1},pL={readContext:Bn,useCallback:CA,useContext:Bn,useEffect:ym,useImperativeHandle:SA,useInsertionEffect:wA,useLayoutEffect:xA,useMemo:EA,useReducer:qd,useRef:vA,useState:function(){return qd(Au)},useDebugValue:vm,useDeferredValue:function(e){var t=Vn();return ft===null?t.memoizedState=e:PA(t,ft.memoizedState,e)},useTransition:function(){var e=qd(Au)[0],t=Vn().memoizedState;return[e,t]},useMutableSource:fA,useSyncExternalStore:dA,useId:_A,unstable_isNewReconciler:!1};function es(e,t){try{var n="",r=t;do n+=z3(r),r=r.return;while(r);var o=n}catch(u){o=`
29
+ `+o[a].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=a&&0<=c);break}}}finally{bd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zs(e):""}function Q3(e){switch(e.tag){case 5:return zs(e.type);case 16:return zs("Lazy");case 13:return zs("Suspense");case 19:return zs("SuspenseList");case 0:case 2:case 15:return e=Ld(e.type,!1),e;case 11:return e=Ld(e.type.render,!1),e;case 1:return e=Ld(e.type,!0),e;default:return""}}function Rh(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 To:return"Fragment";case _o:return"Portal";case Ph:return"Profiler";case Hp:return"StrictMode";case _h:return"Suspense";case Th:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ax:return(e.displayName||"Context")+".Consumer";case ux:return(e._context.displayName||"Context")+".Provider";case Gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Kp:return t=e.displayName||null,t!==null?t:Rh(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return Rh(e(t))}catch(n){}}return null}function H3(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 Rh(t);case 8:return t===Hp?"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 gi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G3(e){var t=cx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,u.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Va(e){e._valueTracker||(e._valueTracker=G3(e))}function fx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function El(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function kh(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function rv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gi(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 dx(e,t){t=t.checked,t!=null&&Qp(e,"checked",t,!1)}function Oh(e,t){dx(e,t);var n=gi(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")?bh(e,t.type,n):t.hasOwnProperty("defaultValue")&&bh(e,t.type,gi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function iv(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 bh(e,t,n){(t!=="number"||El(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ws=Array.isArray;function zo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+gi(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Lh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ov(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(Ws(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gi(n)}}function hx(e,t){var n=gi(t.value),r=gi(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 sv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function px(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 Ih(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?px(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ua,mx=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ua=Ua||document.createElement("div"),Ua.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ua.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qs={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},K3=["Webkit","ms","Moz","O"];Object.keys(qs).forEach(function(e){K3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qs[t]=qs[e]})});function gx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qs.hasOwnProperty(e)&&qs[e]?(""+t).trim():t+"px"}function yx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=gx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var $3=Je({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 Mh(e,t){if(t){if($3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Dh(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 Nh=null;function $p(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fh=null,Wo=null,Qo=null;function uv(e){if(e=Nu(e)){if(typeof Fh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=vc(t),Fh(e.stateNode,e.type,t))}}function vx(e){Wo?Qo?Qo.push(e):Qo=[e]:Wo=e}function wx(){if(Wo){var e=Wo,t=Qo;if(Qo=Wo=null,uv(e),t)for(e=0;e<t.length;e++)uv(t[e])}}function xx(e,t){return e(t)}function Ax(){}var Id=!1;function Sx(e,t,n){if(Id)return e(t,n);Id=!0;try{return xx(e,t,n)}finally{Id=!1,(Wo!==null||Qo!==null)&&(Ax(),wx())}}function cu(e,t){var n=e.stateNode;if(n===null)return null;var r=vc(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(Q(231,t,typeof n));return n}var Bh=!1;if(kr)try{var Is={};Object.defineProperty(Is,"passive",{get:function(){Bh=!0}}),window.addEventListener("test",Is,Is),window.removeEventListener("test",Is,Is)}catch(e){Bh=!1}function q3(e,t,n,r,o,u,a,c,f){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(p){this.onError(p)}}var Ys=!1,Pl=null,_l=!1,Vh=null,Y3={onError:function(e){Ys=!0,Pl=e}};function J3(e,t,n,r,o,u,a,c,f){Ys=!1,Pl=null,q3.apply(Y3,arguments)}function X3(e,t,n,r,o,u,a,c,f){if(J3.apply(this,arguments),Ys){if(Ys){var d=Pl;Ys=!1,Pl=null}else throw Error(Q(198));_l||(_l=!0,Vh=d)}}function io(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 Cx(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 av(e){if(io(e)!==e)throw Error(Q(188))}function Z3(e){var t=e.alternate;if(!t){if(t=io(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return av(o),e;if(u===r)return av(o),t;u=u.sibling}throw Error(Q(188))}if(n.return!==r.return)n=o,r=u;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=u;break}if(c===r){a=!0,r=o,n=u;break}c=c.sibling}if(!a){for(c=u.child;c;){if(c===n){a=!0,n=u,r=o;break}if(c===r){a=!0,r=u,n=o;break}c=c.sibling}if(!a)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function Ex(e){return e=Z3(e),e!==null?Px(e):null}function Px(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Px(e);if(t!==null)return t;e=e.sibling}return null}var _x=yn.unstable_scheduleCallback,lv=yn.unstable_cancelCallback,e4=yn.unstable_shouldYield,t4=yn.unstable_requestPaint,it=yn.unstable_now,n4=yn.unstable_getCurrentPriorityLevel,qp=yn.unstable_ImmediatePriority,Tx=yn.unstable_UserBlockingPriority,Tl=yn.unstable_NormalPriority,r4=yn.unstable_LowPriority,Rx=yn.unstable_IdlePriority,pc=null,ar=null;function i4(e){if(ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(pc,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Xn=Math.clz32?Math.clz32:u4,o4=Math.log,s4=Math.LN2;function u4(e){return e>>>=0,e===0?32:31-(o4(e)/s4|0)|0}var ja=64,za=4194304;function Qs(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 Rl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,u=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~o;c!==0?r=Qs(c):(u&=a,u!==0&&(r=Qs(u)))}else a=n&~o,a!==0?r=Qs(a):u!==0&&(r=Qs(u));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,u=t&-t,o>=u||o===16&&(u&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-Xn(t),o=1<<n,r|=e[n],t&=~o;return r}function a4(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 l4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var a=31-Xn(u),c=1<<a,f=o[a];f===-1?(!(c&n)||c&r)&&(o[a]=a4(c,t)):f<=t&&(e.expiredLanes|=c),u&=~c}}function Uh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kx(){var e=ja;return ja<<=1,!(ja&4194240)&&(ja=64),e}function Md(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xn(t),e[t]=n}function c4(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 o=31-Xn(n),u=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~u}}function Yp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ke=0;function Ox(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bx,Jp,Lx,Ix,Mx,jh=!1,Wa=[],ri=null,ii=null,oi=null,fu=new Map,du=new Map,Xr=[],f4="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 cv(e,t){switch(e){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":fu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(t.pointerId)}}function Ms(e,t,n,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Nu(t),t!==null&&Jp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function d4(e,t,n,r,o){switch(t){case"focusin":return ri=Ms(ri,e,t,n,r,o),!0;case"dragenter":return ii=Ms(ii,e,t,n,r,o),!0;case"mouseover":return oi=Ms(oi,e,t,n,r,o),!0;case"pointerover":var u=o.pointerId;return fu.set(u,Ms(fu.get(u)||null,e,t,n,r,o)),!0;case"gotpointercapture":return u=o.pointerId,du.set(u,Ms(du.get(u)||null,e,t,n,r,o)),!0}return!1}function Dx(e){var t=Wi(e.target);if(t!==null){var n=io(t);if(n!==null){if(t=n.tag,t===13){if(t=Cx(n),t!==null){e.blockedOn=t,Mx(e.priority,function(){Lx(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 al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Nh=r,n.target.dispatchEvent(r),Nh=null}else return t=Nu(n),t!==null&&Jp(t),e.blockedOn=n,!1;t.shift()}return!0}function fv(e,t,n){al(e)&&n.delete(t)}function h4(){jh=!1,ri!==null&&al(ri)&&(ri=null),ii!==null&&al(ii)&&(ii=null),oi!==null&&al(oi)&&(oi=null),fu.forEach(fv),du.forEach(fv)}function Ds(e,t){e.blockedOn===t&&(e.blockedOn=null,jh||(jh=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,h4)))}function hu(e){function t(o){return Ds(o,e)}if(0<Wa.length){Ds(Wa[0],e);for(var n=1;n<Wa.length;n++){var r=Wa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ri!==null&&Ds(ri,e),ii!==null&&Ds(ii,e),oi!==null&&Ds(oi,e),fu.forEach(t),du.forEach(t),n=0;n<Xr.length;n++)r=Xr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xr.length&&(n=Xr[0],n.blockedOn===null);)Dx(n),n.blockedOn===null&&Xr.shift()}var Ho=Nr.ReactCurrentBatchConfig,kl=!0;function p4(e,t,n,r){var o=ke,u=Ho.transition;Ho.transition=null;try{ke=1,Xp(e,t,n,r)}finally{ke=o,Ho.transition=u}}function m4(e,t,n,r){var o=ke,u=Ho.transition;Ho.transition=null;try{ke=4,Xp(e,t,n,r)}finally{ke=o,Ho.transition=u}}function Xp(e,t,n,r){if(kl){var o=zh(e,t,n,r);if(o===null)Qd(e,t,r,Ol,n),cv(e,r);else if(d4(o,e,t,n,r))r.stopPropagation();else if(cv(e,r),t&4&&-1<f4.indexOf(e)){for(;o!==null;){var u=Nu(o);if(u!==null&&bx(u),u=zh(e,t,n,r),u===null&&Qd(e,t,r,Ol,n),u===o)break;o=u}o!==null&&r.stopPropagation()}else Qd(e,t,r,null,n)}}var Ol=null;function zh(e,t,n,r){if(Ol=null,e=$p(r),e=Wi(e),e!==null)if(t=io(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Cx(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 Ol=e,null}function Nx(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(n4()){case qp:return 1;case Tx:return 4;case Tl:case r4:return 16;case Rx:return 536870912;default:return 16}default:return 16}}var ti=null,Zp=null,ll=null;function Fx(){if(ll)return ll;var e,t=Zp,n=t.length,r,o="value"in ti?ti.value:ti.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[u-r];r++);return ll=o.slice(e,1<r?1-r:void 0)}function cl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qa(){return!0}function dv(){return!1}function An(e){function t(n,r,o,u,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=a,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(u):u[c]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Qa:dv,this.isPropagationStopped=dv,this}return Je(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},em=An(ls),Du=Je({},ls,{view:0,detail:0}),g4=An(Du),Dd,Nd,Ns,mc=Je({},Du,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tm,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!==Ns&&(Ns&&e.type==="mousemove"?(Dd=e.screenX-Ns.screenX,Nd=e.screenY-Ns.screenY):Nd=Dd=0,Ns=e),Dd)},movementY:function(e){return"movementY"in e?e.movementY:Nd}}),hv=An(mc),y4=Je({},mc,{dataTransfer:0}),v4=An(y4),w4=Je({},Du,{relatedTarget:0}),Fd=An(w4),x4=Je({},ls,{animationName:0,elapsedTime:0,pseudoElement:0}),A4=An(x4),S4=Je({},ls,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),C4=An(S4),E4=Je({},ls,{data:0}),pv=An(E4),P4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_4={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"},T4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T4[e])?!!t[e]:!1}function tm(){return R4}var k4=Je({},Du,{key:function(e){if(e.key){var t=P4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tm,charCode:function(e){return e.type==="keypress"?cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),O4=An(k4),b4=Je({},mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mv=An(b4),L4=Je({},Du,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tm}),I4=An(L4),M4=Je({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),D4=An(M4),N4=Je({},mc,{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}),F4=An(N4),B4=[9,13,27,32],nm=kr&&"CompositionEvent"in window,Js=null;kr&&"documentMode"in document&&(Js=document.documentMode);var V4=kr&&"TextEvent"in window&&!Js,Bx=kr&&(!nm||Js&&8<Js&&11>=Js),gv=String.fromCharCode(32),yv=!1;function Vx(e,t){switch(e){case"keyup":return B4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ux(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ro=!1;function U4(e,t){switch(e){case"compositionend":return Ux(t);case"keypress":return t.which!==32?null:(yv=!0,gv);case"textInput":return e=t.data,e===gv&&yv?null:e;default:return null}}function j4(e,t){if(Ro)return e==="compositionend"||!nm&&Vx(e,t)?(e=Fx(),ll=Zp=ti=null,Ro=!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 Bx&&t.locale!=="ko"?null:t.data;default:return null}}var z4={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 vv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z4[e.type]:t==="textarea"}function jx(e,t,n,r){vx(r),t=bl(t,"onChange"),0<t.length&&(n=new em("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xs=null,pu=null;function W4(e){Xx(e,0)}function gc(e){var t=bo(e);if(fx(t))return e}function Q4(e,t){if(e==="change")return t}var zx=!1;if(kr){var Bd;if(kr){var Vd="oninput"in document;if(!Vd){var wv=document.createElement("div");wv.setAttribute("oninput","return;"),Vd=typeof wv.oninput=="function"}Bd=Vd}else Bd=!1;zx=Bd&&(!document.documentMode||9<document.documentMode)}function xv(){Xs&&(Xs.detachEvent("onpropertychange",Wx),pu=Xs=null)}function Wx(e){if(e.propertyName==="value"&&gc(pu)){var t=[];jx(t,pu,e,$p(e)),Sx(W4,t)}}function H4(e,t,n){e==="focusin"?(xv(),Xs=t,pu=n,Xs.attachEvent("onpropertychange",Wx)):e==="focusout"&&xv()}function G4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gc(pu)}function K4(e,t){if(e==="click")return gc(t)}function $4(e,t){if(e==="input"||e==="change")return gc(t)}function q4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var er=typeof Object.is=="function"?Object.is:q4;function mu(e,t){if(er(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 o=n[r];if(!Eh.call(t,o)||!er(e[o],t[o]))return!1}return!0}function Av(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sv(e,t){var n=Av(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=Av(n)}}function Qx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hx(){for(var e=window,t=El();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=El(e.document)}return t}function rm(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 Y4(e){var t=Hx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qx(n.ownerDocument.documentElement,n)){if(r!==null&&rm(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 o=n.textContent.length,u=Math.min(r.start,o);r=r.end===void 0?u:Math.min(r.end,o),!e.extend&&u>r&&(o=r,r=u,u=o),o=Sv(n,u);var a=Sv(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)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 J4=kr&&"documentMode"in document&&11>=document.documentMode,ko=null,Wh=null,Zs=null,Qh=!1;function Cv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qh||ko==null||ko!==El(r)||(r=ko,"selectionStart"in r&&rm(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}),Zs&&mu(Zs,r)||(Zs=r,r=bl(Wh,"onSelect"),0<r.length&&(t=new em("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ko)))}function Ha(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Oo={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionend:Ha("Transition","TransitionEnd")},Ud={},Gx={};kr&&(Gx=document.createElement("div").style,"AnimationEvent"in window||(delete Oo.animationend.animation,delete Oo.animationiteration.animation,delete Oo.animationstart.animation),"TransitionEvent"in window||delete Oo.transitionend.transition);function yc(e){if(Ud[e])return Ud[e];if(!Oo[e])return e;var t=Oo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gx)return Ud[e]=t[n];return e}var Kx=yc("animationend"),$x=yc("animationiteration"),qx=yc("animationstart"),Yx=yc("transitionend"),Jx=new Map,Ev="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){Jx.set(e,t),ro(t,[e])}for(var jd=0;jd<Ev.length;jd++){var zd=Ev[jd],X4=zd.toLowerCase(),Z4=zd[0].toUpperCase()+zd.slice(1);Si(X4,"on"+Z4)}Si(Kx,"onAnimationEnd");Si($x,"onAnimationIteration");Si(qx,"onAnimationStart");Si("dblclick","onDoubleClick");Si("focusin","onFocus");Si("focusout","onBlur");Si(Yx,"onTransitionEnd");Yo("onMouseEnter",["mouseout","mouseover"]);Yo("onMouseLeave",["mouseout","mouseover"]);Yo("onPointerEnter",["pointerout","pointerover"]);Yo("onPointerLeave",["pointerout","pointerover"]);ro("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ro("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ro("onBeforeInput",["compositionend","keypress","textInput","paste"]);ro("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ro("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ro("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="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(" "),eb=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hs));function Pv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,X3(r,t,void 0,e),e.currentTarget=null}function Xx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var a=r.length-1;0<=a;a--){var c=r[a],f=c.instance,d=c.currentTarget;if(c=c.listener,f!==u&&o.isPropagationStopped())break e;Pv(o,c,d),u=f}else for(a=0;a<r.length;a++){if(c=r[a],f=c.instance,d=c.currentTarget,c=c.listener,f!==u&&o.isPropagationStopped())break e;Pv(o,c,d),u=f}}}if(_l)throw e=Vh,_l=!1,Vh=null,e}function Ve(e,t){var n=t[qh];n===void 0&&(n=t[qh]=new Set);var r=e+"__bubble";n.has(r)||(Zx(t,e,2,!1),n.add(r))}function Wd(e,t,n){var r=0;t&&(r|=4),Zx(n,e,r,t)}var Ga="_reactListening"+Math.random().toString(36).slice(2);function gu(e){if(!e[Ga]){e[Ga]=!0,sx.forEach(function(n){n!=="selectionchange"&&(eb.has(n)||Wd(n,!1,e),Wd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ga]||(t[Ga]=!0,Wd("selectionchange",!1,t))}}function Zx(e,t,n,r){switch(Nx(t)){case 1:var o=p4;break;case 4:o=m4;break;default:o=Xp}n=o.bind(null,t,n,e),o=void 0,!Bh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Qd(e,t,n,r,o){var u=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var c=r.stateNode.containerInfo;if(c===o||c.nodeType===8&&c.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var f=a.tag;if((f===3||f===4)&&(f=a.stateNode.containerInfo,f===o||f.nodeType===8&&f.parentNode===o))return;a=a.return}for(;c!==null;){if(a=Wi(c),a===null)return;if(f=a.tag,f===5||f===6){r=u=a;continue e}c=c.parentNode}}r=r.return}Sx(function(){var d=u,p=$p(n),m=[];e:{var g=Jx.get(e);if(g!==void 0){var w=em,E=e;switch(e){case"keypress":if(cl(n)===0)break e;case"keydown":case"keyup":w=O4;break;case"focusin":E="focus",w=Fd;break;case"focusout":E="blur",w=Fd;break;case"beforeblur":case"afterblur":w=Fd;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":w=hv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=v4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=I4;break;case Kx:case $x:case qx:w=A4;break;case Yx:w=D4;break;case"scroll":w=g4;break;case"wheel":w=F4;break;case"copy":case"cut":case"paste":w=C4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=mv}var P=(t&4)!==0,k=!P&&e==="scroll",x=P?g!==null?g+"Capture":null:g;P=[];for(var A=d,C;A!==null;){C=A;var T=C.stateNode;if(C.tag===5&&T!==null&&(C=T,x!==null&&(T=cu(A,x),T!=null&&P.push(yu(A,T,C)))),k)break;A=A.return}0<P.length&&(g=new w(g,E,null,n,p),m.push({event:g,listeners:P}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",g&&n!==Nh&&(E=n.relatedTarget||n.fromElement)&&(Wi(E)||E[Or]))break e;if((w||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,w?(E=n.relatedTarget||n.toElement,w=d,E=E?Wi(E):null,E!==null&&(k=io(E),E!==k||E.tag!==5&&E.tag!==6)&&(E=null)):(w=null,E=d),w!==E)){if(P=hv,T="onMouseLeave",x="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(P=mv,T="onPointerLeave",x="onPointerEnter",A="pointer"),k=w==null?g:bo(w),C=E==null?g:bo(E),g=new P(T,A+"leave",w,n,p),g.target=k,g.relatedTarget=C,T=null,Wi(p)===d&&(P=new P(x,A+"enter",E,n,p),P.target=C,P.relatedTarget=k,T=P),k=T,w&&E)t:{for(P=w,x=E,A=0,C=P;C;C=Po(C))A++;for(C=0,T=x;T;T=Po(T))C++;for(;0<A-C;)P=Po(P),A--;for(;0<C-A;)x=Po(x),C--;for(;A--;){if(P===x||x!==null&&P===x.alternate)break t;P=Po(P),x=Po(x)}P=null}else P=null;w!==null&&_v(m,g,w,P,!1),E!==null&&k!==null&&_v(m,k,E,P,!0)}}e:{if(g=d?bo(d):window,w=g.nodeName&&g.nodeName.toLowerCase(),w==="select"||w==="input"&&g.type==="file")var L=Q4;else if(vv(g))if(zx)L=$4;else{L=G4;var I=H4}else(w=g.nodeName)&&w.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(L=K4);if(L&&(L=L(e,d))){jx(m,L,n,p);break e}I&&I(e,g,d),e==="focusout"&&(I=g._wrapperState)&&I.controlled&&g.type==="number"&&bh(g,"number",g.value)}switch(I=d?bo(d):window,e){case"focusin":(vv(I)||I.contentEditable==="true")&&(ko=I,Wh=d,Zs=null);break;case"focusout":Zs=Wh=ko=null;break;case"mousedown":Qh=!0;break;case"contextmenu":case"mouseup":case"dragend":Qh=!1,Cv(m,n,p);break;case"selectionchange":if(J4)break;case"keydown":case"keyup":Cv(m,n,p)}var D;if(nm)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Ro?Vx(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Bx&&n.locale!=="ko"&&(Ro||N!=="onCompositionStart"?N==="onCompositionEnd"&&Ro&&(D=Fx()):(ti=p,Zp="value"in ti?ti.value:ti.textContent,Ro=!0)),I=bl(d,N),0<I.length&&(N=new pv(N,e,null,n,p),m.push({event:N,listeners:I}),D?N.data=D:(D=Ux(n),D!==null&&(N.data=D)))),(D=V4?U4(e,n):j4(e,n))&&(d=bl(d,"onBeforeInput"),0<d.length&&(p=new pv("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:d}),p.data=D))}Xx(m,t)})}function yu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;o.tag===5&&u!==null&&(o=u,u=cu(e,n),u!=null&&r.unshift(yu(e,u,o)),u=cu(e,t),u!=null&&r.push(yu(e,u,o))),e=e.return}return r}function Po(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _v(e,t,n,r,o){for(var u=t._reactName,a=[];n!==null&&n!==r;){var c=n,f=c.alternate,d=c.stateNode;if(f!==null&&f===r)break;c.tag===5&&d!==null&&(c=d,o?(f=cu(n,u),f!=null&&a.unshift(yu(n,f,c))):o||(f=cu(n,u),f!=null&&a.push(yu(n,f,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var tb=/\r\n?/g,nb=/\u0000|\uFFFD/g;function Tv(e){return(typeof e=="string"?e:""+e).replace(tb,`
30
+ `).replace(nb,"")}function Ka(e,t,n){if(t=Tv(t),Tv(e)!==t&&n)throw Error(Q(425))}function Ll(){}var Hh=null,Gh=null;function Kh(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 $h=typeof setTimeout=="function"?setTimeout:void 0,rb=typeof clearTimeout=="function"?clearTimeout:void 0,Rv=typeof Promise=="function"?Promise:void 0,ib=typeof queueMicrotask=="function"?queueMicrotask:typeof Rv!="undefined"?function(e){return Rv.resolve(null).then(e).catch(ob)}:$h;function ob(e){setTimeout(function(){throw e})}function Hd(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),hu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);hu(t)}function si(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 kv(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 cs=Math.random().toString(36).slice(2),ur="__reactFiber$"+cs,vu="__reactProps$"+cs,Or="__reactContainer$"+cs,qh="__reactEvents$"+cs,sb="__reactListeners$"+cs,ub="__reactHandles$"+cs;function Wi(e){var t=e[ur];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Or]||n[ur]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kv(e);e!==null;){if(n=e[ur])return n;e=kv(e)}return t}e=n,n=e.parentNode}return null}function Nu(e){return e=e[ur]||e[Or],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function bo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function vc(e){return e[vu]||null}var Yh=[],Lo=-1;function Ci(e){return{current:e}}function Ue(e){0>Lo||(e.current=Yh[Lo],Yh[Lo]=null,Lo--)}function Ne(e,t){Lo++,Yh[Lo]=e.current,e.current=t}var yi={},Bt=Ci(yi),rn=Ci(!1),Yi=yi;function Jo(e,t){var n=e.type.contextTypes;if(!n)return yi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in n)o[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function on(e){return e=e.childContextTypes,e!=null}function Il(){Ue(rn),Ue(Bt)}function Ov(e,t,n){if(Bt.current!==yi)throw Error(Q(168));Ne(Bt,t),Ne(rn,n)}function eA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Q(108,H3(e)||"Unknown",o));return Je({},n,r)}function Ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yi,Yi=Bt.current,Ne(Bt,e),Ne(rn,rn.current),!0}function bv(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=eA(e,t,Yi),r.__reactInternalMemoizedMergedChildContext=e,Ue(rn),Ue(Bt),Ne(Bt,e)):Ue(rn),Ne(rn,n)}var Sr=null,wc=!1,Gd=!1;function tA(e){Sr===null?Sr=[e]:Sr.push(e)}function ab(e){wc=!0,tA(e)}function Ei(){if(!Gd&&Sr!==null){Gd=!0;var e=0,t=ke;try{var n=Sr;for(ke=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sr=null,wc=!1}catch(o){throw Sr!==null&&(Sr=Sr.slice(e+1)),_x(qp,Ei),o}finally{ke=t,Gd=!1}}return null}var Io=[],Mo=0,Dl=null,Nl=0,Mn=[],Dn=0,Ji=null,Cr=1,Er="";function Bi(e,t){Io[Mo++]=Nl,Io[Mo++]=Dl,Dl=e,Nl=t}function nA(e,t,n){Mn[Dn++]=Cr,Mn[Dn++]=Er,Mn[Dn++]=Ji,Ji=e;var r=Cr;e=Er;var o=32-Xn(r)-1;r&=~(1<<o),n+=1;var u=32-Xn(t)+o;if(30<u){var a=o-o%5;u=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Cr=1<<32-Xn(t)+o|n<<o|r,Er=u+e}else Cr=1<<u|n<<o|r,Er=e}function im(e){e.return!==null&&(Bi(e,1),nA(e,1,0))}function om(e){for(;e===Dl;)Dl=Io[--Mo],Io[Mo]=null,Nl=Io[--Mo],Io[Mo]=null;for(;e===Ji;)Ji=Mn[--Dn],Mn[Dn]=null,Er=Mn[--Dn],Mn[Dn]=null,Cr=Mn[--Dn],Mn[Dn]=null}var gn=null,mn=null,He=!1,qn=null;function rA(e,t){var n=Nn(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 Lv(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,gn=e,mn=si(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,gn=e,mn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ji!==null?{id:Cr,overflow:Er}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,gn=e,mn=null,!0):!1;default:return!1}}function Jh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xh(e){if(He){var t=mn;if(t){var n=t;if(!Lv(e,t)){if(Jh(e))throw Error(Q(418));t=si(n.nextSibling);var r=gn;t&&Lv(e,t)?rA(r,n):(e.flags=e.flags&-4097|2,He=!1,gn=e)}}else{if(Jh(e))throw Error(Q(418));e.flags=e.flags&-4097|2,He=!1,gn=e}}}function Iv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;gn=e}function $a(e){if(e!==gn)return!1;if(!He)return Iv(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Kh(e.type,e.memoizedProps)),t&&(t=mn)){if(Jh(e))throw iA(),Error(Q(418));for(;t;)rA(e,t),t=si(t.nextSibling)}if(Iv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){mn=si(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}mn=null}}else mn=gn?si(e.stateNode.nextSibling):null;return!0}function iA(){for(var e=mn;e;)e=si(e.nextSibling)}function Xo(){mn=gn=null,He=!1}function sm(e){qn===null?qn=[e]:qn.push(e)}var lb=Nr.ReactCurrentBatchConfig;function Kn(e,t){if(e&&e.defaultProps){t=Je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Fl=Ci(null),Bl=null,Do=null,um=null;function am(){um=Do=Bl=null}function lm(e){var t=Fl.current;Ue(Fl),e._currentValue=t}function Zh(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 Go(e,t){Bl=e,um=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nn=!0),e.firstContext=null)}function Bn(e){var t=e._currentValue;if(um!==e)if(e={context:e,memoizedValue:t,next:null},Do===null){if(Bl===null)throw Error(Q(308));Do=e,Bl.dependencies={lanes:0,firstContext:e}}else Do=Do.next=e;return t}var Qi=null;function cm(e){Qi===null?Qi=[e]:Qi.push(e)}function oA(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,cm(t)):(n.next=o.next,o.next=n),t.interleaved=n,br(e,r)}function br(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 qr=!1;function fm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sA(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 _r(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ui(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,br(e,n)}return o=r.interleaved,o===null?(t.next=t,cm(r)):(t.next=o.next,o.next=t),r.interleaved=t,br(e,n)}function fl(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,Yp(e,n)}}function Mv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?o=u=a:u=u.next=a,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,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 Vl(e,t,n,r){var o=e.updateQueue;qr=!1;var u=o.firstBaseUpdate,a=o.lastBaseUpdate,c=o.shared.pending;if(c!==null){o.shared.pending=null;var f=c,d=f.next;f.next=null,a===null?u=d:a.next=d,a=f;var p=e.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==a&&(c===null?p.firstBaseUpdate=d:c.next=d,p.lastBaseUpdate=f))}if(u!==null){var m=o.baseState;a=0,p=d=f=null,c=u;do{var g=c.lane,w=c.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:w,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var E=e,P=c;switch(g=t,w=n,P.tag){case 1:if(E=P.payload,typeof E=="function"){m=E.call(w,m,g);break e}m=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=P.payload,g=typeof E=="function"?E.call(w,m,g):E,g==null)break e;m=Je({},m,g);break e;case 2:qr=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,g=o.effects,g===null?o.effects=[c]:g.push(c))}else w={eventTime:w,lane:g,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(d=p=w,f=m):p=p.next=w,a|=g;if(c=c.next,c===null){if(c=o.shared.pending,c===null)break;g=c,c=g.next,g.next=null,o.lastBaseUpdate=g,o.shared.pending=null}}while(1);if(p===null&&(f=m),o.baseState=f,o.firstBaseUpdate=d,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else u===null&&(o.shared.lanes=0);Zi|=a,e.lanes=a,e.memoizedState=m}}function Dv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(Q(191,o));o.call(r)}}}var uA=new ox.Component().refs;function ep(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xc={isMounted:function(e){return(e=e._reactInternals)?io(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qt(),o=li(e),u=_r(r,o);u.payload=t,n!=null&&(u.callback=n),t=ui(e,u,o),t!==null&&(Zn(t,e,o,r),fl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qt(),o=li(e),u=_r(r,o);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=ui(e,u,o),t!==null&&(Zn(t,e,o,r),fl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qt(),r=li(e),o=_r(n,r);o.tag=2,t!=null&&(o.callback=t),t=ui(e,o,r),t!==null&&(Zn(t,e,r,n),fl(t,e,r))}};function Nv(e,t,n,r,o,u,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,a):t.prototype&&t.prototype.isPureReactComponent?!mu(n,r)||!mu(o,u):!0}function aA(e,t,n){var r=!1,o=yi,u=t.contextType;return typeof u=="object"&&u!==null?u=Bn(u):(o=on(t)?Yi:Bt.current,r=t.contextTypes,u=(r=r!=null)?Jo(e,o):yi),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),t}function Fv(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&&xc.enqueueReplaceState(t,t.state,null)}function tp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=uA,fm(e);var u=t.contextType;typeof u=="object"&&u!==null?o.context=Bn(u):(u=on(t)?Yi:Bt.current,o.context=Jo(e,u)),o.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(ep(e,t,u,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&xc.enqueueReplaceState(o,o.state,null),Vl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Fs(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(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var o=r,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(a){var c=o.refs;c===uA&&(c=o.refs={}),a===null?delete c[u]:c[u]=a},t._stringRef=u,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bv(e){var t=e._init;return t(e._payload)}function lA(e){function t(x,A){if(e){var C=x.deletions;C===null?(x.deletions=[A],x.flags|=16):C.push(A)}}function n(x,A){if(!e)return null;for(;A!==null;)t(x,A),A=A.sibling;return null}function r(x,A){for(x=new Map;A!==null;)A.key!==null?x.set(A.key,A):x.set(A.index,A),A=A.sibling;return x}function o(x,A){return x=ci(x,A),x.index=0,x.sibling=null,x}function u(x,A,C){return x.index=C,e?(C=x.alternate,C!==null?(C=C.index,C<A?(x.flags|=2,A):C):(x.flags|=2,A)):(x.flags|=1048576,A)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function c(x,A,C,T){return A===null||A.tag!==6?(A=Zd(C,x.mode,T),A.return=x,A):(A=o(A,C),A.return=x,A)}function f(x,A,C,T){var L=C.type;return L===To?p(x,A,C.props.children,T,C.key):A!==null&&(A.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===$r&&Bv(L)===A.type)?(T=o(A,C.props),T.ref=Fs(x,A,C),T.return=x,T):(T=yl(C.type,C.key,C.props,null,x.mode,T),T.ref=Fs(x,A,C),T.return=x,T)}function d(x,A,C,T){return A===null||A.tag!==4||A.stateNode.containerInfo!==C.containerInfo||A.stateNode.implementation!==C.implementation?(A=eh(C,x.mode,T),A.return=x,A):(A=o(A,C.children||[]),A.return=x,A)}function p(x,A,C,T,L){return A===null||A.tag!==7?(A=qi(C,x.mode,T,L),A.return=x,A):(A=o(A,C),A.return=x,A)}function m(x,A,C){if(typeof A=="string"&&A!==""||typeof A=="number")return A=Zd(""+A,x.mode,C),A.return=x,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Ba:return C=yl(A.type,A.key,A.props,null,x.mode,C),C.ref=Fs(x,null,A),C.return=x,C;case _o:return A=eh(A,x.mode,C),A.return=x,A;case $r:var T=A._init;return m(x,T(A._payload),C)}if(Ws(A)||Ls(A))return A=qi(A,x.mode,C,null),A.return=x,A;qa(x,A)}return null}function g(x,A,C,T){var L=A!==null?A.key:null;if(typeof C=="string"&&C!==""||typeof C=="number")return L!==null?null:c(x,A,""+C,T);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ba:return C.key===L?f(x,A,C,T):null;case _o:return C.key===L?d(x,A,C,T):null;case $r:return L=C._init,g(x,A,L(C._payload),T)}if(Ws(C)||Ls(C))return L!==null?null:p(x,A,C,T,null);qa(x,C)}return null}function w(x,A,C,T,L){if(typeof T=="string"&&T!==""||typeof T=="number")return x=x.get(C)||null,c(A,x,""+T,L);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ba:return x=x.get(T.key===null?C:T.key)||null,f(A,x,T,L);case _o:return x=x.get(T.key===null?C:T.key)||null,d(A,x,T,L);case $r:var I=T._init;return w(x,A,C,I(T._payload),L)}if(Ws(T)||Ls(T))return x=x.get(C)||null,p(A,x,T,L,null);qa(A,T)}return null}function E(x,A,C,T){for(var L=null,I=null,D=A,N=A=0,$=null;D!==null&&N<C.length;N++){D.index>N?($=D,D=null):$=D.sibling;var G=g(x,D,C[N],T);if(G===null){D===null&&(D=$);break}e&&D&&G.alternate===null&&t(x,D),A=u(G,A,N),I===null?L=G:I.sibling=G,I=G,D=$}if(N===C.length)return n(x,D),He&&Bi(x,N),L;if(D===null){for(;N<C.length;N++)D=m(x,C[N],T),D!==null&&(A=u(D,A,N),I===null?L=D:I.sibling=D,I=D);return He&&Bi(x,N),L}for(D=r(x,D);N<C.length;N++)$=w(D,x,N,C[N],T),$!==null&&(e&&$.alternate!==null&&D.delete($.key===null?N:$.key),A=u($,A,N),I===null?L=$:I.sibling=$,I=$);return e&&D.forEach(function(le){return t(x,le)}),He&&Bi(x,N),L}function P(x,A,C,T){var L=Ls(C);if(typeof L!="function")throw Error(Q(150));if(C=L.call(C),C==null)throw Error(Q(151));for(var I=L=null,D=A,N=A=0,$=null,G=C.next();D!==null&&!G.done;N++,G=C.next()){D.index>N?($=D,D=null):$=D.sibling;var le=g(x,D,G.value,T);if(le===null){D===null&&(D=$);break}e&&D&&le.alternate===null&&t(x,D),A=u(le,A,N),I===null?L=le:I.sibling=le,I=le,D=$}if(G.done)return n(x,D),He&&Bi(x,N),L;if(D===null){for(;!G.done;N++,G=C.next())G=m(x,G.value,T),G!==null&&(A=u(G,A,N),I===null?L=G:I.sibling=G,I=G);return He&&Bi(x,N),L}for(D=r(x,D);!G.done;N++,G=C.next())G=w(D,x,N,G.value,T),G!==null&&(e&&G.alternate!==null&&D.delete(G.key===null?N:G.key),A=u(G,A,N),I===null?L=G:I.sibling=G,I=G);return e&&D.forEach(function(Ge){return t(x,Ge)}),He&&Bi(x,N),L}function k(x,A,C,T){if(typeof C=="object"&&C!==null&&C.type===To&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Ba:e:{for(var L=C.key,I=A;I!==null;){if(I.key===L){if(L=C.type,L===To){if(I.tag===7){n(x,I.sibling),A=o(I,C.props.children),A.return=x,x=A;break e}}else if(I.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===$r&&Bv(L)===I.type){n(x,I.sibling),A=o(I,C.props),A.ref=Fs(x,I,C),A.return=x,x=A;break e}n(x,I);break}else t(x,I);I=I.sibling}C.type===To?(A=qi(C.props.children,x.mode,T,C.key),A.return=x,x=A):(T=yl(C.type,C.key,C.props,null,x.mode,T),T.ref=Fs(x,A,C),T.return=x,x=T)}return a(x);case _o:e:{for(I=C.key;A!==null;){if(A.key===I)if(A.tag===4&&A.stateNode.containerInfo===C.containerInfo&&A.stateNode.implementation===C.implementation){n(x,A.sibling),A=o(A,C.children||[]),A.return=x,x=A;break e}else{n(x,A);break}else t(x,A);A=A.sibling}A=eh(C,x.mode,T),A.return=x,x=A}return a(x);case $r:return I=C._init,k(x,A,I(C._payload),T)}if(Ws(C))return E(x,A,C,T);if(Ls(C))return P(x,A,C,T);qa(x,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,A!==null&&A.tag===6?(n(x,A.sibling),A=o(A,C),A.return=x,x=A):(n(x,A),A=Zd(C,x.mode,T),A.return=x,x=A),a(x)):n(x,A)}return k}var Zo=lA(!0),cA=lA(!1),Fu={},lr=Ci(Fu),wu=Ci(Fu),xu=Ci(Fu);function Hi(e){if(e===Fu)throw Error(Q(174));return e}function dm(e,t){switch(Ne(xu,t),Ne(wu,e),Ne(lr,Fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ih(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ih(t,e)}Ue(lr),Ne(lr,t)}function es(){Ue(lr),Ue(wu),Ue(xu)}function fA(e){Hi(xu.current);var t=Hi(lr.current),n=Ih(t,e.type);t!==n&&(Ne(wu,e),Ne(lr,n))}function hm(e){wu.current===e&&(Ue(lr),Ue(wu))}var $e=Ci(0);function Ul(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 Kd=[];function pm(){for(var e=0;e<Kd.length;e++)Kd[e]._workInProgressVersionPrimary=null;Kd.length=0}var dl=Nr.ReactCurrentDispatcher,$d=Nr.ReactCurrentBatchConfig,Xi=0,Ye=null,ft=null,gt=null,jl=!1,eu=!1,Au=0,cb=0;function Lt(){throw Error(Q(321))}function mm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function gm(e,t,n,r,o,u){if(Xi=u,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dl.current=e===null||e.memoizedState===null?pb:mb,e=n(r,o),eu){u=0;do{if(eu=!1,Au=0,25<=u)throw Error(Q(301));u+=1,gt=ft=null,t.updateQueue=null,dl.current=gb,e=n(r,o)}while(eu)}if(dl.current=zl,t=ft!==null&&ft.next!==null,Xi=0,gt=ft=Ye=null,jl=!1,t)throw Error(Q(300));return e}function ym(){var e=Au!==0;return Au=0,e}function sr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ye.memoizedState=gt=e:gt=gt.next=e,gt}function Vn(){if(ft===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=gt===null?Ye.memoizedState:gt.next;if(t!==null)gt=t,ft=e;else{if(e===null)throw Error(Q(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},gt===null?Ye.memoizedState=gt=e:gt=gt.next=e}return gt}function Su(e,t){return typeof t=="function"?t(e):t}function qd(e){var t=Vn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=ft,o=r.baseQueue,u=n.pending;if(u!==null){if(o!==null){var a=o.next;o.next=u.next,u.next=a}r.baseQueue=o=u,n.pending=null}if(o!==null){u=o.next,r=r.baseState;var c=a=null,f=null,d=u;do{var p=d.lane;if((Xi&p)===p)f!==null&&(f=f.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var m={lane:p,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};f===null?(c=f=m,a=r):f=f.next=m,Ye.lanes|=p,Zi|=p}d=d.next}while(d!==null&&d!==u);f===null?a=r:f.next=c,er(r,t.memoizedState)||(nn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do u=o.lane,Ye.lanes|=u,Zi|=u,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Yd(e){var t=Vn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do u=e(u,a.action),a=a.next;while(a!==o);er(u,t.memoizedState)||(nn=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function dA(){}function hA(e,t){var n=Ye,r=Vn(),o=t(),u=!er(r.memoizedState,o);if(u&&(r.memoizedState=o,nn=!0),r=r.queue,vm(gA.bind(null,n,r,e),[e]),r.getSnapshot!==t||u||gt!==null&&gt.memoizedState.tag&1){if(n.flags|=2048,Cu(9,mA.bind(null,n,r,o,t),void 0,null),yt===null)throw Error(Q(349));Xi&30||pA(n,t,o)}return o}function pA(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mA(e,t,n,r){t.value=n,t.getSnapshot=r,yA(t)&&vA(e)}function gA(e,t,n){return n(function(){yA(t)&&vA(e)})}function yA(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function vA(e){var t=br(e,1);t!==null&&Zn(t,e,1,-1)}function Vv(e){var t=sr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Su,lastRenderedState:e},t.queue=e,e=e.dispatch=hb.bind(null,Ye,e),[t.memoizedState,e]}function Cu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.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 wA(){return Vn().memoizedState}function hl(e,t,n,r){var o=sr();Ye.flags|=e,o.memoizedState=Cu(1|t,n,void 0,r===void 0?null:r)}function Ac(e,t,n,r){var o=Vn();r=r===void 0?null:r;var u=void 0;if(ft!==null){var a=ft.memoizedState;if(u=a.destroy,r!==null&&mm(r,a.deps)){o.memoizedState=Cu(t,n,u,r);return}}Ye.flags|=e,o.memoizedState=Cu(1|t,n,u,r)}function Uv(e,t){return hl(8390656,8,e,t)}function vm(e,t){return Ac(2048,8,e,t)}function xA(e,t){return Ac(4,2,e,t)}function AA(e,t){return Ac(4,4,e,t)}function SA(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 CA(e,t,n){return n=n!=null?n.concat([e]):null,Ac(4,4,SA.bind(null,t,e),n)}function wm(){}function EA(e,t){var n=Vn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&mm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function PA(e,t){var n=Vn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&mm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _A(e,t,n){return Xi&21?(er(n,t)||(n=kx(),Ye.lanes|=n,Zi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,nn=!0),e.memoizedState=n)}function fb(e,t){var n=ke;ke=n!==0&&4>n?n:4,e(!0);var r=$d.transition;$d.transition={};try{e(!1),t()}finally{ke=n,$d.transition=r}}function TA(){return Vn().memoizedState}function db(e,t,n){var r=li(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RA(e))kA(t,n);else if(n=oA(e,t,n,r),n!==null){var o=Qt();Zn(n,e,r,o),OA(n,t,r)}}function hb(e,t,n){var r=li(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RA(e))kA(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var a=t.lastRenderedState,c=u(a,n);if(o.hasEagerState=!0,o.eagerState=c,er(c,a)){var f=t.interleaved;f===null?(o.next=o,cm(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch(d){}finally{}n=oA(e,t,o,r),n!==null&&(o=Qt(),Zn(n,e,r,o),OA(n,t,r))}}function RA(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function kA(e,t){eu=jl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function OA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yp(e,n)}}var zl={readContext:Bn,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},pb={readContext:Bn,useCallback:function(e,t){return sr().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:Uv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hl(4194308,4,SA.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=sr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sr();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=db.bind(null,Ye,e),[r.memoizedState,e]},useRef:function(e){var t=sr();return e={current:e},t.memoizedState=e},useState:Vv,useDebugValue:wm,useDeferredValue:function(e){return sr().memoizedState=e},useTransition:function(){var e=Vv(!1),t=e[0];return e=fb.bind(null,e[1]),sr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ye,o=sr();if(He){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),yt===null)throw Error(Q(349));Xi&30||pA(r,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,Uv(gA.bind(null,r,u,e),[e]),r.flags|=2048,Cu(9,mA.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=sr(),t=yt.identifierPrefix;if(He){var n=Er,r=Cr;n=(r&~(1<<32-Xn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Au++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=cb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mb={readContext:Bn,useCallback:EA,useContext:Bn,useEffect:vm,useImperativeHandle:CA,useInsertionEffect:xA,useLayoutEffect:AA,useMemo:PA,useReducer:qd,useRef:wA,useState:function(){return qd(Su)},useDebugValue:wm,useDeferredValue:function(e){var t=Vn();return _A(t,ft.memoizedState,e)},useTransition:function(){var e=qd(Su)[0],t=Vn().memoizedState;return[e,t]},useMutableSource:dA,useSyncExternalStore:hA,useId:TA,unstable_isNewReconciler:!1},gb={readContext:Bn,useCallback:EA,useContext:Bn,useEffect:vm,useImperativeHandle:CA,useInsertionEffect:xA,useLayoutEffect:AA,useMemo:PA,useReducer:Yd,useRef:wA,useState:function(){return Yd(Su)},useDebugValue:wm,useDeferredValue:function(e){var t=Vn();return ft===null?t.memoizedState=e:_A(t,ft.memoizedState,e)},useTransition:function(){var e=Yd(Su)[0],t=Vn().memoizedState;return[e,t]},useMutableSource:dA,useSyncExternalStore:hA,useId:TA,unstable_isNewReconciler:!1};function ts(e,t){try{var n="",r=t;do n+=Q3(r),r=r.return;while(r);var o=n}catch(u){o=`
31
31
  Error generating stack: `+u.message+`
32
- `+u.stack}return{value:e,source:t,stack:o,digest:null}}function Yd(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function ep(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var mL=typeof WeakMap=="function"?WeakMap:Map;function OA(e,t,n){n=_r(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,cp=r),ep(e,t)},n}function LA(e,t,n){n=_r(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ep(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){ep(e,t),typeof r!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Uv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mL;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=RL.bind(null,e,t,n),t.then(e,e))}function jv(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 zv(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,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=_r(-1,1),t.tag=2,ui(n,t,1))),n.lanes|=1),e)}var gL=Nr.ReactCurrentOwner,tn=!1;function Wt(e,t,n,r){t.child=e===null?lA(t,null,n,r):Xo(t,e.child,n,r)}function Wv(e,t,n,r,o){n=n.render;var u=t.ref;return Ho(t,o),r=mm(e,t,n,r,u,o),n=gm(),e!==null&&!tn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,br(e,t,o)):(He&&n&&rm(t),t.flags|=1,Wt(e,t,r,o),t.child)}function Qv(e,t,n,r,o){if(e===null){var u=n.type;return typeof u=="function"&&!_m(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,bA(e,t,u,r,o)):(e=gl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!(e.lanes&o)){var a=u.memoizedProps;if(n=n.compare,n=n!==null?n:pu,n(a,r)&&e.ref===t.ref)return br(e,t,o)}return t.flags|=1,e=ci(u,r),e.ref=t.ref,e.return=t,t.child=e}function bA(e,t,n,r,o){if(e!==null){var u=e.memoizedProps;if(pu(u,r)&&e.ref===t.ref)if(tn=!1,t.pendingProps=r=u,(e.lanes&o)!==0)e.flags&131072&&(tn=!0);else return t.lanes=e.lanes,br(e,t,o)}return tp(e,t,n,r,o)}function IA(e,t,n){var r=t.pendingProps,o=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(No,hn),hn|=n;else{if(!(n&1073741824))return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ne(No,hn),hn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,Ne(No,hn),hn|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,Ne(No,hn),hn|=r;return Wt(e,t,o,n),t.child}function MA(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tp(e,t,n,r,o){var u=rn(n)?qi:Bt.current;return u=Yo(t,u),Ho(t,o),n=mm(e,t,n,r,u,o),r=gm(),e!==null&&!tn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,br(e,t,o)):(He&&r&&rm(t),t.flags|=1,Wt(e,t,n,o),t.child)}function Hv(e,t,n,r,o){if(rn(n)){var u=!0;Il(t)}else u=!1;if(Ho(t,o),t.stateNode===null)hl(e,t),uA(t,n,r),Zh(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,c=t.memoizedProps;a.props=c;var f=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=Bn(d):(d=rn(n)?qi:Bt.current,d=Yo(t,d));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";m||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==r||f!==d)&&Nv(t,a,r,d),qr=!1;var g=t.memoizedState;a.state=g,Bl(t,r,a,o),f=t.memoizedState,c!==r||g!==f||nn.current||qr?(typeof p=="function"&&(Xh(t,n,p,r),f=t.memoizedState),(c=qr||Dv(t,n,c,r,g,f,d))?(m||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=d,r=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,oA(e,t),c=t.memoizedProps,d=t.type===t.elementType?c:Kn(t.type,c),a.props=d,m=t.pendingProps,g=a.context,f=n.contextType,typeof f=="object"&&f!==null?f=Bn(f):(f=rn(n)?qi:Bt.current,f=Yo(t,f));var x=n.getDerivedStateFromProps;(p=typeof x=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==m||g!==f)&&Nv(t,a,r,f),qr=!1,g=t.memoizedState,a.state=g,Bl(t,r,a,o);var E=t.memoizedState;c!==m||g!==E||nn.current||qr?(typeof x=="function"&&(Xh(t,n,x,r),E=t.memoizedState),(d=qr||Dv(t,n,d,r,g,E,f)||!1)?(p||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,E,f),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,E,f)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),a.props=r,a.state=E,a.context=f,r=d):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return np(e,t,n,r,u,o)}function np(e,t,n,r,o,u){MA(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Ov(t,n,!1),br(e,t,u);r=t.stateNode,gL.current=t;var c=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Xo(t,e.child,null,u),t.child=Xo(t,null,c,u)):Wt(e,t,c,u),t.memoizedState=r.state,o&&Ov(t,n,!0),t.child}function DA(e){var t=e.stateNode;t.pendingContext?Rv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rv(e,t.context,!1),fm(e,t.containerInfo)}function Gv(e,t,n,r,o){return Jo(),om(o),t.flags|=256,Wt(e,t,n,r),t.child}var rp={dehydrated:null,treeContext:null,retryLane:0};function ip(e){return{baseLanes:e,cachePool:null,transitions:null}}function NA(e,t,n){var r=t.pendingProps,o=$e.current,u=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(o&2)!==0),c?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ne($e,o&1),e===null)return Yh(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):(a=r.children,e=r.fallback,u?(r=t.mode,u=t.child,a={mode:"hidden",children:a},!(r&1)&&u!==null?(u.childLanes=0,u.pendingProps=a):u=Cc(a,r,0,null),e=$i(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ip(n),t.memoizedState=rp,e):wm(t,a));if(o=e.memoizedState,o!==null&&(c=o.dehydrated,c!==null))return yL(e,t,a,r,c,o,n);if(u){u=r.fallback,a=t.mode,o=e.child,c=o.sibling;var f={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=ci(o,f),r.subtreeFlags=o.subtreeFlags&14680064),c!==null?u=ci(c,u):(u=$i(u,a,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,a=e.child.memoizedState,a=a===null?ip(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},u.memoizedState=a,u.childLanes=e.childLanes&~n,t.memoizedState=rp,r}return u=e.child,e=u.sibling,r=ci(u,{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 wm(e,t){return t=Cc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qa(e,t,n,r){return r!==null&&om(r),Xo(t,e.child,null,n),e=wm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yL(e,t,n,r,o,u,a){if(n)return t.flags&256?(t.flags&=-257,r=Yd(Error(Q(422))),qa(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,o=t.mode,r=Cc({mode:"visible",children:r.children},o,0,null),u=$i(u,o,a,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,t.mode&1&&Xo(t,e.child,null,a),t.child.memoizedState=ip(a),t.memoizedState=rp,u);if(!(t.mode&1))return qa(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var c=r.dgst;return r=c,u=Error(Q(419)),r=Yd(u,r,void 0),qa(e,t,a,r)}if(c=(a&e.childLanes)!==0,tn||c){if(r=yt,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==u.retryLane&&(u.retryLane=o,Lr(e,o),Zn(r,e,o,-1))}return Pm(),r=Yd(Error(Q(421))),qa(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=OL.bind(null,e),o._reactRetry=t,null):(e=u.treeContext,pn=si(o.nextSibling),mn=t,He=!0,qn=null,e!==null&&(Mn[Dn++]=Cr,Mn[Dn++]=Er,Mn[Dn++]=Yi,Cr=e.id,Er=e.overflow,Yi=t),t=wm(t,r.children),t.flags|=4096,t)}function Kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jh(e.return,t,n)}function Jd(e,t,n,r,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=o)}function FA(e,t,n){var r=t.pendingProps,o=r.revealOrder,u=r.tail;if(Wt(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&&Kv(e,n,t);else if(e.tag===19)Kv(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(Ne($e,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Vl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Jd(t,!1,o,n,u);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Vl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Jd(t,!0,n,null,u);break;case"together":Jd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function br(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function vL(e,t,n){switch(t.tag){case 3:DA(t),Jo();break;case 5:cA(t);break;case 1:rn(t.type)&&Il(t);break;case 4:fm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ne(Nl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ne($e,$e.current&1),t.flags|=128,null):n&t.child.childLanes?NA(e,t,n):(Ne($e,$e.current&1),e=br(e,t,n),e!==null?e.sibling:null);Ne($e,$e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return FA(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ne($e,$e.current),r)break;return null;case 22:case 23:return t.lanes=0,IA(e,t,n)}return br(e,t,n)}var BA,op,VA,UA;BA=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}};op=function(){};VA=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qi(lr.current);var u=null;switch(n){case"input":o=Th(e,o),r=Th(e,r),u=[];break;case"select":o=Je({},o,{value:void 0}),r=Je({},r,{value:void 0}),u=[];break;case"textarea":o=Oh(e,o),r=Oh(e,r),u=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ll)}bh(n,r);var a;n=null;for(d in o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&o[d]!=null)if(d==="style"){var c=o[d];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(uu.hasOwnProperty(d)?u||(u=[]):(u=u||[]).push(d,null));for(d in r){var f=r[d];if(c=o!=null?o[d]:void 0,r.hasOwnProperty(d)&&f!==c&&(f!=null||c!=null))if(d==="style")if(c){for(a in c)!c.hasOwnProperty(a)||f&&f.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in f)f.hasOwnProperty(a)&&c[a]!==f[a]&&(n||(n={}),n[a]=f[a])}else n||(u||(u=[]),u.push(d,n)),n=f;else d==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(u=u||[]).push(d,f)):d==="children"?typeof f!="string"&&typeof f!="number"||(u=u||[]).push(d,""+f):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(uu.hasOwnProperty(d)?(f!=null&&d==="onScroll"&&Ve("scroll",e),u||c===f||(u=[])):(u=u||[]).push(d,f))}n&&(u=u||[]).push("style",n);var d=u;(t.updateQueue=d)&&(t.flags|=4)}};UA=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fs(e,t){if(!He)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 It(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function wL(e,t,n){var r=t.pendingProps;switch(im(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(t),null;case 1:return rn(t.type)&&bl(),It(t),null;case 3:return r=t.stateNode,Zo(),Ue(nn),Ue(Bt),hm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ka(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qn!==null&&(hp(qn),qn=null))),op(e,t),It(t),null;case 5:dm(t);var o=Qi(wu.current);if(n=t.type,e!==null&&t.stateNode!=null)VA(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return It(t),null}if(e=Qi(lr.current),Ka(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[ur]=t,r[yu]=u,e=(t.mode&1)!==0,n){case"dialog":Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":case"embed":Ve("load",r);break;case"video":case"audio":for(o=0;o<Qs.length;o++)Ve(Qs[o],r);break;case"source":Ve("error",r);break;case"img":case"image":case"link":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"input":nv(r,u),Ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Ve("invalid",r);break;case"textarea":iv(r,u),Ve("invalid",r)}bh(n,u),o=null;for(var a in u)if(u.hasOwnProperty(a)){var c=u[a];a==="children"?typeof c=="string"?r.textContent!==c&&(u.suppressHydrationWarning!==!0&&Ga(r.textContent,c,e),o=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(u.suppressHydrationWarning!==!0&&Ga(r.textContent,c,e),o=["children",""+c]):uu.hasOwnProperty(a)&&c!=null&&a==="onScroll"&&Ve("scroll",r)}switch(n){case"input":Ba(r),rv(r,u,!0);break;case"textarea":Ba(r),ov(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=Ll)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ur]=t,e[yu]=r,BA(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ih(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),o=r;break;case"iframe":case"object":case"embed":Ve("load",e),o=r;break;case"video":case"audio":for(o=0;o<Qs.length;o++)Ve(Qs[o],e);o=r;break;case"source":Ve("error",e),o=r;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),o=r;break;case"details":Ve("toggle",e),o=r;break;case"input":nv(e,r),o=Th(e,r),Ve("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Je({},r,{value:void 0}),Ve("invalid",e);break;case"textarea":iv(e,r),o=Oh(e,r),Ve("invalid",e);break;default:o=r}bh(n,o),c=o;for(u in c)if(c.hasOwnProperty(u)){var f=c[u];u==="style"?gx(e,f):u==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&px(e,f)):u==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&au(e,f):typeof f=="number"&&au(e,""+f):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(uu.hasOwnProperty(u)?f!=null&&u==="onScroll"&&Ve("scroll",e):f!=null&&Wp(e,u,f,a))}switch(n){case"input":Ba(e),rv(e,r,!1);break;case"textarea":Ba(e),ov(e);break;case"option":r.value!=null&&e.setAttribute("value",""+gi(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?jo(e,!!r.multiple,u,!1):r.defaultValue!=null&&jo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ll)}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 It(t),null;case 6:if(e&&t.stateNode!=null)UA(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Qi(wu.current),Qi(lr.current),Ka(t)){if(r=t.stateNode,n=t.memoizedProps,r[ur]=t,(u=r.nodeValue!==n)&&(e=mn,e!==null))switch(e.tag){case 3:Ga(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ga(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ur]=t,t.stateNode=r}return It(t),null;case 13:if(Ue($e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&pn!==null&&t.mode&1&&!(t.flags&128))rA(),Jo(),t.flags|=98560,u=!1;else if(u=Ka(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(Q(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(Q(317));u[ur]=t}else Jo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;It(t),u=!1}else qn!==null&&(hp(qn),qn=null),u=!0;if(!u)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?dt===0&&(dt=3):Pm())),t.updateQueue!==null&&(t.flags|=4),It(t),null);case 4:return Zo(),op(e,t),e===null&&mu(t.stateNode.containerInfo),It(t),null;case 10:return am(t.type._context),It(t),null;case 17:return rn(t.type)&&bl(),It(t),null;case 19:if(Ue($e),u=t.memoizedState,u===null)return It(t),null;if(r=(t.flags&128)!==0,a=u.rendering,a===null)if(r)Fs(u,!1);else{if(dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Vl(e),a!==null){for(t.flags|=128,Fs(u,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,a=u.alternate,a===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,u.type=a.type,e=a.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ne($e,$e.current&1|2),t.child}e=e.sibling}u.tail!==null&&it()>ts&&(t.flags|=128,r=!0,Fs(u,!1),t.lanes=4194304)}else{if(!r)if(e=Vl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fs(u,!0),u.tail===null&&u.tailMode==="hidden"&&!a.alternate&&!He)return It(t),null}else 2*it()-u.renderingStartTime>ts&&n!==1073741824&&(t.flags|=128,r=!0,Fs(u,!1),t.lanes=4194304);u.isBackwards?(a.sibling=t.child,t.child=a):(n=u.last,n!==null?n.sibling=a:t.child=a,u.last=a)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=it(),t.sibling=null,n=$e.current,Ne($e,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return Em(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hn&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function xL(e,t){switch(im(t),t.tag){case 1:return rn(t.type)&&bl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zo(),Ue(nn),Ue(Bt),hm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dm(t),null;case 13:if(Ue($e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Jo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue($e),null;case 4:return Zo(),null;case 10:return am(t.type._context),null;case 22:case 23:return Em(),null;case 24:return null;default:return null}}var Ya=!1,Nt=!1,AL=typeof WeakSet=="function"?WeakSet:Set,J=null;function Do(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ze(e,t,r)}else n.current=null}function sp(e,t,n){try{n()}catch(r){Ze(e,t,r)}}var $v=!1;function SL(e,t){if(Wh=kl,e=Qx(),nm(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 o=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch(k){n=null;break e}var a=0,c=-1,f=-1,d=0,p=0,m=e,g=null;t:for(;;){for(var x;m!==n||o!==0&&m.nodeType!==3||(c=a+o),m!==u||r!==0&&m.nodeType!==3||(f=a+r),m.nodeType===3&&(a+=m.nodeValue.length),(x=m.firstChild)!==null;)g=m,m=x;for(;;){if(m===e)break t;if(g===n&&++d===o&&(c=a),g===u&&++p===r&&(f=a),(x=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=x}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qh={focusedElem:e,selectionRange:n},kl=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var P=E.memoizedProps,R=E.memoizedState,w=t.stateNode,A=w.getSnapshotBeforeUpdate(t.elementType===t.type?P:Kn(t.type,P),R);w.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(k){Ze(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return E=$v,$v=!1,E}function eu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var u=o.destroy;o.destroy=void 0,u!==void 0&&sp(t,n,u)}o=o.next}while(o!==r)}}function Ac(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 up(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 jA(e){var t=e.alternate;t!==null&&(e.alternate=null,jA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[yu],delete t[Kh],delete t[iL],delete t[oL])),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 zA(e){return e.tag===5||e.tag===3||e.tag===4}function qv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zA(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 ap(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=Ll));else if(r!==4&&(e=e.child,e!==null))for(ap(e,t,n),e=e.sibling;e!==null;)ap(e,t,n),e=e.sibling}function lp(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(lp(e,t,n),e=e.sibling;e!==null;)lp(e,t,n),e=e.sibling}var Pt=null,$n=!1;function Gr(e,t,n){for(n=n.child;n!==null;)WA(e,t,n),n=n.sibling}function WA(e,t,n){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(hc,n)}catch(c){}switch(n.tag){case 5:Nt||Do(n,t);case 6:var r=Pt,o=$n;Pt=null,Gr(e,t,n),Pt=r,$n=o,Pt!==null&&($n?(e=Pt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pt.removeChild(n.stateNode));break;case 18:Pt!==null&&($n?(e=Pt,n=n.stateNode,e.nodeType===8?Qd(e.parentNode,n):e.nodeType===1&&Qd(e,n),du(e)):Qd(Pt,n.stateNode));break;case 4:r=Pt,o=$n,Pt=n.stateNode.containerInfo,$n=!0,Gr(e,t,n),Pt=r,$n=o;break;case 0:case 11:case 14:case 15:if(!Nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var u=o,a=u.destroy;u=u.tag,a!==void 0&&(u&2||u&4)&&sp(n,t,a),o=o.next}while(o!==r)}Gr(e,t,n);break;case 1:if(!Nt&&(Do(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ze(n,t,c)}Gr(e,t,n);break;case 21:Gr(e,t,n);break;case 22:n.mode&1?(Nt=(r=Nt)||n.memoizedState!==null,Gr(e,t,n),Nt=r):Gr(e,t,n);break;default:Gr(e,t,n)}}function Yv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new AL),t.forEach(function(r){var o=LL.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Gn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var u=e,a=t,c=a;e:for(;c!==null;){switch(c.tag){case 5:Pt=c.stateNode,$n=!1;break e;case 3:Pt=c.stateNode.containerInfo,$n=!0;break e;case 4:Pt=c.stateNode.containerInfo,$n=!0;break e}c=c.return}if(Pt===null)throw Error(Q(160));WA(u,a,o),Pt=null,$n=!1;var f=o.alternate;f!==null&&(f.return=null),o.return=null}catch(d){Ze(o,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)QA(t,e),t=t.sibling}function QA(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gn(t,e),or(e),r&4){try{eu(3,e,e.return),Ac(3,e)}catch(P){Ze(e,e.return,P)}try{eu(5,e,e.return)}catch(P){Ze(e,e.return,P)}}break;case 1:Gn(t,e),or(e),r&512&&n!==null&&Do(n,n.return);break;case 5:if(Gn(t,e),or(e),r&512&&n!==null&&Do(n,n.return),e.flags&32){var o=e.stateNode;try{au(o,"")}catch(P){Ze(e,e.return,P)}}if(r&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,a=n!==null?n.memoizedProps:u,c=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{c==="input"&&u.type==="radio"&&u.name!=null&&fx(o,u),Ih(c,a);var d=Ih(c,u);for(a=0;a<f.length;a+=2){var p=f[a],m=f[a+1];p==="style"?gx(o,m):p==="dangerouslySetInnerHTML"?px(o,m):p==="children"?au(o,m):Wp(o,p,m,d)}switch(c){case"input":kh(o,u);break;case"textarea":dx(o,u);break;case"select":var g=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var x=u.value;x!=null?jo(o,!!u.multiple,x,!1):g!==!!u.multiple&&(u.defaultValue!=null?jo(o,!!u.multiple,u.defaultValue,!0):jo(o,!!u.multiple,u.multiple?[]:"",!1))}o[yu]=u}catch(P){Ze(e,e.return,P)}}break;case 6:if(Gn(t,e),or(e),r&4){if(e.stateNode===null)throw Error(Q(162));o=e.stateNode,u=e.memoizedProps;try{o.nodeValue=u}catch(P){Ze(e,e.return,P)}}break;case 3:if(Gn(t,e),or(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{du(t.containerInfo)}catch(P){Ze(e,e.return,P)}break;case 4:Gn(t,e),or(e);break;case 13:Gn(t,e),or(e),o=e.child,o.flags&8192&&(u=o.memoizedState!==null,o.stateNode.isHidden=u,!u||o.alternate!==null&&o.alternate.memoizedState!==null||(Sm=it())),r&4&&Yv(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(Nt=(d=Nt)||p,Gn(t,e),Nt=d):Gn(t,e),or(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!p&&e.mode&1)for(J=e,p=e.child;p!==null;){for(m=J=p;J!==null;){switch(g=J,x=g.child,g.tag){case 0:case 11:case 14:case 15:eu(4,g,g.return);break;case 1:Do(g,g.return);var E=g.stateNode;if(typeof E.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(P){Ze(r,n,P)}}break;case 5:Do(g,g.return);break;case 22:if(g.memoizedState!==null){Xv(m);continue}}x!==null?(x.return=g,J=x):Xv(m)}p=p.sibling}e:for(p=null,m=e;;){if(m.tag===5){if(p===null){p=m;try{o=m.stateNode,d?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(c=m.stateNode,f=m.memoizedProps.style,a=f!=null&&f.hasOwnProperty("display")?f.display:null,c.style.display=mx("display",a))}catch(P){Ze(e,e.return,P)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(P){Ze(e,e.return,P)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Gn(t,e),or(e),r&4&&Yv(e);break;case 21:break;default:Gn(t,e),or(e)}}function or(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(zA(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(au(o,""),r.flags&=-33);var u=qv(e);lp(e,u,o);break;case 3:case 4:var a=r.stateNode.containerInfo,c=qv(e);ap(e,c,a);break;default:throw Error(Q(161))}}catch(f){Ze(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function CL(e,t,n){J=e,HA(e)}function HA(e,t,n){for(var r=(e.mode&1)!==0;J!==null;){var o=J,u=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Ya;if(!a){var c=o.alternate,f=c!==null&&c.memoizedState!==null||Nt;c=Ya;var d=Nt;if(Ya=a,(Nt=f)&&!d)for(J=o;J!==null;)a=J,f=a.child,a.tag===22&&a.memoizedState!==null?Zv(o):f!==null?(f.return=a,J=f):Zv(o);for(;u!==null;)J=u,HA(u),u=u.sibling;J=o,Ya=c,Nt=d}Jv(e)}else o.subtreeFlags&8772&&u!==null?(u.return=o,J=u):Jv(e)}}function Jv(e){for(;J!==null;){var t=J;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Nt||Ac(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Nt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&Mv(t,u,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Mv(t,a,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&du(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Nt||t.flags&512&&up(t)}catch(g){Ze(t,t.return,g)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function Xv(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function Zv(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ac(4,t)}catch(f){Ze(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(f){Ze(t,o,f)}}var u=t.return;try{up(t)}catch(f){Ze(t,u,f)}break;case 5:var a=t.return;try{up(t)}catch(f){Ze(t,a,f)}}}catch(f){Ze(t,t.return,f)}if(t===e){J=null;break}var c=t.sibling;if(c!==null){c.return=t.return,J=c;break}J=t.return}}var EL=Math.ceil,zl=Nr.ReactCurrentDispatcher,xm=Nr.ReactCurrentOwner,Fn=Nr.ReactCurrentBatchConfig,Ae=0,yt=null,ut=null,_t=0,hn=0,No=Ci(0),dt=0,Cu=null,Xi=0,Sc=0,Am=0,tu=null,en=null,Sm=0,ts=1/0,Ar=null,Wl=!1,cp=null,ai=null,Ja=!1,ni=null,Ql=0,nu=0,fp=null,pl=-1,ml=0;function Qt(){return Ae&6?it():pl!==-1?pl:pl=it()}function li(e){return e.mode&1?Ae&2&&_t!==0?_t&-_t:uL.transition!==null?(ml===0&&(ml=kx()),ml):(e=Re,e!==0||(e=window.event,e=e===void 0?16:Dx(e.type)),e):1}function Zn(e,t,n,r){if(50<nu)throw nu=0,fp=null,Error(Q(185));Iu(e,n,r),(!(Ae&2)||e!==yt)&&(e===yt&&(!(Ae&2)&&(Sc|=n),dt===4&&Zr(e,_t)),on(e,r),n===1&&Ae===0&&!(t.mode&1)&&(ts=it()+500,vc&&Ei()))}function on(e,t){var n=e.callbackNode;u4(e,t);var r=Tl(e,e===yt?_t:0);if(r===0)n!==null&&av(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&av(n),t===1)e.tag===0?sL(e1.bind(null,e)):eA(e1.bind(null,e)),nL(function(){!(Ae&6)&&Ei()}),n=null;else{switch(Rx(r)){case 1:n=$p;break;case 4:n=_x;break;case 16:n=_l;break;case 536870912:n=Tx;break;default:n=_l}n=ZA(n,GA.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function GA(e,t){if(pl=-1,ml=0,Ae&6)throw Error(Q(327));var n=e.callbackNode;if(Go()&&e.callbackNode!==n)return null;var r=Tl(e,e===yt?_t:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Hl(e,r);else{t=r;var o=Ae;Ae|=2;var u=$A();(yt!==e||_t!==t)&&(Ar=null,ts=it()+500,Ki(e,t));do try{TL();break}catch(c){KA(e,c)}while(1);um(),zl.current=u,Ae=o,ut!==null?t=0:(yt=null,_t=0,t=dt)}if(t!==0){if(t===2&&(o=Bh(e),o!==0&&(r=o,t=dp(e,o))),t===1)throw n=Cu,Ki(e,0),Zr(e,r),on(e,it()),n;if(t===6)Zr(e,r);else{if(o=e.current.alternate,!(r&30)&&!PL(o)&&(t=Hl(e,r),t===2&&(u=Bh(e),u!==0&&(r=u,t=dp(e,u))),t===1))throw n=Cu,Ki(e,0),Zr(e,r),on(e,it()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Bi(e,en,Ar);break;case 3:if(Zr(e,r),(r&130023424)===r&&(t=Sm+500-it(),10<t)){if(Tl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Qt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Gh(Bi.bind(null,e,en,Ar),t);break}Bi(e,en,Ar);break;case 4:if(Zr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Xn(r);u=1<<a,a=t[a],a>o&&(o=a),r&=~u}if(r=o,r=it()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*EL(r/1960))-r,10<r){e.timeoutHandle=Gh(Bi.bind(null,e,en,Ar),r);break}Bi(e,en,Ar);break;case 5:Bi(e,en,Ar);break;default:throw Error(Q(329))}}}return on(e,it()),e.callbackNode===n?GA.bind(null,e):null}function dp(e,t){var n=tu;return e.current.memoizedState.isDehydrated&&(Ki(e,t).flags|=256),e=Hl(e,t),e!==2&&(t=en,en=n,t!==null&&hp(t)),e}function hp(e){en===null?en=e:en.push.apply(en,e)}function PL(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 o=n[r],u=o.getSnapshot;o=o.value;try{if(!er(u(),o))return!1}catch(a){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 Zr(e,t){for(t&=~Am,t&=~Sc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xn(t),r=1<<n;e[n]=-1,t&=~r}}function e1(e){if(Ae&6)throw Error(Q(327));Go();var t=Tl(e,0);if(!(t&1))return on(e,it()),null;var n=Hl(e,t);if(e.tag!==0&&n===2){var r=Bh(e);r!==0&&(t=r,n=dp(e,r))}if(n===1)throw n=Cu,Ki(e,0),Zr(e,t),on(e,it()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bi(e,en,Ar),on(e,it()),null}function Cm(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(ts=it()+500,vc&&Ei())}}function Zi(e){ni!==null&&ni.tag===0&&!(Ae&6)&&Go();var t=Ae;Ae|=1;var n=Fn.transition,r=Re;try{if(Fn.transition=null,Re=1,e)return e()}finally{Re=r,Fn.transition=n,Ae=t,!(Ae&6)&&Ei()}}function Em(){hn=No.current,Ue(No)}function Ki(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,tL(n)),ut!==null)for(n=ut.return;n!==null;){var r=n;switch(im(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bl();break;case 3:Zo(),Ue(nn),Ue(Bt),hm();break;case 5:dm(r);break;case 4:Zo();break;case 13:Ue($e);break;case 19:Ue($e);break;case 10:am(r.type._context);break;case 22:case 23:Em()}n=n.return}if(yt=e,ut=e=ci(e.current,null),_t=hn=t,dt=0,Cu=null,Am=Sc=Xi=0,en=tu=null,Wi!==null){for(t=0;t<Wi.length;t++)if(n=Wi[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,u=n.pending;if(u!==null){var a=u.next;u.next=o,r.next=a}n.pending=r}Wi=null}return e}function KA(e,t){do{var n=ut;try{if(um(),fl.current=jl,Ul){for(var r=Ye.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ul=!1}if(Ji=0,gt=ft=Ye=null,Zs=!1,xu=0,xm.current=null,n===null||n.return===null){dt=1,Cu=t,ut=null;break}e:{var u=e,a=n.return,c=n,f=t;if(t=_t,c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var d=f,p=c,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var x=jv(a);if(x!==null){x.flags&=-257,zv(x,a,c,u,t),x.mode&1&&Uv(u,d,t),t=x,f=d;var E=t.updateQueue;if(E===null){var P=new Set;P.add(f),t.updateQueue=P}else E.add(f);break e}else{if(!(t&1)){Uv(u,d,t),Pm();break e}f=Error(Q(426))}}else if(He&&c.mode&1){var R=jv(a);if(R!==null){!(R.flags&65536)&&(R.flags|=256),zv(R,a,c,u,t),om(es(f,c));break e}}u=f=es(f,c),dt!==4&&(dt=2),tu===null?tu=[u]:tu.push(u),u=a;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var w=OA(u,f,t);Iv(u,w);break e;case 1:c=f;var A=u.type,C=u.stateNode;if(!(u.flags&128)&&(typeof A.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(ai===null||!ai.has(C)))){u.flags|=65536,t&=-t,u.lanes|=t;var k=LA(u,c,t);Iv(u,k);break e}}u=u.return}while(u!==null)}YA(n)}catch(b){t=b,ut===n&&n!==null&&(ut=n=n.return);continue}break}while(1)}function $A(){var e=zl.current;return zl.current=jl,e===null?jl:e}function Pm(){(dt===0||dt===3||dt===2)&&(dt=4),yt===null||!(Xi&268435455)&&!(Sc&268435455)||Zr(yt,_t)}function Hl(e,t){var n=Ae;Ae|=2;var r=$A();(yt!==e||_t!==t)&&(Ar=null,Ki(e,t));do try{_L();break}catch(o){KA(e,o)}while(1);if(um(),Ae=n,zl.current=r,ut!==null)throw Error(Q(261));return yt=null,_t=0,dt}function _L(){for(;ut!==null;)qA(ut)}function TL(){for(;ut!==null&&!X3();)qA(ut)}function qA(e){var t=XA(e.alternate,e,hn);e.memoizedProps=e.pendingProps,t===null?YA(e):ut=t,xm.current=null}function YA(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=xL(n,t),n!==null){n.flags&=32767,ut=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dt=6,ut=null;return}}else if(n=wL(n,t,hn),n!==null){ut=n;return}if(t=t.sibling,t!==null){ut=t;return}ut=t=e}while(t!==null);dt===0&&(dt=5)}function Bi(e,t,n){var r=Re,o=Fn.transition;try{Fn.transition=null,Re=1,kL(e,t,n,r)}finally{Fn.transition=o,Re=r}return null}function kL(e,t,n,r){do Go();while(ni!==null);if(Ae&6)throw Error(Q(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(a4(e,u),e===yt&&(ut=yt=null,_t=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ja||(Ja=!0,ZA(_l,function(){return Go(),null})),u=(n.flags&15990)!==0,n.subtreeFlags&15990||u){u=Fn.transition,Fn.transition=null;var a=Re;Re=1;var c=Ae;Ae|=4,xm.current=null,SL(e,n),QA(n,e),$4(Qh),kl=!!Wh,Qh=Wh=null,e.current=n,CL(n),Z3(),Ae=c,Re=a,Fn.transition=u}else e.current=n;if(Ja&&(Ja=!1,ni=e,Ql=o),u=e.pendingLanes,u===0&&(ai=null),n4(n.stateNode),on(e,it()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Wl)throw Wl=!1,e=cp,cp=null,e;return Ql&1&&e.tag!==0&&Go(),u=e.pendingLanes,u&1?e===fp?nu++:(nu=0,fp=e):nu=0,Ei(),null}function Go(){if(ni!==null){var e=Rx(Ql),t=Fn.transition,n=Re;try{if(Fn.transition=null,Re=16>e?16:e,ni===null)var r=!1;else{if(e=ni,ni=null,Ql=0,Ae&6)throw Error(Q(331));var o=Ae;for(Ae|=4,J=e.current;J!==null;){var u=J,a=u.child;if(J.flags&16){var c=u.deletions;if(c!==null){for(var f=0;f<c.length;f++){var d=c[f];for(J=d;J!==null;){var p=J;switch(p.tag){case 0:case 11:case 15:eu(8,p,u)}var m=p.child;if(m!==null)m.return=p,J=m;else for(;J!==null;){p=J;var g=p.sibling,x=p.return;if(jA(p),p===d){J=null;break}if(g!==null){g.return=x,J=g;break}J=x}}}var E=u.alternate;if(E!==null){var P=E.child;if(P!==null){E.child=null;do{var R=P.sibling;P.sibling=null,P=R}while(P!==null)}}J=u}}if(u.subtreeFlags&2064&&a!==null)a.return=u,J=a;else e:for(;J!==null;){if(u=J,u.flags&2048)switch(u.tag){case 0:case 11:case 15:eu(9,u,u.return)}var w=u.sibling;if(w!==null){w.return=u.return,J=w;break e}J=u.return}}var A=e.current;for(J=A;J!==null;){a=J;var C=a.child;if(a.subtreeFlags&2064&&C!==null)C.return=a,J=C;else e:for(a=A;J!==null;){if(c=J,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Ac(9,c)}}catch(b){Ze(c,c.return,b)}if(c===a){J=null;break e}var k=c.sibling;if(k!==null){k.return=c.return,J=k;break e}J=c.return}}if(Ae=o,Ei(),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(hc,e)}catch(b){}r=!0}return r}finally{Re=n,Fn.transition=t}}return!1}function t1(e,t,n){t=es(n,t),t=OA(e,t,1),e=ui(e,t,1),t=Qt(),e!==null&&(Iu(e,1,t),on(e,t))}function Ze(e,t,n){if(e.tag===3)t1(e,e,n);else for(;t!==null;){if(t.tag===3){t1(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=es(n,e),e=LA(t,e,1),t=ui(t,e,1),e=Qt(),t!==null&&(Iu(t,1,e),on(t,e));break}}t=t.return}}function RL(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qt(),e.pingedLanes|=e.suspendedLanes&n,yt===e&&(_t&n)===n&&(dt===4||dt===3&&(_t&130023424)===_t&&500>it()-Sm?Ki(e,0):Am|=n),on(e,t)}function JA(e,t){t===0&&(e.mode&1?(t=ja,ja<<=1,!(ja&130023424)&&(ja=4194304)):t=1);var n=Qt();e=Lr(e,t),e!==null&&(Iu(e,t,n),on(e,n))}function OL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),JA(e,n)}function LL(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),JA(e,n)}var XA;XA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nn.current)tn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return tn=!1,vL(e,t,n);tn=!!(e.flags&131072)}else tn=!1,He&&t.flags&1048576&&tA(t,Dl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hl(e,t),e=t.pendingProps;var o=Yo(t,Bt.current);Ho(t,n),o=mm(null,t,r,e,o,n);var u=gm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rn(r)?(u=!0,Il(t)):u=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,cm(t),o.updater=wc,t.stateNode=o,o._reactInternals=t,Zh(t,r,e,n),t=np(null,t,r,!0,u,n)):(t.tag=0,He&&u&&rm(t),Wt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=IL(r),e=Kn(r,e),o){case 0:t=tp(null,t,r,e,n);break e;case 1:t=Hv(null,t,r,e,n);break e;case 11:t=Wv(null,t,r,e,n);break e;case 14:t=Qv(null,t,r,Kn(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),tp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Hv(e,t,r,o,n);case 3:e:{if(DA(t),e===null)throw Error(Q(387));r=t.pendingProps,u=t.memoizedState,o=u.element,oA(e,t),Bl(t,r,null,n);var a=t.memoizedState;if(r=a.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){o=es(Error(Q(423)),t),t=Gv(e,t,r,n,o);break e}else if(r!==o){o=es(Error(Q(424)),t),t=Gv(e,t,r,n,o);break e}else for(pn=si(t.stateNode.containerInfo.firstChild),mn=t,He=!0,qn=null,n=lA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Jo(),r===o){t=br(e,t,n);break e}Wt(e,t,r,n)}t=t.child}return t;case 5:return cA(t),e===null&&Yh(t),r=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Hh(r,o)?a=null:u!==null&&Hh(r,u)&&(t.flags|=32),MA(e,t),Wt(e,t,a,n),t.child;case 6:return e===null&&Yh(t),null;case 13:return NA(e,t,n);case 4:return fm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xo(t,null,r,n):Wt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Wv(e,t,r,o,n);case 7:return Wt(e,t,t.pendingProps,n),t.child;case 8:return Wt(e,t,t.pendingProps.children,n),t.child;case 12:return Wt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,u=t.memoizedProps,a=o.value,Ne(Nl,r._currentValue),r._currentValue=a,u!==null)if(er(u.value,a)){if(u.children===o.children&&!nn.current){t=br(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var c=u.dependencies;if(c!==null){a=u.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(u.tag===1){f=_r(-1,n&-n),f.tag=2;var d=u.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?f.next=f:(f.next=p.next,p.next=f),d.pending=f}}u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),Jh(u.return,n,t),c.lanes|=n;break}f=f.next}}else if(u.tag===10)a=u.type===t.type?null:u.child;else if(u.tag===18){if(a=u.return,a===null)throw Error(Q(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Jh(a,n,t),a=u.sibling}else a=u.child;if(a!==null)a.return=u;else for(a=u;a!==null;){if(a===t){a=null;break}if(u=a.sibling,u!==null){u.return=a.return,a=u;break}a=a.return}u=a}Wt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ho(t,n),o=Bn(o),r=r(o),t.flags|=1,Wt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),Qv(e,t,r,o,n);case 15:return bA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),hl(e,t),t.tag=1,rn(r)?(e=!0,Il(t)):e=!1,Ho(t,n),uA(t,r,o),Zh(t,r,o,n),np(null,t,r,!0,e,n);case 19:return FA(e,t,n);case 22:return IA(e,t,n)}throw Error(Q(156,t.tag))};function ZA(e,t){return Px(e,t)}function bL(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 Nn(e,t,n,r){return new bL(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IL(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hp)return 11;if(e===Gp)return 14}return 2}function ci(e,t){var n=e.alternate;return n===null?(n=Nn(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,o,u){var a=2;if(r=e,typeof e=="function")_m(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case _o:return $i(n.children,o,u,t);case Qp:a=8,o|=8;break;case Ch:return e=Nn(12,n,t,o|2),e.elementType=Ch,e.lanes=u,e;case Eh:return e=Nn(13,n,t,o),e.elementType=Eh,e.lanes=u,e;case Ph:return e=Nn(19,n,t,o),e.elementType=Ph,e.lanes=u,e;case ax:return Cc(n,o,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sx:a=10;break e;case ux:a=9;break e;case Hp:a=11;break e;case Gp:a=14;break e;case $r:a=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=Nn(a,n,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function $i(e,t,n,r){return e=Nn(7,e,r,t),e.lanes=n,e}function Cc(e,t,n,r){return e=Nn(22,e,r,t),e.elementType=ax,e.lanes=n,e.stateNode={isHidden:!1},e}function Xd(e,t,n){return e=Nn(6,e,null,t),e.lanes=n,e}function Zd(e,t,n){return t=Nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ML(e,t,n,r,o){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=Id(0),this.expirationTimes=Id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Id(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Tm(e,t,n,r,o,u,a,c,f){return e=new ML(e,t,n,c,f),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Nn(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},cm(u),e}function DL(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Po,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function eS(e){if(!e)return yi;e=e._reactInternals;e:{if(ro(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(rn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(rn(n))return Zx(e,n,t)}return t}function tS(e,t,n,r,o,u,a,c,f){return e=Tm(n,r,!0,e,o,u,a,c,f),e.context=eS(null),n=e.current,r=Qt(),o=li(n),u=_r(r,o),u.callback=t!=null?t:null,ui(n,u,o),e.current.lanes=o,Iu(e,o,r),on(e,r),e}function Ec(e,t,n,r){var o=t.current,u=Qt(),a=li(o);return n=eS(n),t.context===null?t.context=n:t.pendingContext=n,t=_r(u,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ui(o,t,a),e!==null&&(Zn(e,o,a,u),cl(e,o,a)),a}function Gl(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 n1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function km(e,t){n1(e,t),(e=e.alternate)&&n1(e,t)}function NL(){return null}var nS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rm(e){this._internalRoot=e}Pc.prototype.render=Rm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Ec(e,t,null,null)};Pc.prototype.unmount=Rm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zi(function(){Ec(null,e,null,null)}),t[Or]=null}};function Pc(e){this._internalRoot=e}Pc.prototype.unstable_scheduleHydration=function(e){if(e){var t=bx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xr.length&&t!==0&&t<Xr[n].priority;n++);Xr.splice(n,0,e),n===0&&Mx(e)}};function Om(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function r1(){}function FL(e,t,n,r,o){if(o){if(typeof r=="function"){var u=r;r=function(){var d=Gl(a);u.call(d)}}var a=tS(t,r,e,0,null,!1,!1,"",r1);return e._reactRootContainer=a,e[Or]=a.current,mu(e.nodeType===8?e.parentNode:e),Zi(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var c=r;r=function(){var d=Gl(f);c.call(d)}}var f=Tm(e,0,!1,null,null,!1,!1,"",r1);return e._reactRootContainer=f,e[Or]=f.current,mu(e.nodeType===8?e.parentNode:e),Zi(function(){Ec(t,f,n,r)}),f}function Tc(e,t,n,r,o){var u=n._reactRootContainer;if(u){var a=u;if(typeof o=="function"){var c=o;o=function(){var f=Gl(a);c.call(f)}}Ec(t,a,e,o)}else a=FL(n,t,e,o,r);return Gl(a)}Ox=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ws(t.pendingLanes);n!==0&&(qp(t,n|1),on(t,it()),!(Ae&6)&&(ts=it()+500,Ei()))}break;case 13:Zi(function(){var r=Lr(e,1);if(r!==null){var o=Qt();Zn(r,e,1,o)}}),km(e,1)}};Yp=function(e){if(e.tag===13){var t=Lr(e,134217728);if(t!==null){var n=Qt();Zn(t,e,134217728,n)}km(e,134217728)}};Lx=function(e){if(e.tag===13){var t=li(e),n=Lr(e,t);if(n!==null){var r=Qt();Zn(n,e,t,r)}km(e,t)}};bx=function(){return Re};Ix=function(e,t){var n=Re;try{return Re=e,t()}finally{Re=n}};Dh=function(e,t,n){switch(t){case"input":if(kh(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 o=yc(r);if(!o)throw Error(Q(90));cx(r),kh(r,o)}}}break;case"textarea":dx(e,n);break;case"select":t=n.value,t!=null&&jo(e,!!n.multiple,t,!1)}};wx=Cm;xx=Zi;var BL={usingClientEntryPoint:!1,Events:[Du,Oo,yc,yx,vx,Cm]},Bs={findFiberByHostInstance:zi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},VL={bundleType:Bs.bundleType,version:Bs.version,rendererPackageName:Bs.rendererPackageName,rendererConfig:Bs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Cx(e),e===null?null:e.stateNode},findFiberByHostInstance:Bs.findFiberByHostInstance||NL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Xa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xa.isDisabled&&Xa.supportsFiber)try{hc=Xa.inject(VL),ar=Xa}catch(e){}}xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BL;xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Om(t))throw Error(Q(200));return DL(e,t,null,n)};xn.createRoot=function(e,t){if(!Om(e))throw Error(Q(299));var n=!1,r="",o=nS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Tm(e,1,!1,null,null,n,!1,r,o),e[Or]=t.current,mu(e.nodeType===8?e.parentNode:e),new Rm(t)};xn.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=Cx(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return Zi(e)};xn.hydrate=function(e,t,n){if(!_c(t))throw Error(Q(200));return Tc(null,e,t,!0,n)};xn.hydrateRoot=function(e,t,n){if(!Om(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,o=!1,u="",a=nS;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=tS(t,null,e,1,n!=null?n:null,o,!1,u,a),e[Or]=t.current,mu(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Pc(t)};xn.render=function(e,t,n){if(!_c(t))throw Error(Q(200));return Tc(null,e,t,!1,n)};xn.unmountComponentAtNode=function(e){if(!_c(e))throw Error(Q(40));return e._reactRootContainer?(Zi(function(){Tc(null,null,e,!1,function(){e._reactRootContainer=null,e[Or]=null})}),!0):!1};xn.unstable_batchedUpdates=Cm;xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_c(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Tc(e,t,n,!1,r)};xn.version="18.2.0-next-9e3b772b8-20220608";function rS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rS)}catch(e){console.error(e)}}rS(),tx.exports=xn;var iS=tx.exports,i1=iS;Sl.createRoot=i1.createRoot,Sl.hydrateRoot=i1.hydrateRoot;var oS={exports:{}},kc={};/**
32
+ `+u.stack}return{value:e,source:t,stack:o,digest:null}}function Jd(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function np(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yb=typeof WeakMap=="function"?WeakMap:Map;function bA(e,t,n){n=_r(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ql||(Ql=!0,dp=r),np(e,t)},n}function LA(e,t,n){n=_r(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){np(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){np(e,t),typeof r!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function jv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yb;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=bb.bind(null,e,t,n),t.then(e,e))}function zv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wv(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,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=_r(-1,1),t.tag=2,ui(n,t,1))),n.lanes|=1),e)}var vb=Nr.ReactCurrentOwner,nn=!1;function Wt(e,t,n,r){t.child=e===null?cA(t,null,n,r):Zo(t,e.child,n,r)}function Qv(e,t,n,r,o){n=n.render;var u=t.ref;return Go(t,o),r=gm(e,t,n,r,u,o),n=ym(),e!==null&&!nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lr(e,t,o)):(He&&n&&im(t),t.flags|=1,Wt(e,t,r,o),t.child)}function Hv(e,t,n,r,o){if(e===null){var u=n.type;return typeof u=="function"&&!Tm(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,IA(e,t,u,r,o)):(e=yl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!(e.lanes&o)){var a=u.memoizedProps;if(n=n.compare,n=n!==null?n:mu,n(a,r)&&e.ref===t.ref)return Lr(e,t,o)}return t.flags|=1,e=ci(u,r),e.ref=t.ref,e.return=t,t.child=e}function IA(e,t,n,r,o){if(e!==null){var u=e.memoizedProps;if(mu(u,r)&&e.ref===t.ref)if(nn=!1,t.pendingProps=r=u,(e.lanes&o)!==0)e.flags&131072&&(nn=!0);else return t.lanes=e.lanes,Lr(e,t,o)}return rp(e,t,n,r,o)}function MA(e,t,n){var r=t.pendingProps,o=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Fo,pn),pn|=n;else{if(!(n&1073741824))return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ne(Fo,pn),pn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,Ne(Fo,pn),pn|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,Ne(Fo,pn),pn|=r;return Wt(e,t,o,n),t.child}function DA(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rp(e,t,n,r,o){var u=on(n)?Yi:Bt.current;return u=Jo(t,u),Go(t,o),n=gm(e,t,n,r,u,o),r=ym(),e!==null&&!nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lr(e,t,o)):(He&&r&&im(t),t.flags|=1,Wt(e,t,n,o),t.child)}function Gv(e,t,n,r,o){if(on(n)){var u=!0;Ml(t)}else u=!1;if(Go(t,o),t.stateNode===null)pl(e,t),aA(t,n,r),tp(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,c=t.memoizedProps;a.props=c;var f=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=Bn(d):(d=on(n)?Yi:Bt.current,d=Jo(t,d));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";m||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==r||f!==d)&&Fv(t,a,r,d),qr=!1;var g=t.memoizedState;a.state=g,Vl(t,r,a,o),f=t.memoizedState,c!==r||g!==f||rn.current||qr?(typeof p=="function"&&(ep(t,n,p,r),f=t.memoizedState),(c=qr||Nv(t,n,c,r,g,f,d))?(m||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=d,r=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,sA(e,t),c=t.memoizedProps,d=t.type===t.elementType?c:Kn(t.type,c),a.props=d,m=t.pendingProps,g=a.context,f=n.contextType,typeof f=="object"&&f!==null?f=Bn(f):(f=on(n)?Yi:Bt.current,f=Jo(t,f));var w=n.getDerivedStateFromProps;(p=typeof w=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==m||g!==f)&&Fv(t,a,r,f),qr=!1,g=t.memoizedState,a.state=g,Vl(t,r,a,o);var E=t.memoizedState;c!==m||g!==E||rn.current||qr?(typeof w=="function"&&(ep(t,n,w,r),E=t.memoizedState),(d=qr||Nv(t,n,d,r,g,E,f)||!1)?(p||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,E,f),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,E,f)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),a.props=r,a.state=E,a.context=f,r=d):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return ip(e,t,n,r,u,o)}function ip(e,t,n,r,o,u){DA(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&bv(t,n,!1),Lr(e,t,u);r=t.stateNode,vb.current=t;var c=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Zo(t,e.child,null,u),t.child=Zo(t,null,c,u)):Wt(e,t,c,u),t.memoizedState=r.state,o&&bv(t,n,!0),t.child}function NA(e){var t=e.stateNode;t.pendingContext?Ov(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ov(e,t.context,!1),dm(e,t.containerInfo)}function Kv(e,t,n,r,o){return Xo(),sm(o),t.flags|=256,Wt(e,t,n,r),t.child}var op={dehydrated:null,treeContext:null,retryLane:0};function sp(e){return{baseLanes:e,cachePool:null,transitions:null}}function FA(e,t,n){var r=t.pendingProps,o=$e.current,u=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(o&2)!==0),c?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ne($e,o&1),e===null)return Xh(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):(a=r.children,e=r.fallback,u?(r=t.mode,u=t.child,a={mode:"hidden",children:a},!(r&1)&&u!==null?(u.childLanes=0,u.pendingProps=a):u=Ec(a,r,0,null),e=qi(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=sp(n),t.memoizedState=op,e):xm(t,a));if(o=e.memoizedState,o!==null&&(c=o.dehydrated,c!==null))return wb(e,t,a,r,c,o,n);if(u){u=r.fallback,a=t.mode,o=e.child,c=o.sibling;var f={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=ci(o,f),r.subtreeFlags=o.subtreeFlags&14680064),c!==null?u=ci(c,u):(u=qi(u,a,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,a=e.child.memoizedState,a=a===null?sp(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},u.memoizedState=a,u.childLanes=e.childLanes&~n,t.memoizedState=op,r}return u=e.child,e=u.sibling,r=ci(u,{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 xm(e,t){return t=Ec({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ya(e,t,n,r){return r!==null&&sm(r),Zo(t,e.child,null,n),e=xm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wb(e,t,n,r,o,u,a){if(n)return t.flags&256?(t.flags&=-257,r=Jd(Error(Q(422))),Ya(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,o=t.mode,r=Ec({mode:"visible",children:r.children},o,0,null),u=qi(u,o,a,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,t.mode&1&&Zo(t,e.child,null,a),t.child.memoizedState=sp(a),t.memoizedState=op,u);if(!(t.mode&1))return Ya(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var c=r.dgst;return r=c,u=Error(Q(419)),r=Jd(u,r,void 0),Ya(e,t,a,r)}if(c=(a&e.childLanes)!==0,nn||c){if(r=yt,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==u.retryLane&&(u.retryLane=o,br(e,o),Zn(r,e,o,-1))}return _m(),r=Jd(Error(Q(421))),Ya(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Lb.bind(null,e),o._reactRetry=t,null):(e=u.treeContext,mn=si(o.nextSibling),gn=t,He=!0,qn=null,e!==null&&(Mn[Dn++]=Cr,Mn[Dn++]=Er,Mn[Dn++]=Ji,Cr=e.id,Er=e.overflow,Ji=t),t=xm(t,r.children),t.flags|=4096,t)}function $v(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zh(e.return,t,n)}function Xd(e,t,n,r,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=o)}function BA(e,t,n){var r=t.pendingProps,o=r.revealOrder,u=r.tail;if(Wt(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&&$v(e,n,t);else if(e.tag===19)$v(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(Ne($e,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Xd(t,!1,o,n,u);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ul(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Xd(t,!0,n,null,u);break;case"together":Xd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xb(e,t,n){switch(t.tag){case 3:NA(t),Xo();break;case 5:fA(t);break;case 1:on(t.type)&&Ml(t);break;case 4:dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ne(Fl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ne($e,$e.current&1),t.flags|=128,null):n&t.child.childLanes?FA(e,t,n):(Ne($e,$e.current&1),e=Lr(e,t,n),e!==null?e.sibling:null);Ne($e,$e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return BA(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ne($e,$e.current),r)break;return null;case 22:case 23:return t.lanes=0,MA(e,t,n)}return Lr(e,t,n)}var VA,up,UA,jA;VA=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}};up=function(){};UA=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Hi(lr.current);var u=null;switch(n){case"input":o=kh(e,o),r=kh(e,r),u=[];break;case"select":o=Je({},o,{value:void 0}),r=Je({},r,{value:void 0}),u=[];break;case"textarea":o=Lh(e,o),r=Lh(e,r),u=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ll)}Mh(n,r);var a;n=null;for(d in o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&o[d]!=null)if(d==="style"){var c=o[d];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(au.hasOwnProperty(d)?u||(u=[]):(u=u||[]).push(d,null));for(d in r){var f=r[d];if(c=o!=null?o[d]:void 0,r.hasOwnProperty(d)&&f!==c&&(f!=null||c!=null))if(d==="style")if(c){for(a in c)!c.hasOwnProperty(a)||f&&f.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in f)f.hasOwnProperty(a)&&c[a]!==f[a]&&(n||(n={}),n[a]=f[a])}else n||(u||(u=[]),u.push(d,n)),n=f;else d==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(u=u||[]).push(d,f)):d==="children"?typeof f!="string"&&typeof f!="number"||(u=u||[]).push(d,""+f):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(au.hasOwnProperty(d)?(f!=null&&d==="onScroll"&&Ve("scroll",e),u||c===f||(u=[])):(u=u||[]).push(d,f))}n&&(u=u||[]).push("style",n);var d=u;(t.updateQueue=d)&&(t.flags|=4)}};jA=function(e,t,n,r){n!==r&&(t.flags|=4)};function Bs(e,t){if(!He)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 It(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ab(e,t,n){var r=t.pendingProps;switch(om(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(t),null;case 1:return on(t.type)&&Il(),It(t),null;case 3:return r=t.stateNode,es(),Ue(rn),Ue(Bt),pm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($a(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qn!==null&&(mp(qn),qn=null))),up(e,t),It(t),null;case 5:hm(t);var o=Hi(xu.current);if(n=t.type,e!==null&&t.stateNode!=null)UA(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return It(t),null}if(e=Hi(lr.current),$a(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[ur]=t,r[vu]=u,e=(t.mode&1)!==0,n){case"dialog":Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":case"embed":Ve("load",r);break;case"video":case"audio":for(o=0;o<Hs.length;o++)Ve(Hs[o],r);break;case"source":Ve("error",r);break;case"img":case"image":case"link":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"input":rv(r,u),Ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Ve("invalid",r);break;case"textarea":ov(r,u),Ve("invalid",r)}Mh(n,u),o=null;for(var a in u)if(u.hasOwnProperty(a)){var c=u[a];a==="children"?typeof c=="string"?r.textContent!==c&&(u.suppressHydrationWarning!==!0&&Ka(r.textContent,c,e),o=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(u.suppressHydrationWarning!==!0&&Ka(r.textContent,c,e),o=["children",""+c]):au.hasOwnProperty(a)&&c!=null&&a==="onScroll"&&Ve("scroll",r)}switch(n){case"input":Va(r),iv(r,u,!0);break;case"textarea":Va(r),sv(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=Ll)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=px(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ur]=t,e[vu]=r,VA(e,t,!1,!1),t.stateNode=e;e:{switch(a=Dh(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),o=r;break;case"iframe":case"object":case"embed":Ve("load",e),o=r;break;case"video":case"audio":for(o=0;o<Hs.length;o++)Ve(Hs[o],e);o=r;break;case"source":Ve("error",e),o=r;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),o=r;break;case"details":Ve("toggle",e),o=r;break;case"input":rv(e,r),o=kh(e,r),Ve("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Je({},r,{value:void 0}),Ve("invalid",e);break;case"textarea":ov(e,r),o=Lh(e,r),Ve("invalid",e);break;default:o=r}Mh(n,o),c=o;for(u in c)if(c.hasOwnProperty(u)){var f=c[u];u==="style"?yx(e,f):u==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&mx(e,f)):u==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&lu(e,f):typeof f=="number"&&lu(e,""+f):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(au.hasOwnProperty(u)?f!=null&&u==="onScroll"&&Ve("scroll",e):f!=null&&Qp(e,u,f,a))}switch(n){case"input":Va(e),iv(e,r,!1);break;case"textarea":Va(e),sv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+gi(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?zo(e,!!r.multiple,u,!1):r.defaultValue!=null&&zo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ll)}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 It(t),null;case 6:if(e&&t.stateNode!=null)jA(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Hi(xu.current),Hi(lr.current),$a(t)){if(r=t.stateNode,n=t.memoizedProps,r[ur]=t,(u=r.nodeValue!==n)&&(e=gn,e!==null))switch(e.tag){case 3:Ka(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ka(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ur]=t,t.stateNode=r}return It(t),null;case 13:if(Ue($e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&mn!==null&&t.mode&1&&!(t.flags&128))iA(),Xo(),t.flags|=98560,u=!1;else if(u=$a(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(Q(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(Q(317));u[ur]=t}else Xo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;It(t),u=!1}else qn!==null&&(mp(qn),qn=null),u=!0;if(!u)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?dt===0&&(dt=3):_m())),t.updateQueue!==null&&(t.flags|=4),It(t),null);case 4:return es(),up(e,t),e===null&&gu(t.stateNode.containerInfo),It(t),null;case 10:return lm(t.type._context),It(t),null;case 17:return on(t.type)&&Il(),It(t),null;case 19:if(Ue($e),u=t.memoizedState,u===null)return It(t),null;if(r=(t.flags&128)!==0,a=u.rendering,a===null)if(r)Bs(u,!1);else{if(dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Ul(e),a!==null){for(t.flags|=128,Bs(u,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,a=u.alternate,a===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,u.type=a.type,e=a.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ne($e,$e.current&1|2),t.child}e=e.sibling}u.tail!==null&&it()>ns&&(t.flags|=128,r=!0,Bs(u,!1),t.lanes=4194304)}else{if(!r)if(e=Ul(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bs(u,!0),u.tail===null&&u.tailMode==="hidden"&&!a.alternate&&!He)return It(t),null}else 2*it()-u.renderingStartTime>ns&&n!==1073741824&&(t.flags|=128,r=!0,Bs(u,!1),t.lanes=4194304);u.isBackwards?(a.sibling=t.child,t.child=a):(n=u.last,n!==null?n.sibling=a:t.child=a,u.last=a)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=it(),t.sibling=null,n=$e.current,Ne($e,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return Pm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pn&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function Sb(e,t){switch(om(t),t.tag){case 1:return on(t.type)&&Il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return es(),Ue(rn),Ue(Bt),pm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hm(t),null;case 13:if(Ue($e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue($e),null;case 4:return es(),null;case 10:return lm(t.type._context),null;case 22:case 23:return Pm(),null;case 24:return null;default:return null}}var Ja=!1,Nt=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,J=null;function No(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ze(e,t,r)}else n.current=null}function ap(e,t,n){try{n()}catch(r){Ze(e,t,r)}}var qv=!1;function Eb(e,t){if(Hh=kl,e=Hx(),rm(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 o=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch(T){n=null;break e}var a=0,c=-1,f=-1,d=0,p=0,m=e,g=null;t:for(;;){for(var w;m!==n||o!==0&&m.nodeType!==3||(c=a+o),m!==u||r!==0&&m.nodeType!==3||(f=a+r),m.nodeType===3&&(a+=m.nodeValue.length),(w=m.firstChild)!==null;)g=m,m=w;for(;;){if(m===e)break t;if(g===n&&++d===o&&(c=a),g===u&&++p===r&&(f=a),(w=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=w}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gh={focusedElem:e,selectionRange:n},kl=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var P=E.memoizedProps,k=E.memoizedState,x=t.stateNode,A=x.getSnapshotBeforeUpdate(t.elementType===t.type?P:Kn(t.type,P),k);x.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){Ze(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return E=qv,qv=!1,E}function tu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var u=o.destroy;o.destroy=void 0,u!==void 0&&ap(t,n,u)}o=o.next}while(o!==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 lp(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 zA(e){var t=e.alternate;t!==null&&(e.alternate=null,zA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[vu],delete t[qh],delete t[sb],delete t[ub])),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 WA(e){return e.tag===5||e.tag===3||e.tag===4}function Yv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||WA(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 cp(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=Ll));else if(r!==4&&(e=e.child,e!==null))for(cp(e,t,n),e=e.sibling;e!==null;)cp(e,t,n),e=e.sibling}function fp(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(fp(e,t,n),e=e.sibling;e!==null;)fp(e,t,n),e=e.sibling}var Pt=null,$n=!1;function Gr(e,t,n){for(n=n.child;n!==null;)QA(e,t,n),n=n.sibling}function QA(e,t,n){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(pc,n)}catch(c){}switch(n.tag){case 5:Nt||No(n,t);case 6:var r=Pt,o=$n;Pt=null,Gr(e,t,n),Pt=r,$n=o,Pt!==null&&($n?(e=Pt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pt.removeChild(n.stateNode));break;case 18:Pt!==null&&($n?(e=Pt,n=n.stateNode,e.nodeType===8?Hd(e.parentNode,n):e.nodeType===1&&Hd(e,n),hu(e)):Hd(Pt,n.stateNode));break;case 4:r=Pt,o=$n,Pt=n.stateNode.containerInfo,$n=!0,Gr(e,t,n),Pt=r,$n=o;break;case 0:case 11:case 14:case 15:if(!Nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var u=o,a=u.destroy;u=u.tag,a!==void 0&&(u&2||u&4)&&ap(n,t,a),o=o.next}while(o!==r)}Gr(e,t,n);break;case 1:if(!Nt&&(No(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ze(n,t,c)}Gr(e,t,n);break;case 21:Gr(e,t,n);break;case 22:n.mode&1?(Nt=(r=Nt)||n.memoizedState!==null,Gr(e,t,n),Nt=r):Gr(e,t,n);break;default:Gr(e,t,n)}}function Jv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Cb),t.forEach(function(r){var o=Ib.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Gn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var u=e,a=t,c=a;e:for(;c!==null;){switch(c.tag){case 5:Pt=c.stateNode,$n=!1;break e;case 3:Pt=c.stateNode.containerInfo,$n=!0;break e;case 4:Pt=c.stateNode.containerInfo,$n=!0;break e}c=c.return}if(Pt===null)throw Error(Q(160));QA(u,a,o),Pt=null,$n=!1;var f=o.alternate;f!==null&&(f.return=null),o.return=null}catch(d){Ze(o,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)HA(t,e),t=t.sibling}function HA(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gn(t,e),or(e),r&4){try{tu(3,e,e.return),Sc(3,e)}catch(P){Ze(e,e.return,P)}try{tu(5,e,e.return)}catch(P){Ze(e,e.return,P)}}break;case 1:Gn(t,e),or(e),r&512&&n!==null&&No(n,n.return);break;case 5:if(Gn(t,e),or(e),r&512&&n!==null&&No(n,n.return),e.flags&32){var o=e.stateNode;try{lu(o,"")}catch(P){Ze(e,e.return,P)}}if(r&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,a=n!==null?n.memoizedProps:u,c=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{c==="input"&&u.type==="radio"&&u.name!=null&&dx(o,u),Dh(c,a);var d=Dh(c,u);for(a=0;a<f.length;a+=2){var p=f[a],m=f[a+1];p==="style"?yx(o,m):p==="dangerouslySetInnerHTML"?mx(o,m):p==="children"?lu(o,m):Qp(o,p,m,d)}switch(c){case"input":Oh(o,u);break;case"textarea":hx(o,u);break;case"select":var g=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var w=u.value;w!=null?zo(o,!!u.multiple,w,!1):g!==!!u.multiple&&(u.defaultValue!=null?zo(o,!!u.multiple,u.defaultValue,!0):zo(o,!!u.multiple,u.multiple?[]:"",!1))}o[vu]=u}catch(P){Ze(e,e.return,P)}}break;case 6:if(Gn(t,e),or(e),r&4){if(e.stateNode===null)throw Error(Q(162));o=e.stateNode,u=e.memoizedProps;try{o.nodeValue=u}catch(P){Ze(e,e.return,P)}}break;case 3:if(Gn(t,e),or(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hu(t.containerInfo)}catch(P){Ze(e,e.return,P)}break;case 4:Gn(t,e),or(e);break;case 13:Gn(t,e),or(e),o=e.child,o.flags&8192&&(u=o.memoizedState!==null,o.stateNode.isHidden=u,!u||o.alternate!==null&&o.alternate.memoizedState!==null||(Cm=it())),r&4&&Jv(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(Nt=(d=Nt)||p,Gn(t,e),Nt=d):Gn(t,e),or(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!p&&e.mode&1)for(J=e,p=e.child;p!==null;){for(m=J=p;J!==null;){switch(g=J,w=g.child,g.tag){case 0:case 11:case 14:case 15:tu(4,g,g.return);break;case 1:No(g,g.return);var E=g.stateNode;if(typeof E.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(P){Ze(r,n,P)}}break;case 5:No(g,g.return);break;case 22:if(g.memoizedState!==null){Zv(m);continue}}w!==null?(w.return=g,J=w):Zv(m)}p=p.sibling}e:for(p=null,m=e;;){if(m.tag===5){if(p===null){p=m;try{o=m.stateNode,d?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(c=m.stateNode,f=m.memoizedProps.style,a=f!=null&&f.hasOwnProperty("display")?f.display:null,c.style.display=gx("display",a))}catch(P){Ze(e,e.return,P)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(P){Ze(e,e.return,P)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Gn(t,e),or(e),r&4&&Jv(e);break;case 21:break;default:Gn(t,e),or(e)}}function or(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(WA(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(lu(o,""),r.flags&=-33);var u=Yv(e);fp(e,u,o);break;case 3:case 4:var a=r.stateNode.containerInfo,c=Yv(e);cp(e,c,a);break;default:throw Error(Q(161))}}catch(f){Ze(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pb(e,t,n){J=e,GA(e)}function GA(e,t,n){for(var r=(e.mode&1)!==0;J!==null;){var o=J,u=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Ja;if(!a){var c=o.alternate,f=c!==null&&c.memoizedState!==null||Nt;c=Ja;var d=Nt;if(Ja=a,(Nt=f)&&!d)for(J=o;J!==null;)a=J,f=a.child,a.tag===22&&a.memoizedState!==null?e1(o):f!==null?(f.return=a,J=f):e1(o);for(;u!==null;)J=u,GA(u),u=u.sibling;J=o,Ja=c,Nt=d}Xv(e)}else o.subtreeFlags&8772&&u!==null?(u.return=o,J=u):Xv(e)}}function Xv(e){for(;J!==null;){var t=J;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Nt||Sc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Nt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&Dv(t,u,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Dv(t,a,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&hu(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Nt||t.flags&512&&lp(t)}catch(g){Ze(t,t.return,g)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function Zv(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function e1(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Sc(4,t)}catch(f){Ze(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(f){Ze(t,o,f)}}var u=t.return;try{lp(t)}catch(f){Ze(t,u,f)}break;case 5:var a=t.return;try{lp(t)}catch(f){Ze(t,a,f)}}}catch(f){Ze(t,t.return,f)}if(t===e){J=null;break}var c=t.sibling;if(c!==null){c.return=t.return,J=c;break}J=t.return}}var _b=Math.ceil,Wl=Nr.ReactCurrentDispatcher,Am=Nr.ReactCurrentOwner,Fn=Nr.ReactCurrentBatchConfig,Ae=0,yt=null,ut=null,_t=0,pn=0,Fo=Ci(0),dt=0,Eu=null,Zi=0,Cc=0,Sm=0,nu=null,tn=null,Cm=0,ns=1/0,Ar=null,Ql=!1,dp=null,ai=null,Xa=!1,ni=null,Hl=0,ru=0,hp=null,ml=-1,gl=0;function Qt(){return Ae&6?it():ml!==-1?ml:ml=it()}function li(e){return e.mode&1?Ae&2&&_t!==0?_t&-_t:lb.transition!==null?(gl===0&&(gl=kx()),gl):(e=ke,e!==0||(e=window.event,e=e===void 0?16:Nx(e.type)),e):1}function Zn(e,t,n,r){if(50<ru)throw ru=0,hp=null,Error(Q(185));Mu(e,n,r),(!(Ae&2)||e!==yt)&&(e===yt&&(!(Ae&2)&&(Cc|=n),dt===4&&Zr(e,_t)),sn(e,r),n===1&&Ae===0&&!(t.mode&1)&&(ns=it()+500,wc&&Ei()))}function sn(e,t){var n=e.callbackNode;l4(e,t);var r=Rl(e,e===yt?_t:0);if(r===0)n!==null&&lv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&lv(n),t===1)e.tag===0?ab(t1.bind(null,e)):tA(t1.bind(null,e)),ib(function(){!(Ae&6)&&Ei()}),n=null;else{switch(Ox(r)){case 1:n=qp;break;case 4:n=Tx;break;case 16:n=Tl;break;case 536870912:n=Rx;break;default:n=Tl}n=eS(n,KA.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function KA(e,t){if(ml=-1,gl=0,Ae&6)throw Error(Q(327));var n=e.callbackNode;if(Ko()&&e.callbackNode!==n)return null;var r=Rl(e,e===yt?_t:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gl(e,r);else{t=r;var o=Ae;Ae|=2;var u=qA();(yt!==e||_t!==t)&&(Ar=null,ns=it()+500,$i(e,t));do try{kb();break}catch(c){$A(e,c)}while(1);am(),Wl.current=u,Ae=o,ut!==null?t=0:(yt=null,_t=0,t=dt)}if(t!==0){if(t===2&&(o=Uh(e),o!==0&&(r=o,t=pp(e,o))),t===1)throw n=Eu,$i(e,0),Zr(e,r),sn(e,it()),n;if(t===6)Zr(e,r);else{if(o=e.current.alternate,!(r&30)&&!Tb(o)&&(t=Gl(e,r),t===2&&(u=Uh(e),u!==0&&(r=u,t=pp(e,u))),t===1))throw n=Eu,$i(e,0),Zr(e,r),sn(e,it()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Vi(e,tn,Ar);break;case 3:if(Zr(e,r),(r&130023424)===r&&(t=Cm+500-it(),10<t)){if(Rl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Qt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=$h(Vi.bind(null,e,tn,Ar),t);break}Vi(e,tn,Ar);break;case 4:if(Zr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Xn(r);u=1<<a,a=t[a],a>o&&(o=a),r&=~u}if(r=o,r=it()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_b(r/1960))-r,10<r){e.timeoutHandle=$h(Vi.bind(null,e,tn,Ar),r);break}Vi(e,tn,Ar);break;case 5:Vi(e,tn,Ar);break;default:throw Error(Q(329))}}}return sn(e,it()),e.callbackNode===n?KA.bind(null,e):null}function pp(e,t){var n=nu;return e.current.memoizedState.isDehydrated&&($i(e,t).flags|=256),e=Gl(e,t),e!==2&&(t=tn,tn=n,t!==null&&mp(t)),e}function mp(e){tn===null?tn=e:tn.push.apply(tn,e)}function Tb(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 o=n[r],u=o.getSnapshot;o=o.value;try{if(!er(u(),o))return!1}catch(a){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 Zr(e,t){for(t&=~Sm,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xn(t),r=1<<n;e[n]=-1,t&=~r}}function t1(e){if(Ae&6)throw Error(Q(327));Ko();var t=Rl(e,0);if(!(t&1))return sn(e,it()),null;var n=Gl(e,t);if(e.tag!==0&&n===2){var r=Uh(e);r!==0&&(t=r,n=pp(e,r))}if(n===1)throw n=Eu,$i(e,0),Zr(e,t),sn(e,it()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vi(e,tn,Ar),sn(e,it()),null}function Em(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(ns=it()+500,wc&&Ei())}}function eo(e){ni!==null&&ni.tag===0&&!(Ae&6)&&Ko();var t=Ae;Ae|=1;var n=Fn.transition,r=ke;try{if(Fn.transition=null,ke=1,e)return e()}finally{ke=r,Fn.transition=n,Ae=t,!(Ae&6)&&Ei()}}function Pm(){pn=Fo.current,Ue(Fo)}function $i(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rb(n)),ut!==null)for(n=ut.return;n!==null;){var r=n;switch(om(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Il();break;case 3:es(),Ue(rn),Ue(Bt),pm();break;case 5:hm(r);break;case 4:es();break;case 13:Ue($e);break;case 19:Ue($e);break;case 10:lm(r.type._context);break;case 22:case 23:Pm()}n=n.return}if(yt=e,ut=e=ci(e.current,null),_t=pn=t,dt=0,Eu=null,Sm=Cc=Zi=0,tn=nu=null,Qi!==null){for(t=0;t<Qi.length;t++)if(n=Qi[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,u=n.pending;if(u!==null){var a=u.next;u.next=o,r.next=a}n.pending=r}Qi=null}return e}function $A(e,t){do{var n=ut;try{if(am(),dl.current=zl,jl){for(var r=Ye.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}jl=!1}if(Xi=0,gt=ft=Ye=null,eu=!1,Au=0,Am.current=null,n===null||n.return===null){dt=1,Eu=t,ut=null;break}e:{var u=e,a=n.return,c=n,f=t;if(t=_t,c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var d=f,p=c,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var w=zv(a);if(w!==null){w.flags&=-257,Wv(w,a,c,u,t),w.mode&1&&jv(u,d,t),t=w,f=d;var E=t.updateQueue;if(E===null){var P=new Set;P.add(f),t.updateQueue=P}else E.add(f);break e}else{if(!(t&1)){jv(u,d,t),_m();break e}f=Error(Q(426))}}else if(He&&c.mode&1){var k=zv(a);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Wv(k,a,c,u,t),sm(ts(f,c));break e}}u=f=ts(f,c),dt!==4&&(dt=2),nu===null?nu=[u]:nu.push(u),u=a;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var x=bA(u,f,t);Mv(u,x);break e;case 1:c=f;var A=u.type,C=u.stateNode;if(!(u.flags&128)&&(typeof A.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(ai===null||!ai.has(C)))){u.flags|=65536,t&=-t,u.lanes|=t;var T=LA(u,c,t);Mv(u,T);break e}}u=u.return}while(u!==null)}JA(n)}catch(L){t=L,ut===n&&n!==null&&(ut=n=n.return);continue}break}while(1)}function qA(){var e=Wl.current;return Wl.current=zl,e===null?zl:e}function _m(){(dt===0||dt===3||dt===2)&&(dt=4),yt===null||!(Zi&268435455)&&!(Cc&268435455)||Zr(yt,_t)}function Gl(e,t){var n=Ae;Ae|=2;var r=qA();(yt!==e||_t!==t)&&(Ar=null,$i(e,t));do try{Rb();break}catch(o){$A(e,o)}while(1);if(am(),Ae=n,Wl.current=r,ut!==null)throw Error(Q(261));return yt=null,_t=0,dt}function Rb(){for(;ut!==null;)YA(ut)}function kb(){for(;ut!==null&&!e4();)YA(ut)}function YA(e){var t=ZA(e.alternate,e,pn);e.memoizedProps=e.pendingProps,t===null?JA(e):ut=t,Am.current=null}function JA(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Sb(n,t),n!==null){n.flags&=32767,ut=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dt=6,ut=null;return}}else if(n=Ab(n,t,pn),n!==null){ut=n;return}if(t=t.sibling,t!==null){ut=t;return}ut=t=e}while(t!==null);dt===0&&(dt=5)}function Vi(e,t,n){var r=ke,o=Fn.transition;try{Fn.transition=null,ke=1,Ob(e,t,n,r)}finally{Fn.transition=o,ke=r}return null}function Ob(e,t,n,r){do Ko();while(ni!==null);if(Ae&6)throw Error(Q(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(c4(e,u),e===yt&&(ut=yt=null,_t=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Xa||(Xa=!0,eS(Tl,function(){return Ko(),null})),u=(n.flags&15990)!==0,n.subtreeFlags&15990||u){u=Fn.transition,Fn.transition=null;var a=ke;ke=1;var c=Ae;Ae|=4,Am.current=null,Eb(e,n),HA(n,e),Y4(Gh),kl=!!Hh,Gh=Hh=null,e.current=n,Pb(n),t4(),Ae=c,ke=a,Fn.transition=u}else e.current=n;if(Xa&&(Xa=!1,ni=e,Hl=o),u=e.pendingLanes,u===0&&(ai=null),i4(n.stateNode),sn(e,it()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ql)throw Ql=!1,e=dp,dp=null,e;return Hl&1&&e.tag!==0&&Ko(),u=e.pendingLanes,u&1?e===hp?ru++:(ru=0,hp=e):ru=0,Ei(),null}function Ko(){if(ni!==null){var e=Ox(Hl),t=Fn.transition,n=ke;try{if(Fn.transition=null,ke=16>e?16:e,ni===null)var r=!1;else{if(e=ni,ni=null,Hl=0,Ae&6)throw Error(Q(331));var o=Ae;for(Ae|=4,J=e.current;J!==null;){var u=J,a=u.child;if(J.flags&16){var c=u.deletions;if(c!==null){for(var f=0;f<c.length;f++){var d=c[f];for(J=d;J!==null;){var p=J;switch(p.tag){case 0:case 11:case 15:tu(8,p,u)}var m=p.child;if(m!==null)m.return=p,J=m;else for(;J!==null;){p=J;var g=p.sibling,w=p.return;if(zA(p),p===d){J=null;break}if(g!==null){g.return=w,J=g;break}J=w}}}var E=u.alternate;if(E!==null){var P=E.child;if(P!==null){E.child=null;do{var k=P.sibling;P.sibling=null,P=k}while(P!==null)}}J=u}}if(u.subtreeFlags&2064&&a!==null)a.return=u,J=a;else e:for(;J!==null;){if(u=J,u.flags&2048)switch(u.tag){case 0:case 11:case 15:tu(9,u,u.return)}var x=u.sibling;if(x!==null){x.return=u.return,J=x;break e}J=u.return}}var A=e.current;for(J=A;J!==null;){a=J;var C=a.child;if(a.subtreeFlags&2064&&C!==null)C.return=a,J=C;else e:for(a=A;J!==null;){if(c=J,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Sc(9,c)}}catch(L){Ze(c,c.return,L)}if(c===a){J=null;break e}var T=c.sibling;if(T!==null){T.return=c.return,J=T;break e}J=c.return}}if(Ae=o,Ei(),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(pc,e)}catch(L){}r=!0}return r}finally{ke=n,Fn.transition=t}}return!1}function n1(e,t,n){t=ts(n,t),t=bA(e,t,1),e=ui(e,t,1),t=Qt(),e!==null&&(Mu(e,1,t),sn(e,t))}function Ze(e,t,n){if(e.tag===3)n1(e,e,n);else for(;t!==null;){if(t.tag===3){n1(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=ts(n,e),e=LA(t,e,1),t=ui(t,e,1),e=Qt(),t!==null&&(Mu(t,1,e),sn(t,e));break}}t=t.return}}function bb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qt(),e.pingedLanes|=e.suspendedLanes&n,yt===e&&(_t&n)===n&&(dt===4||dt===3&&(_t&130023424)===_t&&500>it()-Cm?$i(e,0):Sm|=n),sn(e,t)}function XA(e,t){t===0&&(e.mode&1?(t=za,za<<=1,!(za&130023424)&&(za=4194304)):t=1);var n=Qt();e=br(e,t),e!==null&&(Mu(e,t,n),sn(e,n))}function Lb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),XA(e,n)}function Ib(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),XA(e,n)}var ZA;ZA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rn.current)nn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nn=!1,xb(e,t,n);nn=!!(e.flags&131072)}else nn=!1,He&&t.flags&1048576&&nA(t,Nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pl(e,t),e=t.pendingProps;var o=Jo(t,Bt.current);Go(t,n),o=gm(null,t,r,e,o,n);var u=ym();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(r)?(u=!0,Ml(t)):u=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,fm(t),o.updater=xc,t.stateNode=o,o._reactInternals=t,tp(t,r,e,n),t=ip(null,t,r,!0,u,n)):(t.tag=0,He&&u&&im(t),Wt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Db(r),e=Kn(r,e),o){case 0:t=rp(null,t,r,e,n);break e;case 1:t=Gv(null,t,r,e,n);break e;case 11:t=Qv(null,t,r,e,n);break e;case 14:t=Hv(null,t,r,Kn(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),rp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Gv(e,t,r,o,n);case 3:e:{if(NA(t),e===null)throw Error(Q(387));r=t.pendingProps,u=t.memoizedState,o=u.element,sA(e,t),Vl(t,r,null,n);var a=t.memoizedState;if(r=a.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){o=ts(Error(Q(423)),t),t=Kv(e,t,r,n,o);break e}else if(r!==o){o=ts(Error(Q(424)),t),t=Kv(e,t,r,n,o);break e}else for(mn=si(t.stateNode.containerInfo.firstChild),gn=t,He=!0,qn=null,n=cA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xo(),r===o){t=Lr(e,t,n);break e}Wt(e,t,r,n)}t=t.child}return t;case 5:return fA(t),e===null&&Xh(t),r=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Kh(r,o)?a=null:u!==null&&Kh(r,u)&&(t.flags|=32),DA(e,t),Wt(e,t,a,n),t.child;case 6:return e===null&&Xh(t),null;case 13:return FA(e,t,n);case 4:return dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zo(t,null,r,n):Wt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Qv(e,t,r,o,n);case 7:return Wt(e,t,t.pendingProps,n),t.child;case 8:return Wt(e,t,t.pendingProps.children,n),t.child;case 12:return Wt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,u=t.memoizedProps,a=o.value,Ne(Fl,r._currentValue),r._currentValue=a,u!==null)if(er(u.value,a)){if(u.children===o.children&&!rn.current){t=Lr(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var c=u.dependencies;if(c!==null){a=u.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(u.tag===1){f=_r(-1,n&-n),f.tag=2;var d=u.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?f.next=f:(f.next=p.next,p.next=f),d.pending=f}}u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),Zh(u.return,n,t),c.lanes|=n;break}f=f.next}}else if(u.tag===10)a=u.type===t.type?null:u.child;else if(u.tag===18){if(a=u.return,a===null)throw Error(Q(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Zh(a,n,t),a=u.sibling}else a=u.child;if(a!==null)a.return=u;else for(a=u;a!==null;){if(a===t){a=null;break}if(u=a.sibling,u!==null){u.return=a.return,a=u;break}a=a.return}u=a}Wt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Go(t,n),o=Bn(o),r=r(o),t.flags|=1,Wt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),Hv(e,t,r,o,n);case 15:return IA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),pl(e,t),t.tag=1,on(r)?(e=!0,Ml(t)):e=!1,Go(t,n),aA(t,r,o),tp(t,r,o,n),ip(null,t,r,!0,e,n);case 19:return BA(e,t,n);case 22:return MA(e,t,n)}throw Error(Q(156,t.tag))};function eS(e,t){return _x(e,t)}function Mb(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 Nn(e,t,n,r){return new Mb(e,t,n,r)}function Tm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Db(e){if(typeof e=="function")return Tm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gp)return 11;if(e===Kp)return 14}return 2}function ci(e,t){var n=e.alternate;return n===null?(n=Nn(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 yl(e,t,n,r,o,u){var a=2;if(r=e,typeof e=="function")Tm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case To:return qi(n.children,o,u,t);case Hp:a=8,o|=8;break;case Ph:return e=Nn(12,n,t,o|2),e.elementType=Ph,e.lanes=u,e;case _h:return e=Nn(13,n,t,o),e.elementType=_h,e.lanes=u,e;case Th:return e=Nn(19,n,t,o),e.elementType=Th,e.lanes=u,e;case lx:return Ec(n,o,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ux:a=10;break e;case ax:a=9;break e;case Gp:a=11;break e;case Kp:a=14;break e;case $r:a=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=Nn(a,n,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function qi(e,t,n,r){return e=Nn(7,e,r,t),e.lanes=n,e}function Ec(e,t,n,r){return e=Nn(22,e,r,t),e.elementType=lx,e.lanes=n,e.stateNode={isHidden:!1},e}function Zd(e,t,n){return e=Nn(6,e,null,t),e.lanes=n,e}function eh(e,t,n){return t=Nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Nb(e,t,n,r,o){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=Md(0),this.expirationTimes=Md(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Md(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rm(e,t,n,r,o,u,a,c,f){return e=new Nb(e,t,n,c,f),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Nn(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fm(u),e}function Fb(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_o,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tS(e){if(!e)return yi;e=e._reactInternals;e:{if(io(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(on(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(on(n))return eA(e,n,t)}return t}function nS(e,t,n,r,o,u,a,c,f){return e=Rm(n,r,!0,e,o,u,a,c,f),e.context=tS(null),n=e.current,r=Qt(),o=li(n),u=_r(r,o),u.callback=t!=null?t:null,ui(n,u,o),e.current.lanes=o,Mu(e,o,r),sn(e,r),e}function Pc(e,t,n,r){var o=t.current,u=Qt(),a=li(o);return n=tS(n),t.context===null?t.context=n:t.pendingContext=n,t=_r(u,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ui(o,t,a),e!==null&&(Zn(e,o,a,u),fl(e,o,a)),a}function Kl(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 r1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function km(e,t){r1(e,t),(e=e.alternate)&&r1(e,t)}function Bb(){return null}var rS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Om(e){this._internalRoot=e}_c.prototype.render=Om.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Pc(e,t,null,null)};_c.prototype.unmount=Om.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;eo(function(){Pc(null,e,null,null)}),t[Or]=null}};function _c(e){this._internalRoot=e}_c.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ix();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xr.length&&t!==0&&t<Xr[n].priority;n++);Xr.splice(n,0,e),n===0&&Dx(e)}};function bm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Tc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function i1(){}function Vb(e,t,n,r,o){if(o){if(typeof r=="function"){var u=r;r=function(){var d=Kl(a);u.call(d)}}var a=nS(t,r,e,0,null,!1,!1,"",i1);return e._reactRootContainer=a,e[Or]=a.current,gu(e.nodeType===8?e.parentNode:e),eo(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var c=r;r=function(){var d=Kl(f);c.call(d)}}var f=Rm(e,0,!1,null,null,!1,!1,"",i1);return e._reactRootContainer=f,e[Or]=f.current,gu(e.nodeType===8?e.parentNode:e),eo(function(){Pc(t,f,n,r)}),f}function Rc(e,t,n,r,o){var u=n._reactRootContainer;if(u){var a=u;if(typeof o=="function"){var c=o;o=function(){var f=Kl(a);c.call(f)}}Pc(t,a,e,o)}else a=Vb(n,t,e,o,r);return Kl(a)}bx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qs(t.pendingLanes);n!==0&&(Yp(t,n|1),sn(t,it()),!(Ae&6)&&(ns=it()+500,Ei()))}break;case 13:eo(function(){var r=br(e,1);if(r!==null){var o=Qt();Zn(r,e,1,o)}}),km(e,1)}};Jp=function(e){if(e.tag===13){var t=br(e,134217728);if(t!==null){var n=Qt();Zn(t,e,134217728,n)}km(e,134217728)}};Lx=function(e){if(e.tag===13){var t=li(e),n=br(e,t);if(n!==null){var r=Qt();Zn(n,e,t,r)}km(e,t)}};Ix=function(){return ke};Mx=function(e,t){var n=ke;try{return ke=e,t()}finally{ke=n}};Fh=function(e,t,n){switch(t){case"input":if(Oh(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 o=vc(r);if(!o)throw Error(Q(90));fx(r),Oh(r,o)}}}break;case"textarea":hx(e,n);break;case"select":t=n.value,t!=null&&zo(e,!!n.multiple,t,!1)}};xx=Em;Ax=eo;var Ub={usingClientEntryPoint:!1,Events:[Nu,bo,vc,vx,wx,Em]},Vs={findFiberByHostInstance:Wi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},jb={bundleType:Vs.bundleType,version:Vs.version,rendererPackageName:Vs.rendererPackageName,rendererConfig:Vs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ex(e),e===null?null:e.stateNode},findFiberByHostInstance:Vs.findFiberByHostInstance||Bb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Za=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Za.isDisabled&&Za.supportsFiber)try{pc=Za.inject(jb),ar=Za}catch(e){}}xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ub;xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bm(t))throw Error(Q(200));return Fb(e,t,null,n)};xn.createRoot=function(e,t){if(!bm(e))throw Error(Q(299));var n=!1,r="",o=rS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Rm(e,1,!1,null,null,n,!1,r,o),e[Or]=t.current,gu(e.nodeType===8?e.parentNode:e),new Om(t)};xn.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=Ex(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return eo(e)};xn.hydrate=function(e,t,n){if(!Tc(t))throw Error(Q(200));return Rc(null,e,t,!0,n)};xn.hydrateRoot=function(e,t,n){if(!bm(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,o=!1,u="",a=rS;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=nS(t,null,e,1,n!=null?n:null,o,!1,u,a),e[Or]=t.current,gu(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new _c(t)};xn.render=function(e,t,n){if(!Tc(t))throw Error(Q(200));return Rc(null,e,t,!1,n)};xn.unmountComponentAtNode=function(e){if(!Tc(e))throw Error(Q(40));return e._reactRootContainer?(eo(function(){Rc(null,null,e,!1,function(){e._reactRootContainer=null,e[Or]=null})}),!0):!1};xn.unstable_batchedUpdates=Em;xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Tc(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Rc(e,t,n,!1,r)};xn.version="18.2.0-next-9e3b772b8-20220608";function iS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iS)}catch(e){console.error(e)}}iS(),nx.exports=xn;var oS=nx.exports,o1=oS;Cl.createRoot=o1.createRoot,Cl.hydrateRoot=o1.hydrateRoot;var sS={exports:{}},kc={};/**
33
33
  * @license React
34
34
  * react-jsx-runtime.production.min.js
35
35
  *
@@ -37,7 +37,7 @@ Error generating stack: `+u.message+`
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var UL=B,jL=Symbol.for("react.element"),zL=Symbol.for("react.fragment"),WL=Object.prototype.hasOwnProperty,QL=UL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,HL={key:!0,ref:!0,__self:!0,__source:!0};function sS(e,t,n){var r,o={},u=null,a=null;n!==void 0&&(u=""+n),t.key!==void 0&&(u=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)WL.call(t,r)&&!HL.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:jL,type:e,key:u,ref:a,props:o,_owner:QL.current}}kc.Fragment=zL;kc.jsx=sS;kc.jsxs=sS;oS.exports=kc;var Lm=oS.exports;const Ir=Lm.Fragment,z=Lm.jsx,De=Lm.jsxs;var uS={exports:{}},aS={};/**
40
+ */var zb=B,Wb=Symbol.for("react.element"),Qb=Symbol.for("react.fragment"),Hb=Object.prototype.hasOwnProperty,Gb=zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kb={key:!0,ref:!0,__self:!0,__source:!0};function uS(e,t,n){var r,o={},u=null,a=null;n!==void 0&&(u=""+n),t.key!==void 0&&(u=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Hb.call(t,r)&&!Kb.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Wb,type:e,key:u,ref:a,props:o,_owner:Gb.current}}kc.Fragment=Qb;kc.jsx=uS;kc.jsxs=uS;sS.exports=kc;var Lm=sS.exports;const Ir=Lm.Fragment,z=Lm.jsx,be=Lm.jsxs;var aS={exports:{}},lS={};/**
41
41
  * @license React
42
42
  * use-sync-external-store-shim.production.min.js
43
43
  *
@@ -45,7 +45,7 @@ Error generating stack: `+u.message+`
45
45
  *
46
46
  * This source code is licensed under the MIT license found in the
47
47
  * LICENSE file in the root directory of this source tree.
48
- */var ns=B;function GL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KL=typeof Object.is=="function"?Object.is:GL,$L=ns.useState,qL=ns.useEffect,YL=ns.useLayoutEffect,JL=ns.useDebugValue;function XL(e,t){var n=t(),r=$L({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return YL(function(){o.value=n,o.getSnapshot=t,eh(o)&&u({inst:o})},[e,n,t]),qL(function(){return eh(o)&&u({inst:o}),e(function(){eh(o)&&u({inst:o})})},[e]),JL(n),n}function eh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!KL(e,n)}catch(r){return!0}}function ZL(e,t){return t()}var eb=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?ZL:XL;aS.useSyncExternalStore=ns.useSyncExternalStore!==void 0?ns.useSyncExternalStore:eb;uS.exports=aS;var lS=uS.exports,cS={exports:{}},fS={};/**
48
+ */var rs=B;function $b(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qb=typeof Object.is=="function"?Object.is:$b,Yb=rs.useState,Jb=rs.useEffect,Xb=rs.useLayoutEffect,Zb=rs.useDebugValue;function eL(e,t){var n=t(),r=Yb({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return Xb(function(){o.value=n,o.getSnapshot=t,th(o)&&u({inst:o})},[e,n,t]),Jb(function(){return th(o)&&u({inst:o}),e(function(){th(o)&&u({inst:o})})},[e]),Zb(n),n}function th(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qb(e,n)}catch(r){return!0}}function tL(e,t){return t()}var nL=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?tL:eL;lS.useSyncExternalStore=rs.useSyncExternalStore!==void 0?rs.useSyncExternalStore:nL;aS.exports=lS;var cS=aS.exports,fS={exports:{}},dS={};/**
49
49
  * @license React
50
50
  * use-sync-external-store-shim/with-selector.production.min.js
51
51
  *
@@ -53,14 +53,14 @@ Error generating stack: `+u.message+`
53
53
  *
54
54
  * This source code is licensed under the MIT license found in the
55
55
  * LICENSE file in the root directory of this source tree.
56
- */var Rc=B,tb=lS;function nb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rb=typeof Object.is=="function"?Object.is:nb,ib=tb.useSyncExternalStore,ob=Rc.useRef,sb=Rc.useEffect,ub=Rc.useMemo,ab=Rc.useDebugValue;fS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var u=ob(null);if(u.current===null){var a={hasValue:!1,value:null};u.current=a}else a=u.current;u=ub(function(){function f(x){if(!d){if(d=!0,p=x,x=r(x),o!==void 0&&a.hasValue){var E=a.value;if(o(E,x))return m=E}return m=x}if(E=m,rb(p,x))return E;var P=r(x);return o!==void 0&&o(E,P)?E:(p=x,m=P)}var d=!1,p,m,g=n===void 0?null:n;return[function(){return f(t())},g===null?void 0:function(){return f(g())}]},[t,n,r,o]);var c=ib(e,u[0],u[1]);return sb(function(){a.hasValue=!0,a.value=c},[c]),ab(c),c};cS.exports=fS;var lb=cS.exports;function cb(e){e()}let dS=cb;const fb=e=>dS=e,db=()=>dS,o1=Symbol.for("react-redux-context"),s1=typeof globalThis!="undefined"?globalThis:{};function hb(){var e;if(!B.createContext)return{};const t=(e=s1[o1])!=null?e:s1[o1]=new Map;let n=t.get(B.createContext);return n||(n=B.createContext(null),t.set(B.createContext,n)),n}const vi=hb();function bm(e=vi){return function(){return B.useContext(e)}}const hS=bm(),pb=()=>{throw new Error("uSES not initialized!")};let pS=pb;const mb=e=>{pS=e},gb=(e,t)=>e===t;function yb(e=vi){const t=e===vi?hS:bm(e);return function(r,o={}){const{equalityFn:u=gb,stabilityCheck:a=void 0,noopCheck:c=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:f,subscription:d,getServerState:p,stabilityCheck:m,noopCheck:g}=t();B.useRef(!0);const x=B.useCallback({[r.name](P){return r(P)}}[r.name],[r,m,a]),E=pS(d.addNestedSub,f.getState,p||f.getState,x,u);return B.useDebugValue(E),E}}const gn=yb();var mS={exports:{}},Oe={};/** @license React v16.13.1
56
+ */var Oc=B,rL=cS;function iL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oL=typeof Object.is=="function"?Object.is:iL,sL=rL.useSyncExternalStore,uL=Oc.useRef,aL=Oc.useEffect,lL=Oc.useMemo,cL=Oc.useDebugValue;dS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var u=uL(null);if(u.current===null){var a={hasValue:!1,value:null};u.current=a}else a=u.current;u=lL(function(){function f(w){if(!d){if(d=!0,p=w,w=r(w),o!==void 0&&a.hasValue){var E=a.value;if(o(E,w))return m=E}return m=w}if(E=m,oL(p,w))return E;var P=r(w);return o!==void 0&&o(E,P)?E:(p=w,m=P)}var d=!1,p,m,g=n===void 0?null:n;return[function(){return f(t())},g===null?void 0:function(){return f(g())}]},[t,n,r,o]);var c=sL(e,u[0],u[1]);return aL(function(){a.hasValue=!0,a.value=c},[c]),cL(c),c};fS.exports=dS;var fL=fS.exports;function dL(e){e()}let hS=dL;const hL=e=>hS=e,pL=()=>hS,s1=Symbol.for("react-redux-context"),u1=typeof globalThis!="undefined"?globalThis:{};function mL(){var e;if(!B.createContext)return{};const t=(e=u1[s1])!=null?e:u1[s1]=new Map;let n=t.get(B.createContext);return n||(n=B.createContext(null),t.set(B.createContext,n)),n}const vi=mL();function Im(e=vi){return function(){return B.useContext(e)}}const pS=Im(),gL=()=>{throw new Error("uSES not initialized!")};let mS=gL;const yL=e=>{mS=e},vL=(e,t)=>e===t;function wL(e=vi){const t=e===vi?pS:Im(e);return function(r,o={}){const{equalityFn:u=vL,stabilityCheck:a=void 0,noopCheck:c=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:f,subscription:d,getServerState:p,stabilityCheck:m,noopCheck:g}=t();B.useRef(!0);const w=B.useCallback({[r.name](P){return r(P)}}[r.name],[r,m,a]),E=mS(d.addNestedSub,f.getState,p||f.getState,w,u);return B.useDebugValue(E),E}}const Ht=wL();var gS={exports:{}},Oe={};/** @license React v16.13.1
57
57
  * react-is.production.min.js
58
58
  *
59
59
  * Copyright (c) Facebook, Inc. and its affiliates.
60
60
  *
61
61
  * This source code is licensed under the MIT license found in the
62
62
  * LICENSE file in the root directory of this source tree.
63
- */var vt=typeof Symbol=="function"&&Symbol.for,Im=vt?Symbol.for("react.element"):60103,Mm=vt?Symbol.for("react.portal"):60106,Oc=vt?Symbol.for("react.fragment"):60107,Lc=vt?Symbol.for("react.strict_mode"):60108,bc=vt?Symbol.for("react.profiler"):60114,Ic=vt?Symbol.for("react.provider"):60109,Mc=vt?Symbol.for("react.context"):60110,Dm=vt?Symbol.for("react.async_mode"):60111,Dc=vt?Symbol.for("react.concurrent_mode"):60111,Nc=vt?Symbol.for("react.forward_ref"):60112,Fc=vt?Symbol.for("react.suspense"):60113,vb=vt?Symbol.for("react.suspense_list"):60120,Bc=vt?Symbol.for("react.memo"):60115,Vc=vt?Symbol.for("react.lazy"):60116,wb=vt?Symbol.for("react.block"):60121,xb=vt?Symbol.for("react.fundamental"):60117,Ab=vt?Symbol.for("react.responder"):60118,Sb=vt?Symbol.for("react.scope"):60119;function Sn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Im:switch(e=e.type,e){case Dm:case Dc:case Oc:case bc:case Lc:case Fc:return e;default:switch(e=e&&e.$$typeof,e){case Mc:case Nc:case Vc:case Bc:case Ic:return e;default:return t}}case Mm:return t}}}function gS(e){return Sn(e)===Dc}Oe.AsyncMode=Dm;Oe.ConcurrentMode=Dc;Oe.ContextConsumer=Mc;Oe.ContextProvider=Ic;Oe.Element=Im;Oe.ForwardRef=Nc;Oe.Fragment=Oc;Oe.Lazy=Vc;Oe.Memo=Bc;Oe.Portal=Mm;Oe.Profiler=bc;Oe.StrictMode=Lc;Oe.Suspense=Fc;Oe.isAsyncMode=function(e){return gS(e)||Sn(e)===Dm};Oe.isConcurrentMode=gS;Oe.isContextConsumer=function(e){return Sn(e)===Mc};Oe.isContextProvider=function(e){return Sn(e)===Ic};Oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Im};Oe.isForwardRef=function(e){return Sn(e)===Nc};Oe.isFragment=function(e){return Sn(e)===Oc};Oe.isLazy=function(e){return Sn(e)===Vc};Oe.isMemo=function(e){return Sn(e)===Bc};Oe.isPortal=function(e){return Sn(e)===Mm};Oe.isProfiler=function(e){return Sn(e)===bc};Oe.isStrictMode=function(e){return Sn(e)===Lc};Oe.isSuspense=function(e){return Sn(e)===Fc};Oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Oc||e===Dc||e===bc||e===Lc||e===Fc||e===vb||typeof e=="object"&&e!==null&&(e.$$typeof===Vc||e.$$typeof===Bc||e.$$typeof===Ic||e.$$typeof===Mc||e.$$typeof===Nc||e.$$typeof===xb||e.$$typeof===Ab||e.$$typeof===Sb||e.$$typeof===wb)};Oe.typeOf=Sn;mS.exports=Oe;var Cb=mS.exports,yS=Cb,Eb={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Pb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vS={};vS[yS.ForwardRef]=Eb;vS[yS.Memo]=Pb;var Le={};/**
63
+ */var vt=typeof Symbol=="function"&&Symbol.for,Mm=vt?Symbol.for("react.element"):60103,Dm=vt?Symbol.for("react.portal"):60106,bc=vt?Symbol.for("react.fragment"):60107,Lc=vt?Symbol.for("react.strict_mode"):60108,Ic=vt?Symbol.for("react.profiler"):60114,Mc=vt?Symbol.for("react.provider"):60109,Dc=vt?Symbol.for("react.context"):60110,Nm=vt?Symbol.for("react.async_mode"):60111,Nc=vt?Symbol.for("react.concurrent_mode"):60111,Fc=vt?Symbol.for("react.forward_ref"):60112,Bc=vt?Symbol.for("react.suspense"):60113,xL=vt?Symbol.for("react.suspense_list"):60120,Vc=vt?Symbol.for("react.memo"):60115,Uc=vt?Symbol.for("react.lazy"):60116,AL=vt?Symbol.for("react.block"):60121,SL=vt?Symbol.for("react.fundamental"):60117,CL=vt?Symbol.for("react.responder"):60118,EL=vt?Symbol.for("react.scope"):60119;function Sn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Mm:switch(e=e.type,e){case Nm:case Nc:case bc:case Ic:case Lc:case Bc:return e;default:switch(e=e&&e.$$typeof,e){case Dc:case Fc:case Uc:case Vc:case Mc:return e;default:return t}}case Dm:return t}}}function yS(e){return Sn(e)===Nc}Oe.AsyncMode=Nm;Oe.ConcurrentMode=Nc;Oe.ContextConsumer=Dc;Oe.ContextProvider=Mc;Oe.Element=Mm;Oe.ForwardRef=Fc;Oe.Fragment=bc;Oe.Lazy=Uc;Oe.Memo=Vc;Oe.Portal=Dm;Oe.Profiler=Ic;Oe.StrictMode=Lc;Oe.Suspense=Bc;Oe.isAsyncMode=function(e){return yS(e)||Sn(e)===Nm};Oe.isConcurrentMode=yS;Oe.isContextConsumer=function(e){return Sn(e)===Dc};Oe.isContextProvider=function(e){return Sn(e)===Mc};Oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mm};Oe.isForwardRef=function(e){return Sn(e)===Fc};Oe.isFragment=function(e){return Sn(e)===bc};Oe.isLazy=function(e){return Sn(e)===Uc};Oe.isMemo=function(e){return Sn(e)===Vc};Oe.isPortal=function(e){return Sn(e)===Dm};Oe.isProfiler=function(e){return Sn(e)===Ic};Oe.isStrictMode=function(e){return Sn(e)===Lc};Oe.isSuspense=function(e){return Sn(e)===Bc};Oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bc||e===Nc||e===Ic||e===Lc||e===Bc||e===xL||typeof e=="object"&&e!==null&&(e.$$typeof===Uc||e.$$typeof===Vc||e.$$typeof===Mc||e.$$typeof===Dc||e.$$typeof===Fc||e.$$typeof===SL||e.$$typeof===CL||e.$$typeof===EL||e.$$typeof===AL)};Oe.typeOf=Sn;gS.exports=Oe;var PL=gS.exports,vS=PL,_L={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},TL={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},wS={};wS[vS.ForwardRef]=_L;wS[vS.Memo]=TL;var Le={};/**
64
64
  * @license React
65
65
  * react-is.production.min.js
66
66
  *
@@ -68,37 +68,36 @@ Error generating stack: `+u.message+`
68
68
  *
69
69
  * This source code is licensed under the MIT license found in the
70
70
  * LICENSE file in the root directory of this source tree.
71
- */var Nm=Symbol.for("react.element"),Fm=Symbol.for("react.portal"),Uc=Symbol.for("react.fragment"),jc=Symbol.for("react.strict_mode"),zc=Symbol.for("react.profiler"),Wc=Symbol.for("react.provider"),Qc=Symbol.for("react.context"),_b=Symbol.for("react.server_context"),Hc=Symbol.for("react.forward_ref"),Gc=Symbol.for("react.suspense"),Kc=Symbol.for("react.suspense_list"),$c=Symbol.for("react.memo"),qc=Symbol.for("react.lazy"),Tb=Symbol.for("react.offscreen"),wS;wS=Symbol.for("react.module.reference");function Un(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Nm:switch(e=e.type,e){case Uc:case zc:case jc:case Gc:case Kc:return e;default:switch(e=e&&e.$$typeof,e){case _b:case Qc:case Hc:case qc:case $c:case Wc:return e;default:return t}}case Fm:return t}}}Le.ContextConsumer=Qc;Le.ContextProvider=Wc;Le.Element=Nm;Le.ForwardRef=Hc;Le.Fragment=Uc;Le.Lazy=qc;Le.Memo=$c;Le.Portal=Fm;Le.Profiler=zc;Le.StrictMode=jc;Le.Suspense=Gc;Le.SuspenseList=Kc;Le.isAsyncMode=function(){return!1};Le.isConcurrentMode=function(){return!1};Le.isContextConsumer=function(e){return Un(e)===Qc};Le.isContextProvider=function(e){return Un(e)===Wc};Le.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nm};Le.isForwardRef=function(e){return Un(e)===Hc};Le.isFragment=function(e){return Un(e)===Uc};Le.isLazy=function(e){return Un(e)===qc};Le.isMemo=function(e){return Un(e)===$c};Le.isPortal=function(e){return Un(e)===Fm};Le.isProfiler=function(e){return Un(e)===zc};Le.isStrictMode=function(e){return Un(e)===jc};Le.isSuspense=function(e){return Un(e)===Gc};Le.isSuspenseList=function(e){return Un(e)===Kc};Le.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uc||e===zc||e===jc||e===Gc||e===Kc||e===Tb||typeof e=="object"&&e!==null&&(e.$$typeof===qc||e.$$typeof===$c||e.$$typeof===Wc||e.$$typeof===Qc||e.$$typeof===Hc||e.$$typeof===wS||e.getModuleId!==void 0)};Le.typeOf=Un;function kb(){const e=db();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,u=n={callback:r,next:null,prev:n};return u.prev?u.prev.next=u:t=u,function(){!o||t===null||(o=!1,u.next?u.next.prev=u.prev:n=u.prev,u.prev?u.prev.next=u.next:t=u.next)}}}}const u1={notify(){},get:()=>[]};function Rb(e,t){let n,r=u1,o=0,u=!1;function a(P){p();const R=r.subscribe(P);let w=!1;return()=>{w||(w=!0,R(),m())}}function c(){r.notify()}function f(){E.onStateChange&&E.onStateChange()}function d(){return u}function p(){o++,n||(n=t?t.addNestedSub(f):e.subscribe(f),r=kb())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=u1)}function g(){u||(u=!0,p())}function x(){u&&(u=!1,m())}const E={addNestedSub:a,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:d,trySubscribe:g,tryUnsubscribe:x,getListeners:()=>r};return E}const Ob=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",Lb=Ob?B.useLayoutEffect:B.useEffect;function xS({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:u="once"}){const a=B.useMemo(()=>{const d=Rb(e);return{store:e,subscription:d,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:u}},[e,r,o,u]),c=B.useMemo(()=>e.getState(),[e]);Lb(()=>{const{subscription:d}=a;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),c!==e.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[a,c]);const f=t||vi;return B.createElement(f.Provider,{value:a},n)}function AS(e=vi){const t=e===vi?hS:bm(e);return function(){const{store:r}=t();return r}}const bb=AS();function Ib(e=vi){const t=e===vi?bb:AS(e);return function(){return t().dispatch}}const io=Ib();mb(lb.useSyncExternalStoreWithSelector);fb(iS.unstable_batchedUpdates);const Mb=25,Db=30,Nb=30,Fb=15,Bb=-5,a1=-15,Vb=-1;function SS(e,t,n,r,o,u,a,c,f,d){let p=0;if(++f>=d)return[!1,p];if(n===e.length||r===t.length)return[!1,p];let m=!1,g=[],x=0,E=!0;for(;n<e.length&&r<t.length;){if(e[n].toLowerCase()===t[r].toLowerCase()){if(c>=a)return[!1,p];E&&o&&(u=[...o],E=!1);const R=[],[w,A]=SS(e,t,n,r+1,u,R,a,c,f,d);w&&((!m||A>x)&&(g=[...R],x=Number(A)),m=!0),u[c++]=r,++n}++r}const P=n===e.length;if(P){p=100;let R=Bb*u[0];R=R<a1?a1:R,p+=R;const w=t.length-c;p+=Vb*w;for(let A=0;A<c;A++){const C=u[A];if(A>0){const k=u[A-1];C==k+1&&(p+=Mb)}if(C>0){const k=t[C-1],b=t[C];k!==k.toUpperCase()&&b!==b.toLowerCase()&&(p+=Nb),(k=="_"||k==" ")&&(p+=Db)}else p+=Fb}return m&&(!P||x>p)?(u=[...g],p=x,[!0,p]):P?[!0,p]:[!1,p]}return[!1,p]}function CS(e,t){return SS(e,t,0,0,null,[],256,0,0,10)}function Ub(e,t){if(!CS(t,e)[0])return e;if(e.indexOf(t)==0){const a=e.split(t)[1];return"<mark>"+t+"</mark>"+a}let n="";const r=e,o=e.length;e=e.toLowerCase(),t=t.toLowerCase();let u=0;e:for(let a=0;a<t.length;a++){const c=t.charCodeAt(a);for(;u<o;){if(e.charCodeAt(u)===c){const f=r.charAt(u);f===f.toLowerCase()?n+="<mark>"+t.charAt(a)+"</mark>":n+="<mark>"+t.charAt(a).toUpperCase()+"</mark>",u++;continue e}n+=r.charAt(u),u++}return r}return n+=r.slice(u),n}const ES=e=>({logo_img:"",getSearchContext:t=>ct(Ft,null,function*(){var n;if((e==null?void 0:e.type)=="public"){const r=yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.assistant_api.get_chatnext_assistant_public_trigger_list").then(a=>a.json()),o=((n=r==null?void 0:r.message)==null?void 0:n.map(a=>({label:(a==null?void 0:a.name_of_action)||"",funnel_defination_id:(a==null?void 0:a.name)||""})))||[],u=[];return o.forEach((a,c)=>{const f=(a==null?void 0:a.label)||"",d=t?CS(t,window.__(f))[1]:1;d&&u.push({type:"Assistant",label:t?window.__(Ub(f,t)):f,value:t?window.__(f):f,index:t?d+.5:c+.5,match:f,funnel_defination_id:a.funnel_defination_id})}),{results:u}}return{results:[]}}),handleRouteClick:t=>{console.log(t)},getChatContextRoute:()=>"",isPublicApp:!1,isPublicTrigger:!1}),ls=B.createContext(ES({})),PS=({children:e,propsData:t})=>{const n=F(q(F({},ES(t)),{isPublicApp:(t==null?void 0:t.type)==="public",isPublicTrigger:(t==null?void 0:t.trigger)==="public"}),t);return z(ls.Provider,{value:n,children:e})};function Yn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function wi(e){return!!e&&!!e[Qe]}function Mr(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===qb}(e)||Array.isArray(e)||!!e[m1]||!!(!((t=e.constructor)===null||t===void 0)&&t[m1])||Bm(e)||Vm(e))}function eo(e,t,n){n===void 0&&(n=!1),cs(e)===0?(n?Object.keys:$o)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function cs(e){var t=e[Qe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Bm(e)?2:Vm(e)?3:0}function Ko(e,t){return cs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jb(e,t){return cs(e)===2?e.get(t):e[t]}function _S(e,t,n){var r=cs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function TS(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Bm(e){return Kb&&e instanceof Map}function Vm(e){return $b&&e instanceof Set}function Vi(e){return e.o||e.t}function Um(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=RS(e);delete t[Qe];for(var n=$o(t),r=0;r<n.length;r++){var o=n[r],u=t[o];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(t[o]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function jm(e,t){return t===void 0&&(t=!1),zm(e)||wi(e)||!Mr(e)||(cs(e)>1&&(e.set=e.add=e.clear=e.delete=zb),Object.freeze(e),t&&eo(e,function(n,r){return jm(r,!0)},!0)),e}function zb(){Yn(2)}function zm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function cr(e){var t=yp[e];return t||Yn(18,e),t}function Wb(e,t){yp[e]||(yp[e]=t)}function pp(){return Eu}function th(e,t){t&&(cr("Patches"),e.u=[],e.s=[],e.v=t)}function Kl(e){mp(e),e.p.forEach(Qb),e.p=null}function mp(e){e===Eu&&(Eu=e.l)}function l1(e){return Eu={p:[],l:Eu,h:e,m:!0,_:0}}function Qb(e){var t=e[Qe];t.i===0||t.i===1?t.j():t.g=!0}function nh(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||cr("ES5").S(t,e,r),r?(n[Qe].P&&(Kl(t),Yn(4)),Mr(e)&&(e=$l(t,e),t.l||ql(t,e)),t.u&&cr("Patches").M(n[Qe].t,e,t.u,t.s)):e=$l(t,n,[]),Kl(t),t.u&&t.v(t.u,t.s),e!==kS?e:void 0}function $l(e,t,n){if(zm(t))return t;var r=t[Qe];if(!r)return eo(t,function(c,f){return c1(e,r,t,c,f,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ql(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Um(r.k):r.o,u=o,a=!1;r.i===3&&(u=new Set(o),o.clear(),a=!0),eo(u,function(c,f){return c1(e,r,o,c,f,n,a)}),ql(e,o,!1),n&&e.u&&cr("Patches").N(r,n,e.u,e.s)}return r.o}function c1(e,t,n,r,o,u,a){if(wi(o)){var c=$l(e,o,u&&t&&t.i!==3&&!Ko(t.R,r)?u.concat(r):void 0);if(_S(n,r,c),!wi(c))return;e.m=!1}else a&&n.add(o);if(Mr(o)&&!zm(o)){if(!e.h.D&&e._<1)return;$l(e,o),t&&t.A.l||ql(e,o)}}function ql(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&jm(t,n)}function rh(e,t){var n=e[Qe];return(n?Vi(n):e)[t]}function f1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ei(e){e.P||(e.P=!0,e.l&&ei(e.l))}function ih(e){e.o||(e.o=Um(e.t))}function gp(e,t,n){var r=Bm(t)?cr("MapSet").F(t,n):Vm(t)?cr("MapSet").T(t,n):e.O?function(o,u){var a=Array.isArray(o),c={i:a?1:0,A:u?u.A:pp(),P:!1,I:!1,R:{},l:u,t:o,k:null,o:null,j:null,C:!1},f=c,d=Pu;a&&(f=[c],d=Hs);var p=Proxy.revocable(f,d),m=p.revoke,g=p.proxy;return c.k=g,c.j=m,g}(t,n):cr("ES5").J(t,n);return(n?n.A:pp()).p.push(r),r}function Hb(e){return wi(e)||Yn(22,e),function t(n){if(!Mr(n))return n;var r,o=n[Qe],u=cs(n);if(o){if(!o.P&&(o.i<4||!cr("ES5").K(o)))return o.t;o.I=!0,r=d1(n,u),o.I=!1}else r=d1(n,u);return eo(r,function(a,c){o&&jb(o.t,a)===c||_S(r,a,t(c))}),u===3?new Set(r):r}(e)}function d1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Um(e)}function Gb(){function e(u,a){var c=o[u];return c?c.enumerable=a:o[u]=c={configurable:!0,enumerable:a,get:function(){var f=this[Qe];return Pu.get(f,u)},set:function(f){var d=this[Qe];Pu.set(d,u,f)}},c}function t(u){for(var a=u.length-1;a>=0;a--){var c=u[a][Qe];if(!c.P)switch(c.i){case 5:r(c)&&ei(c);break;case 4:n(c)&&ei(c)}}}function n(u){for(var a=u.t,c=u.k,f=$o(c),d=f.length-1;d>=0;d--){var p=f[d];if(p!==Qe){var m=a[p];if(m===void 0&&!Ko(a,p))return!0;var g=c[p],x=g&&g[Qe];if(x?x.t!==m:!TS(g,m))return!0}}var E=!!a[Qe];return f.length!==$o(a).length+(E?0:1)}function r(u){var a=u.k;if(a.length!==u.t.length)return!0;var c=Object.getOwnPropertyDescriptor(a,a.length-1);if(c&&!c.get)return!0;for(var f=0;f<a.length;f++)if(!a.hasOwnProperty(f))return!0;return!1}var o={};Wb("ES5",{J:function(u,a){var c=Array.isArray(u),f=function(p,m){if(p){for(var g=Array(m.length),x=0;x<m.length;x++)Object.defineProperty(g,""+x,e(x,!0));return g}var E=RS(m);delete E[Qe];for(var P=$o(E),R=0;R<P.length;R++){var w=P[R];E[w]=e(w,p||!!E[w].enumerable)}return Object.create(Object.getPrototypeOf(m),E)}(c,u),d={i:c?5:4,A:a?a.A:pp(),P:!1,I:!1,R:{},l:a,t:u,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,Qe,{value:d,writable:!0}),f},S:function(u,a,c){c?wi(a)&&a[Qe].A===u&&t(u.p):(u.u&&function f(d){if(d&&typeof d=="object"){var p=d[Qe];if(p){var m=p.t,g=p.k,x=p.R,E=p.i;if(E===4)eo(g,function(C){C!==Qe&&(m[C]!==void 0||Ko(m,C)?x[C]||f(g[C]):(x[C]=!0,ei(p)))}),eo(m,function(C){g[C]!==void 0||Ko(g,C)||(x[C]=!1,ei(p))});else if(E===5){if(r(p)&&(ei(p),x.length=!0),g.length<m.length)for(var P=g.length;P<m.length;P++)x[P]=!1;else for(var R=m.length;R<g.length;R++)x[R]=!0;for(var w=Math.min(g.length,m.length),A=0;A<w;A++)g.hasOwnProperty(A)||(x[A]=!0),x[A]===void 0&&f(g[A])}}}}(u.p[0]),t(u.p))},K:function(u){return u.i===4?n(u):r(u)}})}var h1,Eu,Wm=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",Kb=typeof Map!="undefined",$b=typeof Set!="undefined",p1=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",kS=Wm?Symbol.for("immer-nothing"):((h1={})["immer-nothing"]=!0,h1),m1=Wm?Symbol.for("immer-draftable"):"__$immer_draftable",Qe=Wm?Symbol.for("immer-state"):"__$immer_state",qb=""+Object.prototype.constructor,$o=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,RS=Object.getOwnPropertyDescriptors||function(e){var t={};return $o(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},yp={},Pu={get:function(e,t){if(t===Qe)return e;var n=Vi(e);if(!Ko(n,t))return function(o,u,a){var c,f=f1(u,a);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Mr(r)?r:r===rh(e.t,t)?(ih(e),e.o[t]=gp(e.A.h,r,e)):r},has:function(e,t){return t in Vi(e)},ownKeys:function(e){return Reflect.ownKeys(Vi(e))},set:function(e,t,n){var r=f1(Vi(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=rh(Vi(e),t),u=o==null?void 0:o[Qe];if(u&&u.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(TS(n,o)&&(n!==void 0||Ko(e.t,t)))return!0;ih(e),ei(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return rh(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ih(e),ei(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Vi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Yn(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Yn(12)}},Hs={};eo(Pu,function(e,t){Hs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Hs.deleteProperty=function(e,t){return Hs.set.call(this,e,t,void 0)},Hs.set=function(e,t,n){return Pu.set.call(this,e[0],t,n,e[0])};var Yb=function(){function e(n){var r=this;this.O=p1,this.D=!0,this.produce=function(o,u,a){if(typeof o=="function"&&typeof u!="function"){var c=u;u=o;var f=r;return function(P){var R=this;P===void 0&&(P=c);for(var w=arguments.length,A=Array(w>1?w-1:0),C=1;C<w;C++)A[C-1]=arguments[C];return f.produce(P,function(k){var b;return(b=u).call.apply(b,[R,k].concat(A))})}}var d;if(typeof u!="function"&&Yn(6),a!==void 0&&typeof a!="function"&&Yn(7),Mr(o)){var p=l1(r),m=gp(r,o,void 0),g=!0;try{d=u(m),g=!1}finally{g?Kl(p):mp(p)}return typeof Promise!="undefined"&&d instanceof Promise?d.then(function(P){return th(p,a),nh(P,p)},function(P){throw Kl(p),P}):(th(p,a),nh(d,p))}if(!o||typeof o!="object"){if((d=u(o))===void 0&&(d=o),d===kS&&(d=void 0),r.D&&jm(d,!0),a){var x=[],E=[];cr("Patches").M(o,d,x,E),a(x,E)}return d}Yn(21,o)},this.produceWithPatches=function(o,u){if(typeof o=="function")return function(d){for(var p=arguments.length,m=Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];return r.produceWithPatches(d,function(x){return o.apply(void 0,[x].concat(m))})};var a,c,f=r.produce(o,u,function(d,p){a=d,c=p});return typeof Promise!="undefined"&&f instanceof Promise?f.then(function(d){return[d,a,c]}):[f,a,c]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Mr(n)||Yn(8),wi(n)&&(n=Hb(n));var r=l1(this),o=gp(this,n,void 0);return o[Qe].C=!0,mp(r),o},t.finishDraft=function(n,r){var o=n&&n[Qe],u=o.A;return th(u,r),nh(void 0,u)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!p1&&Yn(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var u=r[o];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}o>-1&&(r=r.slice(o+1));var a=cr("Patches").$;return wi(n)?a(n,r):this.produce(n,function(c){return a(c,r)})},e}(),vn=new Yb,OS=vn.produce;vn.produceWithPatches.bind(vn);vn.setAutoFreeze.bind(vn);vn.setUseProxies.bind(vn);vn.applyPatches.bind(vn);vn.createDraft.bind(vn);vn.finishDraft.bind(vn);function _u(e){"@babel/helpers - typeof";return _u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_u(e)}function Jb(e,t){if(_u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xb(e){var t=Jb(e,"string");return _u(t)=="symbol"?t:String(t)}function Zb(e,t,n){return t=Xb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function y1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(n),!0).forEach(function(r){Zb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var v1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),oh=function(){return Math.random().toString(36).substring(7).split("").join(".")},Yl={INIT:"@@redux/INIT"+oh(),REPLACE:"@@redux/REPLACE"+oh(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+oh()}};function eI(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function LS(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Mt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Mt(1));return n(LS)(e,t)}if(typeof e!="function")throw new Error(Mt(2));var o=e,u=t,a=[],c=a,f=!1;function d(){c===a&&(c=a.slice())}function p(){if(f)throw new Error(Mt(3));return u}function m(P){if(typeof P!="function")throw new Error(Mt(4));if(f)throw new Error(Mt(5));var R=!0;return d(),c.push(P),function(){if(R){if(f)throw new Error(Mt(6));R=!1,d();var A=c.indexOf(P);c.splice(A,1),a=null}}}function g(P){if(!eI(P))throw new Error(Mt(7));if(typeof P.type=="undefined")throw new Error(Mt(8));if(f)throw new Error(Mt(9));try{f=!0,u=o(u,P)}finally{f=!1}for(var R=a=c,w=0;w<R.length;w++){var A=R[w];A()}return P}function x(P){if(typeof P!="function")throw new Error(Mt(10));o=P,g({type:Yl.REPLACE})}function E(){var P,R=m;return P={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(Mt(11));function C(){A.next&&A.next(p())}C();var k=R(C);return{unsubscribe:k}}},P[v1]=function(){return this},P}return g({type:Yl.INIT}),r={dispatch:g,subscribe:m,getState:p,replaceReducer:x},r[v1]=E,r}function tI(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Yl.INIT});if(typeof r=="undefined")throw new Error(Mt(12));if(typeof n(void 0,{type:Yl.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Mt(13))})}function nI(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var u=Object.keys(n),a;try{tI(n)}catch(c){a=c}return function(f,d){if(f===void 0&&(f={}),a)throw a;for(var p=!1,m={},g=0;g<u.length;g++){var x=u[g],E=n[x],P=f[x],R=E(P,d);if(typeof R=="undefined")throw d&&d.type,new Error(Mt(14));m[x]=R,p=p||R!==P}return p=p||u.length!==Object.keys(f).length,p?m:f}}function Jl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function rI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),u=function(){throw new Error(Mt(15))},a={getState:o.getState,dispatch:function(){return u.apply(void 0,arguments)}},c=t.map(function(f){return f(a)});return u=Jl.apply(void 0,c)(o.dispatch),y1(y1({},o),{},{dispatch:u})}}}function bS(e){var t=function(r){var o=r.dispatch,u=r.getState;return function(a){return function(c){return typeof c=="function"?c(o,u,e):a(c)}}};return t}var IS=bS();IS.withExtraArgument=bS;const w1=IS;var MS=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),iI=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,o,u,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(d){return function(p){return f([d,p])}}function f(d){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(u=d[0]&2?o.return:d[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,d[1])).done)return u;switch(o=0,u&&(d=[d[0]&2,u.value]),d[0]){case 0:case 1:u=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]<u[3])){n.label=d[1];break}if(d[0]===6&&n.label<u[1]){n.label=u[1],u=d;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(d);break}u[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(p){d=[6,p],o=0}finally{r=u=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},rs=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},oI=Object.defineProperty,sI=Object.defineProperties,uI=Object.getOwnPropertyDescriptors,x1=Object.getOwnPropertySymbols,aI=Object.prototype.hasOwnProperty,lI=Object.prototype.propertyIsEnumerable,A1=function(e,t,n){return t in e?oI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fi=function(e,t){for(var n in t||(t={}))aI.call(t,n)&&A1(e,n,t[n]);if(x1)for(var r=0,o=x1(t);r<o.length;r++){var n=o[r];lI.call(t,n)&&A1(e,n,t[n])}return e},sh=function(e,t){return sI(e,uI(t))},cI=function(e,t,n){return new Promise(function(r,o){var u=function(f){try{c(n.next(f))}catch(d){o(d)}},a=function(f){try{c(n.throw(f))}catch(d){o(d)}},c=function(f){return f.done?r(f.value):Promise.resolve(f.value).then(u,a)};c((n=n.apply(e,t)).next())})},fI=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jl:Jl.apply(null,arguments)};function dI(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function di(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var u=t.apply(void 0,r);if(!u)throw new Error("prepareAction did not return an object");return fi(fi({type:e,payload:u.payload},"meta"in u&&{meta:u.meta}),"error"in u&&{error:u.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}var hI=function(e){MS(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,rs([void 0],n[0].concat(this)))):new(t.bind.apply(t,rs([void 0],n.concat(this))))},t}(Array),pI=function(e){MS(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,rs([void 0],n[0].concat(this)))):new(t.bind.apply(t,rs([void 0],n.concat(this))))},t}(Array);function vp(e){return Mr(e)?OS(e,function(){}):e}function mI(e){return typeof e=="boolean"}function gI(){return function(t){return yI(t)}}function yI(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck,e.actionCreatorCheck;var r=new hI;return n&&(mI(n)?r.push(w1):r.push(w1.withExtraArgument(n.extraArgument))),r}var vI=!0;function wI(e){var t=gI(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,u=n.middleware,a=u===void 0?t():u,c=n.devTools,f=c===void 0?!0:c,d=n.preloadedState,p=d===void 0?void 0:d,m=n.enhancers,g=m===void 0?void 0:m,x;if(typeof o=="function")x=o;else if(dI(o))x=nI(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=a;typeof E=="function"&&(E=E(t));var P=rI.apply(void 0,E),R=Jl;f&&(R=fI(fi({trace:!vI},typeof f=="object"&&f)));var w=new pI(P),A=w;Array.isArray(g)?A=rs([P],g):typeof g=="function"&&(A=g(w));var C=R.apply(void 0,A);return LS(x,p,C)}function DS(e){var t={},n=[],r,o={addCase:function(u,a){var c=typeof u=="string"?u:u.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[c]=a,o},addMatcher:function(u,a){return n.push({matcher:u,reducer:a}),o},addDefaultCase:function(u){return r=u,o}};return e(o),[t,n,r]}function xI(e){return typeof e=="function"}function AI(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?DS(t):[t,n,r],u=o[0],a=o[1],c=o[2],f;if(xI(e))f=function(){return vp(e())};else{var d=vp(e);f=function(){return d}}function p(m,g){m===void 0&&(m=f());var x=rs([u[g.type]],a.filter(function(E){var P=E.matcher;return P(g)}).map(function(E){var P=E.reducer;return P}));return x.filter(function(E){return!!E}).length===0&&(x=[c]),x.reduce(function(E,P){if(P)if(wi(E)){var R=E,w=P(R,g);return w===void 0?E:w}else{if(Mr(E))return OS(E,function(A){return P(A,g)});var w=P(E,g);if(w===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return E},m)}return p.getInitialState=f,p}function SI(e,t){return e+"/"+t}function Yc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n=typeof e.initialState=="function"?e.initialState:vp(e.initialState),r=e.reducers||{},o=Object.keys(r),u={},a={},c={};o.forEach(function(p){var m=r[p],g=SI(t,p),x,E;"reducer"in m?(x=m.reducer,E=m.prepare):x=m,u[p]=x,a[g]=x,c[p]=E?di(g,E):di(g)});function f(){var p=typeof e.extraReducers=="function"?DS(e.extraReducers):[e.extraReducers],m=p[0],g=m===void 0?{}:m,x=p[1],E=x===void 0?[]:x,P=p[2],R=P===void 0?void 0:P,w=fi(fi({},g),a);return AI(n,function(A){for(var C in w)A.addCase(C,w[C]);for(var k=0,b=E;k<b.length;k++){var I=b[k];A.addMatcher(I.matcher,I.reducer)}R&&A.addDefaultCase(R)})}var d;return{name:t,reducer:function(p,m){return d||(d=f()),d(p,m)},actions:c,caseReducers:u,getInitialState:function(){return d||(d=f()),d.getInitialState()}}}var CI="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",EI=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=CI[Math.random()*64|0];return t},PI=["name","message","stack","code"],uh=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),S1=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),_I=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=PI;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}};(function(){function e(t,n,r){var o=di(t+"/fulfilled",function(d,p,m,g){return{payload:d,meta:sh(fi({},g||{}),{arg:m,requestId:p,requestStatus:"fulfilled"})}}),u=di(t+"/pending",function(d,p,m){return{payload:void 0,meta:sh(fi({},m||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),a=di(t+"/rejected",function(d,p,m,g,x){return{payload:g,error:(r&&r.serializeError||_I)(d||"Rejected"),meta:sh(fi({},x||{}),{arg:m,requestId:p,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(d==null?void 0:d.name)==="AbortError",condition:(d==null?void 0:d.name)==="ConditionError"})}}),c=typeof AbortController!="undefined"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function f(d){return function(p,m,g){var x=r!=null&&r.idGenerator?r.idGenerator(d):EI(),E=new c,P;function R(A){P=A,E.abort()}var w=function(){return cI(this,null,function(){var A,C,k,b,I,N,D;return iI(this,function($){switch($.label){case 0:return $.trys.push([0,4,,5]),b=(A=r==null?void 0:r.condition)==null?void 0:A.call(r,d,{getState:m,extra:g}),kI(b)?[4,b]:[3,2];case 1:b=$.sent(),$.label=2;case 2:if(b===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=new Promise(function(G,le){return E.signal.addEventListener("abort",function(){return le({name:"AbortError",message:P||"Aborted"})})}),p(u(x,d,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:x,arg:d},{getState:m,extra:g}))),[4,Promise.race([I,Promise.resolve(n(d,{dispatch:p,getState:m,extra:g,requestId:x,signal:E.signal,abort:R,rejectWithValue:function(G,le){return new uh(G,le)},fulfillWithValue:function(G,le){return new S1(G,le)}})).then(function(G){if(G instanceof uh)throw G;return G instanceof S1?o(G.payload,x,d,G.meta):o(G,x,d)})])];case 3:return k=$.sent(),[3,5];case 4:return N=$.sent(),k=N instanceof uh?a(null,x,d,N.payload,N.meta):a(N,x,d),[3,5];case 5:return D=r&&!r.dispatchConditionRejection&&a.match(k)&&k.meta.condition,D||p(k),[2,k]}})})}();return Object.assign(w,{abort:R,requestId:x,arg:d,unwrap:function(){return w.then(TI)}})}}return Object.assign(f,{pending:u,rejected:a,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e})();function TI(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kI(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Qm="listenerMiddleware";di(Qm+"/add");di(Qm+"/removeAll");di(Qm+"/remove");var C1;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window!="undefined"?window:typeof global!="undefined"?global:globalThis);Gb();const RI={isOpen:!1,isOpenPop:!1,isPinned:!1},NS=Yc({name:"chatButton",initialState:RI,reducers:{openModal:e=>{e.isOpen=!0},closeModal:e=>{e.isOpen=!1},toggleModal:e=>{e.isOpen=!e.isOpen},openPopup:e=>{e.isOpenPop=!0},closePopup:e=>{e.isOpenPop=!1},togglePinned:e=>{e.isPinned=!e.isPinned},togglePopup:e=>{e.isOpenPop=!e.isOpenPop}}}),{openModal:yl,closeModal:Hm,toggleModal:P8,openPopup:FS,closePopup:Zt,togglePopup:_8,togglePinned:OI}=NS.actions,LI=NS.reducer,E1=[],BS=Yc({name:"chatArray",initialState:E1,reducers:{addNewMessage:(e,t)=>{e.push(t.payload)},resetSession:()=>E1,updateChats:(e,t)=>[...t.payload]}}),{addNewMessage:T8,resetSession:bI,updateChats:VS}=BS.actions,II=BS.reducer,MI={isLoading:!1},DI=Yc({name:"loader",initialState:MI,reducers:{enableLoading:e=>{e.isLoading=!0},disableLoading:e=>{e.isLoading=!1}}}),NI=DI.reducer,FI={user:"",isAuthenticated:!1,session_id:""},US=Yc({name:"user",initialState:FI,reducers:{loginUser:(e,t)=>{e.user=t.payload},authUser:(e,t)=>{e.isAuthenticated=t.payload},setSessionId:(e,t)=>q(F({},e),{session_id:t.payload})}}),{loginUser:k8,authUser:vl,setSessionId:Tu}=US.actions,BI=US.reducer,jS=wI({reducer:{chatButton:LI,chatArray:II,loading:NI,user:BI}}),VI=e=>B.createElement("svg",F({width:32,height:28,viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.createElement("path",{d:"M19.3333 2H14C7.37258 2 2 7.37258 2 14V14C2 20.6274 7.39979 26 14.0272 26V26H19.3333",stroke:"white",strokeWidth:3,strokeLinecap:"round"}),B.createElement("rect",{x:8.83334,y:8.16669,width:21.6667,height:11.6667,rx:5.83333,fill:"#0038FF",stroke:"white",strokeWidth:3}),B.createElement("path",{d:"M22 20.0637V18.1667C22 18.0746 22.0746 18 22.1667 18H25.9607C26.1365 18 26.1925 18.2371 26.0352 18.3157L22.2412 20.2127C22.1304 20.2681 22 20.1876 22 20.0637Z",fill:"#0038FF"}),B.createElement("circle",{cx:16,cy:14,r:2,fill:"white"}),B.createElement("circle",{cx:23.3333,cy:14,r:2,fill:"white"})),UI=()=>{const e=gn(r=>r.chatButton.isOpenPop),t=io();return De("div",{className:`tw-fixed sm:!tw-bottom-7 tw-bottom-14 tw-right-[30px] tw-m-0 tw-cursor-pointer tw-w-[60px] tw-h-[60px] tw-z-[10] tw-flex-col tw-items-center tw-justify-center tw-rounded-full tw-p-2 tw-bg-blue-700 tw-text-white ${e?"tw-hidden":"tw-flex"}`,onClick:r=>{r.stopPropagation(),t(e?Zt():FS())},children:[z("div",{className:`tw-flex tw-h-full tw-w-full tw-transform tw-items-center tw-justify-center tw-rounded-full tw-transition-all tw-delay-75 tw-duration-100 tw-ease-in-out
72
- ${e?"tw-mb-2 tw-rotate-90 tw-bg-opacity-10":"tw-rotate-0"}`,children:z("span",{className:"btn-open-popup__icon tw-w-9 tw-h-9 tw-flex tw-items-center tw-justify-center tw-text-center tw-text-4xl",children:z(VI,{})})}),z("span",{className:`tw-rounded-md tw-bg-white tw-bg-opacity-10
71
+ */var Fm=Symbol.for("react.element"),Bm=Symbol.for("react.portal"),jc=Symbol.for("react.fragment"),zc=Symbol.for("react.strict_mode"),Wc=Symbol.for("react.profiler"),Qc=Symbol.for("react.provider"),Hc=Symbol.for("react.context"),RL=Symbol.for("react.server_context"),Gc=Symbol.for("react.forward_ref"),Kc=Symbol.for("react.suspense"),$c=Symbol.for("react.suspense_list"),qc=Symbol.for("react.memo"),Yc=Symbol.for("react.lazy"),kL=Symbol.for("react.offscreen"),xS;xS=Symbol.for("react.module.reference");function Un(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fm:switch(e=e.type,e){case jc:case Wc:case zc:case Kc:case $c:return e;default:switch(e=e&&e.$$typeof,e){case RL:case Hc:case Gc:case Yc:case qc:case Qc:return e;default:return t}}case Bm:return t}}}Le.ContextConsumer=Hc;Le.ContextProvider=Qc;Le.Element=Fm;Le.ForwardRef=Gc;Le.Fragment=jc;Le.Lazy=Yc;Le.Memo=qc;Le.Portal=Bm;Le.Profiler=Wc;Le.StrictMode=zc;Le.Suspense=Kc;Le.SuspenseList=$c;Le.isAsyncMode=function(){return!1};Le.isConcurrentMode=function(){return!1};Le.isContextConsumer=function(e){return Un(e)===Hc};Le.isContextProvider=function(e){return Un(e)===Qc};Le.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm};Le.isForwardRef=function(e){return Un(e)===Gc};Le.isFragment=function(e){return Un(e)===jc};Le.isLazy=function(e){return Un(e)===Yc};Le.isMemo=function(e){return Un(e)===qc};Le.isPortal=function(e){return Un(e)===Bm};Le.isProfiler=function(e){return Un(e)===Wc};Le.isStrictMode=function(e){return Un(e)===zc};Le.isSuspense=function(e){return Un(e)===Kc};Le.isSuspenseList=function(e){return Un(e)===$c};Le.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jc||e===Wc||e===zc||e===Kc||e===$c||e===kL||typeof e=="object"&&e!==null&&(e.$$typeof===Yc||e.$$typeof===qc||e.$$typeof===Qc||e.$$typeof===Hc||e.$$typeof===Gc||e.$$typeof===xS||e.getModuleId!==void 0)};Le.typeOf=Un;function OL(){const e=pL();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,u=n={callback:r,next:null,prev:n};return u.prev?u.prev.next=u:t=u,function(){!o||t===null||(o=!1,u.next?u.next.prev=u.prev:n=u.prev,u.prev?u.prev.next=u.next:t=u.next)}}}}const a1={notify(){},get:()=>[]};function bL(e,t){let n,r=a1,o=0,u=!1;function a(P){p();const k=r.subscribe(P);let x=!1;return()=>{x||(x=!0,k(),m())}}function c(){r.notify()}function f(){E.onStateChange&&E.onStateChange()}function d(){return u}function p(){o++,n||(n=t?t.addNestedSub(f):e.subscribe(f),r=OL())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=a1)}function g(){u||(u=!0,p())}function w(){u&&(u=!1,m())}const E={addNestedSub:a,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:d,trySubscribe:g,tryUnsubscribe:w,getListeners:()=>r};return E}const LL=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",IL=LL?B.useLayoutEffect:B.useEffect;function AS({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:u="once"}){const a=B.useMemo(()=>{const d=bL(e);return{store:e,subscription:d,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:u}},[e,r,o,u]),c=B.useMemo(()=>e.getState(),[e]);IL(()=>{const{subscription:d}=a;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),c!==e.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[a,c]);const f=t||vi;return B.createElement(f.Provider,{value:a},n)}function SS(e=vi){const t=e===vi?pS:Im(e);return function(){const{store:r}=t();return r}}const ML=SS();function DL(e=vi){const t=e===vi?ML:SS(e);return function(){return t().dispatch}}const Pi=DL();yL(fL.useSyncExternalStoreWithSelector);hL(oS.unstable_batchedUpdates);const NL=25,FL=30,BL=30,VL=15,UL=-5,l1=-15,jL=-1;function CS(e,t,n,r,o,u,a,c,f,d){let p=0;if(++f>=d)return[!1,p];if(n===e.length||r===t.length)return[!1,p];let m=!1,g=[],w=0,E=!0;for(;n<e.length&&r<t.length;){if(e[n].toLowerCase()===t[r].toLowerCase()){if(c>=a)return[!1,p];E&&o&&(u=[...o],E=!1);const k=[],[x,A]=CS(e,t,n,r+1,u,k,a,c,f,d);x&&((!m||A>w)&&(g=[...k],w=Number(A)),m=!0),u[c++]=r,++n}++r}const P=n===e.length;if(P){p=100;let k=UL*u[0];k=k<l1?l1:k,p+=k;const x=t.length-c;p+=jL*x;for(let A=0;A<c;A++){const C=u[A];if(A>0){const T=u[A-1];C==T+1&&(p+=NL)}if(C>0){const T=t[C-1],L=t[C];T!==T.toUpperCase()&&L!==L.toLowerCase()&&(p+=BL),(T=="_"||T==" ")&&(p+=FL)}else p+=VL}return m&&(!P||w>p)?(u=[...g],p=w,[!0,p]):P?[!0,p]:[!1,p]}return[!1,p]}function ES(e,t){return CS(e,t,0,0,null,[],256,0,0,10)}function zL(e,t){if(!ES(t,e)[0])return e;if(e.indexOf(t)==0){const a=e.split(t)[1];return"<mark>"+t+"</mark>"+a}let n="";const r=e,o=e.length;e=e.toLowerCase(),t=t.toLowerCase();let u=0;e:for(let a=0;a<t.length;a++){const c=t.charCodeAt(a);for(;u<o;){if(e.charCodeAt(u)===c){const f=r.charAt(u);f===f.toLowerCase()?n+="<mark>"+t.charAt(a)+"</mark>":n+="<mark>"+t.charAt(a).toUpperCase()+"</mark>",u++;continue e}n+=r.charAt(u),u++}return r}return n+=r.slice(u),n}const PS=e=>({logo_img:"",getSearchContext:t=>ct(Ft,null,function*(){var n;if((e==null?void 0:e.type)=="public"){const r=yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.assistant_api.get_chatnext_assistant_public_trigger_list").then(a=>a.json()),o=((n=r==null?void 0:r.message)==null?void 0:n.map(a=>({label:(a==null?void 0:a.name_of_action)||"",funnel_defination_id:(a==null?void 0:a.name)||""})))||[],u=[];return o.forEach((a,c)=>{const f=(a==null?void 0:a.label)||"",d=t?ES(t,window.__(f))[1]:1;d&&u.push({type:"Assistant",label:t?window.__(zL(f,t)):f,value:t?window.__(f):f,index:t?d+.5:c+.5,match:f,funnel_defination_id:a.funnel_defination_id})}),{results:u}}return{results:[]}}),handleRouteClick:t=>{console.log(t)},getChatContextRoute:()=>"",isPublicApp:!1,isPublicTrigger:!1}),oo=B.createContext(PS({})),_S=({children:e,propsData:t})=>{const n=F(q(F({},PS(t)),{isPublicApp:(t==null?void 0:t.type)==="public",isPublicTrigger:(t==null?void 0:t.trigger)==="public"}),t);return z(oo.Provider,{value:n,children:e})};function Yn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function wi(e){return!!e&&!!e[Qe]}function Mr(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===JL}(e)||Array.isArray(e)||!!e[g1]||!!(!((t=e.constructor)===null||t===void 0)&&t[g1])||Vm(e)||Um(e))}function to(e,t,n){n===void 0&&(n=!1),fs(e)===0?(n?Object.keys:qo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function fs(e){var t=e[Qe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Vm(e)?2:Um(e)?3:0}function $o(e,t){return fs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function WL(e,t){return fs(e)===2?e.get(t):e[t]}function TS(e,t,n){var r=fs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function RS(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Vm(e){return qL&&e instanceof Map}function Um(e){return YL&&e instanceof Set}function Ui(e){return e.o||e.t}function jm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=OS(e);delete t[Qe];for(var n=qo(t),r=0;r<n.length;r++){var o=n[r],u=t[o];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(t[o]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function zm(e,t){return t===void 0&&(t=!1),Wm(e)||wi(e)||!Mr(e)||(fs(e)>1&&(e.set=e.add=e.clear=e.delete=QL),Object.freeze(e),t&&to(e,function(n,r){return zm(r,!0)},!0)),e}function QL(){Yn(2)}function Wm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function cr(e){var t=wp[e];return t||Yn(18,e),t}function HL(e,t){wp[e]||(wp[e]=t)}function gp(){return Pu}function nh(e,t){t&&(cr("Patches"),e.u=[],e.s=[],e.v=t)}function $l(e){yp(e),e.p.forEach(GL),e.p=null}function yp(e){e===Pu&&(Pu=e.l)}function c1(e){return Pu={p:[],l:Pu,h:e,m:!0,_:0}}function GL(e){var t=e[Qe];t.i===0||t.i===1?t.j():t.g=!0}function rh(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||cr("ES5").S(t,e,r),r?(n[Qe].P&&($l(t),Yn(4)),Mr(e)&&(e=ql(t,e),t.l||Yl(t,e)),t.u&&cr("Patches").M(n[Qe].t,e,t.u,t.s)):e=ql(t,n,[]),$l(t),t.u&&t.v(t.u,t.s),e!==kS?e:void 0}function ql(e,t,n){if(Wm(t))return t;var r=t[Qe];if(!r)return to(t,function(c,f){return f1(e,r,t,c,f,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Yl(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=jm(r.k):r.o,u=o,a=!1;r.i===3&&(u=new Set(o),o.clear(),a=!0),to(u,function(c,f){return f1(e,r,o,c,f,n,a)}),Yl(e,o,!1),n&&e.u&&cr("Patches").N(r,n,e.u,e.s)}return r.o}function f1(e,t,n,r,o,u,a){if(wi(o)){var c=ql(e,o,u&&t&&t.i!==3&&!$o(t.R,r)?u.concat(r):void 0);if(TS(n,r,c),!wi(c))return;e.m=!1}else a&&n.add(o);if(Mr(o)&&!Wm(o)){if(!e.h.D&&e._<1)return;ql(e,o),t&&t.A.l||Yl(e,o)}}function Yl(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&zm(t,n)}function ih(e,t){var n=e[Qe];return(n?Ui(n):e)[t]}function d1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ei(e){e.P||(e.P=!0,e.l&&ei(e.l))}function oh(e){e.o||(e.o=jm(e.t))}function vp(e,t,n){var r=Vm(t)?cr("MapSet").F(t,n):Um(t)?cr("MapSet").T(t,n):e.O?function(o,u){var a=Array.isArray(o),c={i:a?1:0,A:u?u.A:gp(),P:!1,I:!1,R:{},l:u,t:o,k:null,o:null,j:null,C:!1},f=c,d=_u;a&&(f=[c],d=Gs);var p=Proxy.revocable(f,d),m=p.revoke,g=p.proxy;return c.k=g,c.j=m,g}(t,n):cr("ES5").J(t,n);return(n?n.A:gp()).p.push(r),r}function KL(e){return wi(e)||Yn(22,e),function t(n){if(!Mr(n))return n;var r,o=n[Qe],u=fs(n);if(o){if(!o.P&&(o.i<4||!cr("ES5").K(o)))return o.t;o.I=!0,r=h1(n,u),o.I=!1}else r=h1(n,u);return to(r,function(a,c){o&&WL(o.t,a)===c||TS(r,a,t(c))}),u===3?new Set(r):r}(e)}function h1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return jm(e)}function $L(){function e(u,a){var c=o[u];return c?c.enumerable=a:o[u]=c={configurable:!0,enumerable:a,get:function(){var f=this[Qe];return _u.get(f,u)},set:function(f){var d=this[Qe];_u.set(d,u,f)}},c}function t(u){for(var a=u.length-1;a>=0;a--){var c=u[a][Qe];if(!c.P)switch(c.i){case 5:r(c)&&ei(c);break;case 4:n(c)&&ei(c)}}}function n(u){for(var a=u.t,c=u.k,f=qo(c),d=f.length-1;d>=0;d--){var p=f[d];if(p!==Qe){var m=a[p];if(m===void 0&&!$o(a,p))return!0;var g=c[p],w=g&&g[Qe];if(w?w.t!==m:!RS(g,m))return!0}}var E=!!a[Qe];return f.length!==qo(a).length+(E?0:1)}function r(u){var a=u.k;if(a.length!==u.t.length)return!0;var c=Object.getOwnPropertyDescriptor(a,a.length-1);if(c&&!c.get)return!0;for(var f=0;f<a.length;f++)if(!a.hasOwnProperty(f))return!0;return!1}var o={};HL("ES5",{J:function(u,a){var c=Array.isArray(u),f=function(p,m){if(p){for(var g=Array(m.length),w=0;w<m.length;w++)Object.defineProperty(g,""+w,e(w,!0));return g}var E=OS(m);delete E[Qe];for(var P=qo(E),k=0;k<P.length;k++){var x=P[k];E[x]=e(x,p||!!E[x].enumerable)}return Object.create(Object.getPrototypeOf(m),E)}(c,u),d={i:c?5:4,A:a?a.A:gp(),P:!1,I:!1,R:{},l:a,t:u,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,Qe,{value:d,writable:!0}),f},S:function(u,a,c){c?wi(a)&&a[Qe].A===u&&t(u.p):(u.u&&function f(d){if(d&&typeof d=="object"){var p=d[Qe];if(p){var m=p.t,g=p.k,w=p.R,E=p.i;if(E===4)to(g,function(C){C!==Qe&&(m[C]!==void 0||$o(m,C)?w[C]||f(g[C]):(w[C]=!0,ei(p)))}),to(m,function(C){g[C]!==void 0||$o(g,C)||(w[C]=!1,ei(p))});else if(E===5){if(r(p)&&(ei(p),w.length=!0),g.length<m.length)for(var P=g.length;P<m.length;P++)w[P]=!1;else for(var k=m.length;k<g.length;k++)w[k]=!0;for(var x=Math.min(g.length,m.length),A=0;A<x;A++)g.hasOwnProperty(A)||(w[A]=!0),w[A]===void 0&&f(g[A])}}}}(u.p[0]),t(u.p))},K:function(u){return u.i===4?n(u):r(u)}})}var p1,Pu,Qm=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",qL=typeof Map!="undefined",YL=typeof Set!="undefined",m1=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",kS=Qm?Symbol.for("immer-nothing"):((p1={})["immer-nothing"]=!0,p1),g1=Qm?Symbol.for("immer-draftable"):"__$immer_draftable",Qe=Qm?Symbol.for("immer-state"):"__$immer_state",JL=""+Object.prototype.constructor,qo=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,OS=Object.getOwnPropertyDescriptors||function(e){var t={};return qo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},wp={},_u={get:function(e,t){if(t===Qe)return e;var n=Ui(e);if(!$o(n,t))return function(o,u,a){var c,f=d1(u,a);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Mr(r)?r:r===ih(e.t,t)?(oh(e),e.o[t]=vp(e.A.h,r,e)):r},has:function(e,t){return t in Ui(e)},ownKeys:function(e){return Reflect.ownKeys(Ui(e))},set:function(e,t,n){var r=d1(Ui(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=ih(Ui(e),t),u=o==null?void 0:o[Qe];if(u&&u.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(RS(n,o)&&(n!==void 0||$o(e.t,t)))return!0;oh(e),ei(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return ih(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,oh(e),ei(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ui(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Yn(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Yn(12)}},Gs={};to(_u,function(e,t){Gs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Gs.deleteProperty=function(e,t){return Gs.set.call(this,e,t,void 0)},Gs.set=function(e,t,n){return _u.set.call(this,e[0],t,n,e[0])};var XL=function(){function e(n){var r=this;this.O=m1,this.D=!0,this.produce=function(o,u,a){if(typeof o=="function"&&typeof u!="function"){var c=u;u=o;var f=r;return function(P){var k=this;P===void 0&&(P=c);for(var x=arguments.length,A=Array(x>1?x-1:0),C=1;C<x;C++)A[C-1]=arguments[C];return f.produce(P,function(T){var L;return(L=u).call.apply(L,[k,T].concat(A))})}}var d;if(typeof u!="function"&&Yn(6),a!==void 0&&typeof a!="function"&&Yn(7),Mr(o)){var p=c1(r),m=vp(r,o,void 0),g=!0;try{d=u(m),g=!1}finally{g?$l(p):yp(p)}return typeof Promise!="undefined"&&d instanceof Promise?d.then(function(P){return nh(p,a),rh(P,p)},function(P){throw $l(p),P}):(nh(p,a),rh(d,p))}if(!o||typeof o!="object"){if((d=u(o))===void 0&&(d=o),d===kS&&(d=void 0),r.D&&zm(d,!0),a){var w=[],E=[];cr("Patches").M(o,d,w,E),a(w,E)}return d}Yn(21,o)},this.produceWithPatches=function(o,u){if(typeof o=="function")return function(d){for(var p=arguments.length,m=Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];return r.produceWithPatches(d,function(w){return o.apply(void 0,[w].concat(m))})};var a,c,f=r.produce(o,u,function(d,p){a=d,c=p});return typeof Promise!="undefined"&&f instanceof Promise?f.then(function(d){return[d,a,c]}):[f,a,c]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Mr(n)||Yn(8),wi(n)&&(n=KL(n));var r=c1(this),o=vp(this,n,void 0);return o[Qe].C=!0,yp(r),o},t.finishDraft=function(n,r){var o=n&&n[Qe],u=o.A;return nh(u,r),rh(void 0,u)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!m1&&Yn(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var u=r[o];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}o>-1&&(r=r.slice(o+1));var a=cr("Patches").$;return wi(n)?a(n,r):this.produce(n,function(c){return a(c,r)})},e}(),vn=new XL,bS=vn.produce;vn.produceWithPatches.bind(vn);vn.setAutoFreeze.bind(vn);vn.setUseProxies.bind(vn);vn.applyPatches.bind(vn);vn.createDraft.bind(vn);vn.finishDraft.bind(vn);function Tu(e){"@babel/helpers - typeof";return Tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tu(e)}function ZL(e,t){if(Tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eI(e){var t=ZL(e,"string");return Tu(t)=="symbol"?t:String(t)}function tI(e,t,n){return t=eI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function v1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y1(Object(n),!0).forEach(function(r){tI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var w1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sh=function(){return Math.random().toString(36).substring(7).split("").join(".")},Jl={INIT:"@@redux/INIT"+sh(),REPLACE:"@@redux/REPLACE"+sh(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sh()}};function nI(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function LS(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Mt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Mt(1));return n(LS)(e,t)}if(typeof e!="function")throw new Error(Mt(2));var o=e,u=t,a=[],c=a,f=!1;function d(){c===a&&(c=a.slice())}function p(){if(f)throw new Error(Mt(3));return u}function m(P){if(typeof P!="function")throw new Error(Mt(4));if(f)throw new Error(Mt(5));var k=!0;return d(),c.push(P),function(){if(k){if(f)throw new Error(Mt(6));k=!1,d();var A=c.indexOf(P);c.splice(A,1),a=null}}}function g(P){if(!nI(P))throw new Error(Mt(7));if(typeof P.type=="undefined")throw new Error(Mt(8));if(f)throw new Error(Mt(9));try{f=!0,u=o(u,P)}finally{f=!1}for(var k=a=c,x=0;x<k.length;x++){var A=k[x];A()}return P}function w(P){if(typeof P!="function")throw new Error(Mt(10));o=P,g({type:Jl.REPLACE})}function E(){var P,k=m;return P={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(Mt(11));function C(){A.next&&A.next(p())}C();var T=k(C);return{unsubscribe:T}}},P[w1]=function(){return this},P}return g({type:Jl.INIT}),r={dispatch:g,subscribe:m,getState:p,replaceReducer:w},r[w1]=E,r}function rI(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Jl.INIT});if(typeof r=="undefined")throw new Error(Mt(12));if(typeof n(void 0,{type:Jl.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Mt(13))})}function iI(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var u=Object.keys(n),a;try{rI(n)}catch(c){a=c}return function(f,d){if(f===void 0&&(f={}),a)throw a;for(var p=!1,m={},g=0;g<u.length;g++){var w=u[g],E=n[w],P=f[w],k=E(P,d);if(typeof k=="undefined")throw d&&d.type,new Error(Mt(14));m[w]=k,p=p||k!==P}return p=p||u.length!==Object.keys(f).length,p?m:f}}function Xl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function oI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),u=function(){throw new Error(Mt(15))},a={getState:o.getState,dispatch:function(){return u.apply(void 0,arguments)}},c=t.map(function(f){return f(a)});return u=Xl.apply(void 0,c)(o.dispatch),v1(v1({},o),{},{dispatch:u})}}}function IS(e){var t=function(r){var o=r.dispatch,u=r.getState;return function(a){return function(c){return typeof c=="function"?c(o,u,e):a(c)}}};return t}var MS=IS();MS.withExtraArgument=IS;const x1=MS;var DS=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sI=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,o,u,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(d){return function(p){return f([d,p])}}function f(d){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(u=d[0]&2?o.return:d[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,d[1])).done)return u;switch(o=0,u&&(d=[d[0]&2,u.value]),d[0]){case 0:case 1:u=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]<u[3])){n.label=d[1];break}if(d[0]===6&&n.label<u[1]){n.label=u[1],u=d;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(d);break}u[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(p){d=[6,p],o=0}finally{r=u=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},is=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},uI=Object.defineProperty,aI=Object.defineProperties,lI=Object.getOwnPropertyDescriptors,A1=Object.getOwnPropertySymbols,cI=Object.prototype.hasOwnProperty,fI=Object.prototype.propertyIsEnumerable,S1=function(e,t,n){return t in e?uI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fi=function(e,t){for(var n in t||(t={}))cI.call(t,n)&&S1(e,n,t[n]);if(A1)for(var r=0,o=A1(t);r<o.length;r++){var n=o[r];fI.call(t,n)&&S1(e,n,t[n])}return e},uh=function(e,t){return aI(e,lI(t))},dI=function(e,t,n){return new Promise(function(r,o){var u=function(f){try{c(n.next(f))}catch(d){o(d)}},a=function(f){try{c(n.throw(f))}catch(d){o(d)}},c=function(f){return f.done?r(f.value):Promise.resolve(f.value).then(u,a)};c((n=n.apply(e,t)).next())})},hI=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xl:Xl.apply(null,arguments)};function pI(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function di(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var u=t.apply(void 0,r);if(!u)throw new Error("prepareAction did not return an object");return fi(fi({type:e,payload:u.payload},"meta"in u&&{meta:u.meta}),"error"in u&&{error:u.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}var mI=function(e){DS(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,is([void 0],n[0].concat(this)))):new(t.bind.apply(t,is([void 0],n.concat(this))))},t}(Array),gI=function(e){DS(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,is([void 0],n[0].concat(this)))):new(t.bind.apply(t,is([void 0],n.concat(this))))},t}(Array);function xp(e){return Mr(e)?bS(e,function(){}):e}function yI(e){return typeof e=="boolean"}function vI(){return function(t){return wI(t)}}function wI(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck,e.actionCreatorCheck;var r=new mI;return n&&(yI(n)?r.push(x1):r.push(x1.withExtraArgument(n.extraArgument))),r}var xI=!0;function AI(e){var t=vI(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,u=n.middleware,a=u===void 0?t():u,c=n.devTools,f=c===void 0?!0:c,d=n.preloadedState,p=d===void 0?void 0:d,m=n.enhancers,g=m===void 0?void 0:m,w;if(typeof o=="function")w=o;else if(pI(o))w=iI(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=a;typeof E=="function"&&(E=E(t));var P=oI.apply(void 0,E),k=Xl;f&&(k=hI(fi({trace:!xI},typeof f=="object"&&f)));var x=new gI(P),A=x;Array.isArray(g)?A=is([P],g):typeof g=="function"&&(A=g(x));var C=k.apply(void 0,A);return LS(w,p,C)}function NS(e){var t={},n=[],r,o={addCase:function(u,a){var c=typeof u=="string"?u:u.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[c]=a,o},addMatcher:function(u,a){return n.push({matcher:u,reducer:a}),o},addDefaultCase:function(u){return r=u,o}};return e(o),[t,n,r]}function SI(e){return typeof e=="function"}function CI(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?NS(t):[t,n,r],u=o[0],a=o[1],c=o[2],f;if(SI(e))f=function(){return xp(e())};else{var d=xp(e);f=function(){return d}}function p(m,g){m===void 0&&(m=f());var w=is([u[g.type]],a.filter(function(E){var P=E.matcher;return P(g)}).map(function(E){var P=E.reducer;return P}));return w.filter(function(E){return!!E}).length===0&&(w=[c]),w.reduce(function(E,P){if(P)if(wi(E)){var k=E,x=P(k,g);return x===void 0?E:x}else{if(Mr(E))return bS(E,function(A){return P(A,g)});var x=P(E,g);if(x===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}return E},m)}return p.getInitialState=f,p}function EI(e,t){return e+"/"+t}function Jc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n=typeof e.initialState=="function"?e.initialState:xp(e.initialState),r=e.reducers||{},o=Object.keys(r),u={},a={},c={};o.forEach(function(p){var m=r[p],g=EI(t,p),w,E;"reducer"in m?(w=m.reducer,E=m.prepare):w=m,u[p]=w,a[g]=w,c[p]=E?di(g,E):di(g)});function f(){var p=typeof e.extraReducers=="function"?NS(e.extraReducers):[e.extraReducers],m=p[0],g=m===void 0?{}:m,w=p[1],E=w===void 0?[]:w,P=p[2],k=P===void 0?void 0:P,x=fi(fi({},g),a);return CI(n,function(A){for(var C in x)A.addCase(C,x[C]);for(var T=0,L=E;T<L.length;T++){var I=L[T];A.addMatcher(I.matcher,I.reducer)}k&&A.addDefaultCase(k)})}var d;return{name:t,reducer:function(p,m){return d||(d=f()),d(p,m)},actions:c,caseReducers:u,getInitialState:function(){return d||(d=f()),d.getInitialState()}}}var PI="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_I=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=PI[Math.random()*64|0];return t},TI=["name","message","stack","code"],ah=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),C1=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),RI=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=TI;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}};(function(){function e(t,n,r){var o=di(t+"/fulfilled",function(d,p,m,g){return{payload:d,meta:uh(fi({},g||{}),{arg:m,requestId:p,requestStatus:"fulfilled"})}}),u=di(t+"/pending",function(d,p,m){return{payload:void 0,meta:uh(fi({},m||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),a=di(t+"/rejected",function(d,p,m,g,w){return{payload:g,error:(r&&r.serializeError||RI)(d||"Rejected"),meta:uh(fi({},w||{}),{arg:m,requestId:p,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(d==null?void 0:d.name)==="AbortError",condition:(d==null?void 0:d.name)==="ConditionError"})}}),c=typeof AbortController!="undefined"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function f(d){return function(p,m,g){var w=r!=null&&r.idGenerator?r.idGenerator(d):_I(),E=new c,P;function k(A){P=A,E.abort()}var x=function(){return dI(this,null,function(){var A,C,T,L,I,D,N;return sI(this,function($){switch($.label){case 0:return $.trys.push([0,4,,5]),L=(A=r==null?void 0:r.condition)==null?void 0:A.call(r,d,{getState:m,extra:g}),OI(L)?[4,L]:[3,2];case 1:L=$.sent(),$.label=2;case 2:if(L===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=new Promise(function(G,le){return E.signal.addEventListener("abort",function(){return le({name:"AbortError",message:P||"Aborted"})})}),p(u(w,d,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:w,arg:d},{getState:m,extra:g}))),[4,Promise.race([I,Promise.resolve(n(d,{dispatch:p,getState:m,extra:g,requestId:w,signal:E.signal,abort:k,rejectWithValue:function(G,le){return new ah(G,le)},fulfillWithValue:function(G,le){return new C1(G,le)}})).then(function(G){if(G instanceof ah)throw G;return G instanceof C1?o(G.payload,w,d,G.meta):o(G,w,d)})])];case 3:return T=$.sent(),[3,5];case 4:return D=$.sent(),T=D instanceof ah?a(null,w,d,D.payload,D.meta):a(D,w,d),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&a.match(T)&&T.meta.condition,N||p(T),[2,T]}})})}();return Object.assign(x,{abort:k,requestId:w,arg:d,unwrap:function(){return x.then(kI)}})}}return Object.assign(f,{pending:u,rejected:a,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e})();function kI(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function OI(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hm="listenerMiddleware";di(Hm+"/add");di(Hm+"/removeAll");di(Hm+"/remove");var E1;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window!="undefined"?window:typeof global!="undefined"?global:globalThis);$L();const bI={isOpen:!1,isOpenPop:!1,isPinned:!1},FS=Jc({name:"chatButton",initialState:bI,reducers:{openModal:e=>{e.isOpen=!0},closeModal:e=>{e.isOpen=!1},toggleModal:e=>{e.isOpen=!e.isOpen},openPopup:e=>{e.isOpenPop=!0},closePopup:e=>{e.isOpenPop=!1},togglePinned:e=>{e.isPinned=!e.isPinned},togglePopup:e=>{e.isOpenPop=!e.isOpenPop}}}),{openModal:vl,closeModal:Gm,toggleModal:T8,openPopup:BS,closePopup:en,togglePopup:R8,togglePinned:LI}=FS.actions,II=FS.reducer,P1=[],VS=Jc({name:"chatArray",initialState:P1,reducers:{addNewMessage:(e,t)=>{e.push(t.payload)},resetSession:()=>P1,updateChats:(e,t)=>[...t.payload]}}),{addNewMessage:k8,resetSession:MI,updateChats:US}=VS.actions,DI=VS.reducer,NI={isLoading:!1,isSubmitting:!1},jS=Jc({name:"loader",initialState:NI,reducers:{enableLoading:e=>{e.isLoading=!0},disableLoading:e=>{e.isLoading=!1},startSubmitting:e=>{e.isSubmitting=!0},stopSubmitting:e=>{e.isSubmitting=!1}}}),{enableLoading:O8,disableLoading:b8,startSubmitting:FI,stopSubmitting:lh}=jS.actions,BI=jS.reducer,VI={user:"",isAuthenticated:!1,session_id:""},zS=Jc({name:"user",initialState:VI,reducers:{loginUser:(e,t)=>{e.user=t.payload},authUser:(e,t)=>{e.isAuthenticated=t.payload},setSessionId:(e,t)=>q(F({},e),{session_id:t.payload})}}),{loginUser:L8,authUser:wl,setSessionId:Ru}=zS.actions,UI=zS.reducer,WS=AI({reducer:{chatButton:II,chatArray:DI,loading:BI,user:UI}}),jI=e=>B.createElement("svg",F({width:32,height:28,viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.createElement("path",{d:"M19.3333 2H14C7.37258 2 2 7.37258 2 14V14C2 20.6274 7.39979 26 14.0272 26V26H19.3333",stroke:"white",strokeWidth:3,strokeLinecap:"round"}),B.createElement("rect",{x:8.83334,y:8.16669,width:21.6667,height:11.6667,rx:5.83333,fill:"#0038FF",stroke:"white",strokeWidth:3}),B.createElement("path",{d:"M22 20.0637V18.1667C22 18.0746 22.0746 18 22.1667 18H25.9607C26.1365 18 26.1925 18.2371 26.0352 18.3157L22.2412 20.2127C22.1304 20.2681 22 20.1876 22 20.0637Z",fill:"#0038FF"}),B.createElement("circle",{cx:16,cy:14,r:2,fill:"white"}),B.createElement("circle",{cx:23.3333,cy:14,r:2,fill:"white"})),zI=()=>{const e=Ht(r=>r.chatButton.isOpenPop),t=Pi();return be("div",{className:`tw-fixed sm:!tw-bottom-7 tw-bottom-14 tw-right-[30px] tw-m-0 tw-cursor-pointer tw-w-[60px] tw-h-[60px] tw-z-[10] tw-flex-col tw-items-center tw-justify-center tw-rounded-full tw-p-2 tw-bg-blue-700 tw-text-white ${e?"tw-hidden":"tw-flex"}`,onClick:r=>{r.stopPropagation(),t(e?en():BS())},children:[z("div",{className:`tw-flex tw-h-full tw-w-full tw-transform tw-items-center tw-justify-center tw-rounded-full tw-transition-all tw-delay-75 tw-duration-100 tw-ease-in-out
72
+ ${e?"tw-mb-2 tw-rotate-90 tw-bg-opacity-10":"tw-rotate-0"}`,children:z("span",{className:"btn-open-popup__icon tw-w-9 tw-h-9 tw-flex tw-items-center tw-justify-center tw-text-center tw-text-4xl",children:z(jI,{})})}),z("span",{className:`tw-rounded-md tw-bg-white tw-bg-opacity-10
73
73
  tw-hidden
74
- ${e?"tw-mb-4 tw-rotate-90 tw-scale-105 tw-bg-opacity-10":"tw-scale-100"}`})]})};class fs{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ku=typeof window=="undefined"||"Deno"in window;function In(){}function jI(e,t){return typeof e=="function"?e(t):e}function wp(e){return typeof e=="number"&&e>=0&&e!==1/0}function zS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gs(e,t,n){return Fu(e)?typeof t=="function"?q(F({},n),{queryKey:e,queryFn:t}):q(F({},t),{queryKey:e}):e}function zI(e,t,n){return Fu(e)?typeof t=="function"?q(F({},n),{mutationKey:e,mutationFn:t}):q(F({},t),{mutationKey:e}):typeof e=="function"?q(F({},t),{mutationFn:e}):F({},e)}function Yr(e,t,n){return Fu(e)?[q(F({},t),{queryKey:e}),n]:[e||{},t]}function P1(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:u,queryKey:a,stale:c}=e;if(Fu(a)){if(r){if(t.queryHash!==Gm(a,t.options))return!1}else if(!Xl(t.queryKey,a))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||typeof o!="undefined"&&o!==t.state.fetchStatus||u&&!u(t))}function _1(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:u}=e;if(Fu(u)){if(!t.options.mutationKey)return!1;if(n){if(Hi(t.options.mutationKey)!==Hi(u))return!1}else if(!Xl(t.options.mutationKey,u))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Gm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hi)(e)}function Hi(e){return JSON.stringify(e,(t,n)=>xp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Xl(e,t){return WS(e,t)}function WS(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!WS(e[n],t[n])):!1}function QS(e,t){if(e===t)return e;const n=T1(e)&&T1(t);if(n||xp(e)&&xp(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),u=o.length,a=n?[]:{};let c=0;for(let f=0;f<u;f++){const d=n?f:o[f];a[d]=QS(e[d],t[d]),a[d]===e[d]&&c++}return r===u&&c===r?e:a}return t}function Zl(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function T1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xp(e){if(!k1(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const n=t.prototype;return!(!k1(n)||!n.hasOwnProperty("isPrototypeOf"))}function k1(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fu(e){return Array.isArray(e)}function HS(e){return new Promise(t=>{setTimeout(t,e)})}function R1(e){HS(0).then(e)}function WI(){if(typeof AbortController=="function")return new AbortController}function Ap(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?QS(e,t):t}class QI extends fs{constructor(){super(),this.setup=t=>{if(!ku&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ec=new QI,O1=["online","offline"];class HI extends fs{constructor(){super(),this.setup=t=>{if(!ku&&window.addEventListener){const n=()=>t();return O1.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{O1.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const tc=new HI;function GI(e){return Math.min(1e3*Ma(2,e),3e4)}function Jc(e){return(e!=null?e:"online")==="online"?tc.isOnline():!0}class GS{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function wl(e){return e instanceof GS}function KS(e){let t=!1,n=0,r=!1,o,u,a;const c=new Promise((R,w)=>{u=R,a=w}),f=R=>{r||(x(new GS(R)),e.abort==null||e.abort())},d=()=>{t=!0},p=()=>{t=!1},m=()=>!ec.isFocused()||e.networkMode!=="always"&&!tc.isOnline(),g=R=>{r||(r=!0,e.onSuccess==null||e.onSuccess(R),o==null||o(),u(R))},x=R=>{r||(r=!0,e.onError==null||e.onError(R),o==null||o(),a(R))},E=()=>new Promise(R=>{o=w=>{const A=r||!m();return A&&R(w),A},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),P=()=>{if(r)return;let R;try{R=e.fn()}catch(w){R=Promise.reject(w)}Promise.resolve(R).then(g).catch(w=>{var A,C;if(r)return;const k=(A=e.retry)!=null?A:3,b=(C=e.retryDelay)!=null?C:GI,I=typeof b=="function"?b(n,w):b,N=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,w);if(t||!N){x(w);return}n++,e.onFail==null||e.onFail(n,w),HS(I).then(()=>{if(m())return E()}).then(()=>{t?x(w):P()})})};return Jc(e.networkMode)?P():E().then(P),{promise:c,cancel:f,continue:()=>(o==null?void 0:o())?c:Promise.resolve(),cancelRetry:d,continueRetry:p}}const Km=console;function KI(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const o=p=>{let m;t++;try{m=p()}finally{t--,t||c()}return m},u=p=>{t?e.push(p):R1(()=>{n(p)})},a=p=>(...m)=>{u(()=>{p(...m)})},c=()=>{const p=e;e=[],p.length&&R1(()=>{r(()=>{p.forEach(m=>{n(m)})})})};return{batch:o,batchCalls:a,schedule:u,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const et=KI();class $S{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wp(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:ku?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class $I extends $S{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Km,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||qI(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=F(F({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Ap(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(In).catch(In):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zS(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var u;return(u=this.retryer)==null||u.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(E=>E.options.queryFn);x&&this.setOptions(x.options)}const a=WI(),c={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},f=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};f(c);const d=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(c)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:d};if(f(p),(r=this.options.behavior)==null||r.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=p.fetchOptions)==null?void 0:o.meta)){var m;this.dispatch({type:"fetch",meta:(m=p.fetchOptions)==null?void 0:m.meta})}const g=x=>{if(wl(x)&&x.silent||this.dispatch({type:"error",error:x}),!wl(x)){var E,P,R,w;(E=(P=this.cache.config).onError)==null||E.call(P,x,this),(R=(w=this.cache.config).onSettled)==null||R.call(w,this.state.data,x,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=KS({fn:p.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:x=>{var E,P,R,w;if(typeof x=="undefined"){g(new Error(this.queryHash+" data is undefined"));return}this.setData(x),(E=(P=this.cache.config).onSuccess)==null||E.call(P,x,this),(R=(w=this.cache.config).onSettled)==null||R.call(w,x,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:g,onFail:(x,E)=>{this.dispatch({type:"failed",failureCount:x,error:E})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,u;switch(t.type){case"failed":return q(F({},r),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return q(F({},r),{fetchStatus:"paused"});case"continue":return q(F({},r),{fetchStatus:"fetching"});case"fetch":return F(q(F({},r),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Jc(this.options.networkMode)?"fetching":"paused"}),!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return F(q(F({},r),{data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(u=t.dataUpdatedAt)!=null?u:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const a=t.error;return wl(a)&&a.revert&&this.revertState?q(F({},this.revertState),{fetchStatus:"idle"}):q(F({},r),{error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return q(F({},r),{isInvalidated:!0});case"setState":return F(F({},r),t.state)}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function qI(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t!="undefined",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class YI extends fs{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const u=n.queryKey,a=(o=n.queryHash)!=null?o:Gm(u,n);let c=this.get(a);return c||(c=new $I({cache:this,logger:t.getLogger(),queryKey:u,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(u)}),this.add(c)),c}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){et.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Yr(t,n);return typeof r.exact=="undefined"&&(r.exact=!0),this.queries.find(o=>P1(r,o))}findAll(t,n){const[r]=Yr(t,n);return Object.keys(r).length>0?this.queries.filter(o=>P1(r,o)):this.queries}notify(t){et.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){et.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){et.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class JI extends $S{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Km,this.observers=[],this.state=t.state||qS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=F(F({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}execute(){return ct(this,null,function*(){const t=()=>{var N;return this.retryer=KS({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(D,$)=>{this.dispatch({type:"failed",failureCount:D,error:$})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(N=this.options.retry)!=null?N:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,u,a,c,f,d,p;if(!n){var m,g,x,E;this.dispatch({type:"loading",variables:this.options.variables}),yield(m=(g=this.mutationCache.config).onMutate)==null?void 0:m.call(g,this.state.variables,this);const D=yield(x=(E=this.options).onMutate)==null?void 0:x.call(E,this.state.variables);D!==this.state.context&&this.dispatch({type:"loading",context:D,variables:this.state.variables})}const N=yield t();return yield(r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,N,this.state.variables,this.state.context,this),yield(u=(a=this.options).onSuccess)==null?void 0:u.call(a,N,this.state.variables,this.state.context),yield(c=(f=this.mutationCache.config).onSettled)==null?void 0:c.call(f,N,null,this.state.variables,this.state.context,this),yield(d=(p=this.options).onSettled)==null?void 0:d.call(p,N,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:N}),N}catch(N){try{var P,R,w,A,C,k,b,I;throw yield(P=(R=this.mutationCache.config).onError)==null?void 0:P.call(R,N,this.state.variables,this.state.context,this),yield(w=(A=this.options).onError)==null?void 0:w.call(A,N,this.state.variables,this.state.context),yield(C=(k=this.mutationCache.config).onSettled)==null?void 0:C.call(k,void 0,N,this.state.variables,this.state.context,this),yield(b=(I=this.options).onSettled)==null?void 0:b.call(I,void 0,N,this.state.variables,this.state.context),N}finally{this.dispatch({type:"error",error:N})}}})}dispatch(t){const n=r=>{switch(t.type){case"failed":return q(F({},r),{failureCount:t.failureCount,failureReason:t.error});case"pause":return q(F({},r),{isPaused:!0});case"continue":return q(F({},r),{isPaused:!1});case"loading":return q(F({},r),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Jc(this.options.networkMode),status:"loading",variables:t.variables});case"success":return q(F({},r),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return q(F({},r),{data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return F(F({},r),t.state)}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function qS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class XI extends fs{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new JI({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){et.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact=="undefined"&&(t.exact=!0),this.mutations.find(n=>_1(t,n))}findAll(t){return this.mutations.filter(n=>_1(t,n))}notify(t){et.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return et.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(In)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function ZI(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,u,a;const c=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,f=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,d=f==null?void 0:f.pageParam,p=(f==null?void 0:f.direction)==="forward",m=(f==null?void 0:f.direction)==="backward",g=((u=e.state.data)==null?void 0:u.pages)||[],x=((a=e.state.data)==null?void 0:a.pageParams)||[];let E=x,P=!1;const R=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>{var N;if((N=e.signal)!=null&&N.aborted)P=!0;else{var D;(D=e.signal)==null||D.addEventListener("abort",()=>{P=!0})}return e.signal}})},w=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),A=(I,N,D,$)=>(E=$?[N,...E]:[...E,N],$?[D,...I]:[...I,D]),C=(I,N,D,$)=>{if(P)return Promise.reject("Cancelled");if(typeof D=="undefined"&&!N&&I.length)return Promise.resolve(I);const G={queryKey:e.queryKey,pageParam:D,meta:e.options.meta};R(G);const le=w(G);return Promise.resolve(le).then(ot=>A(I,D,ot,$))};let k;if(!g.length)k=C([]);else if(p){const I=typeof d!="undefined",N=I?d:L1(e.options,g);k=C(g,I,N)}else if(m){const I=typeof d!="undefined",N=I?d:eM(e.options,g);k=C(g,I,N,!0)}else{E=[];const I=typeof e.options.getNextPageParam=="undefined";k=(c&&g[0]?c(g[0],0,g):!0)?C([],I,x[0]):Promise.resolve(A([],x[0],g[0]));for(let D=1;D<g.length;D++)k=k.then($=>{if(c&&g[D]?c(g[D],D,g):!0){const le=I?x[D]:L1(e.options,$);return C($,I,le)}return Promise.resolve(A($,x[D],g[D]))})}return k.then(I=>({pages:I,pageParams:E}))}}}}function L1(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function eM(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class tM{constructor(t={}){this.queryCache=t.queryCache||new YI,this.mutationCache=t.mutationCache||new XI,this.logger=t.logger||Km,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=ec.subscribe(()=>{ec.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=tc.subscribe(()=>{tc.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Yr(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll(q(F({},t),{fetching:!0})).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Gs(t,n,r),u=this.getQueryData(o.queryKey);return u?Promise.resolve(u):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),u=o==null?void 0:o.state.data,a=jI(n,u);if(typeof a=="undefined")return;const c=Gs(t),f=this.defaultQueryOptions(c);return this.queryCache.build(this,f).setData(a,q(F({},r),{manual:!0}))}setQueriesData(t,n,r){return et.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Yr(t,n),o=this.queryCache;et.batch(()=>{o.findAll(r).forEach(u=>{o.remove(u)})})}resetQueries(t,n,r){const[o,u]=Yr(t,n,r),a=this.queryCache,c=F({type:"active"},o);return et.batch(()=>(a.findAll(o).forEach(f=>{f.reset()}),this.refetchQueries(c,u)))}cancelQueries(t,n,r){const[o,u={}]=Yr(t,n,r);typeof u.revert=="undefined"&&(u.revert=!0);const a=et.batch(()=>this.queryCache.findAll(o).map(c=>c.cancel(u)));return Promise.all(a).then(In).catch(In)}invalidateQueries(t,n,r){const[o,u]=Yr(t,n,r);return et.batch(()=>{var a,c;if(this.queryCache.findAll(o).forEach(d=>{d.invalidate()}),o.refetchType==="none")return Promise.resolve();const f=q(F({},o),{type:(a=(c=o.refetchType)!=null?c:o.type)!=null?a:"active"});return this.refetchQueries(f,u)})}refetchQueries(t,n,r){const[o,u]=Yr(t,n,r),a=et.batch(()=>this.queryCache.findAll(o).filter(f=>!f.isDisabled()).map(f=>{var d;return f.fetch(void 0,q(F({},u),{cancelRefetch:(d=u==null?void 0:u.cancelRefetch)!=null?d:!0,meta:{refetchPage:o.refetchPage}}))}));let c=Promise.all(a).then(In);return u!=null&&u.throwOnError||(c=c.catch(In)),c}fetchQuery(t,n,r){const o=Gs(t,n,r),u=this.defaultQueryOptions(o);typeof u.retry=="undefined"&&(u.retry=!1);const a=this.queryCache.build(this,u);return a.isStaleByTime(u.staleTime)?a.fetch(u):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(In).catch(In)}fetchInfiniteQuery(t,n,r){const o=Gs(t,n,r);return o.behavior=ZI(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(In).catch(In)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Hi(t)===Hi(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Xl(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Hi(t)===Hi(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Xl(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n=q(F(F(F({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!n.queryHash&&n.queryKey&&(n.queryHash=Gm(n.queryKey,n)),typeof n.refetchOnReconnect=="undefined"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary=="undefined"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:q(F(F(F({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class nM extends fs{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),b1(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sp(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sp(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Zl(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const u=this.hasListeners();u&&I1(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),u&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();u&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return iM(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(r={}){var o=r,{refetchPage:t}=o,n=Lt(o,["refetchPage"]);return this.fetch(q(F({},n),{meta:{refetchPage:t}}))}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch(q(F({},t),{cancelRefetch:(n=t.cancelRefetch)!=null?n:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(In)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),ku||this.currentResult.isStale||!wp(this.options.staleTime))return;const n=zS(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(ku||this.options.enabled===!1||!wp(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ec.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,u=this.currentResult,a=this.currentResultState,c=this.currentResultOptions,f=t!==r,d=f?t.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,{state:m}=t;let{dataUpdatedAt:g,error:x,errorUpdatedAt:E,fetchStatus:P,status:R}=m,w=!1,A=!1,C;if(n._optimisticResults){const D=this.hasListeners(),$=!D&&b1(t,n),G=D&&I1(t,r,n,o);($||G)&&(P=Jc(t.options.networkMode)?"fetching":"paused",g||(R="loading")),n._optimisticResults==="isRestoring"&&(P="idle")}if(n.keepPreviousData&&!m.dataUpdatedAt&&p!=null&&p.isSuccess&&R!=="error")C=p.data,g=p.dataUpdatedAt,R=p.status,w=!0;else if(n.select&&typeof m.data!="undefined")if(u&&m.data===(a==null?void 0:a.data)&&n.select===this.selectFn)C=this.selectResult;else try{this.selectFn=n.select,C=n.select(m.data),C=Ap(u==null?void 0:u.data,C,n),this.selectResult=C,this.selectError=null}catch(D){this.selectError=D}else C=m.data;if(typeof n.placeholderData!="undefined"&&typeof C=="undefined"&&R==="loading"){let D;if(u!=null&&u.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))D=u.data;else if(D=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof D!="undefined")try{D=n.select(D),this.selectError=null}catch($){this.selectError=$}typeof D!="undefined"&&(R="success",C=Ap(u==null?void 0:u.data,D,n),A=!0)}this.selectError&&(x=this.selectError,C=this.selectResult,E=Date.now(),R="error");const k=P==="fetching",b=R==="loading",I=R==="error";return{status:R,fetchStatus:P,isLoading:b,isSuccess:R==="success",isError:I,isInitialLoading:b&&k,data:C,dataUpdatedAt:g,error:x,errorUpdatedAt:E,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:k,isRefetching:k&&!b,isLoadingError:I&&m.dataUpdatedAt===0,isPaused:P==="paused",isPlaceholderData:A,isPreviousData:w,isRefetchError:I&&m.dataUpdatedAt!==0,isStale:$m(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zl(r,n))return;this.currentResult=r;const o={cache:!0},u=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!this.trackedProps.size)return!0;const f=new Set(c!=null?c:this.trackedProps);return this.options.useErrorBoundary&&f.add("error"),Object.keys(this.currentResult).some(d=>{const p=d;return this.currentResult[p]!==n[p]&&f.has(p)})};(t==null?void 0:t.listeners)!==!1&&u()&&(o.listeners=!0),this.notify(F(F({},o),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!wl(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){et.batch(()=>{if(t.onSuccess){var n,r,o,u;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(u=this.options).onSettled)==null||o.call(u,this.currentResult.data,null)}else if(t.onError){var a,c,f,d;(a=(c=this.options).onError)==null||a.call(c,this.currentResult.error),(f=(d=this.options).onSettled)==null||f.call(d,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:p})=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function rM(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function b1(e,t){return rM(e,t)||e.state.dataUpdatedAt>0&&Sp(e,t,t.refetchOnMount)}function Sp(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&$m(e,t)}return!1}function I1(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&$m(e,n)}function $m(e,t){return e.isStaleByTime(t.staleTime)}function iM(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!Zl(e.getCurrentResult(),t)}let oM=class extends fs{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),Zl(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,q(F({},this.options),{variables:typeof t!="undefined"?t:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:qS(),n=q(F({},t),{isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=n}notify(t){et.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,o,u;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(o=(u=this.mutateOptions).onSettled)==null||o.call(u,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var a,c,f,d;(a=(c=this.mutateOptions).onError)==null||a.call(c,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(f=(d=this.mutateOptions).onSettled)==null||f.call(d,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:p})=>{p(this.currentResult)})})}};const YS=lS.useSyncExternalStore,M1=B.createContext(void 0),JS=B.createContext(!1);function XS(e,t){return e||(t&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=M1),window.ReactQueryClientContext):M1)}const qm=({context:e}={})=>{const t=B.useContext(XS(e,B.useContext(JS)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZS=({client:e,children:t,context:n,contextSharing:r=!1})=>{B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=XS(n,r);return B.createElement(JS.Provider,{value:!n&&r},B.createElement(o.Provider,{value:e},t))},eC=B.createContext(!1),sM=()=>B.useContext(eC);eC.Provider;function uM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const aM=B.createContext(uM()),lM=()=>B.useContext(aM);function tC(e,t){return typeof e=="function"?e(...t):!!e}const cM=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},fM=e=>{B.useEffect(()=>{e.clearReset()},[e])},dM=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&tC(n,[e.error,r]),hM=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},pM=(e,t)=>e.isLoading&&e.isFetching&&!t,mM=(e,t,n)=>(e==null?void 0:e.suspense)&&pM(t,n),gM=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function yM(e,t){const n=qm({context:e.context}),r=sM(),o=lM(),u=n.defaultQueryOptions(e);u._optimisticResults=r?"isRestoring":"optimistic",u.onError&&(u.onError=et.batchCalls(u.onError)),u.onSuccess&&(u.onSuccess=et.batchCalls(u.onSuccess)),u.onSettled&&(u.onSettled=et.batchCalls(u.onSettled)),hM(u),cM(u,o),fM(o);const[a]=B.useState(()=>new t(n,u)),c=a.getOptimisticResult(u);if(YS(B.useCallback(f=>{const d=r?()=>{}:a.subscribe(et.batchCalls(f));return a.updateResult(),d},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),B.useEffect(()=>{a.setOptions(u,{listeners:!1})},[u,a]),mM(u,c,r))throw gM(u,a,o);if(dM({result:c,errorResetBoundary:o,useErrorBoundary:u.useErrorBoundary,query:a.getCurrentQuery()}))throw c.error;return u.notifyOnChangeProps?c:a.trackResult(c)}function Bu(e,t,n){const r=Gs(e,t,n);return yM(r,nM)}function to(e,t,n){const r=zI(e,t,n),o=qm({context:r.context}),[u]=B.useState(()=>new oM(o,r));B.useEffect(()=>{u.setOptions(r)},[u,r]);const a=YS(B.useCallback(f=>u.subscribe(et.batchCalls(f)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c=B.useCallback((f,d)=>{u.mutate(f,d).catch(vM)},[u]);if(a.error&&tC(u.options.useErrorBoundary,[a.error]))throw a.error;return q(F({},a),{mutate:c,mutateAsync:a.mutate})}function vM(){}const wM=()=>to(n=>ct(Ft,[n],function*({message_id:e,data:t}){var u;const r=new Headers;return r.append("Content-Type","application/json"),r.append("x-frappe-csrf-token",(u=window==null?void 0:window.frappe)==null?void 0:u.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.submit_form",{headers:r,body:JSON.stringify({message_id:e,data:t}),method:"POST"})).json()}));function xM({cna_conversation:e}){var a,c,f,d;const t=B.useRef(null),{mutate:n}=wM(),o=((f=(c=(a=window.frappe)==null?void 0:a.session)==null?void 0:c.user)!=null?f:"")===(e==null?void 0:e.user);B.useEffect(()=>{var g,x,E,P;const p=typeof e.message=="string"?JSON.parse(e.message):{},m=q(F({},p.form),{components:((g=e==null?void 0:e.status)==null?void 0:g.toLocaleLowerCase())==="submitted"?(E=(x=p==null?void 0:p.form)==null?void 0:x.components)==null?void 0:E.map(R=>q(F({},R),{disabled:!0})):((P=p==null?void 0:p.form)==null?void 0:P.components)||[]});window==null||window.Formio.createForm(t.current,m,{baseUrl:window.location.origin}).then(R=>{R.submission={data:p!=null&&p.submission_data?p.submission_data:(p==null?void 0:p.prefill_data)||{}},R.nosubmit=!0,R.on("submit",w=>ct(this,null,function*(){var C;const A=(C=t.current)==null?void 0:C.querySelector('button[type="submit"]');A&&(A.disabled=!0,R.emit("submitDone",w),n({message_id:e.id,data:w.data}))}))})},[e.id,e.message,e==null?void 0:e.status,n]);const u=o?"":(d=e==null?void 0:e.user)!=null?d:"";return De("div",{className:"tw-flex tw-flex-col tw-gap-2 tw-w-full",children:[u?z("div",{className:"tw-inline-flex tw-items-center tw-self-start tw-rounded-full tw-bg-slate-100 tw-border tw-border-slate-200 tw-text-[11px] tw-font-semibold tw-uppercase tw-tracking-[0.08em] tw-text-slate-600 tw-px-2 tw-py-[6px]",children:u}):null,z("div",{style:{minWidth:"min(600px, 70vw)"},className:"chatnext-assistant-formio",children:z("div",{ref:t})})]})}function AM({cna_conversation:e}){var n;const t=JSON.parse(e.message||"{}");return(n=t==null?void 0:t.submission)==null||delete n.submit,z("div",{children:z("p",{children:"form submitted"})})}const Ym=e=>{var t,n;return e?(n=(t=e==null?void 0:e.split)==null?void 0:t.call(e,`
75
- `))==null?void 0:n.map((r,o)=>z("div",{children:r},o)):null};function SM({cna_conversation:e}){return z("div",{children:Ym(e.message)})}function CM({cna_conversation:e}){const t=JSON.parse(e.message||"{}");return z("div",{children:t.name_of_action||""})}const nC=(e,t)=>Bu(["cna_conversation",e.session_id],()=>ct(Ft,null,function*(){return(yield(yield fetcher(`/api/method/nextai.funnel.doctype.funnel_task.assistant_api.get_assistant_messages?session_id=${e.session_id}`)).json()).message}),t),EM=()=>{const{session_id:e}=gn(o=>o.user),t=io(),{data:n,refetch:r}=nC({session_id:e!=null?e:""},{enabled:!!e});return to({mutationFn:u=>ct(Ft,[u],function*({message_id:o}){var f;const a=new Headers;return a.append("Content-Type","application/json"),a.append("x-frappe-csrf-token",(f=window==null?void 0:window.frappe)==null?void 0:f.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.on_complete_ui_action",{headers:a,body:JSON.stringify({message_id:o}),method:"POST"})).json()}),onSuccess:()=>ct(Ft,null,function*(){if(yield r(),n!=null&&n.length){const o=n.map(u=>q(F({},u),{author_image:"",timestamp:new Date(u.creation).toISOString()}));t(VS(o))}})})};function D1({cna_conversation:e}){const t=JSON.parse(e.message||"{}"),n=(e==null?void 0:e.status)==="pending",{mutate:r}=EM(),o=io();return B.useEffect(()=>{var u,a;if(n&&(t!=null&&t.action_type)){switch(t.action_type){case"create_document":const c=(t==null?void 0:t.prefill_json)||{};c.doctype=(t==null?void 0:t.doctype)||"";const f=new Event("paste");f.clipboardData={getData:()=>JSON.stringify(c)},(u=document==null?void 0:document.body)==null||u.dispatchEvent(f);break;case"update_document":const d=(t==null?void 0:t.document_data)||{},p=["doctype","name","owner","creation","modified","modified_by","docstatus","idx"];for(const g of p)delete d[g];const m=window==null?void 0:window.cur_frm;m&&typeof(m==null?void 0:m.set_value)=="function"&&Object.entries(d).map(([g,x])=>{try{m.set_value(g,x)}catch(E){console.log("documentData",E)}});break;case"redirect_to":(a=window==null?void 0:window.frappe)==null||a.set_route((t==null?void 0:t.route)||"");break;case"close_modal":console.log("ui action"),setTimeout(()=>o(Hm()),5e3);break}r({message_id:(e==null?void 0:e.id)||""})}},[e==null?void 0:e.id,e.status,e.message,r,o,n]),(t==null?void 0:t.action_type)==="create_document"?De("div",{children:[n?"Creating":"Created"," new ",(t==null?void 0:t.doctype)||""]}):(t==null?void 0:t.action_type)==="update_document"?De("div",{children:[n?"Updating":"Updated"," ",(t==null?void 0:t.doctype)||""]}):(t==null?void 0:t.action_type)==="redirect_to"?z("div",{children:n?"Redirecting...":"Redirected"}):(t==null?void 0:t.action_type)==="close_modal"?z(Ir,{}):z("div",{children:(t==null?void 0:t.action_type)||""})}const rC=()=>to(n=>ct(Ft,[n],function*({session_id:e,message:t}){var u;const r=new Headers;return r.append("Content-Type","application/json"),r.append("x-frappe-csrf-token",(u=window==null?void 0:window.frappe)==null?void 0:u.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.add_user_message",{headers:r,body:JSON.stringify({session_id:e,message:t}),method:"POST"})).json()}));function PM({cna_conversation:e}){var f;const[t,n]=B.useState(!1),{session_id:r}=gn(d=>d.user),o=JSON.parse(e.message||"{}"),{mutate:u,isLoading:a}=rC(),c=d=>{!d||!r||(u({message:d,session_id:r}),n(!0))};return De("div",{className:"tw-w-full",children:[z("div",{children:Ym(o==null?void 0:o.question)}),z("div",{className:"tw-w-full tw-flex tw-flex-col tw-gap-1",children:(f=o==null?void 0:o.options)==null?void 0:f.map((d,p)=>z("button",{disabled:a||t,className:`${a||t?"tw-cursor-default":"tw-cursor-pointer"} tw-w-full tw-p-2 tw-px-4 tw-rounded-md tw-border tw-bg-white tw-text-black tw-text-center`,onClick:()=>c((d==null?void 0:d.option)||""),children:z("strong",{children:(d==null?void 0:d.option)||"-"})},p))})]})}const iC=B.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Xc=B.createContext({}),Jm=B.createContext(null),Zc=typeof document!="undefined",_M=Zc?B.useLayoutEffect:B.useEffect,oC=B.createContext({strict:!1}),Xm=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),TM="framerAppearId",sC="data-"+Xm(TM);function kM(e,t,n,r){const{visualElement:o}=B.useContext(Xc),u=B.useContext(oC),a=B.useContext(Jm),c=B.useContext(iC).reducedMotion,f=B.useRef();r=r||u.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const d=f.current;B.useInsertionEffect(()=>{d&&d.update(n,a)});const p=B.useRef(!!(n[sC]&&!window.HandoffComplete));return _M(()=>{d&&(d.render(),p.current&&d.animationState&&d.animationState.animateChanges())}),B.useEffect(()=>{d&&(d.updateFeatures(),!p.current&&d.animationState&&d.animationState.animateChanges(),p.current&&(p.current=!1,window.HandoffComplete=!0))}),d}function Fo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function RM(e,t,n){return B.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Fo(n)&&(n.current=r))},[t])}function Ru(e){return typeof e=="string"||Array.isArray(e)}function ef(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eg=["initial",...Zm];function tf(e){return ef(e.animate)||eg.some(t=>Ru(e[t]))}function uC(e){return!!(tf(e)||e.variants)}function OM(e,t){if(tf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ru(n)?n:void 0,animate:Ru(r)?r:void 0}}return e.inherit!==!1?t:{}}function LM(e){const{initial:t,animate:n}=OM(e,B.useContext(Xc));return B.useMemo(()=>({initial:t,animate:n}),[N1(t),N1(n)])}function N1(e){return Array.isArray(e)?e.join(" "):e}const F1={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"]},Ou={};for(const e in F1)Ou[e]={isEnabled:t=>F1[e].some(n=>!!t[n])};function bM(e){for(const t in e)Ou[t]=F(F({},Ou[t]),e[t])}const aC=B.createContext({}),lC=B.createContext({}),IM=Symbol.for("motionComponentSymbol");function MM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&bM(e);function u(c,f){let d;const p=q(F(F({},B.useContext(iC)),c),{layoutId:DM(c)}),{isStatic:m}=p,g=LM(c),x=r(c,m);if(!m&&Zc){g.visualElement=kM(o,x,p,t);const E=B.useContext(lC),P=B.useContext(oC).strict;g.visualElement&&(d=g.visualElement.loadFeatures(p,P,e,E))}return B.createElement(Xc.Provider,{value:g},d&&g.visualElement?B.createElement(d,F({visualElement:g.visualElement},p)):null,n(o,c,RM(x,g.visualElement,f),x,m,g.visualElement))}const a=B.forwardRef(u);return a[IM]=o,a}function DM({layoutId:e}){const t=B.useContext(aC).id;return t&&e!==void 0?t+"-"+e:e}function NM(e){function t(r,o={}){return MM(e(r,o))}if(typeof Proxy=="undefined")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const FM=["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 tg(e){return typeof e!="string"||e.includes("-")?!1:!!(FM.indexOf(e)>-1||/[A-Z]/.test(e))}const nc={};function BM(e){Object.assign(nc,e)}const Vu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oo=new Set(Vu);function cC(e,{layout:t,layoutId:n}){return oo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!nc[e]||e==="opacity")}const sn=e=>!!(e&&e.getVelocity),VM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UM=Vu.length;function jM(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let u="";for(let a=0;a<UM;a++){const c=Vu[a];if(e[c]!==void 0){const f=VM[c]||c;u+=`${f}(${e[c]}) `}}return t&&!e.z&&(u+="translateZ(0)"),u=u.trim(),o?u=o(e,r?"":u):n&&r&&(u="none"),u}const fC=e=>t=>typeof t=="string"&&t.startsWith(e),dC=fC("--"),Cp=fC("var(--"),zM=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,WM=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xi=(e,t,n)=>Math.min(Math.max(n,e),t),so={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ru=q(F({},so),{transform:e=>xi(0,1,e)}),Za=q(F({},so),{default:1}),iu=e=>Math.round(e*1e5)/1e5,nf=/(-)?([\d]*\.?[\d])+/g,hC=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,QM=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Uu(e){return typeof e=="string"}const ju=e=>({test:t=>Uu(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kr=ju("deg"),fr=ju("%"),oe=ju("px"),HM=ju("vh"),GM=ju("vw"),B1=q(F({},fr),{parse:e=>fr.parse(e)/100,transform:e=>fr.transform(e*100)}),V1=q(F({},so),{transform:Math.round}),pC={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,size:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,rotate:Kr,rotateX:Kr,rotateY:Kr,rotateZ:Kr,scale:Za,scaleX:Za,scaleY:Za,scaleZ:Za,skew:Kr,skewX:Kr,skewY:Kr,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:ru,originX:B1,originY:B1,originZ:oe,zIndex:V1,fillOpacity:ru,strokeOpacity:ru,numOctaves:V1};function ng(e,t,n,r){const{style:o,vars:u,transform:a,transformOrigin:c}=e;let f=!1,d=!1,p=!0;for(const m in t){const g=t[m];if(dC(m)){u[m]=g;continue}const x=pC[m],E=WM(g,x);if(oo.has(m)){if(f=!0,a[m]=E,!p)continue;g!==(x.default||0)&&(p=!1)}else m.startsWith("origin")?(d=!0,c[m]=E):o[m]=E}if(t.transform||(f||r?o.transform=jM(e.transform,n,p,r):o.transform&&(o.transform="none")),d){const{originX:m="50%",originY:g="50%",originZ:x=0}=c;o.transformOrigin=`${m} ${g} ${x}`}}const rg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mC(e,t,n){for(const r in t)!sn(t[r])&&!cC(r,n)&&(e[r]=t[r])}function KM({transformTemplate:e},t,n){return B.useMemo(()=>{const r=rg();return ng(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $M(e,t,n){const r=e.style||{},o={};return mC(o,r,e),Object.assign(o,KM(e,t,n)),e.transformValues?e.transformValues(o):o}function qM(e,t,n){const r={},o=$M(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const YM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function rc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YM.has(e)}let gC=e=>!rc(e);function JM(e){e&&(gC=t=>t.startsWith("on")?!rc(t):e(t))}try{JM(require("@emotion/is-prop-valid").default)}catch(e){}function XM(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(gC(o)||n===!0&&rc(o)||!t&&!rc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function U1(e,t,n){return typeof e=="string"?e:oe.transform(t+n*e)}function ZM(e,t,n){const r=U1(t,e.x,e.width),o=U1(n,e.y,e.height);return`${r} ${o}`}const e5={offset:"stroke-dashoffset",array:"stroke-dasharray"},t5={offset:"strokeDashoffset",array:"strokeDasharray"};function n5(e,t,n=1,r=0,o=!0){e.pathLength=1;const u=o?e5:t5;e[u.offset]=oe.transform(-r);const a=oe.transform(t),c=oe.transform(n);e[u.array]=`${a} ${c}`}function ig(e,x,p,m,g){var E=x,{attrX:t,attrY:n,attrScale:r,originX:o,originY:u,pathLength:a,pathSpacing:c=1,pathOffset:f=0}=E,d=Lt(E,["attrX","attrY","attrScale","originX","originY","pathLength","pathSpacing","pathOffset"]);if(ng(e,d,p,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:P,style:R,dimensions:w}=e;P.transform&&(w&&(R.transform=P.transform),delete P.transform),w&&(o!==void 0||u!==void 0||R.transform)&&(R.transformOrigin=ZM(w,o!==void 0?o:.5,u!==void 0?u:.5)),t!==void 0&&(P.x=t),n!==void 0&&(P.y=n),r!==void 0&&(P.scale=r),a!==void 0&&n5(P,a,c,f,!1)}const yC=()=>q(F({},rg()),{attrs:{}}),og=e=>typeof e=="string"&&e.toLowerCase()==="svg";function r5(e,t,n,r){const o=B.useMemo(()=>{const u=yC();return ig(u,t,{enableHardwareAcceleration:!1},og(r),e.transformTemplate),q(F({},u.attrs),{style:F({},u.style)})},[t]);if(e.style){const u={};mC(u,e.style,e),o.style=F(F({},u),o.style)}return o}function i5(e=!1){return(n,r,o,{latestValues:u},a)=>{const f=(tg(n)?r5:qM)(r,u,a,n),d=XM(r,typeof n=="string",e),p=q(F(F({},d),f),{ref:o}),{children:m}=r,g=B.useMemo(()=>sn(m)?m.get():m,[m]);return B.createElement(n,q(F({},p),{children:g}))}}function vC(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const u in n)e.style.setProperty(u,n[u])}const wC=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 xC(e,t,n,r){vC(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(wC.has(o)?o:Xm(o),t.attrs[o])}function sg(e,t){const{style:n}=e,r={};for(const o in n)(sn(n[o])||t.style&&sn(t.style[o])||cC(o,e))&&(r[o]=n[o]);return r}function AC(e,t){const n=sg(e,t);for(const r in e)if(sn(e[r])||sn(t[r])){const o=Vu.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function ug(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function o5(e){const t=B.useRef(null);return t.current===null&&(t.current=e()),t.current}const ic=e=>Array.isArray(e),s5=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),u5=e=>ic(e)?e[e.length-1]||0:e;function xl(e){const t=sn(e)?e.get():e;return s5(t)?t.toValue():t}function a5({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,u){const a={latestValues:l5(r,o,u,e),renderState:t()};return n&&(a.mount=c=>n(r,c,a)),a}const SC=e=>(t,n)=>{const r=B.useContext(Xc),o=B.useContext(Jm),u=()=>a5(e,t,r,o);return n?u():o5(u)};function l5(e,t,n,r){const o={},u=r(e,{});for(const g in u)o[g]=xl(u[g]);let{initial:a,animate:c}=e;const f=tf(e),d=uC(e);t&&d&&!f&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let p=n?n.initial===!1:!1;p=p||a===!1;const m=p?c:a;return m&&typeof m!="boolean"&&!ef(m)&&(Array.isArray(m)?m:[m]).forEach(x=>{const E=ug(e,x);if(!E)return;const A=E,{transitionEnd:P,transition:R}=A,w=Lt(A,["transitionEnd","transition"]);for(const C in w){let k=w[C];if(Array.isArray(k)){const b=p?k.length-1:0;k=k[b]}k!==null&&(o[C]=k)}for(const C in P)o[C]=P[C]}),o}const tt=e=>e;class j1{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function c5(e){let t=new j1,n=new j1,r=0,o=!1,u=!1;const a=new WeakSet,c={schedule:(f,d=!1,p=!1)=>{const m=p&&o,g=m?t:n;return d&&a.add(f),g.add(f)&&m&&o&&(r=t.order.length),f},cancel:f=>{n.remove(f),a.delete(f)},process:f=>{if(o){u=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let d=0;d<r;d++){const p=t.order[d];p(f),a.has(p)&&(c.schedule(p),e())}o=!1,u&&(u=!1,c.process(f))}};return c}const el=["prepare","read","update","preRender","render","postRender"],f5=40;function d5(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=el.reduce((m,g)=>(m[g]=c5(()=>n=!0),m),{}),a=m=>u[m].process(o),c=()=>{const m=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(m-o.timestamp,f5),1),o.timestamp=m,o.isProcessing=!0,el.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(c))},f=()=>{n=!0,r=!0,o.isProcessing||e(c)};return{schedule:el.reduce((m,g)=>{const x=u[g];return m[g]=(E,P=!1,R=!1)=>(n||f(),x.schedule(E,P,R)),m},{}),cancel:m=>el.forEach(g=>u[g].cancel(m)),state:o,steps:u}}const{schedule:je,cancel:Dr,state:Dt,steps:ah}=d5(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:tt,!0),h5={useVisualState:SC({scrapeMotionValuesFromProps:AC,createRenderState:yC,onMount:(e,t,{renderState:n,latestValues:r})=>{je.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}}),je.render(()=>{ig(n,r,{enableHardwareAcceleration:!1},og(t.tagName),e.transformTemplate),xC(t,n)})}})},p5={useVisualState:SC({scrapeMotionValuesFromProps:sg,createRenderState:rg})};function m5(e,{forwardMotionProps:t=!1},n,r){const o=tg(e)?h5:p5;return q(F({},o),{preloadedFeatures:n,useRender:i5(t),createVisualElement:r,Component:e})}function Pr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const CC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function rf(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const g5=e=>t=>CC(t)&&e(t,rf(t));function Tr(e,t,n,r){return Pr(e,t,g5(n),r)}const y5=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(y5);function EC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const z1=EC("dragHorizontal"),W1=EC("dragVertical");function PC(e){let t=!1;if(e==="y")t=W1();else if(e==="x")t=z1();else{const n=z1(),r=W1();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function _C(){const e=PC(!0);return e?(e(),!1):!0}class Pi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Q1(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(u,a)=>{if(u.pointerType==="touch"||_C())return;const c=e.getProps();e.animationState&&c.whileHover&&e.animationState.setActive("whileHover",t),c[r]&&je.update(()=>c[r](u,a))};return Tr(e.current,n,o,{passive:!e.getProps()[r]})}class v5 extends Pi{mount(){this.unmount=hi(Q1(this.node,!0),Q1(this.node,!1))}unmount(){}}class w5 extends Pi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(n){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=hi(Pr(this.node.current,"focus",()=>this.onFocus()),Pr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const TC=(e,t)=>t?e===t?!0:TC(e,t.parentElement):!1;function lh(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,rf(n))}class x5 extends Pi{constructor(){super(...arguments),this.removeStartListeners=tt,this.removeEndListeners=tt,this.removeAccessibleListeners=tt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),u=Tr(window,"pointerup",(c,f)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:p,globalTapTarget:m}=this.node.getProps();je.update(()=>{!m&&!TC(this.node.current,c.target)?p&&p(c,f):d&&d(c,f)})},{passive:!(r.onTap||r.onPointerUp)}),a=Tr(window,"pointercancel",(c,f)=>this.cancelPress(c,f),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=hi(u,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=u=>{if(u.key!=="Enter"||this.isPressing)return;const a=c=>{c.key!=="Enter"||!this.checkPressEnd()||lh("up",(f,d)=>{const{onTap:p}=this.node.getProps();p&&je.update(()=>p(f,d))})};this.removeEndListeners(),this.removeEndListeners=Pr(this.node.current,"keyup",a),lh("down",(c,f)=>{this.startPress(c,f)})},n=Pr(this.node.current,"keydown",t),r=()=>{this.isPressing&&lh("cancel",(u,a)=>this.cancelPress(u,a))},o=Pr(this.node.current,"blur",r);this.removeAccessibleListeners=hi(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&je.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!_C()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&je.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Tr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Pr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=hi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ep=new WeakMap,ch=new WeakMap,A5=e=>{const t=Ep.get(e.target);t&&t(e)},S5=e=>{e.forEach(A5)};function C5(n){var r=n,{root:e}=r,t=Lt(r,["root"]);const o=e||document;ch.has(o)||ch.set(o,{});const u=ch.get(o),a=JSON.stringify(t);return u[a]||(u[a]=new IntersectionObserver(S5,F({root:e},t))),u[a]}function E5(e,t,n){const r=C5(t);return Ep.set(e,n),r.observe(e),()=>{Ep.delete(e),r.unobserve(e)}}const P5={some:0,all:1};class _5 extends Pi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:u}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:P5[o]},c=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,u&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),g=d?p:m;g&&g(f)};return E5(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(T5(t,n))&&this.startObserver()}unmount(){}}function T5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const k5={inView:{Feature:_5},tap:{Feature:x5},focus:{Feature:w5},hover:{Feature:v5}};function kC(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}function R5(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function O5(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function of(e,t,n){const r=e.getProps();return ug(r,t,n!==void 0?n:r.custom,R5(e),O5(e))}let L5=tt,ag=tt;const pi=e=>e*1e3,kr=e=>e/1e3,b5={current:!1},RC=e=>Array.isArray(e)&&typeof e[0]=="number";function OC(e){return!!(!e||typeof e=="string"&&LC[e]||RC(e)||Array.isArray(e)&&e.every(OC))}const Ks=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,LC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ks([0,.65,.55,1]),circOut:Ks([.55,0,1,.45]),backIn:Ks([.31,.01,.66,-.59]),backOut:Ks([.33,1.53,.69,.99])};function bC(e){if(e)return RC(e)?Ks(e):Array.isArray(e)?e.map(bC):LC[e]}function I5(e,t,n,{delay:r=0,duration:o,repeat:u=0,repeatType:a="loop",ease:c,times:f}={}){const d={[t]:n};f&&(d.offset=f);const p=bC(c);return Array.isArray(p)&&(d.easing=p),e.animate(d,{delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:u+1,direction:a==="reverse"?"alternate":"normal"})}function M5(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const IC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,D5=1e-7,N5=12;function F5(e,t,n,r,o){let u,a,c=0;do a=t+(n-t)/2,u=IC(a,r,o)-e,u>0?n=a:t=a;while(Math.abs(u)>D5&&++c<N5);return a}function zu(e,t,n,r){if(e===t&&n===r)return tt;const o=u=>F5(u,0,1,e,n);return u=>u===0||u===1?u:IC(o(u),t,r)}const B5=zu(.42,0,1,1),V5=zu(0,0,.58,1),MC=zu(.42,0,.58,1),U5=e=>Array.isArray(e)&&typeof e[0]!="number",DC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,NC=e=>t=>1-e(1-t),lg=e=>1-Math.sin(Math.acos(e)),FC=NC(lg),j5=DC(lg),BC=zu(.33,1.53,.69,.99),cg=NC(BC),z5=DC(cg),W5=e=>(e*=2)<1?.5*cg(e):.5*(2-Math.pow(2,-10*(e-1))),Q5={linear:tt,easeIn:B5,easeInOut:MC,easeOut:V5,circIn:lg,circInOut:j5,circOut:FC,backIn:cg,backInOut:z5,backOut:BC,anticipate:W5},H1=e=>{if(Array.isArray(e)){ag(e.length===4);const[t,n,r,o]=e;return zu(t,n,r,o)}else if(typeof e=="string")return Q5[e];return e},fg=(e,t)=>n=>!!(Uu(n)&&QM.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),VC=(e,t,n)=>r=>{if(!Uu(r))return r;const[o,u,a,c]=r.match(nf);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},H5=e=>xi(0,255,e),fh=q(F({},so),{transform:e=>Math.round(H5(e))}),Gi={test:fg("rgb","red"),parse:VC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+fh.transform(e)+", "+fh.transform(t)+", "+fh.transform(n)+", "+iu(ru.transform(r))+")"};function G5(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Pp={test:fg("#"),parse:G5,transform:Gi.transform},Bo={test:fg("hsl","hue"),parse:VC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fr.transform(iu(t))+", "+fr.transform(iu(n))+", "+iu(ru.transform(r))+")"},zt={test:e=>Gi.test(e)||Pp.test(e)||Bo.test(e),parse:e=>Gi.test(e)?Gi.parse(e):Bo.test(e)?Bo.parse(e):Pp.parse(e),transform:e=>Uu(e)?e:e.hasOwnProperty("red")?Gi.transform(e):Bo.transform(e)},qe=(e,t,n)=>-n*e+n*t+e;function dh(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 K5({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,u=0,a=0;if(!t)o=u=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,f=2*n-c;o=dh(f,c,e+1/3),u=dh(f,c,e),a=dh(f,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(a*255),alpha:r}}const hh=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},$5=[Pp,Gi,Bo],q5=e=>$5.find(t=>t.test(e));function G1(e){const t=q5(e);let n=t.parse(e);return t===Bo&&(n=K5(n)),n}const UC=(e,t)=>{const n=G1(e),r=G1(t),o=F({},n);return u=>(o.red=hh(n.red,r.red,u),o.green=hh(n.green,r.green,u),o.blue=hh(n.blue,r.blue,u),o.alpha=qe(n.alpha,r.alpha,u),Gi.transform(o))};function Y5(e){var t,n;return isNaN(e)&&Uu(e)&&(((t=e.match(nf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(hC))===null||n===void 0?void 0:n.length)||0)>0}const jC={regex:zM,countKey:"Vars",token:"${v}",parse:tt},zC={regex:hC,countKey:"Colors",token:"${c}",parse:zt.parse},WC={regex:nf,countKey:"Numbers",token:"${n}",parse:so.parse};function ph(e,{regex:t,countKey:n,token:r,parse:o}){const u=e.tokenised.match(t);u&&(e["num"+n]=u.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...u.map(o)))}function oc(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&ph(n,jC),ph(n,zC),ph(n,WC),n}function QC(e){return oc(e).values}function HC(e){const{values:t,numColors:n,numVars:r,tokenised:o}=oc(e),u=t.length;return a=>{let c=o;for(let f=0;f<u;f++)f<r?c=c.replace(jC.token,a[f]):f<r+n?c=c.replace(zC.token,zt.transform(a[f])):c=c.replace(WC.token,iu(a[f]));return c}}const J5=e=>typeof e=="number"?0:e;function X5(e){const t=QC(e);return HC(e)(t.map(J5))}const Ai={test:Y5,parse:QC,createTransformer:HC,getAnimatableNone:X5},GC=(e,t)=>n=>`${n>0?t:e}`;function KC(e,t){return typeof e=="number"?n=>qe(e,t,n):zt.test(e)?UC(e,t):e.startsWith("var(")?GC(e,t):qC(e,t)}const $C=(e,t)=>{const n=[...e],r=n.length,o=e.map((u,a)=>KC(u,t[a]));return u=>{for(let a=0;a<r;a++)n[a]=o[a](u);return n}},Z5=(e,t)=>{const n=F(F({},e),t),r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=KC(e[o],t[o]));return o=>{for(const u in r)n[u]=r[u](o);return n}},qC=(e,t)=>{const n=Ai.createTransformer(t),r=oc(e),o=oc(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?hi($C(r.values,o.values),n):GC(e,t)},Lu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},K1=(e,t)=>n=>qe(e,t,n);function eD(e){return typeof e=="number"?K1:typeof e=="string"?zt.test(e)?UC:qC:Array.isArray(e)?$C:typeof e=="object"?Z5:K1}function tD(e,t,n){const r=[],o=n||eD(e[0]),u=e.length-1;for(let a=0;a<u;a++){let c=o(e[a],e[a+1]);if(t){const f=Array.isArray(t)?t[a]||tt:t;c=hi(f,c)}r.push(c)}return r}function YC(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const u=e.length;if(ag(u===t.length),u===1)return()=>t[0];e[0]>e[u-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tD(t,r,o),c=a.length,f=d=>{let p=0;if(c>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const m=Lu(e[p],e[p+1],d);return a[p](m)};return n?d=>f(xi(e[0],e[u-1],d)):f}function nD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Lu(0,t,r);e.push(qe(n,1,o))}}function rD(e){const t=[0];return nD(t,e.length-1),t}function iD(e,t){return e.map(n=>n*t)}function oD(e,t){return e.map(()=>t||MC).splice(0,e.length-1)}function sc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=U5(r)?r.map(H1):H1(r),u={done:!1,value:t[0]},a=iD(n&&n.length===t.length?n:rD(t),e),c=YC(a,t,{ease:Array.isArray(o)?o:oD(t,o)});return{calculatedDuration:e,next:f=>(u.value=c(f),u.done=f>=e,u)}}function JC(e,t){return t?e*(1e3/t):0}const sD=5;function XC(e,t,n){const r=Math.max(t-sD,0);return JC(n-e(r),t-r)}const mh=.001,uD=.01,$1=10,aD=.05,lD=1;function cD({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,u;L5(e<=pi($1));let a=1-t;a=xi(aD,lD,a),e=xi(uD,$1,kr(e)),a<1?(o=d=>{const p=d*a,m=p*e,g=p-n,x=_p(d,a),E=Math.exp(-m);return mh-g/x*E},u=d=>{const m=d*a*e,g=m*n+n,x=Math.pow(a,2)*Math.pow(d,2)*e,E=Math.exp(-m),P=_p(Math.pow(d,2),a);return(-o(d)+mh>0?-1:1)*((g-x)*E)/P}):(o=d=>{const p=Math.exp(-d*e),m=(d-n)*e+1;return-mh+p*m},u=d=>{const p=Math.exp(-d*e),m=(n-d)*(e*e);return p*m});const c=5/e,f=dD(o,u,c);if(e=pi(e),isNaN(f))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(f,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const fD=12;function dD(e,t,n){let r=n;for(let o=1;o<fD;o++)r=r-e(r)/t(r);return r}function _p(e,t){return e*Math.sqrt(1-t*t)}const hD=["duration","bounce"],pD=["stiffness","damping","mass"];function q1(e,t){return t.some(n=>e[n]!==void 0)}function mD(e){let t=F({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!q1(e,pD)&&q1(e,hD)){const n=cD(e);t=q(F(F({},t),n),{mass:1}),t.isResolvedFromDuration=!0}return t}function ZC(o){var u=o,{keyframes:e,restDelta:t,restSpeed:n}=u,r=Lt(u,["keyframes","restDelta","restSpeed"]);const a=e[0],c=e[e.length-1],f={done:!1,value:a},{stiffness:d,damping:p,mass:m,duration:g,velocity:x,isResolvedFromDuration:E}=mD(q(F({},r),{velocity:-kr(r.velocity||0)})),P=x||0,R=p/(2*Math.sqrt(d*m)),w=c-a,A=kr(Math.sqrt(d/m)),C=Math.abs(w)<5;n||(n=C?.01:2),t||(t=C?.005:.5);let k;if(R<1){const b=_p(A,R);k=I=>{const N=Math.exp(-R*A*I);return c-N*((P+R*A*w)/b*Math.sin(b*I)+w*Math.cos(b*I))}}else if(R===1)k=b=>c-Math.exp(-A*b)*(w+(P+A*w)*b);else{const b=A*Math.sqrt(R*R-1);k=I=>{const N=Math.exp(-R*A*I),D=Math.min(b*I,300);return c-N*((P+R*A*w)*Math.sinh(D)+b*w*Math.cosh(D))/b}}return{calculatedDuration:E&&g||null,next:b=>{const I=k(b);if(E)f.done=b>=g;else{let N=P;b!==0&&(R<1?N=XC(k,b,I):N=0);const D=Math.abs(N)<=n,$=Math.abs(c-I)<=t;f.done=D&&$}return f.value=f.done?c:I,f}}}function Y1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:a,min:c,max:f,restDelta:d=.5,restSpeed:p}){const m=e[0],g={done:!1,value:m},x=D=>c!==void 0&&D<c||f!==void 0&&D>f,E=D=>c===void 0?f:f===void 0||Math.abs(c-D)<Math.abs(f-D)?c:f;let P=n*t;const R=m+P,w=a===void 0?R:a(R);w!==R&&(P=w-m);const A=D=>-P*Math.exp(-D/r),C=D=>w+A(D),k=D=>{const $=A(D),G=C(D);g.done=Math.abs($)<=d,g.value=g.done?w:G};let b,I;const N=D=>{x(g.value)&&(b=D,I=ZC({keyframes:[g.value,E(g.value)],velocity:XC(C,D,g.value),damping:o,stiffness:u,restDelta:d,restSpeed:p}))};return N(0),{calculatedDuration:null,next:D=>{let $=!1;return!I&&b===void 0&&($=!0,k(D),N(D)),b!==void 0&&D>b?I.next(D-b):(!$&&k(D),g)}}}const gD=e=>{const t=({timestamp:n})=>e(n);return{start:()=>je.update(t,!0),stop:()=>Dr(t),now:()=>Dt.isProcessing?Dt.timestamp:performance.now()}},J1=2e4;function X1(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<J1;)t+=n,r=e.next(t);return t>=J1?1/0:t}const yD={decay:Y1,inertia:Y1,tween:sc,keyframes:sc,spring:ZC};function uc(x){var E=x,{autoplay:e=!0,delay:t=0,driver:n=gD,keyframes:r,type:o="keyframes",repeat:u=0,repeatDelay:a=0,repeatType:c="loop",onPlay:f,onStop:d,onComplete:p,onUpdate:m}=E,g=Lt(E,["autoplay","delay","driver","keyframes","type","repeat","repeatDelay","repeatType","onPlay","onStop","onComplete","onUpdate"]);let P=1,R=!1,w,A;const C=()=>{A=new Promise(Se=>{w=Se})};C();let k;const b=yD[o]||sc;let I;b!==sc&&typeof r[0]!="number"&&(I=YC([0,100],r,{clamp:!1}),r=[0,100]);const N=b(q(F({},g),{keyframes:r}));let D;c==="mirror"&&(D=b(q(F({},g),{keyframes:[...r].reverse(),velocity:-(g.velocity||0)})));let $="idle",G=null,le=null,Ge=null;N.calculatedDuration===null&&u&&(N.calculatedDuration=X1(N));const{calculatedDuration:ot}=N;let wt=1/0,_e=1/0;ot!==null&&(wt=ot+a,_e=wt*(u+1)-a);let ye=0;const ze=Se=>{if(le===null)return;P>0&&(le=Math.min(le,Se)),P<0&&(le=Math.min(Se-_e/P,le)),G!==null?ye=G:ye=Math.round(Se-le)*P;const xt=ye-t*(P>=0?1:-1),kt=P>=0?xt<0:xt>_e;ye=Math.max(xt,0),$==="finished"&&G===null&&(ye=_e);let ht=ye,Kt=N;if(u){const Ce=Math.min(ye,_e)/wt;let Ee=Math.floor(Ce),te=Ce%1;!te&&Ce>=1&&(te=1),te===1&&Ee--,Ee=Math.min(Ee,u+1),!!(Ee%2)&&(c==="reverse"?(te=1-te,a&&(te-=a/wt)):c==="mirror"&&(Kt=D)),ht=xi(0,1,te)*wt}const $t=kt?{done:!1,value:r[0]}:Kt.next(ht);I&&($t.value=I($t.value));let{done:X}=$t;!kt&&ot!==null&&(X=P>=0?ye>=_e:ye<=0);const ce=G===null&&($==="finished"||$==="running"&&X);return m&&m($t.value),ce&&se(),$t},H=()=>{k&&k.stop(),k=void 0},ee=()=>{$="idle",H(),w(),C(),le=Ge=null},se=()=>{$="finished",p&&p(),H(),w()},me=()=>{if(R)return;k||(k=n(ze));const Se=k.now();f&&f(),G!==null?le=Se-G:(!le||$==="finished")&&(le=Se),$==="finished"&&C(),Ge=le,G=null,$="running",k.start()};e&&me();const Fe={then(Se,xt){return A.then(Se,xt)},get time(){return kr(ye)},set time(Se){Se=pi(Se),ye=Se,G!==null||!k||P===0?G=Se:le=k.now()-Se/P},get duration(){const Se=N.calculatedDuration===null?X1(N):N.calculatedDuration;return kr(Se)},get speed(){return P},set speed(Se){Se===P||!k||(P=Se,Fe.time=kr(ye))},get state(){return $},play:me,pause:()=>{$="paused",G=ye},stop:()=>{R=!0,$!=="idle"&&($="idle",d&&d(),ee())},cancel:()=>{Ge!==null&&ze(Ge),ee()},complete:()=>{$="finished"},sample:Se=>(le=0,ze(Se))};return Fe}function vD(e){let t;return()=>(t===void 0&&(t=e()),t)}const wD=vD(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xD=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),tl=10,AD=2e4,SD=(e,t)=>t.type==="spring"||e==="backgroundColor"||!OC(t.ease);function CD(e,t,u){var a=u,{onUpdate:n,onComplete:r}=a,o=Lt(a,["onUpdate","onComplete"]);if(!(wD()&&xD.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let f=!1,d,p,m=!1;const g=()=>{p=new Promise(b=>{d=b})};g();let{keyframes:x,duration:E=300,ease:P,times:R}=o;if(SD(t,o)){const b=uc(q(F({},o),{repeat:0,delay:0}));let I={done:!1,value:x[0]};const N=[];let D=0;for(;!I.done&&D<AD;)I=b.sample(D),N.push(I.value),D+=tl;R=void 0,x=N,E=D-tl,P="linear"}const w=I5(e.owner.current,t,x,q(F({},o),{duration:E,ease:P,times:R})),A=()=>{m=!1,w.cancel()},C=()=>{m=!0,je.update(A),d(),g()};return w.onfinish=()=>{m||(e.set(M5(x,o)),r&&r(),C())},{then(b,I){return p.then(b,I)},attachTimeline(b){return w.timeline=b,w.onfinish=null,tt},get time(){return kr(w.currentTime||0)},set time(b){w.currentTime=pi(b)},get speed(){return w.playbackRate},set speed(b){w.playbackRate=b},get duration(){return kr(E)},play:()=>{f||(w.play(),Dr(A))},pause:()=>w.pause(),stop:()=>{if(f=!0,w.playState==="idle")return;const{currentTime:b}=w;if(b){const I=uc(q(F({},o),{autoplay:!1}));e.setWithVelocity(I.sample(b-tl).value,I.sample(b).value,tl)}C()},complete:()=>{m||w.finish()},cancel:C}}function ED({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:tt,pause:tt,stop:tt,then:u=>(u(),Promise.resolve()),cancel:tt,complete:tt});return t?uc({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const PD={type:"spring",stiffness:500,damping:25,restSpeed:10},_D=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),TD={type:"keyframes",duration:.8},kD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RD=(e,{keyframes:t})=>t.length>2?TD:oo.has(e)?e.startsWith("scale")?_D(t[1]):PD:kD,Tp=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ai.test(t)||t==="0")&&!t.startsWith("url(")),OD=new Set(["brightness","contrast","saturate","opacity"]);function LD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nf)||[];if(!r)return e;const o=n.replace(r,"");let u=OD.has(t)?1:0;return r!==n&&(u*=100),t+"("+u+o+")"}const bD=/([a-z-]*)\(.*?\)/g,kp=q(F({},Ai),{getAnimatableNone:e=>{const t=e.match(bD);return t?t.map(LD).join(" "):e}}),ID=q(F({},pC),{color:zt,backgroundColor:zt,outlineColor:zt,fill:zt,stroke:zt,borderColor:zt,borderTopColor:zt,borderRightColor:zt,borderBottomColor:zt,borderLeftColor:zt,filter:kp,WebkitFilter:kp}),dg=e=>ID[e];function e2(e,t){let n=dg(e);return n!==kp&&(n=Ai),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const t2=e=>/^0[^.\s]+$/.test(e);function MD(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||t2(e)}function DD(e,t,n,r){const o=Tp(t,n);let u;Array.isArray(n)?u=[...n]:u=[null,n];const a=r.from!==void 0?r.from:e.get();let c;const f=[];for(let d=0;d<u.length;d++)u[d]===null&&(u[d]=d===0?a:u[d-1]),MD(u[d])&&f.push(d),typeof u[d]=="string"&&u[d]!=="none"&&u[d]!=="0"&&(c=u[d]);if(o&&f.length&&c)for(let d=0;d<f.length;d++){const p=f[d];u[p]=e2(t,c)}return u}function ND(m){var g=m,{when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:u,repeatType:a,repeatDelay:c,from:f,elapsed:d}=g,p=Lt(g,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(p).length}function hg(e,t){return e[t]||e.default||e}const FD={skipAnimations:!1},pg=(e,t,n,r={})=>o=>{const u=hg(r,e)||{},a=u.delay||r.delay||0;let{elapsed:c=0}=r;c=c-pi(a);const f=DD(t,e,n,u),d=f[0],p=f[f.length-1],m=Tp(e,d),g=Tp(e,p);let x=q(F({keyframes:f,velocity:t.getVelocity(),ease:"easeOut"},u),{delay:-c,onUpdate:E=>{t.set(E),u.onUpdate&&u.onUpdate(E)},onComplete:()=>{o(),u.onComplete&&u.onComplete()}});if(ND(u)||(x=F(F({},x),RD(e,x))),x.duration&&(x.duration=pi(x.duration)),x.repeatDelay&&(x.repeatDelay=pi(x.repeatDelay)),!m||!g||b5.current||u.type===!1||FD.skipAnimations)return ED(x);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const E=CD(t,e,x);if(E)return E}return uc(x)};function ac(e){return!!(sn(e)&&e.add)}const n2=e=>/^\-?\d*\.?\d+$/.test(e);function mg(e,t){e.indexOf(t)===-1&&e.push(t)}function gg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class yg{constructor(){this.subscriptions=[]}add(t){return mg(this.subscriptions,t),()=>gg(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let u=0;u<o;u++){const a=this.subscriptions[u];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const BD=e=>!isNaN(parseFloat(e));class VD{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:u,timestamp:a}=Dt;this.lastUpdated!==a&&(this.timeDelta=u,this.lastUpdated=a,je.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>je.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=BD(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yg);const r=this.events[t].add(n);return t==="change"?()=>{r(),je.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=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?JC(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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 is(e,t){return new VD(e,t)}const r2=e=>t=>t.test(e),UD={test:e=>e==="auto",parse:e=>e},i2=[so,oe,fr,Kr,GM,HM,UD],Vs=e=>i2.find(r2(e)),jD=[...i2,zt,Ai],zD=e=>jD.find(r2(e));function WD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,is(n))}function QD(e,t){const n=of(e,t);let a=n?e.makeTargetAnimatable(n,!1):{},{transitionEnd:r={},transition:o={}}=a,u=Lt(a,["transitionEnd","transition"]);u=F(F({},u),r);for(const c in u){const f=u5(u[c]);WD(e,c,f)}}function HD(e,t,n){var r,o;const u=Object.keys(t).filter(c=>!e.hasValue(c)),a=u.length;if(a)for(let c=0;c<a;c++){const f=u[c],d=t[f];let p=null;Array.isArray(d)&&(p=d[0]),p===null&&(p=(o=(r=n[f])!==null&&r!==void 0?r:e.readValue(f))!==null&&o!==void 0?o:t[f]),p!=null&&(typeof p=="string"&&(n2(p)||t2(p))?p=parseFloat(p):!zD(p)&&Ai.test(d)&&(p=e2(f,d)),e.addValue(f,is(p,{owner:e})),n[f]===void 0&&(n[f]=p),p!==null&&e.setBaseTarget(f,p))}}function GD(e,t){return t?(t[e]||t.default||t).from:void 0}function KD(e,t,n){const r={};for(const o in e){const u=GD(o,t);if(u!==void 0)r[o]=u;else{const a=n.getValue(o);a&&(r[o]=a.get())}}return r}function $D({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qD(e,t){const n=e.get();if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r]!==n)return!0}else return n!==t}function o2(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let m=e.makeTargetAnimatable(t),{transition:u=e.getDefaultTransition(),transitionEnd:a}=m,c=Lt(m,["transition","transitionEnd"]);const f=e.getValue("willChange");r&&(u=r);const d=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const g in c){const x=e.getValue(g),E=c[g];if(!x||E===void 0||p&&$D(p,g))continue;const P=F({delay:n,elapsed:0},hg(u||{},g));if(window.HandoffAppearAnimations){const A=e.getProps()[sC];if(A){const C=window.HandoffAppearAnimations(A,g,x,je);C!==null&&(P.elapsed=C,P.isHandoff=!0)}}let R=!P.isHandoff&&!qD(x,E);if(P.type==="spring"&&(x.getVelocity()||P.velocity)&&(R=!1),x.animation&&(R=!1),R)continue;x.start(pg(g,x,E,e.shouldReduceMotion&&oo.has(g)?{type:!1}:P));const w=x.animation;ac(f)&&(f.add(g),w.then(()=>f.remove(g))),d.push(w)}return a&&Promise.all(d).then(()=>{a&&QD(e,a)}),d}function Rp(e,t,n={}){const r=of(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const u=r?()=>Promise.all(o2(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:m}=o;return YD(e,t,d+f,p,m,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[f,d]=c==="beforeChildren"?[u,a]:[a,u];return f().then(()=>d())}else return Promise.all([u(),a(n.delay)])}function YD(e,t,n=0,r=0,o=1,u){const a=[],c=(e.variantChildren.size-1)*r,f=o===1?(d=0)=>d*r:(d=0)=>c-d*r;return Array.from(e.variantChildren).sort(JD).forEach((d,p)=>{d.notify("AnimationStart",t),a.push(Rp(d,t,q(F({},u),{delay:n+f(p)})).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function JD(e,t){return e.sortNodePosition(t)}function XD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(u=>Rp(e,u,n));r=Promise.all(o)}else if(typeof t=="string")r=Rp(e,t,n);else{const o=typeof t=="function"?of(e,t,n.custom):t;r=Promise.all(o2(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const ZD=[...Zm].reverse(),e6=Zm.length;function t6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>XD(e,n,r)))}function n6(e){let t=t6(e);const n=i6();let r=!0;const o=(f,d)=>{const p=of(e,d);if(p){const m=p,{transition:g,transitionEnd:x}=m,E=Lt(m,["transition","transitionEnd"]);f=F(F(F({},f),E),x)}return f};function u(f){t=f(e)}function a(f,d){const p=e.getProps(),m=e.getVariantContext(!0)||{},g=[],x=new Set;let E={},P=1/0;for(let w=0;w<e6;w++){const A=ZD[w],C=n[A],k=p[A]!==void 0?p[A]:m[A],b=Ru(k),I=A===d?C.isActive:null;I===!1&&(P=w);let N=k===m[A]&&k!==p[A]&&b;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),C.protectedKeys=F({},E),!C.isActive&&I===null||!k&&!C.prevProp||ef(k)||typeof k=="boolean")continue;let $=r6(C.prevProp,k)||A===d&&C.isActive&&!N&&b||w>P&&b,G=!1;const le=Array.isArray(k)?k:[k];let Ge=le.reduce(o,{});I===!1&&(Ge={});const{prevResolvedValues:ot={}}=C,wt=F(F({},ot),Ge),_e=ye=>{$=!0,x.has(ye)&&(G=!0,x.delete(ye)),C.needsAnimating[ye]=!0};for(const ye in wt){const ze=Ge[ye],H=ot[ye];if(E.hasOwnProperty(ye))continue;let ee=!1;ic(ze)&&ic(H)?ee=!kC(ze,H):ee=ze!==H,ee?ze!==void 0?_e(ye):x.add(ye):ze!==void 0&&x.has(ye)?_e(ye):C.protectedKeys[ye]=!0}C.prevProp=k,C.prevResolvedValues=Ge,C.isActive&&(E=F(F({},E),Ge)),r&&e.blockInitialAnimation&&($=!1),$&&(!N||G)&&g.push(...le.map(ye=>({animation:ye,options:F({type:A},f)})))}if(x.size){const w={};x.forEach(A=>{const C=e.getBaseTarget(A);C!==void 0&&(w[A]=C)}),g.push({animation:w})}let R=!!g.length;return r&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(R=!1),r=!1,R?t(g):Promise.resolve()}function c(f,d,p){var m;if(n[f].isActive===d)return Promise.resolve();(m=e.variantChildren)===null||m===void 0||m.forEach(x=>{var E;return(E=x.animationState)===null||E===void 0?void 0:E.setActive(f,d)}),n[f].isActive=d;const g=a(p,f);for(const x in n)n[x].protectedKeys={};return g}return{animateChanges:a,setActive:c,setAnimateFunction:u,getState:()=>n}}function r6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kC(t,e):!1}function Ni(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i6(){return{animate:Ni(!0),whileInView:Ni(),whileHover:Ni(),whileTap:Ni(),whileDrag:Ni(),whileFocus:Ni(),exit:Ni()}}class o6 extends Pi{constructor(t){super(t),t.animationState||(t.animationState=n6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),ef(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let s6=0;class u6 extends Pi{constructor(){super(...arguments),this.id=s6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const u=this.node.animationState.setActive("exit",!t,{custom:r!=null?r:this.node.getProps().custom});n&&!t&&u.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const a6={animation:{Feature:o6},exit:{Feature:u6}},Z1=(e,t)=>Math.abs(e-t);function l6(e,t){const n=Z1(e.x,t.x),r=Z1(e.y,t.y);return Math.sqrt(Ma(n,2)+Ma(r,2))}class s2{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:u=!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 m=yh(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=l6(m.offset,{x:0,y:0})>=3;if(!g&&!x)return;const{point:E}=m,{timestamp:P}=Dt;this.history.push(q(F({},E),{timestamp:P}));const{onStart:R,onMove:w}=this.handlers;g||(R&&R(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=gh(g,this.transformPagePoint),je.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:E,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=yh(m.type==="pointercancel"?this.lastMoveEventInfo:gh(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,R),E&&E(m,R)},!CC(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=rf(t),c=gh(a,this.transformPagePoint),{point:f}=c,{timestamp:d}=Dt;this.history=[q(F({},f),{timestamp:d})];const{onSessionStart:p}=n;p&&p(t,yh(c,this.history)),this.removeListeners=hi(Tr(this.contextWindow,"pointermove",this.handlePointerMove),Tr(this.contextWindow,"pointerup",this.handlePointerUp),Tr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Dr(this.updatePoint)}}function gh(e,t){return t?{point:t(e.point)}:e}function ew(e,t){return{x:e.x-t.x,y:e.y-t.y}}function yh({point:e},t){return{point:e,delta:ew(e,u2(t)),offset:ew(e,c6(t)),velocity:f6(t,.1)}}function c6(e){return e[0]}function u2(e){return e[e.length-1]}function f6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=u2(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>pi(t)));)n--;if(!r)return{x:0,y:0};const u=kr(o.timestamp-r.timestamp);if(u===0)return{x:0,y:0};const a={x:(o.x-r.x)/u,y:(o.y-r.y)/u};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function wn(e){return e.max-e.min}function Op(e,t=0,n=.01){return Math.abs(e-t)<=n}function tw(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=wn(n)/wn(t),(Op(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(Op(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ou(e,t,n,r){tw(e.x,t.x,n.x,r?r.originX:void 0),tw(e.y,t.y,n.y,r?r.originY:void 0)}function nw(e,t,n){e.min=n.min+t.min,e.max=e.min+wn(t)}function d6(e,t,n){nw(e.x,t.x,n.x),nw(e.y,t.y,n.y)}function rw(e,t,n){e.min=t.min-n.min,e.max=e.min+wn(t)}function su(e,t,n){rw(e.x,t.x,n.x),rw(e.y,t.y,n.y)}function h6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qe(n,e,r.max):Math.min(e,n)),e}function iw(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 p6(e,{top:t,left:n,bottom:r,right:o}){return{x:iw(e.x,n,o),y:iw(e.y,t,r)}}function ow(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 m6(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function g6(e,t){let n=.5;const r=wn(e),o=wn(t);return o>r?n=Lu(t.min,t.max-r,e.min):r>o&&(n=Lu(e.min,e.max-o,t.min)),xi(0,1,n)}function y6(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 Lp=.35;function v6(e=Lp){return e===!1?e=0:e===!0&&(e=Lp),{x:sw(e,"left","right"),y:sw(e,"top","bottom")}}function sw(e,t,n){return{min:uw(e,t),max:uw(e,n)}}function uw(e,t){return typeof e=="number"?e:e[t]||0}const aw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vo=()=>({x:aw(),y:aw()}),lw=()=>({min:0,max:0}),st=()=>({x:lw(),y:lw()});function bn(e){return[e("x"),e("y")]}function a2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function w6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function x6(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}}function vh(e){return e===void 0||e===1}function bp({scale:e,scaleX:t,scaleY:n}){return!vh(e)||!vh(t)||!vh(n)}function Ui(e){return bp(e)||l2(e)||e.z||e.rotate||e.rotateX||e.rotateY}function l2(e){return cw(e.x)||cw(e.y)}function cw(e){return e&&e!=="0%"}function lc(e,t,n){const r=e-n,o=t*r;return n+o}function fw(e,t,n,r,o){return o!==void 0&&(e=lc(e,o,r)),lc(e,n,r)+t}function Ip(e,t=0,n=1,r,o){e.min=fw(e.min,t,n,r,o),e.max=fw(e.max,t,n,r,o)}function c2(e,{x:t,y:n}){Ip(e.x,t.translate,t.scale,t.originPoint),Ip(e.y,n.translate,n.scale,n.originPoint)}function A6(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let u,a;for(let c=0;c<o;c++){u=n[c],a=u.projectionDelta;const f=u.instance;f&&f.style&&f.style.display==="contents"||(r&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Uo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,c2(e,a)),r&&Ui(u.latestValues)&&Uo(e,u.latestValues))}t.x=dw(t.x),t.y=dw(t.y)}function dw(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Jr(e,t){e.min=e.min+t,e.max=e.max+t}function hw(e,t,[n,r,o]){const u=t[o]!==void 0?t[o]:.5,a=qe(e.min,e.max,u);Ip(e,t[n],t[r],a,t.scale)}const S6=["x","scaleX","originX"],C6=["y","scaleY","originY"];function Uo(e,t){hw(e.x,t,S6),hw(e.y,t,C6)}function f2(e,t){return a2(x6(e.getBoundingClientRect(),t))}function E6(e,t,n){const r=f2(e,n),{scroll:o}=t;return o&&(Jr(r.x,o.offset.x),Jr(r.y,o.offset.y)),r}const d2=({current:e})=>e?e.ownerDocument.defaultView:null,P6=new WeakMap;class _6{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=p=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(rf(p,"page").point)},u=(p,m)=>{const{drag:g,dragPropagation:x,onDragStart:E}=this.getProps();if(g&&!x&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=PC(g),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(R=>{let w=this.getAxisMotionValue(R).get()||0;if(fr.test(w)){const{projection:A}=this.visualElement;if(A&&A.layout){const C=A.layout.layoutBox[R];C&&(w=wn(C)*(parseFloat(w)/100))}}this.originPoint[R]=w}),E&&je.update(()=>E(p,m),!1,!0);const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},a=(p,m)=>{const{dragPropagation:g,dragDirectionLock:x,onDirectionLock:E,onDrag:P}=this.getProps();if(!g&&!this.openGlobalLock)return;const{offset:R}=m;if(x&&this.currentDirection===null){this.currentDirection=T6(R),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",m.point,R),this.updateAxis("y",m.point,R),this.visualElement.render(),P&&P(p,m)},c=(p,m)=>this.stop(p,m),f=()=>bn(p=>{var m;return this.getAnimationState(p)==="paused"&&((m=this.getAxisMotionValue(p).animation)===null||m===void 0?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new s2(t,{onSessionStart:o,onStart:u,onMove:a,onSessionEnd:c,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:d2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:u}=this.getProps();u&&je.update(()=>u(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!nl(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=h6(a,this.constraints[t],this.elastic[t])),u.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,u=this.constraints;n&&Fo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=p6(o.layoutBox,n):this.constraints=!1,this.elastic=v6(r),u!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&bn(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=y6(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fo(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=E6(r,o.root,this.visualElement.getTransformPagePoint());let a=m6(o.layout.layoutBox,u);if(n){const c=n(w6(a));this.hasMutatedConstraints=!!c,c&&(a=a2(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:u,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),f=this.constraints||{},d=bn(p=>{if(!nl(p,n,this.currentDirection))return;let m=f&&f[p]||{};a&&(m={min:0,max:0});const g=o?200:1e6,x=o?40:1e7,E=F(F({type:"inertia",velocity:r?t[p]:0,bounceStiffness:g,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10},u),m);return this.startAxisValueAnimation(p,E)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(pg(t,r,0,n))}stopAnimation(){bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){bn(n=>{const{drag:r}=this.getProps();if(!nl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:c}=o.layout.layoutBox[n];u.set(t[n]-qe(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Fo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bn(a=>{const c=this.getAxisMotionValue(a);if(c){const f=c.get();o[a]=g6({min:f,max:f},this.constraints[a])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bn(a=>{if(!nl(a,t,null))return;const c=this.getAxisMotionValue(a),{min:f,max:d}=this.constraints[a];c.set(qe(f,d,o[a]))})}addListeners(){if(!this.visualElement.current)return;P6.set(this.visualElement,this);const t=this.visualElement.current,n=Tr(t,"pointerdown",f=>{const{drag:d,dragListener:p=!0}=this.getProps();d&&p&&this.start(f)}),r=()=>{const{dragConstraints:f}=this.getProps();Fo(f)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,u=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const a=Pr(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d})=>{this.isDragging&&d&&(bn(p=>{const m=this.getAxisMotionValue(p);m&&(this.originPoint[p]+=f[p].translate,m.set(m.get()+f[p].translate))}),this.visualElement.render())});return()=>{a(),n(),u(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:a=Lp,dragMomentum:c=!0}=t;return q(F({},t),{drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:u,dragElastic:a,dragMomentum:c})}}function nl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function T6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class k6 extends Pi{constructor(t){super(t),this.removeGroupControls=tt,this.removeListeners=tt,this.controls=new _6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tt}unmount(){this.removeGroupControls(),this.removeListeners()}}const pw=e=>(t,n)=>{e&&je.update(()=>e(t,n))};class R6 extends Pi{constructor(){super(...arguments),this.removePointerDownListener=tt}onPointerDown(t){this.session=new s2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:pw(t),onStart:pw(n),onMove:r,onEnd:(u,a)=>{delete this.session,o&&je.update(()=>o(u,a))}}}mount(){this.removePointerDownListener=Tr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function O6(){const e=B.useContext(Jm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=B.useId();return B.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Al={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Us={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const n=mw(e,t.target.x),r=mw(e,t.target.y);return`${n}% ${r}%`}},L6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ai.parse(e);if(o.length>5)return r;const u=Ai.createTransformer(e),a=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,f=n.y.scale*t.y;o[0+a]/=c,o[1+a]/=f;const d=qe(c,f,.5);return typeof o[2+a]=="number"&&(o[2+a]/=d),typeof o[3+a]=="number"&&(o[3+a]/=d),u(o)}};class b6 extends Jn.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:u}=t;BM(I6),u&&(n.group&&n.group.add(u),r&&r.register&&o&&r.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions(q(F({},u.options),{onExitComplete:()=>this.safeToRemove()}))),Al.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:u}=this.props,a=r.projection;return a&&(a.isPresent=u,o||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?a.promote():a.relegate()||je.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function h2(e){const[t,n]=O6(),r=B.useContext(aC);return Jn.createElement(b6,q(F({},e),{layoutGroup:r,switchLayoutGroup:B.useContext(lC),isPresent:t,safeToRemove:n}))}const I6={borderRadius:q(F({},Us),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Us,borderTopRightRadius:Us,borderBottomLeftRadius:Us,borderBottomRightRadius:Us,boxShadow:L6},p2=["TopLeft","TopRight","BottomLeft","BottomRight"],M6=p2.length,gw=e=>typeof e=="string"?parseFloat(e):e,yw=e=>typeof e=="number"||oe.test(e);function D6(e,t,n,r,o,u){o?(e.opacity=qe(0,n.opacity!==void 0?n.opacity:1,N6(r)),e.opacityExit=qe(t.opacity!==void 0?t.opacity:1,0,F6(r))):u&&(e.opacity=qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<M6;a++){const c=`border${p2[a]}Radius`;let f=vw(t,c),d=vw(n,c);if(f===void 0&&d===void 0)continue;f||(f=0),d||(d=0),f===0||d===0||yw(f)===yw(d)?(e[c]=Math.max(qe(gw(f),gw(d),r),0),(fr.test(d)||fr.test(f))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function vw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const N6=m2(0,.5,FC),F6=m2(.5,.95,tt);function m2(e,t,n){return r=>r<e?0:r>t?1:n(Lu(e,t,r))}function ww(e,t){e.min=t.min,e.max=t.max}function Ln(e,t){ww(e.x,t.x),ww(e.y,t.y)}function xw(e,t,n,r,o){return e-=t,e=lc(e,1/n,r),o!==void 0&&(e=lc(e,1/o,r)),e}function B6(e,t=0,n=1,r=.5,o,u=e,a=e){if(fr.test(t)&&(t=parseFloat(t),t=qe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=qe(u.min,u.max,r);e===u&&(c-=t),e.min=xw(e.min,t,n,c,o),e.max=xw(e.max,t,n,c,o)}function Aw(e,t,[n,r,o],u,a){B6(e,t[n],t[r],t[o],t.scale,u,a)}const V6=["x","scaleX","originX"],U6=["y","scaleY","originY"];function Sw(e,t,n,r){Aw(e.x,t,V6,n?n.x:void 0,r?r.x:void 0),Aw(e.y,t,U6,n?n.y:void 0,r?r.y:void 0)}function Cw(e){return e.translate===0&&e.scale===1}function g2(e){return Cw(e.x)&&Cw(e.y)}function j6(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function y2(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Ew(e){return wn(e.x)/wn(e.y)}class z6{constructor(){this.members=[]}add(t){mg(this.members,t),t.scheduleRender()}remove(t){if(gg(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1){r=u;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:o}=t.options;o===!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 Pw(e,t,n){let r="";const o=e.x.translate/t.x,u=e.y.translate/t.y;if((o||u)&&(r=`translate3d(${o}px, ${u}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:f,rotateX:d,rotateY:p}=n;f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const W6=(e,t)=>e.depth-t.depth;class Q6{constructor(){this.children=[],this.isDirty=!1}add(t){mg(this.children,t),this.isDirty=!0}remove(t){gg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(W6),this.isDirty=!1,this.children.forEach(t)}}function H6(e,t){const n=performance.now(),r=({timestamp:o})=>{const u=o-n;u>=t&&(Dr(r),e(u-t))};return je.read(r,!0),()=>Dr(r)}function G6(e){window.MotionDebug&&window.MotionDebug.record(e)}function K6(e){return e instanceof SVGElement&&e.tagName!=="svg"}function $6(e,t,n){const r=sn(e)?e:is(e);return r.start(pg("",r,t,n)),r.animation}const _w=["","X","Y","Z"],q6={visibility:"hidden"},Tw=1e3;let Y6=0;const ji={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function v2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},c=t==null?void 0:t()){this.id=Y6++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ji.totalNodes=ji.resolvedTargetDeltas=ji.recalculatedProjection=0,this.nodes.forEach(Z6),this.nodes.forEach(iN),this.nodes.forEach(oN),this.nodes.forEach(eN),G6(ji)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new Q6)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new yg),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const f=this.eventHandlers.get(a);f&&f.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=K6(a),this.instance=a;const{layoutId:f,layout:d,visualElement:p}=this.options;if(p&&!p.current&&p.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(d||f)&&(this.isLayoutDirty=!0),e){let m;const g=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=H6(g,250),Al.hasAnimatedSinceResize&&(Al.hasAnimatedSinceResize=!1,this.nodes.forEach(Rw))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&p&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeTargetChanged:x,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=this.options.transition||p.getDefaultTransition()||cN,{onLayoutAnimationStart:R,onLayoutAnimationComplete:w}=p.getProps(),A=!this.targetLayout||!y2(this.targetLayout,E)||x,C=!g&&x;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||g&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,C);const k=q(F({},hg(P,"layout")),{onPlay:R,onComplete:w});(p.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else g||Rw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Dr(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(sN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const m=this.path[p];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:c,layout:f}=this.options;if(c===void 0&&!f)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kw);return}this.isUpdating||this.nodes.forEach(nN),this.isUpdating=!1,this.nodes.forEach(rN),this.nodes.forEach(J6),this.nodes.forEach(X6),this.clearAllSnapshots();const c=performance.now();Dt.delta=xi(0,1e3/60,c-Dt.timestamp),Dt.timestamp=c,Dt.isProcessing=!0,ah.update.process(Dt),ah.preRender.process(Dt),ah.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(tN),this.sharedNodes.forEach(uN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform,c=this.projectionDelta&&!g2(this.projectionDelta),f=this.getTransformTemplate(),d=f?f(this.latestValues,""):void 0,p=d!==this.prevTransformTemplateValue;a&&(c||Ui(this.latestValues)||p)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let f=this.removeElementScroll(c);return a&&(f=this.removeTransform(f)),fN(f),{animationId:this.root.animationId,measuredBox:c,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return st();const c=a.measureViewportBox(),{scroll:f}=this.root;return f&&(Jr(c.x,f.offset.x),Jr(c.y,f.offset.y)),c}removeElementScroll(a){const c=st();Ln(c,a);for(let f=0;f<this.path.length;f++){const d=this.path[f],{scroll:p,options:m}=d;if(d!==this.root&&p&&m.layoutScroll){if(p.isRoot){Ln(c,a);const{scroll:g}=this.root;g&&(Jr(c.x,-g.offset.x),Jr(c.y,-g.offset.y))}Jr(c.x,p.offset.x),Jr(c.y,p.offset.y)}}return c}applyTransform(a,c=!1){const f=st();Ln(f,a);for(let d=0;d<this.path.length;d++){const p=this.path[d];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&Uo(f,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),Ui(p.latestValues)&&Uo(f,p.latestValues)}return Ui(this.latestValues)&&Uo(f,this.latestValues),f}removeTransform(a){const c=st();Ln(c,a);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!d.instance||!Ui(d.latestValues))continue;bp(d.latestValues)&&d.updateSnapshot();const p=st(),m=d.measurePageBox();Ln(p,m),Sw(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,p)}return Ui(this.latestValues)&&Sw(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options=q(F(F({},this.options),a),{crossfade:a.crossfade!==void 0?a.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!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:m,layoutId:g}=this.options;if(!(!this.layout||!(m||g))){if(this.resolvedRelativeTargetAt=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const x=this.getClosestProjectingParent();x&&x.layout&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),su(this.relativeTargetOrigin,this.layout.layoutBox,x.layout.layoutBox),Ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),d6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),c2(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const x=this.getClosestProjectingParent();x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),su(this.relativeTargetOrigin,this.target,x.target),Ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ji.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||bp(this.parent.latestValues)||l2(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 a;const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(d=!1),d)return;const{layout:p,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||m))return;Ln(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,x=this.treeScale.y;A6(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox);const{target:E}=c;if(!E){this.projectionTransform&&(this.projectionDelta=Vo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Vo(),this.projectionDeltaWithTransform=Vo());const P=this.projectionTransform;ou(this.projectionDelta,this.layoutCorrected,E,this.latestValues),this.projectionTransform=Pw(this.projectionDelta,this.treeScale),(this.projectionTransform!==P||this.treeScale.x!==g||this.treeScale.y!==x)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),ji.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,c=!1){const f=this.snapshot,d=f?f.latestValues:{},p=F({},this.latestValues),m=Vo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=st(),x=f?f.source:void 0,E=this.layout?this.layout.source:void 0,P=x!==E,R=this.getStack(),w=!R||R.members.length<=1,A=!!(P&&!w&&this.options.crossfade===!0&&!this.path.some(lN));this.animationProgress=0;let C;this.mixTargetDelta=k=>{const b=k/1e3;Ow(m.x,a.x,b),Ow(m.y,a.y,b),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(su(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aN(this.relativeTarget,this.relativeTargetOrigin,g,b),C&&j6(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=st()),Ln(C,this.relativeTarget)),P&&(this.animationValues=p,D6(p,d,this.latestValues,b,A,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=je.update(()=>{Al.hasAnimatedSinceResize=!0,this.currentAnimation=$6(0,Tw,q(F({},a),{onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Tw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:f,layout:d,latestValues:p}=a;if(!(!c||!f||!d)){if(this!==a&&this.layout&&d&&w2(this.options.animationType,this.layout.layoutBox,d.layoutBox)){f=this.target||st();const m=wn(this.layout.layoutBox.x);f.x.min=a.target.x.min,f.x.max=f.x.min+m;const g=wn(this.layout.layoutBox.y);f.y.min=a.target.y.min,f.y.max=f.y.min+g}Ln(c,f),Uo(c,p),ou(this.projectionDeltaWithTransform,this.layoutCorrected,c,p)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new z6),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:f}={}){const d=this.getStack();d&&d.promote(this,f),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:f}=a;if((f.rotate||f.rotateX||f.rotateY||f.rotateZ)&&(c=!0),!c)return;const d={};for(let p=0;p<_w.length;p++){const m="rotate"+_w[p];f[m]&&(d[m]=f[m],a.setStaticValue(m,0))}a.render();for(const p in d)a.setStaticValue(p,d[p]);a.scheduleRender()}getProjectionStyles(a){var c,f;if(!this.instance||this.isSVG)return;if(!this.isVisible)return q6;const d={visibility:""},p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=xl(a==null?void 0:a.pointerEvents)||"",d.transform=p?p(this.latestValues,""):"none",d;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const P={};return this.options.layoutId&&(P.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,P.pointerEvents=xl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ui(this.latestValues)&&(P.transform=p?p({},""):"none",this.hasProjected=!1),P}const g=m.animationValues||m.latestValues;this.applyTransformsToTarget(),d.transform=Pw(this.projectionDeltaWithTransform,this.treeScale,g),p&&(d.transform=p(g,d.transform));const{x,y:E}=this.projectionDelta;d.transformOrigin=`${x.origin*100}% ${E.origin*100}% 0`,m.animationValues?d.opacity=m===this?(f=(c=g.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:d.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const P in nc){if(g[P]===void 0)continue;const{correct:R,applyTo:w}=nc[P],A=d.transform==="none"?g[P]:R(g[P],m);if(w){const C=w.length;for(let k=0;k<C;k++)d[w[k]]=A}else d[P]=A}return this.options.layoutId&&(d.pointerEvents=m===this?xl(a==null?void 0:a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(kw),this.root.sharedNodes.clear()}}}function J6(e){e.updateLayout()}function X6(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:u}=e.options,a=n.source!==e.layout.source;u==="size"?bn(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],x=wn(g);g.min=r[m].min,g.max=g.min+x}):w2(u,n.layoutBox,r)&&bn(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],x=wn(r[m]);g.max=g.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+x)});const c=Vo();ou(c,r,n.layoutBox);const f=Vo();a?ou(f,e.applyTransform(o,!0),n.measuredBox):ou(f,r,n.layoutBox);const d=!g2(c);let p=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:x}=m;if(g&&x){const E=st();su(E,n.layoutBox,g.layoutBox);const P=st();su(P,r,x.layoutBox),y2(E,P)||(p=!0),m.options.layoutRoot&&(e.relativeTarget=P,e.relativeTargetOrigin=E,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Z6(e){ji.totalNodes++,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 eN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tN(e){e.clearSnapshot()}function kw(e){e.clearMeasurements()}function nN(e){e.isLayoutDirty=!1}function rN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iN(e){e.resolveTargetDelta()}function oN(e){e.calcProjection()}function sN(e){e.resetRotation()}function uN(e){e.removeLeadSnapshot()}function Ow(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lw(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function aN(e,t,n,r){Lw(e.x,t.x,n.x,r),Lw(e.y,t.y,n.y,r)}function lN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cN={duration:.45,ease:[.4,0,.1,1]},bw=e=>typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().includes(e),Iw=bw("applewebkit/")&&!bw("chrome/")?Math.round:tt;function Mw(e){e.min=Iw(e.min),e.max=Iw(e.max)}function fN(e){Mw(e.x),Mw(e.y)}function w2(e,t,n){return e==="position"||e==="preserve-aspect"&&!Op(Ew(t),Ew(n),.2)}const dN=v2({attachResizeListener:(e,t)=>Pr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wh={current:void 0},x2=v2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wh.current){const e=new dN({});e.mount(window),e.setOptions({layoutScroll:!0}),wh.current=e}return wh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hN={pan:{Feature:R6},drag:{Feature:k6,ProjectionNode:x2,MeasureLayout:h2}},pN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function mN(e){const t=pN.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Mp(e,t,n=1){const[r,o]=mN(e);if(!r)return;const u=window.getComputedStyle(t).getPropertyValue(r);if(u){const a=u.trim();return n2(a)?parseFloat(a):a}else return Cp(o)?Mp(o,t,n+1):o}function gN(e,r,n){var t=Lt(r,[]);const o=e.current;if(!(o instanceof Element))return{target:t,transitionEnd:n};n&&(n=F({},n)),e.values.forEach(u=>{const a=u.get();if(!Cp(a))return;const c=Mp(a,o);c&&u.set(c)});for(const u in t){const a=t[u];if(!Cp(a))continue;const c=Mp(a,o);c&&(t[u]=c,n||(n={}),n[u]===void 0&&(n[u]=a))}return{target:t,transitionEnd:n}}const yN=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),A2=e=>yN.has(e),vN=e=>Object.keys(e).some(A2),Dw=e=>e===so||e===oe,Nw=(e,t)=>parseFloat(e.split(", ")[t]),Fw=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Nw(o[1],t);{const u=r.match(/^matrix\((.+)\)$/);return u?Nw(u[1],e):0}},wN=new Set(["x","y","z"]),xN=Vu.filter(e=>!wN.has(e));function AN(e){const t=[];return xN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const os={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:Fw(4,13),y:Fw(5,14)};os.translateX=os.x;os.translateY=os.y;const SN=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,u=getComputedStyle(o),{display:a}=u,c={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(d=>{c[d]=os[d](r,u)}),t.render();const f=t.measureViewportBox();return n.forEach(d=>{const p=t.getValue(d);p&&p.jump(c[d]),e[d]=os[d](f,u)}),e},CN=(e,t,n={},r={})=>{t=F({},t),r=F({},r);const o=Object.keys(t).filter(A2);let u=[],a=!1;const c=[];if(o.forEach(f=>{const d=e.getValue(f);if(!e.hasValue(f))return;let p=n[f],m=Vs(p);const g=t[f];let x;if(ic(g)){const E=g.length,P=g[0]===null?1:0;p=g[P],m=Vs(p);for(let R=P;R<E&&g[R]!==null;R++)x?ag(Vs(g[R])===x):x=Vs(g[R])}else x=Vs(g);if(m!==x)if(Dw(m)&&Dw(x)){const E=d.get();typeof E=="string"&&d.set(parseFloat(E)),typeof g=="string"?t[f]=parseFloat(g):Array.isArray(g)&&x===oe&&(t[f]=g.map(parseFloat))}else m!=null&&m.transform&&(x!=null&&x.transform)&&(p===0||g===0)?p===0?d.set(x.transform(p)):t[f]=m.transform(g):(a||(u=AN(e),a=!0),c.push(f),r[f]=r[f]!==void 0?r[f]:t[f],d.jump(g))}),c.length){const f=c.indexOf("height")>=0?window.pageYOffset:null,d=SN(t,e,c);return u.length&&u.forEach(([p,m])=>{e.getValue(p).set(m)}),e.render(),Zc&&f!==null&&window.scrollTo({top:f}),{target:d,transitionEnd:r}}else return{target:t,transitionEnd:r}};function EN(e,t,n,r){return vN(t)?CN(e,t,n,r):{target:t,transitionEnd:r}}const PN=(e,t,n,r)=>{const o=gN(e,t,r);return t=o.target,r=o.transitionEnd,EN(e,t,n,r)},Dp={current:null},S2={current:!1};function _N(){if(S2.current=!0,!!Zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dp.current=e.matches;e.addListener(t),t()}else Dp.current=!1}function TN(e,t,n){const{willChange:r}=t;for(const o in t){const u=t[o],a=n[o];if(sn(u))e.addValue(o,u),ac(r)&&r.add(o);else if(sn(a))e.addValue(o,is(u,{owner:e})),ac(r)&&r.remove(o);else if(a!==u)if(e.hasValue(o)){const c=e.getValue(o);!c.hasAnimated&&c.set(u)}else{const c=e.getStaticValue(o);e.addValue(o,is(c!==void 0?c:u,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Bw=new WeakMap,C2=Object.keys(Ou),kN=C2.length,Vw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],RN=eg.length;class ON{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:u},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>je.render(this.render,!1,!0);const{latestValues:c,renderState:f}=u;this.latestValues=c,this.baseTarget=F({},c),this.initialValues=n.initial?F({},c):{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.isControllingVariants=tf(n),this.isVariantNode=uC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const m=this.scrapeMotionValuesFromProps(n,{}),{willChange:d}=m,p=Lt(m,["willChange"]);for(const g in p){const x=p[g];c[g]!==void 0&&sn(x)&&(x.set(c[g],!1),ac(d)&&d.add(g))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Bw.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)),S2.current||_N(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Bw.delete(this.current),this.projection&&this.projection.unmount(),Dr(this.notifyUpdate),Dr(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=oo.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&je.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),u=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),u()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(a,r,o,u){var c=a,{children:t}=c,n=Lt(c,["children"]);let f,d;for(let p=0;p<kN;p++){const m=C2[p],{isEnabled:g,Feature:x,ProjectionNode:E,MeasureLayout:P}=Ou[m];E&&(f=E),g(n)&&(!this.features[m]&&x&&(this.features[m]=new x(this)),P&&(d=P))}if((this.type==="html"||this.type==="svg")&&!this.projection&&f){this.projection=new f(this.latestValues,this.parent&&this.parent.projection);const{layoutId:p,layout:m,drag:g,dragConstraints:x,layoutScroll:E,layoutRoot:P}=n;this.projection.setOptions({layoutId:p,layout:m,alwaysMeasureLayout:!!g||x&&Fo(x),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof m=="string"?m:"both",initialPromotionConfig:u,layoutScroll:E,layoutRoot:P})}return d}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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<Vw.length;r++){const o=Vw[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const u=t["on"+o];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=TN(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<RN;r++){const o=eg[r],u=this.props[o];(Ru(u)||u===!1)&&(n[o]=u)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=is(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=ug(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const u=this.getBaseTargetFromProps(this.props,t);return u!==void 0&&!sn(u)?u:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class E2 extends ON{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]}makeTargetAnimatableFromInstance(a,{transformValues:o},u){var c=a,{transition:t,transitionEnd:n}=c,r=Lt(c,["transition","transitionEnd"]);let f=KD(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),f&&(f=o(f))),u){HD(this,r,f);const d=PN(this,r,f,n);n=d.transitionEnd,r=d.target}return F({transition:t,transitionEnd:n},r)}}function LN(e){return window.getComputedStyle(e)}class bN extends E2{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(oo.has(n)){const r=dg(n);return r&&r.default||0}else{const r=LN(t),o=(dC(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return f2(t,n)}build(t,n,r,o){ng(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return sg(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;sn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){vC(t,n,r,o)}}class IN extends E2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oo.has(n)){const r=dg(n);return r&&r.default||0}return n=wC.has(n)?n:Xm(n),t.getAttribute(n)}measureInstanceViewportBox(){return st()}scrapeMotionValuesFromProps(t,n){return AC(t,n)}build(t,n,r,o){ig(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){xC(t,n,r,o)}mount(t){this.isSVGTag=og(t.tagName),super.mount(t)}}const MN=(e,t)=>tg(e)?new IN(t,{enableHardwareAcceleration:!1}):new bN(t,{enableHardwareAcceleration:!0}),DN={layout:{ProjectionNode:x2,MeasureLayout:h2}},NN=F(F(F(F({},a6),k5),hN),DN),xh=NM((e,t)=>m5(e,t,NN,MN)),Ah={width:10,height:10,borderRadius:"50%",backgroundColor:"#1d4ed8",margin:"0 5px"},FN=()=>De("div",{style:{display:"flex",alignItems:"center",height:"50px"},children:[z(xh.div,{style:Ah,animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:.6,ease:"easeInOut",delay:0}}),z(xh.div,{style:Ah,animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:.6,ease:"easeInOut",delay:.2}}),z(xh.div,{style:Ah,animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:.6,ease:"easeInOut",delay:.4}})]});function BN({cna_conversation:e}){var n,r;const t=JSON.parse(e.message);return t.type==="file"?De("div",{children:["File: ",t.filename||((r=(n=t==null?void 0:t.file_url)==null?void 0:n.split("/"))==null?void 0:r.pop()),z("br",{}),z("a",{href:t.open_file_doc?`/app/file/${t.file_docname}`:t.file_url,target:"_blank",rel:"noreferrer",children:z("button",{className:"tw-py-1 tw-px-2 tw-border tw-border-1 tw-border-b-gray-300 tw-rounded tw-m-1",children:"View"})}),t.enable_download&&z("a",{href:t.file_url,target:"_blank",rel:"noreferrer",download:!0,children:z("button",{className:"tw-py-1 tw-px-2 tw-border tw-border-1 tw-border-b-gray-300 tw-rounded tw-m-1",children:"Download"})})]}):z(Ir,{})}function VN({cna_conversation:e}){return z("div",{style:{color:"red"},children:Ym(e.message)})}function UN({cna_conversation:e}){return z("div",{dangerouslySetInnerHTML:{__html:e.message}})}const jN=({cna_conversation:e,is_last:t})=>{var c;const{message_type:n,author:r,id:o}=e,u=n==null?void 0:n.toLocaleLowerCase(),a=r==null?void 0:r.toLocaleLowerCase();return u==="loader"?t?z(FN,{}):z(Ir,{}):u==="ui action"&&((c=JSON.parse((e==null?void 0:e.message)||"{}"))==null?void 0:c.action_type)==="close_modal"?z(D1,{cna_conversation:e}):z("div",{className:`tw-flex tw-justify-between tw-pt-2 tw-w-full
76
- ${a!=="bot"?"tw-justify-between tw-flex-row-reverse":"tw-justify-start"}`,id:o&&o.toLocaleLowerCase()==="default"?"bot-greet-response":"",children:z("div",{className:`tw-flex tw-items-center tw-w-full ${a!=="bot"?"tw-flex-row-reverse":""}`,children:De("div",{className:`tw-max-w-[80%] tw-flex tw-mx-2 tw-word-break tw-rounded-tl-xl tw-rounded-tr-xl tw-p-2 tw-overflow-y-visible ${a!=="bot"?"tw-bg-blue-700 tw-text-white tw-rounded-bl-xl tw-text-left":"tw-bg-white tw-border tw-border-[#d9d9d9] tw-rounded-br-xl"}`,children:[u==="single choice"&&z(PM,{cna_conversation:e}),u==="ui action"&&z(D1,{cna_conversation:e}),u==="trigger"&&z(CM,{cna_conversation:e}),u==="form"&&z(xM,{cna_conversation:e}),u==="text"&&z(SM,{cna_conversation:e}),u==="html"&&z(UN,{cna_conversation:e}),u==="submission"&&z(AM,{cna_conversation:e}),u==="preview"&&z(BN,{cna_conversation:e}),u==="error"&&z(VN,{cna_conversation:e})]})})})},zN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKLSURBVHgB7ZqBTcMwEAC/TMAGZAM6QpkAmIBsQDegTAAbNBsUJghMUDZwN2g3eP6VFFm209jJt7GFT7IitYn9p7ddxy5AJpPJZOJl5nsjIi7ock9lTqWgcmjLD5Vvvs5msx2kDokWVGr0g+8r+RlIkVZW4TDWyYmPkI1WvHMMU5APdNkYH++ofEIzbhkez7dUFtBPReU12nFOwu9GphSV6xP389jdpJbxP9CeqFaez/G4r5ITR3v8loHPpyU+VlirJw1xtMfjO4wgenG0J60aBIhWHJtZV2ePJ2bpAfXHJc5yjsZLECYqcbR/mkS6dUdb04tTxUtHgwWckQDxF5AGm269NxpawQXwFFfiCUB7thadvDza7xNXotJtgzhFlh1xVJeSrqbMshFL1zu63ISKkWTZiMclveh7NmRPq6LLk/YR72c9Qjg7iXfitgtvqeg97YvqvgMJOrI8lCUIwL3MUbfcUEO/30cf9iAAuleD81PPXEEYPyDDAQSg7uuqRzTDCsez7ctCQDxzR/03IAHab09MCROCzbpaR4EUjuzKVT4snmdHAtYgQWzZ7ZBlCpAgluxiMyu/dciuQIIYstuKvqD95nZk1H6b2Vg9VXY9RMVliymy6ynK34ms2PSG15fMrqcoU+M5dl7Qnqxkpn27nRDRBZwDdK9iRFZIWhvTi2rBmBt4Yt05KlEtKPOo5QNGEqWoFlxtBLGCgUQtqgWpjGBKCCQJUS1YNVQ4KdEjOOC4NEnRI+jeLyod9/FqbIl+/+WKT/QIuveLGNUGvvXIZPyiOmgfs4RSJyGqg+E7lZz1TXKiOti8E6seyRqbsTzJEYwv3icPTJu1Aox/09J2qdT2bSaTyWQy/4lfz/GuGzBe3RUAAAAASUVORK5CYII=",WN=()=>{var e,t,n;switch(((n=(t=(e=window==null?void 0:window.frappe)==null?void 0:e.get_route)==null?void 0:t.call(e))==null?void 0:n[0])||""){case"Form":return"doctype";case"List":return"doclist";case"Workspaces":return"workspace";default:return""}},P2=e=>to(t=>ct(Ft,null,function*(){var u,a,c,f;const n=new Headers;n.append("Content-Type","application/json"),n.append("x-frappe-csrf-token",(u=window==null?void 0:window.frappe)==null?void 0:u.csrf_token);const r=e?"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_public_trigger.create_new_conversation":"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.create_new_conversation";return(yield fetcher(r,{headers:n,body:JSON.stringify({message:t.message,route:window.location.pathname,page_name:((f=(c=(a=window==null?void 0:window.frappe)==null?void 0:a.get_route)==null?void 0:c.call(a))==null?void 0:f[1])||"",page_type:WN(),previous_session_id:t.session_id}),method:"POST"})).json()})),QN=({isPublic:e})=>{const{isPublicApp:t}=B.useContext(ls),n=gn(w=>w.loading.isLoading),[r,o]=B.useState(""),{mutateAsync:u,isLoading:a}=rC(),{session_id:c}=gn(w=>w.user),f=gn(w=>w.chatArray),{mutateAsync:d,isLoading:p}=P2(t),m=w=>{o(()=>w.target.value)},g=a||p,x=B.useMemo(()=>{var A,C,k;if(!f.length)return!1;const w=f[f.length-1];return((A=w==null?void 0:w.author)==null?void 0:A.toLocaleLowerCase())==="user"||((C=w==null?void 0:w.status)==null?void 0:C.toLocaleLowerCase())!=="pending"?!1:((k=w==null?void 0:w.message_type)==null?void 0:k.toLocaleLowerCase())=="text"},[f]),E=x&&!g,P=()=>ct(Ft,null,function*(){g||r&&E&&c&&(o(()=>""),yield u({message:r,session_id:c}),o(()=>""))}),R=w=>{!w.shiftKey&&w.key==="Enter"&&P().catch()};return x?z("div",{className:"tw-flex tw-flex-col",children:De("div",{className:`tw-flex tw-mt-2 tw-h-[90px] tw-items-center tw-rounded-md tw-outline-none ${n||!E?"tw-opacity-50 tw-cursor-not-allowed":""}`,children:[z("div",{className:"tw-flex tw-flex-grow tw-p-3 tw-resize-none tw-text-base tw-text-black tw-h-full tw-shadow tw-bg-stone-50 tw-outline-none tw-rounded-[17px] tw-font-[inherit]",children:z("textarea",{className:"tw-max-h-auto tw-w-full tw-bg-transparent focus:tw-outline-none tw-outline-none tw-resize-none",placeholder:"Type your message here...",onChange:m,value:r,onKeyDown:R,disabled:n||!E})}),z("button",{className:" tw-mx-2 tw-p-2 tw-rounded-full tw-outline-none tw-bg-blue-700 tw-text-white",onClick:P,disabled:!r||!E,children:z("img",{src:zN,style:{filter:"brightness(0) invert(1)"},className:"tw-w-6",alt:"sendicon"})})]})}):z(Ir,{})},HN=({className:e=""})=>z("div",{className:"tw-flex tw-justify-center",children:z("output",{className:"tw-flex tw-justify-center tw-items-center tw-h-12 tw-w-12 "+e,children:De("svg",{"aria-hidden":"true",className:"tw-inline tw-w-8 tw-h-8 tw-text-gray-200 tw-animate-spin tw-fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[z("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),z("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})}),cc=(e,t=[],n=[])=>{try{if(t.find(o=>new RegExp(o).test(n.join("."))))return e;const r=typeof e=="string"&&(e.trim().startsWith("{")&&e.trim().endsWith("}")||e.trim().startsWith("[")&&e.trim().endsWith("]"))?JSON.parse(e):e;if(Array.isArray(r))return r.map(o=>cc(o,t,[...n,"_number__"]));if(typeof r=="object"&&r!==null){const o=Object.keys(r);for(let u=0;u<o.length;u++){const a=o[u];r[a]=cc(r[a],t,[...n,a])}}return r}catch(r){}return e},GN=e=>{const t="/api/method/nextai.core_handshake.initiate";return Bu(["initiate_handshake"],()=>{var n;return fetcher(t,{headers:{"X-Frappe-Csrf-Token":(n=window==null?void 0:window.frappe)==null?void 0:n.csrf_token}}).then(r=>{if(r.status===200)return r.json();throw new Error("No details found")}).then(r=>cc(r))},e)},_2=e=>{const t="/api/method/nextai.core_handshake.check";return Bu(["handshake_check"],()=>{var n;return window.fetcher(t,{headers:{"X-Frappe-Csrf-Token":(n=window==null?void 0:window.frappe)==null?void 0:n.csrf_token}}).then(r=>{if(r.status===200)return r.json();throw new Error("No details found")}).then(r=>cc(r))},e)},KN=()=>{const e=io(),{refetch:t}=GN({enabled:!1}),{refetch:n}=_2({enabled:!1});return De("div",{className:"tw-flex tw-items-center tw-p-4 tw-justify-between tw-w-auto",children:[De("span",{className:"tw-flex tw-items-center",children:[z("span",{className:"tw-flex tw-items-center tw-justify-center tw-min-h-[40px] tw-min-w-[40px] min tw-rounded-full tw-bg-gray-300 tw-text-gray-500 tw-text-sm",children:"🤖"}),z("p",{className:"tw-text-l tw-mx-4 tw-my-0 tw-word-break",children:"Please allow ChatNext to access your system."})]}),z("span",{children:z("button",{className:"tw-border tw-mx-2 tw-p-1 tw-border-gray-300 tw-rounded-md tw-outline-none tw-bg-slate-600 tw-text-white tw-cursor-pointer",onClick:()=>ct(Ft,null,function*(){const{data:o}=yield t();if(o!=null&&o.message){const{data:u}=yield n();u!=null&&u.message&&e(vl(!0))}}),children:"Allow"})})]})},T2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAyZSURBVHgB7VsLcFTVGf7OuXdf2YQ8SLKJRo0SUFDBNmIrUgHFlITHCLRSLHXGju2047RTlYrWMsXxOVLqWB/UaX0UFEEqKo9EQDCITNSpQBUKSpRAeeRBXiabfd17Tv+7DiHJ3nt3Q5IVmHyZze6e1z3nO//5///85ywwiEEMYhCDGMTZCoZvD6yoVDpbHHDqHeDMAWlXuKkCbVRFIslICkH502QKwh0jdUdKsSJRCI4CKbUCQB1CHUiTDKptA9L4049SvZfVRmXlkSoWQJKgYoCQM+q9VF448UYmQrfRtF/FnCnnK4Dr5JQwdurRcWfJKMCUYfT/+nAWsuh9CZKEfpWggmulR09HseSR3zDumEZJKeh/iPYActu2sEYkARz9A+YrbZujZck3SSbfJ3JuwcCQY4B7WMsEJAl9XmJDJ8uRDqd8hnE2nr46kQToSkhHknDaBGXPkGmqhnsYlwtIgNxIEqSUfq74PkKScFoE5U9uGym10BLGXaXJ9BRI2WtMykcaynktkoRej85XKm/ginyRql6EPkJKaPQWYAxhKW39IMPMfwWhLKl9h61GEtEbCWJ5pXI2qfUV9NHRi3pRIoiE46Q9PhFQKrVIpCqsOb5s+0FlKxZN0nAGI2EJ8pWF5jLuXMZ6RapsIYfwNSl4hWff9s01NZOCOMuQ0GBzp8pZnMmnEy1PijQCGXpUj7hfbdjsPICzGHElKPvGhhEOT/YuJODXGBaGMfFW0KPc2byateIcgK1E+GbKXBaWbyARp0+KwwLyrvr16hrEB88qkec7ncjXJW0/pNavppBpqqZyNKZUV9RUV5eF0AfYdsw3VX+SM/47xAGZn71hPTClqSLliFWZUaP2OBsvvGCWwr0zJedj6NG5lOwlBd4rhZ8QGAT972CkA2ni9lL/Vvr9HRvaKoecQC9hSVBuabCEK65yKqDABjTADamfY3Z1NTOdqbybZSFCuJ1amc8GbvsRH5J6weS6cPuhhY2VF+9PtJopQcXF0nEsX+6l7OGwfabcgtYv59ZuH94Qk7lI8tyPMVNleIrCGefjzEGdkHg62IrnWj9gzfEKm25Wj/j0H8UnB4d10THPlBxC3sdYTJZv1RlGjgEfZ3jYnSGX5UysT41XOEaC0qfKTA/wATl2oyxrSTToAjPrK9iOnllGcIxm6BXqxEyc4SCr+9+wv/mHTZVDLXVnjASlML3Ulpxow+HnzMjBRKkKIR5OlBxpbK7oFennl55gYJYxNsrpzXzVV9KWa1UmxsxLoZPHrNiN6oBQI0vNsnxe/TbOFFurp5F9SfVIlH0/IEcUCJmRqnOF9++GNxABjtUq2LHfiX01KjQbL4JIul46Uu+jj3eb5nf9kjclUAjFtYcqea0aJALn1Jarr/dMz5jSXOhR06uMLZtZPUHEjLgogrtm+zF+dDgqPcmAP8jw8jspWLYpBaGQNVFCD82oq3Cv65nefYlxZZItOVJvSJXK22Z5bjVjkRU5tGTx05IAVvyxBdddmTxyDHjdEnfe7McL97ag6DzrfTH5ewvzi4/GuCE9CFJvhi2Uf1VXxPo7hsdNivvHZjUMffCLqX4smNsGp5r0U5tOXFEYwbIHmpGfZRGM5OpYkZs9PSa5y2fGJPsurCGEri03bTsQmkdSEsO+ISkzrg3i1zSDZwJSSJqWzm+B02k2UQycO2/pmdpJUNb3ZBo5fpY+C+UdYkL91Kxlqaqm0uNySdw9tz26xOKCoW/ByQTrFvp03FHmhzDnaELWxCMFXZM6rZiag4uZ/VD21m1iMaKQOU1eQOedI2I6SB0ouyaI7DRhr3PIrOlv7QYO1Eeni40bBk4vKIkduIhdhyC3VdPOi1b+sBzwmy4Hy7Lf0cy9IYjXtnjR3BYz3KGqK/Uyeu/0i06ZeV3zQbHe3NPG7wuzdFekfRjU1Mye6cZKnzUhYE9OYzv0xRshj5+KjMi9xyDf2w/l7pvIH7A5CyBPVazZBbF2t6Fhv0n7vBb6Vqp77xQwIssKaV6BMcPDqNzpisljitvwAd89+f3UNDHVBxsIDaZbCql48om9mKnITZcYlm9/OiPWfdqNnG/6QW2SNIn37eNscn9td3JOIhiBWLoN8TDu8rB5BnMVdf3aSRDnGAI7KNxc03LF1C3IStfhsjsli+iQ+ywOJ2jQYlscgvYciyXnZF4tkd5qf3xfkKtFYyImjx7a7XuXz/ZqTlrmmy4iOi8zzCIsoRFBwbB1Pi0hW5UYton1G1LYbh/+dhpRKHNF3Y23UwRJ43qJHYSp5uNMbzZ7UiDIEY7YDNDlALtgqGU2uyQbtgrswixYHhSpKp2Fp8MOLW3clH8p0E2sOwnSIx31sAGJXrZZutDCR2k4Mc7joXoFja3ctkE+eSQRZWIYUl1QZhXDtj/ji8wVMc0/nz6aSLK3ggf+p5ouCSki3YxRZyuKknII9l0qMksVgfY91GqsMiH9/NlB+2gqu6oAygKyOIU5UYmC2wlWRMb0PjqwzUuzrWu4AUY5Po7CVl6yRm5HVGr4z68Dn/0d26rG5nXr7lgLZsQ/OHPs6tbHkx8yi5vS3XmZzWYWKVoXOOgPYKzZtZO8aZF1DOq0nulFBRpWP9gU34cz9iPtHVFLgTQPeo0A6TJDnw1JSch/qtrjxK+ezIjpl5CymjM25vh61nEyrbO15k+yWqlGg1Wj1NjFHoc2wiyPtiArzdK/IDHe+okLcaFQ6+ne0yPHgIfMZWZqws7l8xu85pPG2HtdyTHQrUUpxVbYgBSy6Wa2PuBeRfr069jywJ9eSsO+wwN2ka13IEF9ZEUqdu53mOUFuQi+0jO5O+WivQI2oEDa7UVFMlYkKplGU/IHszptAY75fxsSlaZvE7rO8OJGD1ZtSYmu5J6gnfgbx8s923umdyuqsCEfEskdlk9hak7bCMwyy3K317xKynp3TBV6Ha1TMe/hTGz82GW+SRxgBChodv/f07BkVZrFlTpBsTTlAZg4Dj2XIs8vo5AGV26FNb5QGquuOlI1LsZV9ZWErmAO5ybyL/LNKhq+X0G2jp/cFMCE0SH4MoThsiS22+8CYxQOxZppXTDycxhqKOxqWKsVmz2kPiwfEtREx/yGcu+zZpkxtXzT5VxygJdbHxhKw1d4sLbc9SBMGPdN0+YwqSynQVvaeMNoOWkqs4kgr0f0OsrhJHKW3tOCjLQej6eGdnzmxJrtbnp3oY3OVh2KfVvkGD5RW84WWOXH9o0ODfPysDvOyUZY6JhQV8E+NMv0lck7aJ0/A+Pa7wDAQ3GmdY82Rgk2YNC0l4Lzf16Vij1fOWyD9F1B9R7SPXiiYTVrtypj2lL+FG0eVGU5bBuXxzTOLjuxlpluUXLKAtcrcP6TcV6IfoZB0PrHGpGWIrHzgANPrfFiz5eORK28QUwj/XuqdgN7KF5Zc6p/SVJ0DLso83K7yhCRzeg4eOvxyktNLwXklzVfBJZhLMU59KR+u+hp6K2S4iCa2jk+IKdPTXSNGvf8hFgrFOXx+vWsKpEqlk1nlwYmqIp7S9zLC0A5edi32V3szi5pKFbVofczzgxve0CWnS1kdNtbqUeaF6vOzG09nUE7WHO/SPK8f+OvVOBOxHu+lJ9p4cYpJzbnHLMrd+H4lsxgWvpYzrTJ9OQrGVPzqfPkPst+PTkkMow4Sj2kVkPr7n1/h7LudG/m298PouMcHsYGKnU14vZKHNSl9vv6DufbUcfxHEH8K3iTjl7q8J63E4lcwSOWmNRe6IBjQeuG+FdLzgYkJNp5pbKUKXgTCesP0ajr/n9EIupzze+mHMZZjF5cA+64lXM3+TYsEwlDnhBSe5M2cesCjf4dX1elN+EsQ6+UY940eTuto+ftvGQLGHbkKJj4SIfyri4Cu0Ka52B7uLIJlefIRfKTyJ0aGaeAvU4HSH28OWZwJokc7ifCI/EKS6HXSKb/pW6DayWSiNMyr/lT20YKuJ/lTJ2EJCJ630pgYV05exxJQl/8D55Xpj/GGP9tf3rJCUD6I8j+eiNLij7ryy8ORW25skBTcKUUcj2SF+dhLq3hBiQJff5JZsNaVl1bzmeISPN0IukdSurTzfZEQOfnSVPs/fWbVVm3KWv98bGYSrGGyRK68fOFhPc7vYRQ1LRdSBL6dQ/UFb6S/3gVx+gbhQj9jCmua8hince6/hb89BCiCNDiuvVsIZKEASOoK3wl0iud2mgu2GUU+B9O6upiOpLNpRh3OvXAS0vTGaeXktGZFdn6VbXl6ktIIpJCkCkkWPHVUj18CVxaM5R4xcdo8FeeQ5vgQQxiEIMYxCAGHv8HN1XK6ib8sEsAAAAASUVORK5CYII=",$N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIABAMAAAAGVsnJAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABPaAAAT2gFqQZ8CAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAABVQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAPYbscQAAAAZ0Uk5TAARUp6v7ZOI89wAACnhJREFUeJzt3cmRG0cURdEWLdACBihCQQe00F4bGYAFHZAI/01Qz42hhszKP7ybX9gyKviS93DqBqqentZev/+6+kO41y9/9F/z7cdf9kOyXqefv3Vf8/3y7zQEfvn7cu695tuPy2UaAqfLpZvA98tlGgLPAC69BF4ATEPg9HKWTgIvAGYh8Aqgk8AbgEkInN7O0kXgDcAcBN4BdBH4ADAFgdPHWToIfACYgcAngA4CXwAmIHD6OkszgS8AfAJXAJoJXAPAEzhdn6WRwDUAOoEbAI0EbgHACZxuz9JE4BYAm8AdgCYC9wDQBE73Z2kgcA+ATOABQAOBRwBgAg8AGgg8AuASWACwS2AJAJbAAoBdAksAqAQWAewQWAYAJbAIYIfAMgAmgRUAmwTWACAJrADYJLAGgEhgFcAGgXUAQAKrADYIrAPgEdgAsEpgCwCOwAaAVQJbAGgENgGsENgGACOwCWCFwDYAFoEdAIsE9gCgCOwAWCSwB4BEYBfAAoF9ACACuwAWCOwD4BBoAPBAoAUAhkADgAcCLQAoBJoA3BFoAwAh0ATgjkAbAAaBRgA3BFoBIAg0Argh0AqAQKAZwBWBdgAAAs0Argi0A9An0AHgk0APAHkCHQA+CfQAUCfQBeCdQB8AcQJdAN4J9AHQJtAJ4JVALwBpAp0AXgn0AlAm0A3ghcCf3dfoEugGcLn8c+QiVQIHADzHPHaV5Otgy2kIHE05DYHDJSchcDzkJAQGOk5BYCTjFASGKk5AYCziBAQGG+IJjCbEExguCCcwHhBOwKAfmoBFPjQBk3pgAjbxwASM2mEJWKXDEjArByVgFw5KwLAbkoBlNiQB02pAArbRgASMm+EIWCfDETAvBiNgHwxGwKEXioBHLhQBl1ogAj6xQAScWmEIeKXCEHArBSHgFwpCwLETgoBnJgQB10oAAr6RAAScG8kT8E4kT8C9kDgB/0DiBAL6SBOIyCNNIKSOMIGYOMIEgtrIEohKI0sgrIwogbgwogQCu0gSiMwiSSC0iiCB2CiCBIKbyBGITiJHILyIGIH4IGIEEnpIEcjIIUUgpYYQgZwYQgSSWsgQyEohQyCthAiBvBAiBBI7SBDIzCBBILWCAIHcCAIEkhukE8hOkP3z5xdIHpAeIHtBOoDkCfkAkjcIAEgdoQAgdYUEgMQZGgASd4gASBuiAiBtiQyApCk6AJK2CAFIGaMEIGWNFICEOVoAEvaIAQgfpAYgfJEcgOBJegCCNwkCCB2lCCB0lSSAwFmaAAJ3iQIIG6YKIGyZLICgaboAgrYJAwgZpwwgZJ00gIB52gAC9okDcB+oDsB9oTwA54n6AJw3AgC4jiQAcF2JAOA4kwHAcScEgNtQCgC3pRgATlM5AJy2ggC4jCUBcFmLAuAwlwXAYS8MgPlgGgDzxTgAxpN5AIw3AwGYjiYCMF2NBGA4mwnAcDcUgNlwKgCz5VgARtO5AIy2gwGYjCcDMFmPBmAwnw3AYD8cwPAB6ACGT4AHMHgEPoDBM0wAYOgQMwAYOsUUAAaOMQeAgXNMAuDwQWYBcPgk0wA4eJR5ABwkMBGAYwT+7r9GFcAxAv0vXQCHCPS/dAHEEFAGEEJAGUAEAW0AAQS0AfgTUAfgTkAdgDcBfQDOBPQB+BIgAHAlQADgSYABwJEAA4AfAQoANwIUAF4EOACcCHAA+BAgAXAhQALgQYAFwIEAC4A9ARoAcwI0ANYEeACMCfAA2BIgAjAlQARgSYAJwJAAE4AdASoAMwJUAFYEuACMCHAB2BAgAzAhQAZgQYANwIAAG8A4ATqAYQJ0AKME+AAGCfABjBGYAcAQgRkAjBCYA8AAgTkAHCcwC4DDBGYBcJTAPAAOEpgHwDECMwH4/xeg+m+B8n8IVv9rsPw/hKr/U7j8f4aq/3e4/BdEqn9JrPwXRat/Wbz8N0aqf2us/DdHq397vPwbJKq/Rab8m6Sqv02u/Bslq79Vtvybpau/Xb78Byaqf2Sm/Iemqn9srvwHJ6t/dLb8h6erf3y+/A0Uqt9Co/xNVKrfRqf8jZSq30qr/M3Uqt9Or/wNFavfUrP8TVWr31a3/I2Vq99au/zN1avfXr/8AxaqP2Kj/ENWqj9mp/yDlqo/aqv8w9aqP26v/AMXqz9ys/xDV6s/drf8g5erP3q7/MPXB0+AJzB8ADqB4f1wAgbz2QQM1qMJmIwnEzDZDiZgNJ1LwGg5loDZcCoBs91QAoazmQQMVyMJmI4mEjDdDCRgPJlHwHgxjoD5YBoB870wAg5zWQQc1qIIuIwlEXDZCiLgNJVDwGkphoDbUAoBt50QAo4zGQQcVyIIuI4kEHDdCCDgPFGfgPNCeQLuA9UJuO8TJxAwT5tAwDppAiHjlAmEbBMmEDRNl0DQMlkCYcNUCYTtEiUQOEuTQOAqSQKhoxQJhG4SJBA8SY9A8CI5AuGD1AiE7xEjkDBHi0DCGikCKWOUCKRsESKQNEWHQNISGQJpQ1QIpO0QIZA4Q4NA4goJAqkjFAikbhAgkDwhn0DygnQC6QOyCWT//NkF0gFkJ0gHkNxAAEBuBAEAqRUkAGRmkACQ2EEEQF4IEQBpJWQAZKWQAZDUQghATgwhACk1pABk5JACkNBDDEB8EDEA4UXkAEQnkQMQ3EQQQGwUQQChVSQBRGaRBBDYRRRAXBhRAGFlZAFEpZEFENRGGEBMHGEAIXWkAUTkkQYQ0EccgH8gcQDuheQBeCeSB+DcCADANxIAgGslBADPTAgAjp0gAPxCQQC4lcIA8EqFAeDUCgTAJxYIgEstFACPXCgADr1gAOyDwQCYF8MBsE6GA2DcDAjANhoQgGk1JADLbEgAht2gAOzCQQGYlcMCsEqHBWDUDgzAJh4YgEk9NACLfGgABv3gAMYDwgEMF8QDGE2IBzDYcAIAYxEnADBUcQoAIxmnADDQcRIAx0NOAuBwyWkAHE05DYCjLf88cpHo60DMf56+d1+jCuAQgfPTtx+918gCOEDg529P3QR0ARwgcH6+qJeAMIBuAi8AegkoA+gmcH69qI+ANIBOAm8A+ghoA+gkcH6/qIeAOIAuAh8AegioA+gicP68qJ2APIAOAl8A2gnoA+ggcL66qJUAAEAzgWsArQQIAJoJnG8uaiOAANBI4BZAGwEGgEYC57uLWghAADQRuAfQQoACoInAPYAWAhgADQQeAewT4ABoIPAIYJ8ACMAugSUAewRIAHYJLAHYI4ACsENgGcA2ARaAHQLLALYJwABsElgDsEWABmCTwBqALQI4ABsE1gGsE+AB2CCwDmCdABDAKoEtAGsEiABWCWwBWCOABLBCYBvAMgEmgBUC2wCWCUABLBLYA7BEgApgkcAegCUCWAALBPYBPBLgAlggsA/gkQAYwAOBFgD3BMgAHgi0ALgngAZwR6ANwC0BNoA7Am0AbgnAAdwQaAVwTYAO4IZAK4BrAngAVwTaAXwR4AO4ItAO4IvABAA+CfQA+CAwA4BPAj0APghMAeCdQB+ANwJzAHgn0AfgjcAkAF4J9AJ4ITALgFcCvQBeCEwD4JlAP4Cnp9+nAfBM4I/VH/oPjXuGAChg6qwAAAAASUVORK5CYII=";function k2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=k2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Np(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=k2(e))&&(r&&(r+=" "),r+=t);return r}const qN=()=>to({mutationFn:t=>ct(Ft,[t],function*({trigger_id:e}){var o;const n=new Headers;return n.append("Content-Type","application/json"),n.append("x-frappe-csrf-token",(o=window==null?void 0:window.frappe)==null?void 0:o.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_public_trigger.link_trigger",{headers:n,body:JSON.stringify({trigger_id:e}),method:"POST"})).json()})}),Uw=e=>{const{isPublicApp:t}=B.useContext(ls),{isLoadingChat:n,isAuthenticated:r,messageBoxRef:o,chatArray:u,isPublic:a,onClose:c}=e;return B.useEffect(()=>{const f=new CustomEvent("chatnext:modal:chat:open");return document.dispatchEvent(f),()=>{const d=new CustomEvent("chatnext:modal:chat:close");document.dispatchEvent(d)}},[]),z("div",{className:Np("tw-relative tw-mx-auto tw-w-full tw-h-full",!a&&"md:tw-w-4/5 md:tw-h-4/5"),children:De("div",{className:"tw-rounded-lg tw-h-full tw-border-0 tw-shadow-lg tw-relative tw-flex tw-flex-col tw-w-full tw-bg-white tw-outline-none focus:tw-outline-none",children:[De("div",{className:"tw-rounded-t-lg tw-bg-white tw-border-b-zinc-300 tw-border tw-flex tw-justify-between tw-items-center",children:[De("div",{className:"tw-h-full tw-flex tw-justify-center tw-items-center tw-p-3",children:[z("img",{className:"tw-w-9 tw-h-9",src:T2,alt:"chatnextlogo"}),z("span",{className:"tw-text-blue-700 tw-text-xl tw-font-bold",children:"ChatNext"})]}),!a&&z("button",{className:"tw-ml-3 tw-cursor-pointer mr-3 tw-bg-transparent",onClick:c,children:z("img",{className:"tw-w-5 tw-h-5",src:$N,alt:"headerIcon"})})]}),n?z(HN,{}):z(Ir,{children:r||a||t?De("div",{className:"tw-pt-0 tw-pl-4 tw-pr-4 tw-pb-6 tw-flex tw-flex-auto tw-flex-col tw-overflow-x-hidden tw-overflow-y-hidden tw-flex-grow",children:[z("div",{className:"tw-grow tw-flex-col tw-overflow-y-auto tw-overflow-x-hidden custom-chatnext-scrollbar",ref:o,children:u.map((f,d)=>z(jN,{cna_conversation:f,is_last:u.length-1===d},`${f.id}-${f.status}`))}),z(QN,{isPublic:a})]}):z(KN,{})})]})})},R2=()=>{const e=gn(E=>E.chatButton.isOpen),t=gn(E=>E.chatArray),{isAuthenticated:n,session_id:r}=gn(E=>E.user),{isPublicTrigger:o,isPublicApp:u}=B.useContext(ls),a=B.useRef(null),{mutateAsync:c}=qN(),f=io(),[d,p]=B.useState(!0),{data:m}=nC({session_id:r!=null?r:""},{enabled:!!r&&(e||o),refetchInterval:1e3}),{refetch:g}=_2({enabled:!(o||u)}),x=()=>{f(Hm())};return B.useEffect(()=>{var A;if(!o)return;const E=window.location,P=(A=E==null?void 0:E.search)==null?void 0:A.slice(1),R=new URLSearchParams(P),w={};for(const[C,k]of R.entries())w[C]=k;w!=null&&w.trigger&&c({trigger_id:w.trigger}).then(C=>{var k,b,I;(k=C==null?void 0:C.message)!=null&&k.session&&(console.log({new_session_id:(b=C==null?void 0:C.message)==null?void 0:b.session}),f(Tu((I=C==null?void 0:C.message)==null?void 0:I.session)))})},[f,o,c]),B.useEffect(()=>{var P,R;const E=(P=a==null?void 0:a.current)==null?void 0:P.scrollHeight;(R=a==null?void 0:a.current)==null||R.scroll({top:E,behavior:"smooth"})},[t.length]),B.useEffect(()=>{if(m!=null&&m.length){const E=m.map(P=>q(F({},P),{author_image:"",timestamp:new Date(P.creation).toISOString()}));f(VS(E))}},[m,f]),B.useEffect(()=>{o?p(!1):(()=>ct(Ft,null,function*(){if(u){f(vl(!1));return}const{data:P}=yield g({});P!=null&&P.message?f(vl(!0)):f(vl(!1))}))().finally(()=>p(!1))},[o]),B.useEffect(()=>{window.trigger_chatnext_assistant=(E,P)=>{E&&(f(Tu(P||"")),f(yl()))}},[]),o?z("div",{className:"tw-absolute tw-w-screen tw-h-screen tw-flex tw-flex-col tw-justify-center tw-items-center tw-inset-0",children:z(Uw,{isLoadingChat:d,isAuthenticated:n,messageBoxRef:a,chatArray:t,isPublic:o})}):z(Ir,{children:e&&De(Ir,{children:[z("div",{className:"tw-absolute tw-w-screen tw-h-screen tw-flex tw-flex-col tw-justify-center tw-items-center tw-inset-0",id:"modalId01",style:{zIndex:99999},children:z(Uw,{isLoadingChat:d,isAuthenticated:n,messageBoxRef:a,chatArray:t,onClose:x})}),z("div",{className:"tw-opacity-25 tw-fixed tw-inset-0 tw-z-[9999] tw-bg-black"})]})})},YN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAjCAYAAADxG9hnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAZuSURBVHgB1VhLaFRXGD73MZPJy7x8ICYqNiiaRKW6SGxFYxa26EZaY+1CobjItrar1oVS0l1DN6UtdOPCBkxSXCgUIaK0JQW1aKkGxYI1Yggx5v2amXtvv+/knJuTm5lRoxt/+Ln3zj2P737/f77znxHiTbUgCKTDLO36GVdLNQvvjd9ey+RywtOnT9u40h24u2PHjhiuMV7pe/fudQ8fPuyoNovALAmU2ZmuJuDEcXgCXrBq1apCXIvghcoL1Ls4QRGQAm8pJrMCsXIBgck2+FpndHTUnpycdFKplPP06VOCcoqKiuyJiQnZvri4mPEJHMfxbNv2nz17lsazh77+hg0b/PPnz/sYL1DjBtH53Ews8JatwYJ1584d5+bNm5oNtncPHTr0bn5+fl1eXl4Nmi2j+77fNz093Ts+Pv77pUuX/ka7dHl5efrJkydp9E83NzfrcX3xPEYUkODMmTOS0urqaufBgwduSUlJ3PO82IEDBz4GC82u6zaIHIZx+gCorb29/Wc8JuEpAlNONvysQAzK+Bvj6q5YsSI2Ozsb37ZtW/XGjRu/fR6ATIDu3bv3wbVr1/7FWEl8UKqystK7evWqp1aa0GEyQ6NBWBrE4OBgfP/+/W+vW7eui/SLlzT0qdq0aVMXWPwE4fqLv8XjcclINE9szYYGwcTE1QGI2J49e95aKggTzJo1a7p2795dzTGHh4f58Y6IpIUb7cfELCsrY0gSCMcvmUAUFBQIJKKoqqoKf+vr6xOPHz/OBmbZ5s2bO5E3TY8ePRoQczlCDxYBYYKADZtAgDp27Nixz7EMK6MA9u3bJ533phFIa2uryMVMbW1ty61bt76G/ngDAwOeAiOV2lWNAixV+/r161Ixt27dWoGl2RwFcfLkSYFkE/fv3xc9PT1iaGgofJ+NjcgYJ5D4P96+fZuscAXZAOFRr1yFyGpsbLQePnwo5Rs0vh9lA0AlCAiTuHLlShgezQzfaZuamsoIjCGqq6s7AiDfrV692kEie9acyglXixiWlExWKKRdWFj4njnA9u3bRUNDg7h48aIEwWeEblF4TCNjHR0dEpRpWDXvYI7v+/v7LfocPst3De2Q+gGFhEo7C9ggCA5IIBUVFaKlpUWGhROZ4TGBM49oZ8+eXfAOY9cgaW1jTmm2Zg0qaoFq+RJhqTE7c3JNNUHR2traZK7wmWB4z/Do8JERvouypkJuL1++fIGY2lrhaNioBDY2ETXsK+GXExSNz1jecjJeaQcPHhRNTU3he903l2ErkYvFVTuswJ4ikw/6wR1yLKofOhm5TDk5J2WoTP3g8sXGJ1nQTEVDx7GRg/Lrt2zZIoHQFkg84kfp9blH4BqGB1kuY042mKy7du2SQDQT2giM+VFfXy/BRPODhs3zLlgP8D5QwLjJhTkiawlIcID6wk8mkz1m5+7ubnk9fvy4vDI/mAOcjOC08z10QjKk20QtnU7/QzzYQKWYhUWPQsVnB/THMEgC9UbjypUru8wBGHtqCZQx62p5EYOifgip6MZGOIu5UkrQAlNZA0zgI5vTly9f/uPo0aM9CFWDyQoTjyEh/VwlJhjmCsOWyxjyCxcu/IY5vEQi4SM/fJ2jjmpjsYICUuqFjXLQXrt2bT+LIHMgLe0MCQYTNTU1cuOjo4+4ceNGTiBYlZ/ehbEuwebHuiRcsjo0OlasylysoDzcJxDzViA/IV6DzczM/ITk/QK30/AUIpCG3niaEZms6iEAVQErKDFX2s2i4ylkeY94ReMYnZ2dp8Rc2cjxPaSBVHS9xZjFib6XGx82JReaEB8ZGSEzXy2VGehSBxL8S/igmK9ffb3rRieXZhwh9CEqhiLJRX2Sh+Rl4fxZdFfOZhQu6MU3586d+6G0tDSJD0qh3knyaEE2gjlJDzSYTOeakBkon4PccqC4MSRjDJtVDIA+QrIegQ7UZwKAMPyJhP8Vedbe29s7hD5kIY2xPIwVFkPCqM6yAVkARrODqsqB0LmYyBkbG4vt3LmzFPlUSxaxzAWEcBQa8R9UeFTMHx20e2LhMSLrQWuRGQW1bRw3E8idAlT4PGaWwEvh5fAy3iOM/K1YGEdPuD4PL+3ca57sxfwB3FVn2jiWed769es5Wb5y3nPZ63OvPIyrfq9ukb8aeDX/EXDU18qJ9b8FBpvCLDNy2UvRFa55pTsZ+gf62GouzTfK/gem2mK7tBpFOQAAAABJRU5ErkJggg==";var fc={exports:{}};/**
74
+ ${e?"tw-mb-4 tw-rotate-90 tw-scale-105 tw-bg-opacity-10":"tw-scale-100"}`})]})};class ds{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ku=typeof window=="undefined"||"Deno"in window;function In(){}function WI(e,t){return typeof e=="function"?e(t):e}function Ap(e){return typeof e=="number"&&e>=0&&e!==1/0}function QS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ks(e,t,n){return Bu(e)?typeof t=="function"?q(F({},n),{queryKey:e,queryFn:t}):q(F({},t),{queryKey:e}):e}function QI(e,t,n){return Bu(e)?typeof t=="function"?q(F({},n),{mutationKey:e,mutationFn:t}):q(F({},t),{mutationKey:e}):typeof e=="function"?q(F({},t),{mutationFn:e}):F({},e)}function Yr(e,t,n){return Bu(e)?[q(F({},t),{queryKey:e}),n]:[e||{},t]}function _1(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:u,queryKey:a,stale:c}=e;if(Bu(a)){if(r){if(t.queryHash!==Km(a,t.options))return!1}else if(!Zl(t.queryKey,a))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||typeof o!="undefined"&&o!==t.state.fetchStatus||u&&!u(t))}function T1(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:u}=e;if(Bu(u)){if(!t.options.mutationKey)return!1;if(n){if(Gi(t.options.mutationKey)!==Gi(u))return!1}else if(!Zl(t.options.mutationKey,u))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Km(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gi)(e)}function Gi(e){return JSON.stringify(e,(t,n)=>Sp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Zl(e,t){return HS(e,t)}function HS(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!HS(e[n],t[n])):!1}function GS(e,t){if(e===t)return e;const n=R1(e)&&R1(t);if(n||Sp(e)&&Sp(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),u=o.length,a=n?[]:{};let c=0;for(let f=0;f<u;f++){const d=n?f:o[f];a[d]=GS(e[d],t[d]),a[d]===e[d]&&c++}return r===u&&c===r?e:a}return t}function ec(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function R1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sp(e){if(!k1(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const n=t.prototype;return!(!k1(n)||!n.hasOwnProperty("isPrototypeOf"))}function k1(e){return Object.prototype.toString.call(e)==="[object Object]"}function Bu(e){return Array.isArray(e)}function KS(e){return new Promise(t=>{setTimeout(t,e)})}function O1(e){KS(0).then(e)}function HI(){if(typeof AbortController=="function")return new AbortController}function Cp(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?GS(e,t):t}class GI extends ds{constructor(){super(),this.setup=t=>{if(!ku&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const tc=new GI,b1=["online","offline"];class KI extends ds{constructor(){super(),this.setup=t=>{if(!ku&&window.addEventListener){const n=()=>t();return b1.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{b1.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const nc=new KI;function $I(e){return Math.min(1e3*Da(2,e),3e4)}function Xc(e){return(e!=null?e:"online")==="online"?nc.isOnline():!0}class $S{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function xl(e){return e instanceof $S}function qS(e){let t=!1,n=0,r=!1,o,u,a;const c=new Promise((k,x)=>{u=k,a=x}),f=k=>{r||(w(new $S(k)),e.abort==null||e.abort())},d=()=>{t=!0},p=()=>{t=!1},m=()=>!tc.isFocused()||e.networkMode!=="always"&&!nc.isOnline(),g=k=>{r||(r=!0,e.onSuccess==null||e.onSuccess(k),o==null||o(),u(k))},w=k=>{r||(r=!0,e.onError==null||e.onError(k),o==null||o(),a(k))},E=()=>new Promise(k=>{o=x=>{const A=r||!m();return A&&k(x),A},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),P=()=>{if(r)return;let k;try{k=e.fn()}catch(x){k=Promise.reject(x)}Promise.resolve(k).then(g).catch(x=>{var A,C;if(r)return;const T=(A=e.retry)!=null?A:3,L=(C=e.retryDelay)!=null?C:$I,I=typeof L=="function"?L(n,x):L,D=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,x);if(t||!D){w(x);return}n++,e.onFail==null||e.onFail(n,x),KS(I).then(()=>{if(m())return E()}).then(()=>{t?w(x):P()})})};return Xc(e.networkMode)?P():E().then(P),{promise:c,cancel:f,continue:()=>(o==null?void 0:o())?c:Promise.resolve(),cancelRetry:d,continueRetry:p}}const $m=console;function qI(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const o=p=>{let m;t++;try{m=p()}finally{t--,t||c()}return m},u=p=>{t?e.push(p):O1(()=>{n(p)})},a=p=>(...m)=>{u(()=>{p(...m)})},c=()=>{const p=e;e=[],p.length&&O1(()=>{r(()=>{p.forEach(m=>{n(m)})})})};return{batch:o,batchCalls:a,schedule:u,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const et=qI();class YS{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ap(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:ku?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class YI extends YS{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||$m,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||JI(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=F(F({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Cp(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(In).catch(In):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!QS(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var u;return(u=this.retryer)==null||u.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(E=>E.options.queryFn);w&&this.setOptions(w.options)}const a=HI(),c={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},f=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};f(c);const d=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(c)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:d};if(f(p),(r=this.options.behavior)==null||r.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=p.fetchOptions)==null?void 0:o.meta)){var m;this.dispatch({type:"fetch",meta:(m=p.fetchOptions)==null?void 0:m.meta})}const g=w=>{if(xl(w)&&w.silent||this.dispatch({type:"error",error:w}),!xl(w)){var E,P,k,x;(E=(P=this.cache.config).onError)==null||E.call(P,w,this),(k=(x=this.cache.config).onSettled)==null||k.call(x,this.state.data,w,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=qS({fn:p.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:w=>{var E,P,k,x;if(typeof w=="undefined"){g(new Error(this.queryHash+" data is undefined"));return}this.setData(w),(E=(P=this.cache.config).onSuccess)==null||E.call(P,w,this),(k=(x=this.cache.config).onSettled)==null||k.call(x,w,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:g,onFail:(w,E)=>{this.dispatch({type:"failed",failureCount:w,error:E})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,u;switch(t.type){case"failed":return q(F({},r),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return q(F({},r),{fetchStatus:"paused"});case"continue":return q(F({},r),{fetchStatus:"fetching"});case"fetch":return F(q(F({},r),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Xc(this.options.networkMode)?"fetching":"paused"}),!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return F(q(F({},r),{data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(u=t.dataUpdatedAt)!=null?u:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const a=t.error;return xl(a)&&a.revert&&this.revertState?q(F({},this.revertState),{fetchStatus:"idle"}):q(F({},r),{error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return q(F({},r),{isInvalidated:!0});case"setState":return F(F({},r),t.state)}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function JI(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t!="undefined",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class XI extends ds{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const u=n.queryKey,a=(o=n.queryHash)!=null?o:Km(u,n);let c=this.get(a);return c||(c=new YI({cache:this,logger:t.getLogger(),queryKey:u,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(u)}),this.add(c)),c}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){et.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Yr(t,n);return typeof r.exact=="undefined"&&(r.exact=!0),this.queries.find(o=>_1(r,o))}findAll(t,n){const[r]=Yr(t,n);return Object.keys(r).length>0?this.queries.filter(o=>_1(r,o)):this.queries}notify(t){et.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){et.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){et.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class ZI extends YS{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||$m,this.observers=[],this.state=t.state||JS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=F(F({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}execute(){return ct(this,null,function*(){const t=()=>{var D;return this.retryer=qS({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,$)=>{this.dispatch({type:"failed",failureCount:N,error:$})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,u,a,c,f,d,p;if(!n){var m,g,w,E;this.dispatch({type:"loading",variables:this.options.variables}),yield(m=(g=this.mutationCache.config).onMutate)==null?void 0:m.call(g,this.state.variables,this);const N=yield(w=(E=this.options).onMutate)==null?void 0:w.call(E,this.state.variables);N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const D=yield t();return yield(r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,D,this.state.variables,this.state.context,this),yield(u=(a=this.options).onSuccess)==null?void 0:u.call(a,D,this.state.variables,this.state.context),yield(c=(f=this.mutationCache.config).onSettled)==null?void 0:c.call(f,D,null,this.state.variables,this.state.context,this),yield(d=(p=this.options).onSettled)==null?void 0:d.call(p,D,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:D}),D}catch(D){try{var P,k,x,A,C,T,L,I;throw yield(P=(k=this.mutationCache.config).onError)==null?void 0:P.call(k,D,this.state.variables,this.state.context,this),yield(x=(A=this.options).onError)==null?void 0:x.call(A,D,this.state.variables,this.state.context),yield(C=(T=this.mutationCache.config).onSettled)==null?void 0:C.call(T,void 0,D,this.state.variables,this.state.context,this),yield(L=(I=this.options).onSettled)==null?void 0:L.call(I,void 0,D,this.state.variables,this.state.context),D}finally{this.dispatch({type:"error",error:D})}}})}dispatch(t){const n=r=>{switch(t.type){case"failed":return q(F({},r),{failureCount:t.failureCount,failureReason:t.error});case"pause":return q(F({},r),{isPaused:!0});case"continue":return q(F({},r),{isPaused:!1});case"loading":return q(F({},r),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Xc(this.options.networkMode),status:"loading",variables:t.variables});case"success":return q(F({},r),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return q(F({},r),{data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return F(F({},r),t.state)}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function JS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class eM extends ds{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new ZI({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){et.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact=="undefined"&&(t.exact=!0),this.mutations.find(n=>T1(t,n))}findAll(t){return this.mutations.filter(n=>T1(t,n))}notify(t){et.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return et.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(In)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function tM(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,u,a;const c=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,f=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,d=f==null?void 0:f.pageParam,p=(f==null?void 0:f.direction)==="forward",m=(f==null?void 0:f.direction)==="backward",g=((u=e.state.data)==null?void 0:u.pages)||[],w=((a=e.state.data)==null?void 0:a.pageParams)||[];let E=w,P=!1;const k=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>{var D;if((D=e.signal)!=null&&D.aborted)P=!0;else{var N;(N=e.signal)==null||N.addEventListener("abort",()=>{P=!0})}return e.signal}})},x=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),A=(I,D,N,$)=>(E=$?[D,...E]:[...E,D],$?[N,...I]:[...I,N]),C=(I,D,N,$)=>{if(P)return Promise.reject("Cancelled");if(typeof N=="undefined"&&!D&&I.length)return Promise.resolve(I);const G={queryKey:e.queryKey,pageParam:N,meta:e.options.meta};k(G);const le=x(G);return Promise.resolve(le).then(ot=>A(I,N,ot,$))};let T;if(!g.length)T=C([]);else if(p){const I=typeof d!="undefined",D=I?d:L1(e.options,g);T=C(g,I,D)}else if(m){const I=typeof d!="undefined",D=I?d:nM(e.options,g);T=C(g,I,D,!0)}else{E=[];const I=typeof e.options.getNextPageParam=="undefined";T=(c&&g[0]?c(g[0],0,g):!0)?C([],I,w[0]):Promise.resolve(A([],w[0],g[0]));for(let N=1;N<g.length;N++)T=T.then($=>{if(c&&g[N]?c(g[N],N,g):!0){const le=I?w[N]:L1(e.options,$);return C($,I,le)}return Promise.resolve(A($,w[N],g[N]))})}return T.then(I=>({pages:I,pageParams:E}))}}}}function L1(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function nM(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class rM{constructor(t={}){this.queryCache=t.queryCache||new XI,this.mutationCache=t.mutationCache||new eM,this.logger=t.logger||$m,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=tc.subscribe(()=>{tc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=nc.subscribe(()=>{nc.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Yr(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll(q(F({},t),{fetching:!0})).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Ks(t,n,r),u=this.getQueryData(o.queryKey);return u?Promise.resolve(u):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),u=o==null?void 0:o.state.data,a=WI(n,u);if(typeof a=="undefined")return;const c=Ks(t),f=this.defaultQueryOptions(c);return this.queryCache.build(this,f).setData(a,q(F({},r),{manual:!0}))}setQueriesData(t,n,r){return et.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Yr(t,n),o=this.queryCache;et.batch(()=>{o.findAll(r).forEach(u=>{o.remove(u)})})}resetQueries(t,n,r){const[o,u]=Yr(t,n,r),a=this.queryCache,c=F({type:"active"},o);return et.batch(()=>(a.findAll(o).forEach(f=>{f.reset()}),this.refetchQueries(c,u)))}cancelQueries(t,n,r){const[o,u={}]=Yr(t,n,r);typeof u.revert=="undefined"&&(u.revert=!0);const a=et.batch(()=>this.queryCache.findAll(o).map(c=>c.cancel(u)));return Promise.all(a).then(In).catch(In)}invalidateQueries(t,n,r){const[o,u]=Yr(t,n,r);return et.batch(()=>{var a,c;if(this.queryCache.findAll(o).forEach(d=>{d.invalidate()}),o.refetchType==="none")return Promise.resolve();const f=q(F({},o),{type:(a=(c=o.refetchType)!=null?c:o.type)!=null?a:"active"});return this.refetchQueries(f,u)})}refetchQueries(t,n,r){const[o,u]=Yr(t,n,r),a=et.batch(()=>this.queryCache.findAll(o).filter(f=>!f.isDisabled()).map(f=>{var d;return f.fetch(void 0,q(F({},u),{cancelRefetch:(d=u==null?void 0:u.cancelRefetch)!=null?d:!0,meta:{refetchPage:o.refetchPage}}))}));let c=Promise.all(a).then(In);return u!=null&&u.throwOnError||(c=c.catch(In)),c}fetchQuery(t,n,r){const o=Ks(t,n,r),u=this.defaultQueryOptions(o);typeof u.retry=="undefined"&&(u.retry=!1);const a=this.queryCache.build(this,u);return a.isStaleByTime(u.staleTime)?a.fetch(u):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(In).catch(In)}fetchInfiniteQuery(t,n,r){const o=Ks(t,n,r);return o.behavior=tM(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(In).catch(In)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Gi(t)===Gi(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Zl(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Gi(t)===Gi(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Zl(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n=q(F(F(F({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!n.queryHash&&n.queryKey&&(n.queryHash=Km(n.queryKey,n)),typeof n.refetchOnReconnect=="undefined"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary=="undefined"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:q(F(F(F({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class iM extends ds{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),I1(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ep(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ep(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),ec(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const u=this.hasListeners();u&&M1(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),u&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();u&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return sM(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(r={}){var o=r,{refetchPage:t}=o,n=bt(o,["refetchPage"]);return this.fetch(q(F({},n),{meta:{refetchPage:t}}))}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch(q(F({},t),{cancelRefetch:(n=t.cancelRefetch)!=null?n:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(In)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),ku||this.currentResult.isStale||!Ap(this.options.staleTime))return;const n=QS(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(ku||this.options.enabled===!1||!Ap(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||tc.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,u=this.currentResult,a=this.currentResultState,c=this.currentResultOptions,f=t!==r,d=f?t.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,{state:m}=t;let{dataUpdatedAt:g,error:w,errorUpdatedAt:E,fetchStatus:P,status:k}=m,x=!1,A=!1,C;if(n._optimisticResults){const N=this.hasListeners(),$=!N&&I1(t,n),G=N&&M1(t,r,n,o);($||G)&&(P=Xc(t.options.networkMode)?"fetching":"paused",g||(k="loading")),n._optimisticResults==="isRestoring"&&(P="idle")}if(n.keepPreviousData&&!m.dataUpdatedAt&&p!=null&&p.isSuccess&&k!=="error")C=p.data,g=p.dataUpdatedAt,k=p.status,x=!0;else if(n.select&&typeof m.data!="undefined")if(u&&m.data===(a==null?void 0:a.data)&&n.select===this.selectFn)C=this.selectResult;else try{this.selectFn=n.select,C=n.select(m.data),C=Cp(u==null?void 0:u.data,C,n),this.selectResult=C,this.selectError=null}catch(N){this.selectError=N}else C=m.data;if(typeof n.placeholderData!="undefined"&&typeof C=="undefined"&&k==="loading"){let N;if(u!=null&&u.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))N=u.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof N!="undefined")try{N=n.select(N),this.selectError=null}catch($){this.selectError=$}typeof N!="undefined"&&(k="success",C=Cp(u==null?void 0:u.data,N,n),A=!0)}this.selectError&&(w=this.selectError,C=this.selectResult,E=Date.now(),k="error");const T=P==="fetching",L=k==="loading",I=k==="error";return{status:k,fetchStatus:P,isLoading:L,isSuccess:k==="success",isError:I,isInitialLoading:L&&T,data:C,dataUpdatedAt:g,error:w,errorUpdatedAt:E,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!L,isLoadingError:I&&m.dataUpdatedAt===0,isPaused:P==="paused",isPlaceholderData:A,isPreviousData:x,isRefetchError:I&&m.dataUpdatedAt!==0,isStale:qm(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,ec(r,n))return;this.currentResult=r;const o={cache:!0},u=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!this.trackedProps.size)return!0;const f=new Set(c!=null?c:this.trackedProps);return this.options.useErrorBoundary&&f.add("error"),Object.keys(this.currentResult).some(d=>{const p=d;return this.currentResult[p]!==n[p]&&f.has(p)})};(t==null?void 0:t.listeners)!==!1&&u()&&(o.listeners=!0),this.notify(F(F({},o),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!xl(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){et.batch(()=>{if(t.onSuccess){var n,r,o,u;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(u=this.options).onSettled)==null||o.call(u,this.currentResult.data,null)}else if(t.onError){var a,c,f,d;(a=(c=this.options).onError)==null||a.call(c,this.currentResult.error),(f=(d=this.options).onSettled)==null||f.call(d,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:p})=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function oM(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function I1(e,t){return oM(e,t)||e.state.dataUpdatedAt>0&&Ep(e,t,t.refetchOnMount)}function Ep(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&qm(e,t)}return!1}function M1(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&qm(e,n)}function qm(e,t){return e.isStaleByTime(t.staleTime)}function sM(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!ec(e.getCurrentResult(),t)}let uM=class extends ds{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),ec(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,q(F({},this.options),{variables:typeof t!="undefined"?t:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:JS(),n=q(F({},t),{isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=n}notify(t){et.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,o,u;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(o=(u=this.mutateOptions).onSettled)==null||o.call(u,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var a,c,f,d;(a=(c=this.mutateOptions).onError)==null||a.call(c,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(f=(d=this.mutateOptions).onSettled)==null||f.call(d,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:p})=>{p(this.currentResult)})})}};const XS=cS.useSyncExternalStore,D1=B.createContext(void 0),ZS=B.createContext(!1);function eC(e,t){return e||(t&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=D1),window.ReactQueryClientContext):D1)}const Ym=({context:e}={})=>{const t=B.useContext(eC(e,B.useContext(ZS)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tC=({client:e,children:t,context:n,contextSharing:r=!1})=>{B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=eC(n,r);return B.createElement(ZS.Provider,{value:!n&&r},B.createElement(o.Provider,{value:e},t))},nC=B.createContext(!1),aM=()=>B.useContext(nC);nC.Provider;function lM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const cM=B.createContext(lM()),fM=()=>B.useContext(cM);function rC(e,t){return typeof e=="function"?e(...t):!!e}const dM=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},hM=e=>{B.useEffect(()=>{e.clearReset()},[e])},pM=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&rC(n,[e.error,r]),mM=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},gM=(e,t)=>e.isLoading&&e.isFetching&&!t,yM=(e,t,n)=>(e==null?void 0:e.suspense)&&gM(t,n),vM=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function wM(e,t){const n=Ym({context:e.context}),r=aM(),o=fM(),u=n.defaultQueryOptions(e);u._optimisticResults=r?"isRestoring":"optimistic",u.onError&&(u.onError=et.batchCalls(u.onError)),u.onSuccess&&(u.onSuccess=et.batchCalls(u.onSuccess)),u.onSettled&&(u.onSettled=et.batchCalls(u.onSettled)),mM(u),dM(u,o),hM(o);const[a]=B.useState(()=>new t(n,u)),c=a.getOptimisticResult(u);if(XS(B.useCallback(f=>{const d=r?()=>{}:a.subscribe(et.batchCalls(f));return a.updateResult(),d},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),B.useEffect(()=>{a.setOptions(u,{listeners:!1})},[u,a]),yM(u,c,r))throw vM(u,a,o);if(pM({result:c,errorResetBoundary:o,useErrorBoundary:u.useErrorBoundary,query:a.getCurrentQuery()}))throw c.error;return u.notifyOnChangeProps?c:a.trackResult(c)}function Vu(e,t,n){const r=Ks(e,t,n);return wM(r,iM)}function no(e,t,n){const r=QI(e,t,n),o=Ym({context:r.context}),[u]=B.useState(()=>new uM(o,r));B.useEffect(()=>{u.setOptions(r)},[u,r]);const a=XS(B.useCallback(f=>u.subscribe(et.batchCalls(f)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c=B.useCallback((f,d)=>{u.mutate(f,d).catch(xM)},[u]);if(a.error&&rC(u.options.useErrorBoundary,[a.error]))throw a.error;return q(F({},a),{mutate:c,mutateAsync:a.mutate})}function xM(){}const AM=()=>no(n=>ct(Ft,[n],function*({message_id:e,data:t}){var u;const r=new Headers;return r.append("Content-Type","application/json"),r.append("x-frappe-csrf-token",(u=window==null?void 0:window.frappe)==null?void 0:u.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.submit_form",{headers:r,body:JSON.stringify({message_id:e,data:t}),method:"POST"})).json()}));function SM({cna_conversation:e}){var p,m,g,w,E;const t=Pi(),n=Ht(P=>P.loading.isSubmitting),r=B.useRef(null),o=B.useRef(null),{mutate:u}=AM(),c=((g=(m=(p=window.frappe)==null?void 0:p.session)==null?void 0:m.user)!=null?g:"")===(e==null?void 0:e.user),f=((w=e==null?void 0:e.status)==null?void 0:w.toLocaleLowerCase())==="submitted";B.useEffect(()=>{var x,A,C;const P=typeof e.message=="string"?JSON.parse(e.message):{},k=q(F({},P.form),{components:f?(A=(x=P==null?void 0:P.form)==null?void 0:x.components)==null?void 0:A.map(T=>q(F({},T),{disabled:!0})):((C=P==null?void 0:P.form)==null?void 0:C.components)||[]});window==null||window.Formio.createForm(r.current,k,{baseUrl:window.location.origin,sanitizeConfig:{addTags:["iframe"],addAttr:["src","width","height","frameborder","allowfullscreen"]}}).then(T=>{T.submission={data:P!=null&&P.submission_data?P.submission_data:(P==null?void 0:P.prefill_data)||{}},T.nosubmit=!0,T.on("submit",L=>ct(this,null,function*(){var D;const I=(D=r.current)==null?void 0:D.querySelector('button[type="submit"]');I&&(I.disabled=!0,T.emit("submitDone",L),t(FI()),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>t(lh()),3e4),u({message_id:e.id,data:L.data},{onSuccess:()=>{o.current&&clearTimeout(o.current),t(lh())},onError:()=>{o.current&&clearTimeout(o.current),t(lh())}}))}))})},[e.id,e.message,e==null?void 0:e.status,u]);const d=c?"":(E=e==null?void 0:e.user)!=null?E:"";return be("div",{className:"tw-flex tw-flex-col tw-gap-2 tw-w-full",children:[d?z("div",{className:"tw-inline-flex tw-items-center tw-self-start tw-rounded-full tw-bg-slate-100 tw-border tw-border-slate-200 tw-text-[11px] tw-font-semibold tw-uppercase tw-tracking-[0.08em] tw-text-slate-600 tw-px-2 tw-py-[6px]",children:d}):null,be("div",{style:{minWidth:"min(600px, 70vw)"},className:"chatnext-assistant-formio",children:[z("div",{ref:r}),n&&z("p",{className:"tw-text-green-600 tw-text-sm tw-mt-2",children:"sending submission to server..."})]})]})}function CM({cna_conversation:e}){var n;const t=JSON.parse(e.message||"{}");return(n=t==null?void 0:t.submission)==null||delete n.submit,z("div",{children:z("p",{children:"form submitted"})})}const Jm=e=>{var t,n;return e?(n=(t=e==null?void 0:e.split)==null?void 0:t.call(e,`
75
+ `))==null?void 0:n.map((r,o)=>z("div",{children:r},o)):null};function EM({cna_conversation:e}){return z("div",{children:Jm(e.message)})}function PM({cna_conversation:e}){const t=JSON.parse(e.message||"{}");return z("div",{children:t.name_of_action||""})}const iC=(e,t)=>Vu(["cna_conversation",e.session_id],()=>ct(Ft,null,function*(){return(yield(yield fetcher(`/api/method/nextai.funnel.doctype.funnel_task.assistant_api.get_assistant_messages?session_id=${e.session_id}`)).json()).message}),t),_M=()=>{const{session_id:e}=Ht(o=>o.user),t=Pi(),{data:n,refetch:r}=iC({session_id:e!=null?e:""},{enabled:!!e});return no({mutationFn:u=>ct(Ft,[u],function*({message_id:o}){var f;const a=new Headers;return a.append("Content-Type","application/json"),a.append("x-frappe-csrf-token",(f=window==null?void 0:window.frappe)==null?void 0:f.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.on_complete_ui_action",{headers:a,body:JSON.stringify({message_id:o}),method:"POST"})).json()}),onSuccess:()=>ct(Ft,null,function*(){if(yield r(),n!=null&&n.length){const o=n.map(u=>q(F({},u),{author_image:"",timestamp:new Date(u.creation).toISOString()}));t(US(o))}})})};function N1({cna_conversation:e}){const t=JSON.parse(e.message||"{}"),n=(e==null?void 0:e.status)==="pending",{mutate:r}=_M(),o=Pi();return B.useEffect(()=>{var u,a;if(n&&(t!=null&&t.action_type)){switch(t.action_type){case"create_document":const c=(t==null?void 0:t.prefill_json)||{};c.doctype=(t==null?void 0:t.doctype)||"";const f=new Event("paste");f.clipboardData={getData:()=>JSON.stringify(c)},(u=document==null?void 0:document.body)==null||u.dispatchEvent(f);break;case"update_document":const d=(t==null?void 0:t.document_data)||{},p=["doctype","name","owner","creation","modified","modified_by","docstatus","idx"];for(const g of p)delete d[g];const m=window==null?void 0:window.cur_frm;m&&typeof(m==null?void 0:m.set_value)=="function"&&Object.entries(d).map(([g,w])=>{try{m.set_value(g,w)}catch(E){console.log("documentData",E)}});break;case"redirect_to":(a=window==null?void 0:window.frappe)==null||a.set_route((t==null?void 0:t.route)||"");break;case"close_modal":console.log("ui action"),setTimeout(()=>o(Gm()),5e3);break}r({message_id:(e==null?void 0:e.id)||""})}},[e==null?void 0:e.id,e.status,e.message,r,o,n]),(t==null?void 0:t.action_type)==="create_document"?be("div",{children:[n?"Creating":"Created"," new ",(t==null?void 0:t.doctype)||""]}):(t==null?void 0:t.action_type)==="update_document"?be("div",{children:[n?"Updating":"Updated"," ",(t==null?void 0:t.doctype)||""]}):(t==null?void 0:t.action_type)==="redirect_to"?z("div",{children:n?"Redirecting...":"Redirected"}):(t==null?void 0:t.action_type)==="close_modal"?z(Ir,{}):z("div",{children:(t==null?void 0:t.action_type)||""})}const oC=()=>no(r=>ct(Ft,[r],function*({session_id:e,message:t,question_conv_id:n}){var a;const o=new Headers;return o.append("Content-Type","application/json"),o.append("x-frappe-csrf-token",(a=window==null?void 0:window.frappe)==null?void 0:a.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.add_user_message",{headers:o,body:JSON.stringify({session_id:e,message:t,question_conv_id:n}),method:"POST"})).json()}));function TM({cna_conversation:e}){var p;const[t,n]=B.useState(!1),{session_id:r}=Ht(m=>m.user),o=JSON.parse(e.message||"{}"),{mutate:u,isLoading:a}=oC(),c=m=>{!m||!r||(u({message:m,session_id:r,question_conv_id:e==null?void 0:e.name}),n(!0))},f=t||(e==null?void 0:e.status)!=="pending",d=a||f;return be("div",{className:"tw-w-full",children:[z("div",{children:Jm(o==null?void 0:o.question)}),z("div",{className:"tw-w-full tw-flex tw-flex-col tw-gap-1",children:(p=o==null?void 0:o.options)==null?void 0:p.map((m,g)=>{const E=f&&(o==null?void 0:o.answer)!=null&&(m==null?void 0:m.option)===o.answer?"tw-bg-blue-100 tw-border-blue-400 tw-text-black":d?"tw-bg-gray-100 tw-text-black tw-border-0":"tw-bg-white tw-text-black hover:tw-bg-blue-100 tw-transition-colors";return z("button",{disabled:d,className:`${d?"tw-cursor-default":"tw-cursor-pointer"} tw-w-full tw-p-2 tw-px-4 tw-rounded-md tw-border ${E} tw-text-center`,onClick:()=>c((m==null?void 0:m.option)||""),children:z("strong",{children:(m==null?void 0:m.option)||"-"})},g)})})]})}function RM({cna_conversation:e}){var n,r;const t=JSON.parse(e.message);return t.type==="file"?be("div",{children:["File: ",t.filename||((r=(n=t==null?void 0:t.file_url)==null?void 0:n.split("/"))==null?void 0:r.pop()),z("br",{}),z("a",{href:t.open_file_doc?`/app/file/${t.file_docname}`:t.file_url,target:"_blank",rel:"noreferrer",children:z("button",{className:"tw-py-1 tw-px-2 tw-border tw-border-1 tw-border-b-gray-300 tw-rounded tw-m-1",children:"View"})}),t.enable_download&&z("a",{href:t.file_url,target:"_blank",rel:"noreferrer",download:!0,children:z("button",{className:"tw-py-1 tw-px-2 tw-border tw-border-1 tw-border-b-gray-300 tw-rounded tw-m-1",children:"Download"})})]}):z(Ir,{})}function kM({cna_conversation:e}){return z("div",{style:{color:"red"},children:Jm(e.message)})}function OM({cna_conversation:e}){return z("div",{dangerouslySetInnerHTML:{__html:e.message}})}function sC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=sC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function os(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=sC(e))&&(r&&(r+=" "),r+=t);return r}const bM=({cna_conversation:e})=>{var a;const{message_type:t,author:n,id:r}=e,o=t==null?void 0:t.toLocaleLowerCase(),u=n==null?void 0:n.toLocaleLowerCase();return o==="loader"?z(Ir,{}):o==="ui action"&&((a=JSON.parse((e==null?void 0:e.message)||"{}"))==null?void 0:a.action_type)==="close_modal"?z(N1,{cna_conversation:e}):z("div",{className:os("tw-flex tw-justify-between tw-pt-2 tw-w-full",u!=="bot"?"tw-justify-between tw-flex-row-reverse":"tw-justify-start"),id:r&&r.toLocaleLowerCase()==="default"?"bot-greet-response":"",children:z("div",{className:`tw-flex tw-items-center tw-w-full ${u!=="bot"?"tw-flex-row-reverse":""}`,children:be("div",{className:os("tw-max-w-[80%] tw-flex tw-mx-2 tw-word-break tw-rounded-tl-xl tw-rounded-tr-xl tw-p-2 tw-overflow-y-visible",u!=="bot"?"tw-bg-blue-700 tw-text-white tw-rounded-bl-xl tw-text-left":"tw-bg-white tw-border tw-border-[#d9d9d9] tw-rounded-br-xl"),children:[o==="single choice"&&z(TM,{cna_conversation:e}),o==="ui action"&&z(N1,{cna_conversation:e}),o==="trigger"&&z(PM,{cna_conversation:e}),o==="form"&&z(SM,{cna_conversation:e}),o==="text"&&z(EM,{cna_conversation:e}),o==="html"&&z(OM,{cna_conversation:e}),o==="submission"&&z(CM,{cna_conversation:e}),o==="preview"&&z(RM,{cna_conversation:e}),o==="error"&&z(kM,{cna_conversation:e})]})})})},uC=B.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Zc=B.createContext({}),Xm=B.createContext(null),ef=typeof document!="undefined",LM=ef?B.useLayoutEffect:B.useEffect,aC=B.createContext({strict:!1}),Zm=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),IM="framerAppearId",lC="data-"+Zm(IM);function MM(e,t,n,r){const{visualElement:o}=B.useContext(Zc),u=B.useContext(aC),a=B.useContext(Xm),c=B.useContext(uC).reducedMotion,f=B.useRef();r=r||u.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const d=f.current;B.useInsertionEffect(()=>{d&&d.update(n,a)});const p=B.useRef(!!(n[lC]&&!window.HandoffComplete));return LM(()=>{d&&(d.render(),p.current&&d.animationState&&d.animationState.animateChanges())}),B.useEffect(()=>{d&&(d.updateFeatures(),!p.current&&d.animationState&&d.animationState.animateChanges(),p.current&&(p.current=!1,window.HandoffComplete=!0))}),d}function Bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function DM(e,t,n){return B.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Bo(n)&&(n.current=r))},[t])}function Ou(e){return typeof e=="string"||Array.isArray(e)}function tf(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const eg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tg=["initial",...eg];function nf(e){return tf(e.animate)||tg.some(t=>Ou(e[t]))}function cC(e){return!!(nf(e)||e.variants)}function NM(e,t){if(nf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ou(n)?n:void 0,animate:Ou(r)?r:void 0}}return e.inherit!==!1?t:{}}function FM(e){const{initial:t,animate:n}=NM(e,B.useContext(Zc));return B.useMemo(()=>({initial:t,animate:n}),[F1(t),F1(n)])}function F1(e){return Array.isArray(e)?e.join(" "):e}const B1={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"]},bu={};for(const e in B1)bu[e]={isEnabled:t=>B1[e].some(n=>!!t[n])};function BM(e){for(const t in e)bu[t]=F(F({},bu[t]),e[t])}const fC=B.createContext({}),dC=B.createContext({}),VM=Symbol.for("motionComponentSymbol");function UM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&BM(e);function u(c,f){let d;const p=q(F(F({},B.useContext(uC)),c),{layoutId:jM(c)}),{isStatic:m}=p,g=FM(c),w=r(c,m);if(!m&&ef){g.visualElement=MM(o,w,p,t);const E=B.useContext(dC),P=B.useContext(aC).strict;g.visualElement&&(d=g.visualElement.loadFeatures(p,P,e,E))}return B.createElement(Zc.Provider,{value:g},d&&g.visualElement?B.createElement(d,F({visualElement:g.visualElement},p)):null,n(o,c,DM(w,g.visualElement,f),w,m,g.visualElement))}const a=B.forwardRef(u);return a[VM]=o,a}function jM({layoutId:e}){const t=B.useContext(fC).id;return t&&e!==void 0?t+"-"+e:e}function zM(e){function t(r,o={}){return UM(e(r,o))}if(typeof Proxy=="undefined")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const WM=["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 ng(e){return typeof e!="string"||e.includes("-")?!1:!!(WM.indexOf(e)>-1||/[A-Z]/.test(e))}const rc={};function QM(e){Object.assign(rc,e)}const Uu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],so=new Set(Uu);function hC(e,{layout:t,layoutId:n}){return so.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!rc[e]||e==="opacity")}const un=e=>!!(e&&e.getVelocity),HM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GM=Uu.length;function KM(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let u="";for(let a=0;a<GM;a++){const c=Uu[a];if(e[c]!==void 0){const f=HM[c]||c;u+=`${f}(${e[c]}) `}}return t&&!e.z&&(u+="translateZ(0)"),u=u.trim(),o?u=o(e,r?"":u):n&&r&&(u="none"),u}const pC=e=>t=>typeof t=="string"&&t.startsWith(e),mC=pC("--"),Pp=pC("var(--"),$M=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,qM=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xi=(e,t,n)=>Math.min(Math.max(n,e),t),uo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},iu=q(F({},uo),{transform:e=>xi(0,1,e)}),el=q(F({},uo),{default:1}),ou=e=>Math.round(e*1e5)/1e5,rf=/(-)?([\d]*\.?[\d])+/g,gC=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,YM=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ju(e){return typeof e=="string"}const zu=e=>({test:t=>ju(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kr=zu("deg"),fr=zu("%"),oe=zu("px"),JM=zu("vh"),XM=zu("vw"),V1=q(F({},fr),{parse:e=>fr.parse(e)/100,transform:e=>fr.transform(e*100)}),U1=q(F({},uo),{transform:Math.round}),yC={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,size:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,rotate:Kr,rotateX:Kr,rotateY:Kr,rotateZ:Kr,scale:el,scaleX:el,scaleY:el,scaleZ:el,skew:Kr,skewX:Kr,skewY:Kr,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:iu,originX:V1,originY:V1,originZ:oe,zIndex:U1,fillOpacity:iu,strokeOpacity:iu,numOctaves:U1};function rg(e,t,n,r){const{style:o,vars:u,transform:a,transformOrigin:c}=e;let f=!1,d=!1,p=!0;for(const m in t){const g=t[m];if(mC(m)){u[m]=g;continue}const w=yC[m],E=qM(g,w);if(so.has(m)){if(f=!0,a[m]=E,!p)continue;g!==(w.default||0)&&(p=!1)}else m.startsWith("origin")?(d=!0,c[m]=E):o[m]=E}if(t.transform||(f||r?o.transform=KM(e.transform,n,p,r):o.transform&&(o.transform="none")),d){const{originX:m="50%",originY:g="50%",originZ:w=0}=c;o.transformOrigin=`${m} ${g} ${w}`}}const ig=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vC(e,t,n){for(const r in t)!un(t[r])&&!hC(r,n)&&(e[r]=t[r])}function ZM({transformTemplate:e},t,n){return B.useMemo(()=>{const r=ig();return rg(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function e5(e,t,n){const r=e.style||{},o={};return vC(o,r,e),Object.assign(o,ZM(e,t,n)),e.transformValues?e.transformValues(o):o}function t5(e,t,n){const r={},o=e5(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const n5=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ic(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||n5.has(e)}let wC=e=>!ic(e);function r5(e){e&&(wC=t=>t.startsWith("on")?!ic(t):e(t))}try{r5(require("@emotion/is-prop-valid").default)}catch(e){}function i5(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(wC(o)||n===!0&&ic(o)||!t&&!ic(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function j1(e,t,n){return typeof e=="string"?e:oe.transform(t+n*e)}function o5(e,t,n){const r=j1(t,e.x,e.width),o=j1(n,e.y,e.height);return`${r} ${o}`}const s5={offset:"stroke-dashoffset",array:"stroke-dasharray"},u5={offset:"strokeDashoffset",array:"strokeDasharray"};function a5(e,t,n=1,r=0,o=!0){e.pathLength=1;const u=o?s5:u5;e[u.offset]=oe.transform(-r);const a=oe.transform(t),c=oe.transform(n);e[u.array]=`${a} ${c}`}function og(e,w,p,m,g){var E=w,{attrX:t,attrY:n,attrScale:r,originX:o,originY:u,pathLength:a,pathSpacing:c=1,pathOffset:f=0}=E,d=bt(E,["attrX","attrY","attrScale","originX","originY","pathLength","pathSpacing","pathOffset"]);if(rg(e,d,p,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:P,style:k,dimensions:x}=e;P.transform&&(x&&(k.transform=P.transform),delete P.transform),x&&(o!==void 0||u!==void 0||k.transform)&&(k.transformOrigin=o5(x,o!==void 0?o:.5,u!==void 0?u:.5)),t!==void 0&&(P.x=t),n!==void 0&&(P.y=n),r!==void 0&&(P.scale=r),a!==void 0&&a5(P,a,c,f,!1)}const xC=()=>q(F({},ig()),{attrs:{}}),sg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function l5(e,t,n,r){const o=B.useMemo(()=>{const u=xC();return og(u,t,{enableHardwareAcceleration:!1},sg(r),e.transformTemplate),q(F({},u.attrs),{style:F({},u.style)})},[t]);if(e.style){const u={};vC(u,e.style,e),o.style=F(F({},u),o.style)}return o}function c5(e=!1){return(n,r,o,{latestValues:u},a)=>{const f=(ng(n)?l5:t5)(r,u,a,n),d=i5(r,typeof n=="string",e),p=q(F(F({},d),f),{ref:o}),{children:m}=r,g=B.useMemo(()=>un(m)?m.get():m,[m]);return B.createElement(n,q(F({},p),{children:g}))}}function AC(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const u in n)e.style.setProperty(u,n[u])}const SC=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 CC(e,t,n,r){AC(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(SC.has(o)?o:Zm(o),t.attrs[o])}function ug(e,t){const{style:n}=e,r={};for(const o in n)(un(n[o])||t.style&&un(t.style[o])||hC(o,e))&&(r[o]=n[o]);return r}function EC(e,t){const n=ug(e,t);for(const r in e)if(un(e[r])||un(t[r])){const o=Uu.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function ag(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function f5(e){const t=B.useRef(null);return t.current===null&&(t.current=e()),t.current}const oc=e=>Array.isArray(e),d5=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),h5=e=>oc(e)?e[e.length-1]||0:e;function Al(e){const t=un(e)?e.get():e;return d5(t)?t.toValue():t}function p5({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,u){const a={latestValues:m5(r,o,u,e),renderState:t()};return n&&(a.mount=c=>n(r,c,a)),a}const PC=e=>(t,n)=>{const r=B.useContext(Zc),o=B.useContext(Xm),u=()=>p5(e,t,r,o);return n?u():f5(u)};function m5(e,t,n,r){const o={},u=r(e,{});for(const g in u)o[g]=Al(u[g]);let{initial:a,animate:c}=e;const f=nf(e),d=cC(e);t&&d&&!f&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let p=n?n.initial===!1:!1;p=p||a===!1;const m=p?c:a;return m&&typeof m!="boolean"&&!tf(m)&&(Array.isArray(m)?m:[m]).forEach(w=>{const E=ag(e,w);if(!E)return;const A=E,{transitionEnd:P,transition:k}=A,x=bt(A,["transitionEnd","transition"]);for(const C in x){let T=x[C];if(Array.isArray(T)){const L=p?T.length-1:0;T=T[L]}T!==null&&(o[C]=T)}for(const C in P)o[C]=P[C]}),o}const tt=e=>e;class z1{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function g5(e){let t=new z1,n=new z1,r=0,o=!1,u=!1;const a=new WeakSet,c={schedule:(f,d=!1,p=!1)=>{const m=p&&o,g=m?t:n;return d&&a.add(f),g.add(f)&&m&&o&&(r=t.order.length),f},cancel:f=>{n.remove(f),a.delete(f)},process:f=>{if(o){u=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let d=0;d<r;d++){const p=t.order[d];p(f),a.has(p)&&(c.schedule(p),e())}o=!1,u&&(u=!1,c.process(f))}};return c}const tl=["prepare","read","update","preRender","render","postRender"],y5=40;function v5(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=tl.reduce((m,g)=>(m[g]=g5(()=>n=!0),m),{}),a=m=>u[m].process(o),c=()=>{const m=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(m-o.timestamp,y5),1),o.timestamp=m,o.isProcessing=!0,tl.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(c))},f=()=>{n=!0,r=!0,o.isProcessing||e(c)};return{schedule:tl.reduce((m,g)=>{const w=u[g];return m[g]=(E,P=!1,k=!1)=>(n||f(),w.schedule(E,P,k)),m},{}),cancel:m=>tl.forEach(g=>u[g].cancel(m)),state:o,steps:u}}const{schedule:je,cancel:Dr,state:Dt,steps:ch}=v5(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:tt,!0),w5={useVisualState:PC({scrapeMotionValuesFromProps:EC,createRenderState:xC,onMount:(e,t,{renderState:n,latestValues:r})=>{je.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}}),je.render(()=>{og(n,r,{enableHardwareAcceleration:!1},sg(t.tagName),e.transformTemplate),CC(t,n)})}})},x5={useVisualState:PC({scrapeMotionValuesFromProps:ug,createRenderState:ig})};function A5(e,{forwardMotionProps:t=!1},n,r){const o=ng(e)?w5:x5;return q(F({},o),{preloadedFeatures:n,useRender:c5(t),createVisualElement:r,Component:e})}function Pr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _C=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function of(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const S5=e=>t=>_C(t)&&e(t,of(t));function Tr(e,t,n,r){return Pr(e,t,S5(n),r)}const C5=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(C5);function TC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const W1=TC("dragHorizontal"),Q1=TC("dragVertical");function RC(e){let t=!1;if(e==="y")t=Q1();else if(e==="x")t=W1();else{const n=W1(),r=Q1();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function kC(){const e=RC(!0);return e?(e(),!1):!0}class _i{constructor(t){this.isMounted=!1,this.node=t}update(){}}function H1(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(u,a)=>{if(u.pointerType==="touch"||kC())return;const c=e.getProps();e.animationState&&c.whileHover&&e.animationState.setActive("whileHover",t),c[r]&&je.update(()=>c[r](u,a))};return Tr(e.current,n,o,{passive:!e.getProps()[r]})}class E5 extends _i{mount(){this.unmount=hi(H1(this.node,!0),H1(this.node,!1))}unmount(){}}class P5 extends _i{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(n){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=hi(Pr(this.node.current,"focus",()=>this.onFocus()),Pr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const OC=(e,t)=>t?e===t?!0:OC(e,t.parentElement):!1;function fh(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,of(n))}class _5 extends _i{constructor(){super(...arguments),this.removeStartListeners=tt,this.removeEndListeners=tt,this.removeAccessibleListeners=tt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),u=Tr(window,"pointerup",(c,f)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:p,globalTapTarget:m}=this.node.getProps();je.update(()=>{!m&&!OC(this.node.current,c.target)?p&&p(c,f):d&&d(c,f)})},{passive:!(r.onTap||r.onPointerUp)}),a=Tr(window,"pointercancel",(c,f)=>this.cancelPress(c,f),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=hi(u,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=u=>{if(u.key!=="Enter"||this.isPressing)return;const a=c=>{c.key!=="Enter"||!this.checkPressEnd()||fh("up",(f,d)=>{const{onTap:p}=this.node.getProps();p&&je.update(()=>p(f,d))})};this.removeEndListeners(),this.removeEndListeners=Pr(this.node.current,"keyup",a),fh("down",(c,f)=>{this.startPress(c,f)})},n=Pr(this.node.current,"keydown",t),r=()=>{this.isPressing&&fh("cancel",(u,a)=>this.cancelPress(u,a))},o=Pr(this.node.current,"blur",r);this.removeAccessibleListeners=hi(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&je.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!kC()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&je.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Tr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Pr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=hi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _p=new WeakMap,dh=new WeakMap,T5=e=>{const t=_p.get(e.target);t&&t(e)},R5=e=>{e.forEach(T5)};function k5(n){var r=n,{root:e}=r,t=bt(r,["root"]);const o=e||document;dh.has(o)||dh.set(o,{});const u=dh.get(o),a=JSON.stringify(t);return u[a]||(u[a]=new IntersectionObserver(R5,F({root:e},t))),u[a]}function O5(e,t,n){const r=k5(t);return _p.set(e,n),r.observe(e),()=>{_p.delete(e),r.unobserve(e)}}const b5={some:0,all:1};class L5 extends _i{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:u}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:b5[o]},c=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,u&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),g=d?p:m;g&&g(f)};return O5(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(I5(t,n))&&this.startObserver()}unmount(){}}function I5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const M5={inView:{Feature:L5},tap:{Feature:_5},focus:{Feature:P5},hover:{Feature:E5}};function bC(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}function D5(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function N5(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function sf(e,t,n){const r=e.getProps();return ag(r,t,n!==void 0?n:r.custom,D5(e),N5(e))}let F5=tt,lg=tt;const pi=e=>e*1e3,Rr=e=>e/1e3,B5={current:!1},LC=e=>Array.isArray(e)&&typeof e[0]=="number";function IC(e){return!!(!e||typeof e=="string"&&MC[e]||LC(e)||Array.isArray(e)&&e.every(IC))}const $s=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,MC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$s([0,.65,.55,1]),circOut:$s([.55,0,1,.45]),backIn:$s([.31,.01,.66,-.59]),backOut:$s([.33,1.53,.69,.99])};function DC(e){if(e)return LC(e)?$s(e):Array.isArray(e)?e.map(DC):MC[e]}function V5(e,t,n,{delay:r=0,duration:o,repeat:u=0,repeatType:a="loop",ease:c,times:f}={}){const d={[t]:n};f&&(d.offset=f);const p=DC(c);return Array.isArray(p)&&(d.easing=p),e.animate(d,{delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:u+1,direction:a==="reverse"?"alternate":"normal"})}function U5(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const NC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,j5=1e-7,z5=12;function W5(e,t,n,r,o){let u,a,c=0;do a=t+(n-t)/2,u=NC(a,r,o)-e,u>0?n=a:t=a;while(Math.abs(u)>j5&&++c<z5);return a}function Wu(e,t,n,r){if(e===t&&n===r)return tt;const o=u=>W5(u,0,1,e,n);return u=>u===0||u===1?u:NC(o(u),t,r)}const Q5=Wu(.42,0,1,1),H5=Wu(0,0,.58,1),FC=Wu(.42,0,.58,1),G5=e=>Array.isArray(e)&&typeof e[0]!="number",BC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,VC=e=>t=>1-e(1-t),cg=e=>1-Math.sin(Math.acos(e)),UC=VC(cg),K5=BC(cg),jC=Wu(.33,1.53,.69,.99),fg=VC(jC),$5=BC(fg),q5=e=>(e*=2)<1?.5*fg(e):.5*(2-Math.pow(2,-10*(e-1))),Y5={linear:tt,easeIn:Q5,easeInOut:FC,easeOut:H5,circIn:cg,circInOut:K5,circOut:UC,backIn:fg,backInOut:$5,backOut:jC,anticipate:q5},G1=e=>{if(Array.isArray(e)){lg(e.length===4);const[t,n,r,o]=e;return Wu(t,n,r,o)}else if(typeof e=="string")return Y5[e];return e},dg=(e,t)=>n=>!!(ju(n)&&YM.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),zC=(e,t,n)=>r=>{if(!ju(r))return r;const[o,u,a,c]=r.match(rf);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},J5=e=>xi(0,255,e),hh=q(F({},uo),{transform:e=>Math.round(J5(e))}),Ki={test:dg("rgb","red"),parse:zC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+hh.transform(e)+", "+hh.transform(t)+", "+hh.transform(n)+", "+ou(iu.transform(r))+")"};function X5(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Tp={test:dg("#"),parse:X5,transform:Ki.transform},Vo={test:dg("hsl","hue"),parse:zC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fr.transform(ou(t))+", "+fr.transform(ou(n))+", "+ou(iu.transform(r))+")"},zt={test:e=>Ki.test(e)||Tp.test(e)||Vo.test(e),parse:e=>Ki.test(e)?Ki.parse(e):Vo.test(e)?Vo.parse(e):Tp.parse(e),transform:e=>ju(e)?e:e.hasOwnProperty("red")?Ki.transform(e):Vo.transform(e)},qe=(e,t,n)=>-n*e+n*t+e;function ph(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 Z5({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,u=0,a=0;if(!t)o=u=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,f=2*n-c;o=ph(f,c,e+1/3),u=ph(f,c,e),a=ph(f,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(a*255),alpha:r}}const mh=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},eD=[Tp,Ki,Vo],tD=e=>eD.find(t=>t.test(e));function K1(e){const t=tD(e);let n=t.parse(e);return t===Vo&&(n=Z5(n)),n}const WC=(e,t)=>{const n=K1(e),r=K1(t),o=F({},n);return u=>(o.red=mh(n.red,r.red,u),o.green=mh(n.green,r.green,u),o.blue=mh(n.blue,r.blue,u),o.alpha=qe(n.alpha,r.alpha,u),Ki.transform(o))};function nD(e){var t,n;return isNaN(e)&&ju(e)&&(((t=e.match(rf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(gC))===null||n===void 0?void 0:n.length)||0)>0}const QC={regex:$M,countKey:"Vars",token:"${v}",parse:tt},HC={regex:gC,countKey:"Colors",token:"${c}",parse:zt.parse},GC={regex:rf,countKey:"Numbers",token:"${n}",parse:uo.parse};function gh(e,{regex:t,countKey:n,token:r,parse:o}){const u=e.tokenised.match(t);u&&(e["num"+n]=u.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...u.map(o)))}function sc(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&gh(n,QC),gh(n,HC),gh(n,GC),n}function KC(e){return sc(e).values}function $C(e){const{values:t,numColors:n,numVars:r,tokenised:o}=sc(e),u=t.length;return a=>{let c=o;for(let f=0;f<u;f++)f<r?c=c.replace(QC.token,a[f]):f<r+n?c=c.replace(HC.token,zt.transform(a[f])):c=c.replace(GC.token,ou(a[f]));return c}}const rD=e=>typeof e=="number"?0:e;function iD(e){const t=KC(e);return $C(e)(t.map(rD))}const Ai={test:nD,parse:KC,createTransformer:$C,getAnimatableNone:iD},qC=(e,t)=>n=>`${n>0?t:e}`;function YC(e,t){return typeof e=="number"?n=>qe(e,t,n):zt.test(e)?WC(e,t):e.startsWith("var(")?qC(e,t):XC(e,t)}const JC=(e,t)=>{const n=[...e],r=n.length,o=e.map((u,a)=>YC(u,t[a]));return u=>{for(let a=0;a<r;a++)n[a]=o[a](u);return n}},oD=(e,t)=>{const n=F(F({},e),t),r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=YC(e[o],t[o]));return o=>{for(const u in r)n[u]=r[u](o);return n}},XC=(e,t)=>{const n=Ai.createTransformer(t),r=sc(e),o=sc(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?hi(JC(r.values,o.values),n):qC(e,t)},Lu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$1=(e,t)=>n=>qe(e,t,n);function sD(e){return typeof e=="number"?$1:typeof e=="string"?zt.test(e)?WC:XC:Array.isArray(e)?JC:typeof e=="object"?oD:$1}function uD(e,t,n){const r=[],o=n||sD(e[0]),u=e.length-1;for(let a=0;a<u;a++){let c=o(e[a],e[a+1]);if(t){const f=Array.isArray(t)?t[a]||tt:t;c=hi(f,c)}r.push(c)}return r}function ZC(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const u=e.length;if(lg(u===t.length),u===1)return()=>t[0];e[0]>e[u-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=uD(t,r,o),c=a.length,f=d=>{let p=0;if(c>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const m=Lu(e[p],e[p+1],d);return a[p](m)};return n?d=>f(xi(e[0],e[u-1],d)):f}function aD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Lu(0,t,r);e.push(qe(n,1,o))}}function lD(e){const t=[0];return aD(t,e.length-1),t}function cD(e,t){return e.map(n=>n*t)}function fD(e,t){return e.map(()=>t||FC).splice(0,e.length-1)}function uc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=G5(r)?r.map(G1):G1(r),u={done:!1,value:t[0]},a=cD(n&&n.length===t.length?n:lD(t),e),c=ZC(a,t,{ease:Array.isArray(o)?o:fD(t,o)});return{calculatedDuration:e,next:f=>(u.value=c(f),u.done=f>=e,u)}}function e2(e,t){return t?e*(1e3/t):0}const dD=5;function t2(e,t,n){const r=Math.max(t-dD,0);return e2(n-e(r),t-r)}const yh=.001,hD=.01,q1=10,pD=.05,mD=1;function gD({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,u;F5(e<=pi(q1));let a=1-t;a=xi(pD,mD,a),e=xi(hD,q1,Rr(e)),a<1?(o=d=>{const p=d*a,m=p*e,g=p-n,w=Rp(d,a),E=Math.exp(-m);return yh-g/w*E},u=d=>{const m=d*a*e,g=m*n+n,w=Math.pow(a,2)*Math.pow(d,2)*e,E=Math.exp(-m),P=Rp(Math.pow(d,2),a);return(-o(d)+yh>0?-1:1)*((g-w)*E)/P}):(o=d=>{const p=Math.exp(-d*e),m=(d-n)*e+1;return-yh+p*m},u=d=>{const p=Math.exp(-d*e),m=(n-d)*(e*e);return p*m});const c=5/e,f=vD(o,u,c);if(e=pi(e),isNaN(f))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(f,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const yD=12;function vD(e,t,n){let r=n;for(let o=1;o<yD;o++)r=r-e(r)/t(r);return r}function Rp(e,t){return e*Math.sqrt(1-t*t)}const wD=["duration","bounce"],xD=["stiffness","damping","mass"];function Y1(e,t){return t.some(n=>e[n]!==void 0)}function AD(e){let t=F({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Y1(e,xD)&&Y1(e,wD)){const n=gD(e);t=q(F(F({},t),n),{mass:1}),t.isResolvedFromDuration=!0}return t}function n2(o){var u=o,{keyframes:e,restDelta:t,restSpeed:n}=u,r=bt(u,["keyframes","restDelta","restSpeed"]);const a=e[0],c=e[e.length-1],f={done:!1,value:a},{stiffness:d,damping:p,mass:m,duration:g,velocity:w,isResolvedFromDuration:E}=AD(q(F({},r),{velocity:-Rr(r.velocity||0)})),P=w||0,k=p/(2*Math.sqrt(d*m)),x=c-a,A=Rr(Math.sqrt(d/m)),C=Math.abs(x)<5;n||(n=C?.01:2),t||(t=C?.005:.5);let T;if(k<1){const L=Rp(A,k);T=I=>{const D=Math.exp(-k*A*I);return c-D*((P+k*A*x)/L*Math.sin(L*I)+x*Math.cos(L*I))}}else if(k===1)T=L=>c-Math.exp(-A*L)*(x+(P+A*x)*L);else{const L=A*Math.sqrt(k*k-1);T=I=>{const D=Math.exp(-k*A*I),N=Math.min(L*I,300);return c-D*((P+k*A*x)*Math.sinh(N)+L*x*Math.cosh(N))/L}}return{calculatedDuration:E&&g||null,next:L=>{const I=T(L);if(E)f.done=L>=g;else{let D=P;L!==0&&(k<1?D=t2(T,L,I):D=0);const N=Math.abs(D)<=n,$=Math.abs(c-I)<=t;f.done=N&&$}return f.value=f.done?c:I,f}}}function J1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:a,min:c,max:f,restDelta:d=.5,restSpeed:p}){const m=e[0],g={done:!1,value:m},w=N=>c!==void 0&&N<c||f!==void 0&&N>f,E=N=>c===void 0?f:f===void 0||Math.abs(c-N)<Math.abs(f-N)?c:f;let P=n*t;const k=m+P,x=a===void 0?k:a(k);x!==k&&(P=x-m);const A=N=>-P*Math.exp(-N/r),C=N=>x+A(N),T=N=>{const $=A(N),G=C(N);g.done=Math.abs($)<=d,g.value=g.done?x:G};let L,I;const D=N=>{w(g.value)&&(L=N,I=n2({keyframes:[g.value,E(g.value)],velocity:t2(C,N,g.value),damping:o,stiffness:u,restDelta:d,restSpeed:p}))};return D(0),{calculatedDuration:null,next:N=>{let $=!1;return!I&&L===void 0&&($=!0,T(N),D(N)),L!==void 0&&N>L?I.next(N-L):(!$&&T(N),g)}}}const SD=e=>{const t=({timestamp:n})=>e(n);return{start:()=>je.update(t,!0),stop:()=>Dr(t),now:()=>Dt.isProcessing?Dt.timestamp:performance.now()}},X1=2e4;function Z1(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<X1;)t+=n,r=e.next(t);return t>=X1?1/0:t}const CD={decay:J1,inertia:J1,tween:uc,keyframes:uc,spring:n2};function ac(w){var E=w,{autoplay:e=!0,delay:t=0,driver:n=SD,keyframes:r,type:o="keyframes",repeat:u=0,repeatDelay:a=0,repeatType:c="loop",onPlay:f,onStop:d,onComplete:p,onUpdate:m}=E,g=bt(E,["autoplay","delay","driver","keyframes","type","repeat","repeatDelay","repeatType","onPlay","onStop","onComplete","onUpdate"]);let P=1,k=!1,x,A;const C=()=>{A=new Promise(Se=>{x=Se})};C();let T;const L=CD[o]||uc;let I;L!==uc&&typeof r[0]!="number"&&(I=ZC([0,100],r,{clamp:!1}),r=[0,100]);const D=L(q(F({},g),{keyframes:r}));let N;c==="mirror"&&(N=L(q(F({},g),{keyframes:[...r].reverse(),velocity:-(g.velocity||0)})));let $="idle",G=null,le=null,Ge=null;D.calculatedDuration===null&&u&&(D.calculatedDuration=Z1(D));const{calculatedDuration:ot}=D;let wt=1/0,_e=1/0;ot!==null&&(wt=ot+a,_e=wt*(u+1)-a);let ye=0;const ze=Se=>{if(le===null)return;P>0&&(le=Math.min(le,Se)),P<0&&(le=Math.min(Se-_e/P,le)),G!==null?ye=G:ye=Math.round(Se-le)*P;const xt=ye-t*(P>=0?1:-1),Rt=P>=0?xt<0:xt>_e;ye=Math.max(xt,0),$==="finished"&&G===null&&(ye=_e);let ht=ye,$t=D;if(u){const Ce=Math.min(ye,_e)/wt;let Ee=Math.floor(Ce),te=Ce%1;!te&&Ce>=1&&(te=1),te===1&&Ee--,Ee=Math.min(Ee,u+1),!!(Ee%2)&&(c==="reverse"?(te=1-te,a&&(te-=a/wt)):c==="mirror"&&($t=N)),ht=xi(0,1,te)*wt}const qt=Rt?{done:!1,value:r[0]}:$t.next(ht);I&&(qt.value=I(qt.value));let{done:X}=qt;!Rt&&ot!==null&&(X=P>=0?ye>=_e:ye<=0);const ce=G===null&&($==="finished"||$==="running"&&X);return m&&m(qt.value),ce&&se(),qt},H=()=>{T&&T.stop(),T=void 0},ee=()=>{$="idle",H(),x(),C(),le=Ge=null},se=()=>{$="finished",p&&p(),H(),x()},me=()=>{if(k)return;T||(T=n(ze));const Se=T.now();f&&f(),G!==null?le=Se-G:(!le||$==="finished")&&(le=Se),$==="finished"&&C(),Ge=le,G=null,$="running",T.start()};e&&me();const Fe={then(Se,xt){return A.then(Se,xt)},get time(){return Rr(ye)},set time(Se){Se=pi(Se),ye=Se,G!==null||!T||P===0?G=Se:le=T.now()-Se/P},get duration(){const Se=D.calculatedDuration===null?Z1(D):D.calculatedDuration;return Rr(Se)},get speed(){return P},set speed(Se){Se===P||!T||(P=Se,Fe.time=Rr(ye))},get state(){return $},play:me,pause:()=>{$="paused",G=ye},stop:()=>{k=!0,$!=="idle"&&($="idle",d&&d(),ee())},cancel:()=>{Ge!==null&&ze(Ge),ee()},complete:()=>{$="finished"},sample:Se=>(le=0,ze(Se))};return Fe}function ED(e){let t;return()=>(t===void 0&&(t=e()),t)}const PD=ED(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),_D=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),nl=10,TD=2e4,RD=(e,t)=>t.type==="spring"||e==="backgroundColor"||!IC(t.ease);function kD(e,t,u){var a=u,{onUpdate:n,onComplete:r}=a,o=bt(a,["onUpdate","onComplete"]);if(!(PD()&&_D.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let f=!1,d,p,m=!1;const g=()=>{p=new Promise(L=>{d=L})};g();let{keyframes:w,duration:E=300,ease:P,times:k}=o;if(RD(t,o)){const L=ac(q(F({},o),{repeat:0,delay:0}));let I={done:!1,value:w[0]};const D=[];let N=0;for(;!I.done&&N<TD;)I=L.sample(N),D.push(I.value),N+=nl;k=void 0,w=D,E=N-nl,P="linear"}const x=V5(e.owner.current,t,w,q(F({},o),{duration:E,ease:P,times:k})),A=()=>{m=!1,x.cancel()},C=()=>{m=!0,je.update(A),d(),g()};return x.onfinish=()=>{m||(e.set(U5(w,o)),r&&r(),C())},{then(L,I){return p.then(L,I)},attachTimeline(L){return x.timeline=L,x.onfinish=null,tt},get time(){return Rr(x.currentTime||0)},set time(L){x.currentTime=pi(L)},get speed(){return x.playbackRate},set speed(L){x.playbackRate=L},get duration(){return Rr(E)},play:()=>{f||(x.play(),Dr(A))},pause:()=>x.pause(),stop:()=>{if(f=!0,x.playState==="idle")return;const{currentTime:L}=x;if(L){const I=ac(q(F({},o),{autoplay:!1}));e.setWithVelocity(I.sample(L-nl).value,I.sample(L).value,nl)}C()},complete:()=>{m||x.finish()},cancel:C}}function OD({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:tt,pause:tt,stop:tt,then:u=>(u(),Promise.resolve()),cancel:tt,complete:tt});return t?ac({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const bD={type:"spring",stiffness:500,damping:25,restSpeed:10},LD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ID={type:"keyframes",duration:.8},MD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},DD=(e,{keyframes:t})=>t.length>2?ID:so.has(e)?e.startsWith("scale")?LD(t[1]):bD:MD,kp=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ai.test(t)||t==="0")&&!t.startsWith("url(")),ND=new Set(["brightness","contrast","saturate","opacity"]);function FD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(rf)||[];if(!r)return e;const o=n.replace(r,"");let u=ND.has(t)?1:0;return r!==n&&(u*=100),t+"("+u+o+")"}const BD=/([a-z-]*)\(.*?\)/g,Op=q(F({},Ai),{getAnimatableNone:e=>{const t=e.match(BD);return t?t.map(FD).join(" "):e}}),VD=q(F({},yC),{color:zt,backgroundColor:zt,outlineColor:zt,fill:zt,stroke:zt,borderColor:zt,borderTopColor:zt,borderRightColor:zt,borderBottomColor:zt,borderLeftColor:zt,filter:Op,WebkitFilter:Op}),hg=e=>VD[e];function r2(e,t){let n=hg(e);return n!==Op&&(n=Ai),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const i2=e=>/^0[^.\s]+$/.test(e);function UD(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||i2(e)}function jD(e,t,n,r){const o=kp(t,n);let u;Array.isArray(n)?u=[...n]:u=[null,n];const a=r.from!==void 0?r.from:e.get();let c;const f=[];for(let d=0;d<u.length;d++)u[d]===null&&(u[d]=d===0?a:u[d-1]),UD(u[d])&&f.push(d),typeof u[d]=="string"&&u[d]!=="none"&&u[d]!=="0"&&(c=u[d]);if(o&&f.length&&c)for(let d=0;d<f.length;d++){const p=f[d];u[p]=r2(t,c)}return u}function zD(m){var g=m,{when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:u,repeatType:a,repeatDelay:c,from:f,elapsed:d}=g,p=bt(g,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(p).length}function pg(e,t){return e[t]||e.default||e}const WD={skipAnimations:!1},mg=(e,t,n,r={})=>o=>{const u=pg(r,e)||{},a=u.delay||r.delay||0;let{elapsed:c=0}=r;c=c-pi(a);const f=jD(t,e,n,u),d=f[0],p=f[f.length-1],m=kp(e,d),g=kp(e,p);let w=q(F({keyframes:f,velocity:t.getVelocity(),ease:"easeOut"},u),{delay:-c,onUpdate:E=>{t.set(E),u.onUpdate&&u.onUpdate(E)},onComplete:()=>{o(),u.onComplete&&u.onComplete()}});if(zD(u)||(w=F(F({},w),DD(e,w))),w.duration&&(w.duration=pi(w.duration)),w.repeatDelay&&(w.repeatDelay=pi(w.repeatDelay)),!m||!g||B5.current||u.type===!1||WD.skipAnimations)return OD(w);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const E=kD(t,e,w);if(E)return E}return ac(w)};function lc(e){return!!(un(e)&&e.add)}const o2=e=>/^\-?\d*\.?\d+$/.test(e);function gg(e,t){e.indexOf(t)===-1&&e.push(t)}function yg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class vg{constructor(){this.subscriptions=[]}add(t){return gg(this.subscriptions,t),()=>yg(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let u=0;u<o;u++){const a=this.subscriptions[u];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const QD=e=>!isNaN(parseFloat(e));class HD{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:u,timestamp:a}=Dt;this.lastUpdated!==a&&(this.timeDelta=u,this.lastUpdated=a,je.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>je.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=QD(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new vg);const r=this.events[t].add(n);return t==="change"?()=>{r(),je.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=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?e2(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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 ss(e,t){return new HD(e,t)}const s2=e=>t=>t.test(e),GD={test:e=>e==="auto",parse:e=>e},u2=[uo,oe,fr,Kr,XM,JM,GD],Us=e=>u2.find(s2(e)),KD=[...u2,zt,Ai],$D=e=>KD.find(s2(e));function qD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ss(n))}function YD(e,t){const n=sf(e,t);let a=n?e.makeTargetAnimatable(n,!1):{},{transitionEnd:r={},transition:o={}}=a,u=bt(a,["transitionEnd","transition"]);u=F(F({},u),r);for(const c in u){const f=h5(u[c]);qD(e,c,f)}}function JD(e,t,n){var r,o;const u=Object.keys(t).filter(c=>!e.hasValue(c)),a=u.length;if(a)for(let c=0;c<a;c++){const f=u[c],d=t[f];let p=null;Array.isArray(d)&&(p=d[0]),p===null&&(p=(o=(r=n[f])!==null&&r!==void 0?r:e.readValue(f))!==null&&o!==void 0?o:t[f]),p!=null&&(typeof p=="string"&&(o2(p)||i2(p))?p=parseFloat(p):!$D(p)&&Ai.test(d)&&(p=r2(f,d)),e.addValue(f,ss(p,{owner:e})),n[f]===void 0&&(n[f]=p),p!==null&&e.setBaseTarget(f,p))}}function XD(e,t){return t?(t[e]||t.default||t).from:void 0}function ZD(e,t,n){const r={};for(const o in e){const u=XD(o,t);if(u!==void 0)r[o]=u;else{const a=n.getValue(o);a&&(r[o]=a.get())}}return r}function e6({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function t6(e,t){const n=e.get();if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r]!==n)return!0}else return n!==t}function a2(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let m=e.makeTargetAnimatable(t),{transition:u=e.getDefaultTransition(),transitionEnd:a}=m,c=bt(m,["transition","transitionEnd"]);const f=e.getValue("willChange");r&&(u=r);const d=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const g in c){const w=e.getValue(g),E=c[g];if(!w||E===void 0||p&&e6(p,g))continue;const P=F({delay:n,elapsed:0},pg(u||{},g));if(window.HandoffAppearAnimations){const A=e.getProps()[lC];if(A){const C=window.HandoffAppearAnimations(A,g,w,je);C!==null&&(P.elapsed=C,P.isHandoff=!0)}}let k=!P.isHandoff&&!t6(w,E);if(P.type==="spring"&&(w.getVelocity()||P.velocity)&&(k=!1),w.animation&&(k=!1),k)continue;w.start(mg(g,w,E,e.shouldReduceMotion&&so.has(g)?{type:!1}:P));const x=w.animation;lc(f)&&(f.add(g),x.then(()=>f.remove(g))),d.push(x)}return a&&Promise.all(d).then(()=>{a&&YD(e,a)}),d}function bp(e,t,n={}){const r=sf(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const u=r?()=>Promise.all(a2(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:m}=o;return n6(e,t,d+f,p,m,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[f,d]=c==="beforeChildren"?[u,a]:[a,u];return f().then(()=>d())}else return Promise.all([u(),a(n.delay)])}function n6(e,t,n=0,r=0,o=1,u){const a=[],c=(e.variantChildren.size-1)*r,f=o===1?(d=0)=>d*r:(d=0)=>c-d*r;return Array.from(e.variantChildren).sort(r6).forEach((d,p)=>{d.notify("AnimationStart",t),a.push(bp(d,t,q(F({},u),{delay:n+f(p)})).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function r6(e,t){return e.sortNodePosition(t)}function i6(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(u=>bp(e,u,n));r=Promise.all(o)}else if(typeof t=="string")r=bp(e,t,n);else{const o=typeof t=="function"?sf(e,t,n.custom):t;r=Promise.all(a2(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const o6=[...eg].reverse(),s6=eg.length;function u6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>i6(e,n,r)))}function a6(e){let t=u6(e);const n=c6();let r=!0;const o=(f,d)=>{const p=sf(e,d);if(p){const m=p,{transition:g,transitionEnd:w}=m,E=bt(m,["transition","transitionEnd"]);f=F(F(F({},f),E),w)}return f};function u(f){t=f(e)}function a(f,d){const p=e.getProps(),m=e.getVariantContext(!0)||{},g=[],w=new Set;let E={},P=1/0;for(let x=0;x<s6;x++){const A=o6[x],C=n[A],T=p[A]!==void 0?p[A]:m[A],L=Ou(T),I=A===d?C.isActive:null;I===!1&&(P=x);let D=T===m[A]&&T!==p[A]&&L;if(D&&r&&e.manuallyAnimateOnMount&&(D=!1),C.protectedKeys=F({},E),!C.isActive&&I===null||!T&&!C.prevProp||tf(T)||typeof T=="boolean")continue;let $=l6(C.prevProp,T)||A===d&&C.isActive&&!D&&L||x>P&&L,G=!1;const le=Array.isArray(T)?T:[T];let Ge=le.reduce(o,{});I===!1&&(Ge={});const{prevResolvedValues:ot={}}=C,wt=F(F({},ot),Ge),_e=ye=>{$=!0,w.has(ye)&&(G=!0,w.delete(ye)),C.needsAnimating[ye]=!0};for(const ye in wt){const ze=Ge[ye],H=ot[ye];if(E.hasOwnProperty(ye))continue;let ee=!1;oc(ze)&&oc(H)?ee=!bC(ze,H):ee=ze!==H,ee?ze!==void 0?_e(ye):w.add(ye):ze!==void 0&&w.has(ye)?_e(ye):C.protectedKeys[ye]=!0}C.prevProp=T,C.prevResolvedValues=Ge,C.isActive&&(E=F(F({},E),Ge)),r&&e.blockInitialAnimation&&($=!1),$&&(!D||G)&&g.push(...le.map(ye=>({animation:ye,options:F({type:A},f)})))}if(w.size){const x={};w.forEach(A=>{const C=e.getBaseTarget(A);C!==void 0&&(x[A]=C)}),g.push({animation:x})}let k=!!g.length;return r&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,k?t(g):Promise.resolve()}function c(f,d,p){var m;if(n[f].isActive===d)return Promise.resolve();(m=e.variantChildren)===null||m===void 0||m.forEach(w=>{var E;return(E=w.animationState)===null||E===void 0?void 0:E.setActive(f,d)}),n[f].isActive=d;const g=a(p,f);for(const w in n)n[w].protectedKeys={};return g}return{animateChanges:a,setActive:c,setAnimateFunction:u,getState:()=>n}}function l6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bC(t,e):!1}function Fi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function c6(){return{animate:Fi(!0),whileInView:Fi(),whileHover:Fi(),whileTap:Fi(),whileDrag:Fi(),whileFocus:Fi(),exit:Fi()}}class f6 extends _i{constructor(t){super(t),t.animationState||(t.animationState=a6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),tf(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let d6=0;class h6 extends _i{constructor(){super(...arguments),this.id=d6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const u=this.node.animationState.setActive("exit",!t,{custom:r!=null?r:this.node.getProps().custom});n&&!t&&u.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const p6={animation:{Feature:f6},exit:{Feature:h6}},ew=(e,t)=>Math.abs(e-t);function m6(e,t){const n=ew(e.x,t.x),r=ew(e.y,t.y);return Math.sqrt(Da(n,2)+Da(r,2))}class l2{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:u=!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 m=wh(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,w=m6(m.offset,{x:0,y:0})>=3;if(!g&&!w)return;const{point:E}=m,{timestamp:P}=Dt;this.history.push(q(F({},E),{timestamp:P}));const{onStart:k,onMove:x}=this.handlers;g||(k&&k(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=vh(g,this.transformPagePoint),je.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:w,onSessionEnd:E,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=wh(m.type==="pointercancel"?this.lastMoveEventInfo:vh(g,this.transformPagePoint),this.history);this.startEvent&&w&&w(m,k),E&&E(m,k)},!_C(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=of(t),c=vh(a,this.transformPagePoint),{point:f}=c,{timestamp:d}=Dt;this.history=[q(F({},f),{timestamp:d})];const{onSessionStart:p}=n;p&&p(t,wh(c,this.history)),this.removeListeners=hi(Tr(this.contextWindow,"pointermove",this.handlePointerMove),Tr(this.contextWindow,"pointerup",this.handlePointerUp),Tr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Dr(this.updatePoint)}}function vh(e,t){return t?{point:t(e.point)}:e}function tw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wh({point:e},t){return{point:e,delta:tw(e,c2(t)),offset:tw(e,g6(t)),velocity:y6(t,.1)}}function g6(e){return e[0]}function c2(e){return e[e.length-1]}function y6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=c2(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>pi(t)));)n--;if(!r)return{x:0,y:0};const u=Rr(o.timestamp-r.timestamp);if(u===0)return{x:0,y:0};const a={x:(o.x-r.x)/u,y:(o.y-r.y)/u};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function wn(e){return e.max-e.min}function Lp(e,t=0,n=.01){return Math.abs(e-t)<=n}function nw(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=wn(n)/wn(t),(Lp(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(Lp(e.translate)||isNaN(e.translate))&&(e.translate=0)}function su(e,t,n,r){nw(e.x,t.x,n.x,r?r.originX:void 0),nw(e.y,t.y,n.y,r?r.originY:void 0)}function rw(e,t,n){e.min=n.min+t.min,e.max=e.min+wn(t)}function v6(e,t,n){rw(e.x,t.x,n.x),rw(e.y,t.y,n.y)}function iw(e,t,n){e.min=t.min-n.min,e.max=e.min+wn(t)}function uu(e,t,n){iw(e.x,t.x,n.x),iw(e.y,t.y,n.y)}function w6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qe(n,e,r.max):Math.min(e,n)),e}function ow(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 x6(e,{top:t,left:n,bottom:r,right:o}){return{x:ow(e.x,n,o),y:ow(e.y,t,r)}}function sw(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 A6(e,t){return{x:sw(e.x,t.x),y:sw(e.y,t.y)}}function S6(e,t){let n=.5;const r=wn(e),o=wn(t);return o>r?n=Lu(t.min,t.max-r,e.min):r>o&&(n=Lu(e.min,e.max-o,t.min)),xi(0,1,n)}function C6(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 Ip=.35;function E6(e=Ip){return e===!1?e=0:e===!0&&(e=Ip),{x:uw(e,"left","right"),y:uw(e,"top","bottom")}}function uw(e,t,n){return{min:aw(e,t),max:aw(e,n)}}function aw(e,t){return typeof e=="number"?e:e[t]||0}const lw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Uo=()=>({x:lw(),y:lw()}),cw=()=>({min:0,max:0}),st=()=>({x:cw(),y:cw()});function Ln(e){return[e("x"),e("y")]}function f2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function P6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _6(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}}function xh(e){return e===void 0||e===1}function Mp({scale:e,scaleX:t,scaleY:n}){return!xh(e)||!xh(t)||!xh(n)}function ji(e){return Mp(e)||d2(e)||e.z||e.rotate||e.rotateX||e.rotateY}function d2(e){return fw(e.x)||fw(e.y)}function fw(e){return e&&e!=="0%"}function cc(e,t,n){const r=e-n,o=t*r;return n+o}function dw(e,t,n,r,o){return o!==void 0&&(e=cc(e,o,r)),cc(e,n,r)+t}function Dp(e,t=0,n=1,r,o){e.min=dw(e.min,t,n,r,o),e.max=dw(e.max,t,n,r,o)}function h2(e,{x:t,y:n}){Dp(e.x,t.translate,t.scale,t.originPoint),Dp(e.y,n.translate,n.scale,n.originPoint)}function T6(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let u,a;for(let c=0;c<o;c++){u=n[c],a=u.projectionDelta;const f=u.instance;f&&f.style&&f.style.display==="contents"||(r&&u.options.layoutScroll&&u.scroll&&u!==u.root&&jo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,h2(e,a)),r&&ji(u.latestValues)&&jo(e,u.latestValues))}t.x=hw(t.x),t.y=hw(t.y)}function hw(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Jr(e,t){e.min=e.min+t,e.max=e.max+t}function pw(e,t,[n,r,o]){const u=t[o]!==void 0?t[o]:.5,a=qe(e.min,e.max,u);Dp(e,t[n],t[r],a,t.scale)}const R6=["x","scaleX","originX"],k6=["y","scaleY","originY"];function jo(e,t){pw(e.x,t,R6),pw(e.y,t,k6)}function p2(e,t){return f2(_6(e.getBoundingClientRect(),t))}function O6(e,t,n){const r=p2(e,n),{scroll:o}=t;return o&&(Jr(r.x,o.offset.x),Jr(r.y,o.offset.y)),r}const m2=({current:e})=>e?e.ownerDocument.defaultView:null,b6=new WeakMap;class L6{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=p=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(of(p,"page").point)},u=(p,m)=>{const{drag:g,dragPropagation:w,onDragStart:E}=this.getProps();if(g&&!w&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=RC(g),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ln(k=>{let x=this.getAxisMotionValue(k).get()||0;if(fr.test(x)){const{projection:A}=this.visualElement;if(A&&A.layout){const C=A.layout.layoutBox[k];C&&(x=wn(C)*(parseFloat(x)/100))}}this.originPoint[k]=x}),E&&je.update(()=>E(p,m),!1,!0);const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},a=(p,m)=>{const{dragPropagation:g,dragDirectionLock:w,onDirectionLock:E,onDrag:P}=this.getProps();if(!g&&!this.openGlobalLock)return;const{offset:k}=m;if(w&&this.currentDirection===null){this.currentDirection=I6(k),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",m.point,k),this.updateAxis("y",m.point,k),this.visualElement.render(),P&&P(p,m)},c=(p,m)=>this.stop(p,m),f=()=>Ln(p=>{var m;return this.getAnimationState(p)==="paused"&&((m=this.getAxisMotionValue(p).animation)===null||m===void 0?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new l2(t,{onSessionStart:o,onStart:u,onMove:a,onSessionEnd:c,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:m2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:u}=this.getProps();u&&je.update(()=>u(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!rl(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=w6(a,this.constraints[t],this.elastic[t])),u.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,u=this.constraints;n&&Bo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=x6(o.layoutBox,n):this.constraints=!1,this.elastic=E6(r),u!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ln(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=C6(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bo(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=O6(r,o.root,this.visualElement.getTransformPagePoint());let a=A6(o.layout.layoutBox,u);if(n){const c=n(P6(a));this.hasMutatedConstraints=!!c,c&&(a=f2(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:u,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),f=this.constraints||{},d=Ln(p=>{if(!rl(p,n,this.currentDirection))return;let m=f&&f[p]||{};a&&(m={min:0,max:0});const g=o?200:1e6,w=o?40:1e7,E=F(F({type:"inertia",velocity:r?t[p]:0,bounceStiffness:g,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10},u),m);return this.startAxisValueAnimation(p,E)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(mg(t,r,0,n))}stopAnimation(){Ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ln(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ln(n=>{const{drag:r}=this.getProps();if(!rl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:c}=o.layout.layoutBox[n];u.set(t[n]-qe(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ln(a=>{const c=this.getAxisMotionValue(a);if(c){const f=c.get();o[a]=S6({min:f,max:f},this.constraints[a])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ln(a=>{if(!rl(a,t,null))return;const c=this.getAxisMotionValue(a),{min:f,max:d}=this.constraints[a];c.set(qe(f,d,o[a]))})}addListeners(){if(!this.visualElement.current)return;b6.set(this.visualElement,this);const t=this.visualElement.current,n=Tr(t,"pointerdown",f=>{const{drag:d,dragListener:p=!0}=this.getProps();d&&p&&this.start(f)}),r=()=>{const{dragConstraints:f}=this.getProps();Bo(f)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,u=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const a=Pr(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ln(p=>{const m=this.getAxisMotionValue(p);m&&(this.originPoint[p]+=f[p].translate,m.set(m.get()+f[p].translate))}),this.visualElement.render())});return()=>{a(),n(),u(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:a=Ip,dragMomentum:c=!0}=t;return q(F({},t),{drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:u,dragElastic:a,dragMomentum:c})}}function rl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function I6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class M6 extends _i{constructor(t){super(t),this.removeGroupControls=tt,this.removeListeners=tt,this.controls=new L6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tt}unmount(){this.removeGroupControls(),this.removeListeners()}}const mw=e=>(t,n)=>{e&&je.update(()=>e(t,n))};class D6 extends _i{constructor(){super(...arguments),this.removePointerDownListener=tt}onPointerDown(t){this.session=new l2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:m2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:mw(t),onStart:mw(n),onMove:r,onEnd:(u,a)=>{delete this.session,o&&je.update(()=>o(u,a))}}}mount(){this.removePointerDownListener=Tr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function N6(){const e=B.useContext(Xm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=B.useId();return B.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function gw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const js={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const n=gw(e,t.target.x),r=gw(e,t.target.y);return`${n}% ${r}%`}},F6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ai.parse(e);if(o.length>5)return r;const u=Ai.createTransformer(e),a=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,f=n.y.scale*t.y;o[0+a]/=c,o[1+a]/=f;const d=qe(c,f,.5);return typeof o[2+a]=="number"&&(o[2+a]/=d),typeof o[3+a]=="number"&&(o[3+a]/=d),u(o)}};class B6 extends Jn.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:u}=t;QM(V6),u&&(n.group&&n.group.add(u),r&&r.register&&o&&r.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions(q(F({},u.options),{onExitComplete:()=>this.safeToRemove()}))),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:u}=this.props,a=r.projection;return a&&(a.isPresent=u,o||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?a.promote():a.relegate()||je.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function g2(e){const[t,n]=N6(),r=B.useContext(fC);return Jn.createElement(B6,q(F({},e),{layoutGroup:r,switchLayoutGroup:B.useContext(dC),isPresent:t,safeToRemove:n}))}const V6={borderRadius:q(F({},js),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:js,borderTopRightRadius:js,borderBottomLeftRadius:js,borderBottomRightRadius:js,boxShadow:F6},y2=["TopLeft","TopRight","BottomLeft","BottomRight"],U6=y2.length,yw=e=>typeof e=="string"?parseFloat(e):e,vw=e=>typeof e=="number"||oe.test(e);function j6(e,t,n,r,o,u){o?(e.opacity=qe(0,n.opacity!==void 0?n.opacity:1,z6(r)),e.opacityExit=qe(t.opacity!==void 0?t.opacity:1,0,W6(r))):u&&(e.opacity=qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<U6;a++){const c=`border${y2[a]}Radius`;let f=ww(t,c),d=ww(n,c);if(f===void 0&&d===void 0)continue;f||(f=0),d||(d=0),f===0||d===0||vw(f)===vw(d)?(e[c]=Math.max(qe(yw(f),yw(d),r),0),(fr.test(d)||fr.test(f))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function ww(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const z6=v2(0,.5,UC),W6=v2(.5,.95,tt);function v2(e,t,n){return r=>r<e?0:r>t?1:n(Lu(e,t,r))}function xw(e,t){e.min=t.min,e.max=t.max}function bn(e,t){xw(e.x,t.x),xw(e.y,t.y)}function Aw(e,t,n,r,o){return e-=t,e=cc(e,1/n,r),o!==void 0&&(e=cc(e,1/o,r)),e}function Q6(e,t=0,n=1,r=.5,o,u=e,a=e){if(fr.test(t)&&(t=parseFloat(t),t=qe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=qe(u.min,u.max,r);e===u&&(c-=t),e.min=Aw(e.min,t,n,c,o),e.max=Aw(e.max,t,n,c,o)}function Sw(e,t,[n,r,o],u,a){Q6(e,t[n],t[r],t[o],t.scale,u,a)}const H6=["x","scaleX","originX"],G6=["y","scaleY","originY"];function Cw(e,t,n,r){Sw(e.x,t,H6,n?n.x:void 0,r?r.x:void 0),Sw(e.y,t,G6,n?n.y:void 0,r?r.y:void 0)}function Ew(e){return e.translate===0&&e.scale===1}function w2(e){return Ew(e.x)&&Ew(e.y)}function K6(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function x2(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Pw(e){return wn(e.x)/wn(e.y)}class $6{constructor(){this.members=[]}add(t){gg(this.members,t),t.scheduleRender()}remove(t){if(yg(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1){r=u;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:o}=t.options;o===!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 _w(e,t,n){let r="";const o=e.x.translate/t.x,u=e.y.translate/t.y;if((o||u)&&(r=`translate3d(${o}px, ${u}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:f,rotateX:d,rotateY:p}=n;f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const q6=(e,t)=>e.depth-t.depth;class Y6{constructor(){this.children=[],this.isDirty=!1}add(t){gg(this.children,t),this.isDirty=!0}remove(t){yg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(q6),this.isDirty=!1,this.children.forEach(t)}}function J6(e,t){const n=performance.now(),r=({timestamp:o})=>{const u=o-n;u>=t&&(Dr(r),e(u-t))};return je.read(r,!0),()=>Dr(r)}function X6(e){window.MotionDebug&&window.MotionDebug.record(e)}function Z6(e){return e instanceof SVGElement&&e.tagName!=="svg"}function eN(e,t,n){const r=un(e)?e:ss(e);return r.start(mg("",r,t,n)),r.animation}const Tw=["","X","Y","Z"],tN={visibility:"hidden"},Rw=1e3;let nN=0;const zi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function A2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},c=t==null?void 0:t()){this.id=nN++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,zi.totalNodes=zi.resolvedTargetDeltas=zi.recalculatedProjection=0,this.nodes.forEach(oN),this.nodes.forEach(cN),this.nodes.forEach(fN),this.nodes.forEach(sN),X6(zi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new Y6)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new vg),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const f=this.eventHandlers.get(a);f&&f.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Z6(a),this.instance=a;const{layoutId:f,layout:d,visualElement:p}=this.options;if(p&&!p.current&&p.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(d||f)&&(this.isLayoutDirty=!0),e){let m;const g=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=J6(g,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ow))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&p&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeTargetChanged:w,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=this.options.transition||p.getDefaultTransition()||gN,{onLayoutAnimationStart:k,onLayoutAnimationComplete:x}=p.getProps(),A=!this.targetLayout||!x2(this.targetLayout,E)||w,C=!g&&w;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||g&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,C);const T=q(F({},pg(P,"layout")),{onPlay:k,onComplete:x});(p.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else g||Ow(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Dr(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(dN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const m=this.path[p];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:c,layout:f}=this.options;if(c===void 0&&!f)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kw);return}this.isUpdating||this.nodes.forEach(aN),this.isUpdating=!1,this.nodes.forEach(lN),this.nodes.forEach(rN),this.nodes.forEach(iN),this.clearAllSnapshots();const c=performance.now();Dt.delta=xi(0,1e3/60,c-Dt.timestamp),Dt.timestamp=c,Dt.isProcessing=!0,ch.update.process(Dt),ch.preRender.process(Dt),ch.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(uN),this.sharedNodes.forEach(hN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform,c=this.projectionDelta&&!w2(this.projectionDelta),f=this.getTransformTemplate(),d=f?f(this.latestValues,""):void 0,p=d!==this.prevTransformTemplateValue;a&&(c||ji(this.latestValues)||p)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let f=this.removeElementScroll(c);return a&&(f=this.removeTransform(f)),yN(f),{animationId:this.root.animationId,measuredBox:c,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return st();const c=a.measureViewportBox(),{scroll:f}=this.root;return f&&(Jr(c.x,f.offset.x),Jr(c.y,f.offset.y)),c}removeElementScroll(a){const c=st();bn(c,a);for(let f=0;f<this.path.length;f++){const d=this.path[f],{scroll:p,options:m}=d;if(d!==this.root&&p&&m.layoutScroll){if(p.isRoot){bn(c,a);const{scroll:g}=this.root;g&&(Jr(c.x,-g.offset.x),Jr(c.y,-g.offset.y))}Jr(c.x,p.offset.x),Jr(c.y,p.offset.y)}}return c}applyTransform(a,c=!1){const f=st();bn(f,a);for(let d=0;d<this.path.length;d++){const p=this.path[d];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&jo(f,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),ji(p.latestValues)&&jo(f,p.latestValues)}return ji(this.latestValues)&&jo(f,this.latestValues),f}removeTransform(a){const c=st();bn(c,a);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!d.instance||!ji(d.latestValues))continue;Mp(d.latestValues)&&d.updateSnapshot();const p=st(),m=d.measurePageBox();bn(p,m),Cw(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,p)}return ji(this.latestValues)&&Cw(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options=q(F(F({},this.options),a),{crossfade:a.crossfade!==void 0?a.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!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:m,layoutId:g}=this.options;if(!(!this.layout||!(m||g))){if(this.resolvedRelativeTargetAt=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const w=this.getClosestProjectingParent();w&&w.layout&&this.animationProgress!==1?(this.relativeParent=w,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),uu(this.relativeTargetOrigin,this.layout.layoutBox,w.layout.layoutBox),bn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),v6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):bn(this.target,this.layout.layoutBox),h2(this.target,this.targetDelta)):bn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const w=this.getClosestProjectingParent();w&&!!w.resumingFrom==!!this.resumingFrom&&!w.options.layoutScroll&&w.target&&this.animationProgress!==1?(this.relativeParent=w,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),uu(this.relativeTargetOrigin,this.target,w.target),bn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}zi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Mp(this.parent.latestValues)||d2(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 a;const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(d=!1),d)return;const{layout:p,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||m))return;bn(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,w=this.treeScale.y;T6(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox);const{target:E}=c;if(!E){this.projectionTransform&&(this.projectionDelta=Uo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Uo(),this.projectionDeltaWithTransform=Uo());const P=this.projectionTransform;su(this.projectionDelta,this.layoutCorrected,E,this.latestValues),this.projectionTransform=_w(this.projectionDelta,this.treeScale),(this.projectionTransform!==P||this.treeScale.x!==g||this.treeScale.y!==w)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),zi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,c=!1){const f=this.snapshot,d=f?f.latestValues:{},p=F({},this.latestValues),m=Uo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=st(),w=f?f.source:void 0,E=this.layout?this.layout.source:void 0,P=w!==E,k=this.getStack(),x=!k||k.members.length<=1,A=!!(P&&!x&&this.options.crossfade===!0&&!this.path.some(mN));this.animationProgress=0;let C;this.mixTargetDelta=T=>{const L=T/1e3;bw(m.x,a.x,L),bw(m.y,a.y,L),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(uu(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pN(this.relativeTarget,this.relativeTargetOrigin,g,L),C&&K6(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=st()),bn(C,this.relativeTarget)),P&&(this.animationValues=p,j6(p,d,this.latestValues,L,A,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=je.update(()=>{Sl.hasAnimatedSinceResize=!0,this.currentAnimation=eN(0,Rw,q(F({},a),{onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:f,layout:d,latestValues:p}=a;if(!(!c||!f||!d)){if(this!==a&&this.layout&&d&&S2(this.options.animationType,this.layout.layoutBox,d.layoutBox)){f=this.target||st();const m=wn(this.layout.layoutBox.x);f.x.min=a.target.x.min,f.x.max=f.x.min+m;const g=wn(this.layout.layoutBox.y);f.y.min=a.target.y.min,f.y.max=f.y.min+g}bn(c,f),jo(c,p),su(this.projectionDeltaWithTransform,this.layoutCorrected,c,p)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new $6),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:f}={}){const d=this.getStack();d&&d.promote(this,f),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:f}=a;if((f.rotate||f.rotateX||f.rotateY||f.rotateZ)&&(c=!0),!c)return;const d={};for(let p=0;p<Tw.length;p++){const m="rotate"+Tw[p];f[m]&&(d[m]=f[m],a.setStaticValue(m,0))}a.render();for(const p in d)a.setStaticValue(p,d[p]);a.scheduleRender()}getProjectionStyles(a){var c,f;if(!this.instance||this.isSVG)return;if(!this.isVisible)return tN;const d={visibility:""},p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Al(a==null?void 0:a.pointerEvents)||"",d.transform=p?p(this.latestValues,""):"none",d;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const P={};return this.options.layoutId&&(P.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,P.pointerEvents=Al(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ji(this.latestValues)&&(P.transform=p?p({},""):"none",this.hasProjected=!1),P}const g=m.animationValues||m.latestValues;this.applyTransformsToTarget(),d.transform=_w(this.projectionDeltaWithTransform,this.treeScale,g),p&&(d.transform=p(g,d.transform));const{x:w,y:E}=this.projectionDelta;d.transformOrigin=`${w.origin*100}% ${E.origin*100}% 0`,m.animationValues?d.opacity=m===this?(f=(c=g.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:d.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const P in rc){if(g[P]===void 0)continue;const{correct:k,applyTo:x}=rc[P],A=d.transform==="none"?g[P]:k(g[P],m);if(x){const C=x.length;for(let T=0;T<C;T++)d[x[T]]=A}else d[P]=A}return this.options.layoutId&&(d.pointerEvents=m===this?Al(a==null?void 0:a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(kw),this.root.sharedNodes.clear()}}}function rN(e){e.updateLayout()}function iN(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:u}=e.options,a=n.source!==e.layout.source;u==="size"?Ln(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],w=wn(g);g.min=r[m].min,g.max=g.min+w}):S2(u,n.layoutBox,r)&&Ln(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],w=wn(r[m]);g.max=g.min+w,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+w)});const c=Uo();su(c,r,n.layoutBox);const f=Uo();a?su(f,e.applyTransform(o,!0),n.measuredBox):su(f,r,n.layoutBox);const d=!w2(c);let p=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:w}=m;if(g&&w){const E=st();uu(E,n.layoutBox,g.layoutBox);const P=st();uu(P,r,w.layoutBox),x2(E,P)||(p=!0),m.options.layoutRoot&&(e.relativeTarget=P,e.relativeTargetOrigin=E,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function oN(e){zi.totalNodes++,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 sN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function uN(e){e.clearSnapshot()}function kw(e){e.clearMeasurements()}function aN(e){e.isLayoutDirty=!1}function lN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ow(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function cN(e){e.resolveTargetDelta()}function fN(e){e.calcProjection()}function dN(e){e.resetRotation()}function hN(e){e.removeLeadSnapshot()}function bw(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lw(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function pN(e,t,n,r){Lw(e.x,t.x,n.x,r),Lw(e.y,t.y,n.y,r)}function mN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gN={duration:.45,ease:[.4,0,.1,1]},Iw=e=>typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().includes(e),Mw=Iw("applewebkit/")&&!Iw("chrome/")?Math.round:tt;function Dw(e){e.min=Mw(e.min),e.max=Mw(e.max)}function yN(e){Dw(e.x),Dw(e.y)}function S2(e,t,n){return e==="position"||e==="preserve-aspect"&&!Lp(Pw(t),Pw(n),.2)}const vN=A2({attachResizeListener:(e,t)=>Pr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ah={current:void 0},C2=A2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ah.current){const e=new vN({});e.mount(window),e.setOptions({layoutScroll:!0}),Ah.current=e}return Ah.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wN={pan:{Feature:D6},drag:{Feature:M6,ProjectionNode:C2,MeasureLayout:g2}},xN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function AN(e){const t=xN.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Np(e,t,n=1){const[r,o]=AN(e);if(!r)return;const u=window.getComputedStyle(t).getPropertyValue(r);if(u){const a=u.trim();return o2(a)?parseFloat(a):a}else return Pp(o)?Np(o,t,n+1):o}function SN(e,r,n){var t=bt(r,[]);const o=e.current;if(!(o instanceof Element))return{target:t,transitionEnd:n};n&&(n=F({},n)),e.values.forEach(u=>{const a=u.get();if(!Pp(a))return;const c=Np(a,o);c&&u.set(c)});for(const u in t){const a=t[u];if(!Pp(a))continue;const c=Np(a,o);c&&(t[u]=c,n||(n={}),n[u]===void 0&&(n[u]=a))}return{target:t,transitionEnd:n}}const CN=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),E2=e=>CN.has(e),EN=e=>Object.keys(e).some(E2),Nw=e=>e===uo||e===oe,Fw=(e,t)=>parseFloat(e.split(", ")[t]),Bw=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Fw(o[1],t);{const u=r.match(/^matrix\((.+)\)$/);return u?Fw(u[1],e):0}},PN=new Set(["x","y","z"]),_N=Uu.filter(e=>!PN.has(e));function TN(e){const t=[];return _N.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const us={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Bw(4,13),y:Bw(5,14)};us.translateX=us.x;us.translateY=us.y;const RN=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,u=getComputedStyle(o),{display:a}=u,c={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(d=>{c[d]=us[d](r,u)}),t.render();const f=t.measureViewportBox();return n.forEach(d=>{const p=t.getValue(d);p&&p.jump(c[d]),e[d]=us[d](f,u)}),e},kN=(e,t,n={},r={})=>{t=F({},t),r=F({},r);const o=Object.keys(t).filter(E2);let u=[],a=!1;const c=[];if(o.forEach(f=>{const d=e.getValue(f);if(!e.hasValue(f))return;let p=n[f],m=Us(p);const g=t[f];let w;if(oc(g)){const E=g.length,P=g[0]===null?1:0;p=g[P],m=Us(p);for(let k=P;k<E&&g[k]!==null;k++)w?lg(Us(g[k])===w):w=Us(g[k])}else w=Us(g);if(m!==w)if(Nw(m)&&Nw(w)){const E=d.get();typeof E=="string"&&d.set(parseFloat(E)),typeof g=="string"?t[f]=parseFloat(g):Array.isArray(g)&&w===oe&&(t[f]=g.map(parseFloat))}else m!=null&&m.transform&&(w!=null&&w.transform)&&(p===0||g===0)?p===0?d.set(w.transform(p)):t[f]=m.transform(g):(a||(u=TN(e),a=!0),c.push(f),r[f]=r[f]!==void 0?r[f]:t[f],d.jump(g))}),c.length){const f=c.indexOf("height")>=0?window.pageYOffset:null,d=RN(t,e,c);return u.length&&u.forEach(([p,m])=>{e.getValue(p).set(m)}),e.render(),ef&&f!==null&&window.scrollTo({top:f}),{target:d,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ON(e,t,n,r){return EN(t)?kN(e,t,n,r):{target:t,transitionEnd:r}}const bN=(e,t,n,r)=>{const o=SN(e,t,r);return t=o.target,r=o.transitionEnd,ON(e,t,n,r)},Fp={current:null},P2={current:!1};function LN(){if(P2.current=!0,!!ef)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fp.current=e.matches;e.addListener(t),t()}else Fp.current=!1}function IN(e,t,n){const{willChange:r}=t;for(const o in t){const u=t[o],a=n[o];if(un(u))e.addValue(o,u),lc(r)&&r.add(o);else if(un(a))e.addValue(o,ss(u,{owner:e})),lc(r)&&r.remove(o);else if(a!==u)if(e.hasValue(o)){const c=e.getValue(o);!c.hasAnimated&&c.set(u)}else{const c=e.getStaticValue(o);e.addValue(o,ss(c!==void 0?c:u,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Vw=new WeakMap,_2=Object.keys(bu),MN=_2.length,Uw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],DN=tg.length;class NN{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:u},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>je.render(this.render,!1,!0);const{latestValues:c,renderState:f}=u;this.latestValues=c,this.baseTarget=F({},c),this.initialValues=n.initial?F({},c):{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.isControllingVariants=nf(n),this.isVariantNode=cC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const m=this.scrapeMotionValuesFromProps(n,{}),{willChange:d}=m,p=bt(m,["willChange"]);for(const g in p){const w=p[g];c[g]!==void 0&&un(w)&&(w.set(c[g],!1),lc(d)&&d.add(g))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Vw.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)),P2.current||LN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Vw.delete(this.current),this.projection&&this.projection.unmount(),Dr(this.notifyUpdate),Dr(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=so.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&je.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),u=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),u()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(a,r,o,u){var c=a,{children:t}=c,n=bt(c,["children"]);let f,d;for(let p=0;p<MN;p++){const m=_2[p],{isEnabled:g,Feature:w,ProjectionNode:E,MeasureLayout:P}=bu[m];E&&(f=E),g(n)&&(!this.features[m]&&w&&(this.features[m]=new w(this)),P&&(d=P))}if((this.type==="html"||this.type==="svg")&&!this.projection&&f){this.projection=new f(this.latestValues,this.parent&&this.parent.projection);const{layoutId:p,layout:m,drag:g,dragConstraints:w,layoutScroll:E,layoutRoot:P}=n;this.projection.setOptions({layoutId:p,layout:m,alwaysMeasureLayout:!!g||w&&Bo(w),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof m=="string"?m:"both",initialPromotionConfig:u,layoutScroll:E,layoutRoot:P})}return d}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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<Uw.length;r++){const o=Uw[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const u=t["on"+o];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=IN(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<DN;r++){const o=tg[r],u=this.props[o];(Ou(u)||u===!1)&&(n[o]=u)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=ss(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=ag(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const u=this.getBaseTargetFromProps(this.props,t);return u!==void 0&&!un(u)?u:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new vg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class T2 extends NN{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]}makeTargetAnimatableFromInstance(a,{transformValues:o},u){var c=a,{transition:t,transitionEnd:n}=c,r=bt(c,["transition","transitionEnd"]);let f=ZD(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),f&&(f=o(f))),u){JD(this,r,f);const d=bN(this,r,f,n);n=d.transitionEnd,r=d.target}return F({transition:t,transitionEnd:n},r)}}function FN(e){return window.getComputedStyle(e)}class BN extends T2{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(so.has(n)){const r=hg(n);return r&&r.default||0}else{const r=FN(t),o=(mC(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return p2(t,n)}build(t,n,r,o){rg(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return ug(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){AC(t,n,r,o)}}class VN extends T2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(so.has(n)){const r=hg(n);return r&&r.default||0}return n=SC.has(n)?n:Zm(n),t.getAttribute(n)}measureInstanceViewportBox(){return st()}scrapeMotionValuesFromProps(t,n){return EC(t,n)}build(t,n,r,o){og(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){CC(t,n,r,o)}mount(t){this.isSVGTag=sg(t.tagName),super.mount(t)}}const UN=(e,t)=>ng(e)?new VN(t,{enableHardwareAcceleration:!1}):new BN(t,{enableHardwareAcceleration:!0}),jN={layout:{ProjectionNode:C2,MeasureLayout:g2}},zN=F(F(F(F({},p6),M5),wN),jN),Sh=zM((e,t)=>A5(e,t,zN,UN)),Ch={width:10,height:10,borderRadius:"50%",backgroundColor:"#1d4ed8",margin:"0 5px"},WN=()=>be("div",{style:{display:"flex",alignItems:"center",height:"50px"},children:[z(Sh.div,{style:Ch,animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:.6,ease:"easeInOut",delay:0}}),z(Sh.div,{style:Ch,animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:.6,ease:"easeInOut",delay:.2}}),z(Sh.div,{style:Ch,animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:.6,ease:"easeInOut",delay:.4}})]}),QN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKLSURBVHgB7ZqBTcMwEAC/TMAGZAM6QpkAmIBsQDegTAAbNBsUJghMUDZwN2g3eP6VFFm209jJt7GFT7IitYn9p7ddxy5AJpPJZOJl5nsjIi7ock9lTqWgcmjLD5Vvvs5msx2kDokWVGr0g+8r+RlIkVZW4TDWyYmPkI1WvHMMU5APdNkYH++ofEIzbhkez7dUFtBPReU12nFOwu9GphSV6xP389jdpJbxP9CeqFaez/G4r5ITR3v8loHPpyU+VlirJw1xtMfjO4wgenG0J60aBIhWHJtZV2ePJ2bpAfXHJc5yjsZLECYqcbR/mkS6dUdb04tTxUtHgwWckQDxF5AGm269NxpawQXwFFfiCUB7thadvDza7xNXotJtgzhFlh1xVJeSrqbMshFL1zu63ISKkWTZiMclveh7NmRPq6LLk/YR72c9Qjg7iXfitgtvqeg97YvqvgMJOrI8lCUIwL3MUbfcUEO/30cf9iAAuleD81PPXEEYPyDDAQSg7uuqRzTDCsez7ctCQDxzR/03IAHab09MCROCzbpaR4EUjuzKVT4snmdHAtYgQWzZ7ZBlCpAgluxiMyu/dciuQIIYstuKvqD95nZk1H6b2Vg9VXY9RMVliymy6ynK34ms2PSG15fMrqcoU+M5dl7Qnqxkpn27nRDRBZwDdK9iRFZIWhvTi2rBmBt4Yt05KlEtKPOo5QNGEqWoFlxtBLGCgUQtqgWpjGBKCCQJUS1YNVQ4KdEjOOC4NEnRI+jeLyod9/FqbIl+/+WKT/QIuveLGNUGvvXIZPyiOmgfs4RSJyGqg+E7lZz1TXKiOti8E6seyRqbsTzJEYwv3icPTJu1Aox/09J2qdT2bSaTyWQy/4lfz/GuGzBe3RUAAAAASUVORK5CYII=",HN=()=>{var e,t,n;switch(((n=(t=(e=window==null?void 0:window.frappe)==null?void 0:e.get_route)==null?void 0:t.call(e))==null?void 0:n[0])||""){case"Form":return"doctype";case"List":return"doclist";case"Workspaces":return"workspace";default:return""}},R2=e=>no(t=>ct(Ft,null,function*(){var u,a,c,f;const n=new Headers;n.append("Content-Type","application/json"),n.append("x-frappe-csrf-token",(u=window==null?void 0:window.frappe)==null?void 0:u.csrf_token);const r=e?"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_public_trigger.create_new_conversation":"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.create_new_conversation";return(yield fetcher(r,{headers:n,body:JSON.stringify({message:t.message,route:window.location.pathname,page_name:((f=(c=(a=window==null?void 0:window.frappe)==null?void 0:a.get_route)==null?void 0:c.call(a))==null?void 0:f[1])||"",page_type:HN(),previous_session_id:t.session_id}),method:"POST"})).json()})),GN=({isPublic:e})=>{const{isPublicApp:t}=B.useContext(oo),n=Ht(x=>x.loading.isLoading),[r,o]=B.useState(""),{mutateAsync:u,isLoading:a}=oC(),{session_id:c}=Ht(x=>x.user),f=Ht(x=>x.chatArray),{mutateAsync:d,isLoading:p}=R2(t),m=x=>{o(()=>x.target.value)},g=a||p,w=B.useMemo(()=>{var A,C,T;if(!f.length)return!1;const x=f[f.length-1];return((A=x==null?void 0:x.author)==null?void 0:A.toLocaleLowerCase())==="user"||((C=x==null?void 0:x.status)==null?void 0:C.toLocaleLowerCase())!=="pending"?!1:((T=x==null?void 0:x.message_type)==null?void 0:T.toLocaleLowerCase())=="text"},[f]),E=w&&!g,P=()=>ct(Ft,null,function*(){g||r&&E&&c&&(o(()=>""),yield u({message:r,session_id:c}),o(()=>""))}),k=x=>{!x.shiftKey&&x.key==="Enter"&&P().catch()};return w?z("div",{className:"tw-flex tw-flex-col",children:be("div",{className:`tw-flex tw-mt-2 tw-h-[90px] tw-items-center tw-rounded-md tw-outline-none ${n||!E?"tw-opacity-50 tw-cursor-not-allowed":""}`,children:[z("div",{className:"tw-flex tw-flex-grow tw-p-3 tw-resize-none tw-text-base tw-text-black tw-h-full tw-shadow tw-bg-stone-50 tw-outline-none tw-rounded-[17px] tw-font-[inherit]",children:z("textarea",{className:"tw-max-h-auto tw-w-full tw-bg-transparent focus:tw-outline-none tw-outline-none tw-resize-none",placeholder:"Type your message here...",onChange:m,value:r,onKeyDown:k,disabled:n||!E})}),z("button",{className:" tw-mx-2 tw-p-2 tw-rounded-full tw-outline-none tw-bg-blue-700 tw-text-white",onClick:P,disabled:!r||!E,children:z("img",{src:QN,style:{filter:"brightness(0) invert(1)"},className:"tw-w-6",alt:"sendicon"})})]})}):z(Ir,{})},KN=({className:e=""})=>z("div",{className:"tw-flex tw-justify-center",children:z("output",{className:"tw-flex tw-justify-center tw-items-center tw-h-12 tw-w-12 "+e,children:be("svg",{"aria-hidden":"true",className:"tw-inline tw-w-8 tw-h-8 tw-text-gray-200 tw-animate-spin tw-fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[z("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),z("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})}),fc=(e,t=[],n=[])=>{try{if(t.find(o=>new RegExp(o).test(n.join("."))))return e;const r=typeof e=="string"&&(e.trim().startsWith("{")&&e.trim().endsWith("}")||e.trim().startsWith("[")&&e.trim().endsWith("]"))?JSON.parse(e):e;if(Array.isArray(r))return r.map(o=>fc(o,t,[...n,"_number__"]));if(typeof r=="object"&&r!==null){const o=Object.keys(r);for(let u=0;u<o.length;u++){const a=o[u];r[a]=fc(r[a],t,[...n,a])}}return r}catch(r){}return e},$N=e=>{const t="/api/method/nextai.core_handshake.initiate";return Vu(["initiate_handshake"],()=>{var n;return fetcher(t,{headers:{"X-Frappe-Csrf-Token":(n=window==null?void 0:window.frappe)==null?void 0:n.csrf_token}}).then(r=>{if(r.status===200)return r.json();throw new Error("No details found")}).then(r=>fc(r))},e)},k2=e=>{const t="/api/method/nextai.core_handshake.check";return Vu(["handshake_check"],()=>{var n;return window.fetcher(t,{headers:{"X-Frappe-Csrf-Token":(n=window==null?void 0:window.frappe)==null?void 0:n.csrf_token}}).then(r=>{if(r.status===200)return r.json();throw new Error("No details found")}).then(r=>fc(r))},e)},qN=()=>{const e=Pi(),{refetch:t}=$N({enabled:!1}),{refetch:n}=k2({enabled:!1});return be("div",{className:"tw-flex tw-items-center tw-p-4 tw-justify-between tw-w-auto",children:[be("span",{className:"tw-flex tw-items-center",children:[z("span",{className:"tw-flex tw-items-center tw-justify-center tw-min-h-[40px] tw-min-w-[40px] min tw-rounded-full tw-bg-gray-300 tw-text-gray-500 tw-text-sm",children:"🤖"}),z("p",{className:"tw-text-l tw-mx-4 tw-my-0 tw-word-break",children:"Please allow ChatNext to access your system."})]}),z("span",{children:z("button",{className:"tw-border tw-mx-2 tw-p-1 tw-border-gray-300 tw-rounded-md tw-outline-none tw-bg-slate-600 tw-text-white tw-cursor-pointer",onClick:()=>ct(Ft,null,function*(){const{data:o}=yield t();if(o!=null&&o.message){const{data:u}=yield n();u!=null&&u.message&&e(wl(!0))}}),children:"Allow"})})]})},O2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAyZSURBVHgB7VsLcFTVGf7OuXdf2YQ8SLKJRo0SUFDBNmIrUgHFlITHCLRSLHXGju2047RTlYrWMsXxOVLqWB/UaX0UFEEqKo9EQDCITNSpQBUKSpRAeeRBXiabfd17Tv+7DiHJ3nt3Q5IVmHyZze6e1z3nO//5///85ywwiEEMYhCDGMTZCoZvD6yoVDpbHHDqHeDMAWlXuKkCbVRFIslICkH502QKwh0jdUdKsSJRCI4CKbUCQB1CHUiTDKptA9L4049SvZfVRmXlkSoWQJKgYoCQM+q9VF448UYmQrfRtF/FnCnnK4Dr5JQwdurRcWfJKMCUYfT/+nAWsuh9CZKEfpWggmulR09HseSR3zDumEZJKeh/iPYActu2sEYkARz9A+YrbZujZck3SSbfJ3JuwcCQY4B7WMsEJAl9XmJDJ8uRDqd8hnE2nr46kQToSkhHknDaBGXPkGmqhnsYlwtIgNxIEqSUfq74PkKScFoE5U9uGym10BLGXaXJ9BRI2WtMykcaynktkoRej85XKm/ginyRql6EPkJKaPQWYAxhKW39IMPMfwWhLKl9h61GEtEbCWJ5pXI2qfUV9NHRi3pRIoiE46Q9PhFQKrVIpCqsOb5s+0FlKxZN0nAGI2EJ8pWF5jLuXMZ6RapsIYfwNSl4hWff9s01NZOCOMuQ0GBzp8pZnMmnEy1PijQCGXpUj7hfbdjsPICzGHElKPvGhhEOT/YuJODXGBaGMfFW0KPc2byateIcgK1E+GbKXBaWbyARp0+KwwLyrvr16hrEB88qkec7ncjXJW0/pNavppBpqqZyNKZUV9RUV5eF0AfYdsw3VX+SM/47xAGZn71hPTClqSLliFWZUaP2OBsvvGCWwr0zJedj6NG5lOwlBd4rhZ8QGAT972CkA2ni9lL/Vvr9HRvaKoecQC9hSVBuabCEK65yKqDABjTADamfY3Z1NTOdqbybZSFCuJ1amc8GbvsRH5J6weS6cPuhhY2VF+9PtJopQcXF0nEsX+6l7OGwfabcgtYv59ZuH94Qk7lI8tyPMVNleIrCGefjzEGdkHg62IrnWj9gzfEKm25Wj/j0H8UnB4d10THPlBxC3sdYTJZv1RlGjgEfZ3jYnSGX5UysT41XOEaC0qfKTA/wATl2oyxrSTToAjPrK9iOnllGcIxm6BXqxEyc4SCr+9+wv/mHTZVDLXVnjASlML3Ulpxow+HnzMjBRKkKIR5OlBxpbK7oFennl55gYJYxNsrpzXzVV9KWa1UmxsxLoZPHrNiN6oBQI0vNsnxe/TbOFFurp5F9SfVIlH0/IEcUCJmRqnOF9++GNxABjtUq2LHfiX01KjQbL4JIul46Uu+jj3eb5nf9kjclUAjFtYcqea0aJALn1Jarr/dMz5jSXOhR06uMLZtZPUHEjLgogrtm+zF+dDgqPcmAP8jw8jspWLYpBaGQNVFCD82oq3Cv65nefYlxZZItOVJvSJXK22Z5bjVjkRU5tGTx05IAVvyxBdddmTxyDHjdEnfe7McL97ag6DzrfTH5ewvzi4/GuCE9CFJvhi2Uf1VXxPo7hsdNivvHZjUMffCLqX4smNsGp5r0U5tOXFEYwbIHmpGfZRGM5OpYkZs9PSa5y2fGJPsurCGEri03bTsQmkdSEsO+ISkzrg3i1zSDZwJSSJqWzm+B02k2UQycO2/pmdpJUNb3ZBo5fpY+C+UdYkL91Kxlqaqm0uNySdw9tz26xOKCoW/ByQTrFvp03FHmhzDnaELWxCMFXZM6rZiag4uZ/VD21m1iMaKQOU1eQOedI2I6SB0ouyaI7DRhr3PIrOlv7QYO1Eeni40bBk4vKIkduIhdhyC3VdPOi1b+sBzwmy4Hy7Lf0cy9IYjXtnjR3BYz3KGqK/Uyeu/0i06ZeV3zQbHe3NPG7wuzdFekfRjU1Mye6cZKnzUhYE9OYzv0xRshj5+KjMi9xyDf2w/l7pvIH7A5CyBPVazZBbF2t6Fhv0n7vBb6Vqp77xQwIssKaV6BMcPDqNzpisljitvwAd89+f3UNDHVBxsIDaZbCql48om9mKnITZcYlm9/OiPWfdqNnG/6QW2SNIn37eNscn9td3JOIhiBWLoN8TDu8rB5BnMVdf3aSRDnGAI7KNxc03LF1C3IStfhsjsli+iQ+ywOJ2jQYlscgvYciyXnZF4tkd5qf3xfkKtFYyImjx7a7XuXz/ZqTlrmmy4iOi8zzCIsoRFBwbB1Pi0hW5UYton1G1LYbh/+dhpRKHNF3Y23UwRJ43qJHYSp5uNMbzZ7UiDIEY7YDNDlALtgqGU2uyQbtgrswixYHhSpKp2Fp8MOLW3clH8p0E2sOwnSIx31sAGJXrZZutDCR2k4Mc7joXoFja3ctkE+eSQRZWIYUl1QZhXDtj/ji8wVMc0/nz6aSLK3ggf+p5ouCSki3YxRZyuKknII9l0qMksVgfY91GqsMiH9/NlB+2gqu6oAygKyOIU5UYmC2wlWRMb0PjqwzUuzrWu4AUY5Po7CVl6yRm5HVGr4z68Dn/0d26rG5nXr7lgLZsQ/OHPs6tbHkx8yi5vS3XmZzWYWKVoXOOgPYKzZtZO8aZF1DOq0nulFBRpWP9gU34cz9iPtHVFLgTQPeo0A6TJDnw1JSch/qtrjxK+ezIjpl5CymjM25vh61nEyrbO15k+yWqlGg1Wj1NjFHoc2wiyPtiArzdK/IDHe+okLcaFQ6+ne0yPHgIfMZWZqws7l8xu85pPG2HtdyTHQrUUpxVbYgBSy6Wa2PuBeRfr069jywJ9eSsO+wwN2ka13IEF9ZEUqdu53mOUFuQi+0jO5O+WivQI2oEDa7UVFMlYkKplGU/IHszptAY75fxsSlaZvE7rO8OJGD1ZtSYmu5J6gnfgbx8s923umdyuqsCEfEskdlk9hak7bCMwyy3K317xKynp3TBV6Ha1TMe/hTGz82GW+SRxgBChodv/f07BkVZrFlTpBsTTlAZg4Dj2XIs8vo5AGV26FNb5QGquuOlI1LsZV9ZWErmAO5ybyL/LNKhq+X0G2jp/cFMCE0SH4MoThsiS22+8CYxQOxZppXTDycxhqKOxqWKsVmz2kPiwfEtREx/yGcu+zZpkxtXzT5VxygJdbHxhKw1d4sLbc9SBMGPdN0+YwqSynQVvaeMNoOWkqs4kgr0f0OsrhJHKW3tOCjLQej6eGdnzmxJrtbnp3oY3OVh2KfVvkGD5RW84WWOXH9o0ODfPysDvOyUZY6JhQV8E+NMv0lck7aJ0/A+Pa7wDAQ3GmdY82Rgk2YNC0l4Lzf16Vij1fOWyD9F1B9R7SPXiiYTVrtypj2lL+FG0eVGU5bBuXxzTOLjuxlpluUXLKAtcrcP6TcV6IfoZB0PrHGpGWIrHzgANPrfFiz5eORK28QUwj/XuqdgN7KF5Zc6p/SVJ0DLso83K7yhCRzeg4eOvxyktNLwXklzVfBJZhLMU59KR+u+hp6K2S4iCa2jk+IKdPTXSNGvf8hFgrFOXx+vWsKpEqlk1nlwYmqIp7S9zLC0A5edi32V3szi5pKFbVofczzgxve0CWnS1kdNtbqUeaF6vOzG09nUE7WHO/SPK8f+OvVOBOxHu+lJ9p4cYpJzbnHLMrd+H4lsxgWvpYzrTJ9OQrGVPzqfPkPst+PTkkMow4Sj2kVkPr7n1/h7LudG/m298PouMcHsYGKnU14vZKHNSl9vv6DufbUcfxHEH8K3iTjl7q8J63E4lcwSOWmNRe6IBjQeuG+FdLzgYkJNp5pbKUKXgTCesP0ajr/n9EIupzze+mHMZZjF5cA+64lXM3+TYsEwlDnhBSe5M2cesCjf4dX1elN+EsQ6+UY940eTuto+ftvGQLGHbkKJj4SIfyri4Cu0Ka52B7uLIJlefIRfKTyJ0aGaeAvU4HSH28OWZwJokc7ifCI/EKS6HXSKb/pW6DayWSiNMyr/lT20YKuJ/lTJ2EJCJ630pgYV05exxJQl/8D55Xpj/GGP9tf3rJCUD6I8j+eiNLij7ryy8ORW25skBTcKUUcj2SF+dhLq3hBiQJff5JZsNaVl1bzmeISPN0IukdSurTzfZEQOfnSVPs/fWbVVm3KWv98bGYSrGGyRK68fOFhPc7vYRQ1LRdSBL6dQ/UFb6S/3gVx+gbhQj9jCmua8hince6/hb89BCiCNDiuvVsIZKEASOoK3wl0iud2mgu2GUU+B9O6upiOpLNpRh3OvXAS0vTGaeXktGZFdn6VbXl6ktIIpJCkCkkWPHVUj18CVxaM5R4xcdo8FeeQ5vgQQxiEIMYxCAGHv8HN1XK6ib8sEsAAAAASUVORK5CYII=",YN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIABAMAAAAGVsnJAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABPaAAAT2gFqQZ8CAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAABVQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAPYbscQAAAAZ0Uk5TAARUp6v7ZOI89wAACnhJREFUeJzt3cmRG0cURdEWLdACBihCQQe00F4bGYAFHZAI/01Qz42hhszKP7ybX9gyKviS93DqBqqentZev/+6+kO41y9/9F/z7cdf9kOyXqefv3Vf8/3y7zQEfvn7cu695tuPy2UaAqfLpZvA98tlGgLPAC69BF4ATEPg9HKWTgIvAGYh8Aqgk8AbgEkInN7O0kXgDcAcBN4BdBH4ADAFgdPHWToIfACYgcAngA4CXwAmIHD6OkszgS8AfAJXAJoJXAPAEzhdn6WRwDUAOoEbAI0EbgHACZxuz9JE4BYAm8AdgCYC9wDQBE73Z2kgcA+ATOABQAOBRwBgAg8AGgg8AuASWACwS2AJAJbAAoBdAksAqAQWAewQWAYAJbAIYIfAMgAmgRUAmwTWACAJrADYJLAGgEhgFcAGgXUAQAKrADYIrAPgEdgAsEpgCwCOwAaAVQJbAGgENgGsENgGACOwCWCFwDYAFoEdAIsE9gCgCOwAWCSwB4BEYBfAAoF9ACACuwAWCOwD4BBoAPBAoAUAhkADgAcCLQAoBJoA3BFoAwAh0ATgjkAbAAaBRgA3BFoBIAg0Argh0AqAQKAZwBWBdgAAAs0Argi0A9An0AHgk0APAHkCHQA+CfQAUCfQBeCdQB8AcQJdAN4J9AHQJtAJ4JVALwBpAp0AXgn0AlAm0A3ghcCf3dfoEugGcLn8c+QiVQIHADzHPHaV5Otgy2kIHE05DYHDJSchcDzkJAQGOk5BYCTjFASGKk5AYCziBAQGG+IJjCbEExguCCcwHhBOwKAfmoBFPjQBk3pgAjbxwASM2mEJWKXDEjArByVgFw5KwLAbkoBlNiQB02pAArbRgASMm+EIWCfDETAvBiNgHwxGwKEXioBHLhQBl1ogAj6xQAScWmEIeKXCEHArBSHgFwpCwLETgoBnJgQB10oAAr6RAAScG8kT8E4kT8C9kDgB/0DiBAL6SBOIyCNNIKSOMIGYOMIEgtrIEohKI0sgrIwogbgwogQCu0gSiMwiSSC0iiCB2CiCBIKbyBGITiJHILyIGIH4IGIEEnpIEcjIIUUgpYYQgZwYQgSSWsgQyEohQyCthAiBvBAiBBI7SBDIzCBBILWCAIHcCAIEkhukE8hOkP3z5xdIHpAeIHtBOoDkCfkAkjcIAEgdoQAgdYUEgMQZGgASd4gASBuiAiBtiQyApCk6AJK2CAFIGaMEIGWNFICEOVoAEvaIAQgfpAYgfJEcgOBJegCCNwkCCB2lCCB0lSSAwFmaAAJ3iQIIG6YKIGyZLICgaboAgrYJAwgZpwwgZJ00gIB52gAC9okDcB+oDsB9oTwA54n6AJw3AgC4jiQAcF2JAOA4kwHAcScEgNtQCgC3pRgATlM5AJy2ggC4jCUBcFmLAuAwlwXAYS8MgPlgGgDzxTgAxpN5AIw3AwGYjiYCMF2NBGA4mwnAcDcUgNlwKgCz5VgARtO5AIy2gwGYjCcDMFmPBmAwnw3AYD8cwPAB6ACGT4AHMHgEPoDBM0wAYOgQMwAYOsUUAAaOMQeAgXNMAuDwQWYBcPgk0wA4eJR5ABwkMBGAYwT+7r9GFcAxAv0vXQCHCPS/dAHEEFAGEEJAGUAEAW0AAQS0AfgTUAfgTkAdgDcBfQDOBPQB+BIgAHAlQADgSYABwJEAA4AfAQoANwIUAF4EOACcCHAA+BAgAXAhQALgQYAFwIEAC4A9ARoAcwI0ANYEeACMCfAA2BIgAjAlQARgSYAJwJAAE4AdASoAMwJUAFYEuACMCHAB2BAgAzAhQAZgQYANwIAAG8A4ATqAYQJ0AKME+AAGCfABjBGYAcAQgRkAjBCYA8AAgTkAHCcwC4DDBGYBcJTAPAAOEpgHwDECMwH4/xeg+m+B8n8IVv9rsPw/hKr/U7j8f4aq/3e4/BdEqn9JrPwXRat/Wbz8N0aqf2us/DdHq397vPwbJKq/Rab8m6Sqv02u/Bslq79Vtvybpau/Xb78Byaqf2Sm/Iemqn9srvwHJ6t/dLb8h6erf3y+/A0Uqt9Co/xNVKrfRqf8jZSq30qr/M3Uqt9Or/wNFavfUrP8TVWr31a3/I2Vq99au/zN1avfXr/8AxaqP2Kj/ENWqj9mp/yDlqo/aqv8w9aqP26v/AMXqz9ys/xDV6s/drf8g5erP3q7/MPXB0+AJzB8ADqB4f1wAgbz2QQM1qMJmIwnEzDZDiZgNJ1LwGg5loDZcCoBs91QAoazmQQMVyMJmI4mEjDdDCRgPJlHwHgxjoD5YBoB870wAg5zWQQc1qIIuIwlEXDZCiLgNJVDwGkphoDbUAoBt50QAo4zGQQcVyIIuI4kEHDdCCDgPFGfgPNCeQLuA9UJuO8TJxAwT5tAwDppAiHjlAmEbBMmEDRNl0DQMlkCYcNUCYTtEiUQOEuTQOAqSQKhoxQJhG4SJBA8SY9A8CI5AuGD1AiE7xEjkDBHi0DCGikCKWOUCKRsESKQNEWHQNISGQJpQ1QIpO0QIZA4Q4NA4goJAqkjFAikbhAgkDwhn0DygnQC6QOyCWT//NkF0gFkJ0gHkNxAAEBuBAEAqRUkAGRmkACQ2EEEQF4IEQBpJWQAZKWQAZDUQghATgwhACk1pABk5JACkNBDDEB8EDEA4UXkAEQnkQMQ3EQQQGwUQQChVSQBRGaRBBDYRRRAXBhRAGFlZAFEpZEFENRGGEBMHGEAIXWkAUTkkQYQ0EccgH8gcQDuheQBeCeSB+DcCADANxIAgGslBADPTAgAjp0gAPxCQQC4lcIA8EqFAeDUCgTAJxYIgEstFACPXCgADr1gAOyDwQCYF8MBsE6GA2DcDAjANhoQgGk1JADLbEgAht2gAOzCQQGYlcMCsEqHBWDUDgzAJh4YgEk9NACLfGgABv3gAMYDwgEMF8QDGE2IBzDYcAIAYxEnADBUcQoAIxmnADDQcRIAx0NOAuBwyWkAHE05DYCjLf88cpHo60DMf56+d1+jCuAQgfPTtx+918gCOEDg529P3QR0ARwgcH6+qJeAMIBuAi8AegkoA+gmcH69qI+ANIBOAm8A+ghoA+gkcH6/qIeAOIAuAh8AegioA+gicP68qJ2APIAOAl8A2gnoA+ggcL66qJUAAEAzgWsArQQIAJoJnG8uaiOAANBI4BZAGwEGgEYC57uLWghAADQRuAfQQoACoInAPYAWAhgADQQeAewT4ABoIPAIYJ8ACMAugSUAewRIAHYJLAHYI4ACsENgGcA2ARaAHQLLALYJwABsElgDsEWABmCTwBqALQI4ABsE1gGsE+AB2CCwDmCdABDAKoEtAGsEiABWCWwBWCOABLBCYBvAMgEmgBUC2wCWCUABLBLYA7BEgApgkcAegCUCWAALBPYBPBLgAlggsA/gkQAYwAOBFgD3BMgAHgi0ALgngAZwR6ANwC0BNoA7Am0AbgnAAdwQaAVwTYAO4IZAK4BrAngAVwTaAXwR4AO4ItAO4IvABAA+CfQA+CAwA4BPAj0APghMAeCdQB+ANwJzAHgn0AfgjcAkAF4J9AJ4ITALgFcCvQBeCEwD4JlAP4Cnp9+nAfBM4I/VH/oPjXuGAChg6qwAAAAASUVORK5CYII=",JN=()=>no({mutationFn:t=>ct(Ft,[t],function*({trigger_id:e}){var o;const n=new Headers;return n.append("Content-Type","application/json"),n.append("x-frappe-csrf-token",(o=window==null?void 0:window.frappe)==null?void 0:o.csrf_token),(yield fetcher("/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_public_trigger.link_trigger",{headers:n,body:JSON.stringify({trigger_id:e}),method:"POST"})).json()})}),jw=e=>{var m;const{isPublicApp:t}=B.useContext(oo),n=Ht(g=>g.loading.isSubmitting),{isLoadingChat:r,isAuthenticated:o,messageBoxRef:u,chatArray:a,isPublic:c,onClose:f}=e;B.useEffect(()=>{const g=new CustomEvent("chatnext:modal:chat:open");return document.dispatchEvent(g),()=>{const w=new CustomEvent("chatnext:modal:chat:close");document.dispatchEvent(w)}},[]);const d=[...a].reverse().find(g=>{var w;return((w=g.message_type)==null?void 0:w.toLocaleLowerCase())!=="loader"}),p=((m=d==null?void 0:d.author)==null?void 0:m.toLocaleLowerCase())!=="bot"&&!!d;return z("div",{className:os("tw-relative tw-mx-auto tw-w-full tw-h-full",!c&&"md:tw-w-4/5 md:tw-h-4/5"),children:be("div",{className:"tw-rounded-lg tw-h-full tw-border-0 tw-shadow-lg tw-relative tw-flex tw-flex-col tw-w-full tw-bg-white tw-outline-none focus:tw-outline-none",children:[be("div",{className:"tw-rounded-t-lg tw-bg-white tw-border-b-zinc-300 tw-border tw-flex tw-justify-between tw-items-center",children:[be("div",{className:"tw-h-full tw-flex tw-justify-center tw-items-center tw-p-3",children:[z("img",{className:"tw-w-9 tw-h-9",src:O2,alt:"chatnextlogo"}),z("span",{className:"tw-text-blue-700 tw-text-xl tw-font-bold",children:"ChatNext"})]}),!c&&z("button",{className:os("tw-ml-3 mr-3 tw-bg-transparent",n?"tw-cursor-not-allowed":"tw-cursor-pointer"),style:n?{opacity:.3}:void 0,onClick:f,disabled:n,children:z("img",{className:"tw-w-5 tw-h-5",src:YN,alt:"headerIcon"})})]}),r?z(KN,{}):z(Ir,{children:o||c||t?be("div",{className:"tw-pt-0 tw-pl-4 tw-pr-4 tw-pb-6 tw-flex tw-flex-auto tw-flex-col tw-overflow-x-hidden tw-overflow-y-hidden tw-flex-grow",children:[be("div",{className:"tw-grow tw-flex-col tw-overflow-y-auto tw-overflow-x-hidden custom-chatnext-scrollbar",ref:u,children:[a.map((g,w)=>z(bM,{cna_conversation:g,is_last:a.length-1===w},`${g.id}-${g.status}`)),p&&z(WN,{})]}),z(GN,{isPublic:c})]}):z(qN,{})})]})})},b2=()=>{const e=Ht(E=>E.chatButton.isOpen),t=Ht(E=>E.chatArray),{isAuthenticated:n,session_id:r}=Ht(E=>E.user),{isPublicTrigger:o,isPublicApp:u}=B.useContext(oo),a=B.useRef(null),{mutateAsync:c}=JN(),f=Pi(),[d,p]=B.useState(!0),{data:m}=iC({session_id:r!=null?r:""},{enabled:!!r&&(e||o),refetchInterval:1e3}),{refetch:g}=k2({enabled:!(o||u)}),w=()=>{f(Gm())};return B.useEffect(()=>{var A;if(!o)return;const E=window.location,P=(A=E==null?void 0:E.search)==null?void 0:A.slice(1),k=new URLSearchParams(P),x={};for(const[C,T]of k.entries())x[C]=T;x!=null&&x.trigger&&c({trigger_id:x.trigger}).then(C=>{var T,L,I;(T=C==null?void 0:C.message)!=null&&T.session&&(console.log({new_session_id:(L=C==null?void 0:C.message)==null?void 0:L.session}),f(Ru((I=C==null?void 0:C.message)==null?void 0:I.session)))})},[f,o,c]),B.useEffect(()=>{const E=a==null?void 0:a.current;if(!E)return;const P=E.lastElementChild;if(!P)return;const k=P.offsetTop-E.clientHeight/2;E.scroll({top:k,behavior:"smooth"})},[t.length]),B.useEffect(()=>{if(m!=null&&m.length){const E=m.map(P=>q(F({},P),{author_image:"",timestamp:new Date(P.creation).toISOString()}));f(US(E))}},[m,f]),B.useEffect(()=>{o?p(!1):(()=>ct(Ft,null,function*(){if(u){f(wl(!1));return}const{data:P}=yield g({});P!=null&&P.message?f(wl(!0)):f(wl(!1))}))().finally(()=>p(!1))},[o]),B.useEffect(()=>{window.trigger_chatnext_assistant=(E,P)=>{E&&(f(Ru(P||"")),f(vl()))}},[]),o?z("div",{className:"tw-absolute tw-w-screen tw-h-screen tw-flex tw-flex-col tw-justify-center tw-items-center tw-inset-0",children:z(jw,{isLoadingChat:d,isAuthenticated:n,messageBoxRef:a,chatArray:t,isPublic:o})}):z(Ir,{children:e&&be(Ir,{children:[z("div",{className:"tw-fixed tw-w-screen tw-h-screen tw-flex tw-flex-col tw-justify-center tw-items-center tw-inset-0",id:"modalId01",style:{zIndex:99999},children:z(jw,{isLoadingChat:d,isAuthenticated:n,messageBoxRef:a,chatArray:t,onClose:w})}),z("div",{className:"tw-opacity-25 tw-fixed tw-inset-0 tw-z-[9999] tw-bg-black"})]})})},XN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAjCAYAAADxG9hnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAZuSURBVHgB1VhLaFRXGD73MZPJy7x8ICYqNiiaRKW6SGxFYxa26EZaY+1CobjItrar1oVS0l1DN6UtdOPCBkxSXCgUIaK0JQW1aKkGxYI1Yggx5v2amXtvv+/knJuTm5lRoxt/+Ln3zj2P737/f77znxHiTbUgCKTDLO36GVdLNQvvjd9ey+RywtOnT9u40h24u2PHjhiuMV7pe/fudQ8fPuyoNovALAmU2ZmuJuDEcXgCXrBq1apCXIvghcoL1Ls4QRGQAm8pJrMCsXIBgck2+FpndHTUnpycdFKplPP06VOCcoqKiuyJiQnZvri4mPEJHMfxbNv2nz17lsazh77+hg0b/PPnz/sYL1DjBtH53Ews8JatwYJ1584d5+bNm5oNtncPHTr0bn5+fl1eXl4Nmi2j+77fNz093Ts+Pv77pUuX/ka7dHl5efrJkydp9E83NzfrcX3xPEYUkODMmTOS0urqaufBgwduSUlJ3PO82IEDBz4GC82u6zaIHIZx+gCorb29/Wc8JuEpAlNONvysQAzK+Bvj6q5YsSI2Ozsb37ZtW/XGjRu/fR6ATIDu3bv3wbVr1/7FWEl8UKqystK7evWqp1aa0GEyQ6NBWBrE4OBgfP/+/W+vW7eui/SLlzT0qdq0aVMXWPwE4fqLv8XjcclINE9szYYGwcTE1QGI2J49e95aKggTzJo1a7p2795dzTGHh4f58Y6IpIUb7cfELCsrY0gSCMcvmUAUFBQIJKKoqqoKf+vr6xOPHz/OBmbZ5s2bO5E3TY8ePRoQczlCDxYBYYKADZtAgDp27Nixz7EMK6MA9u3bJ533phFIa2uryMVMbW1ty61bt76G/ngDAwOeAiOV2lWNAixV+/r161Ixt27dWoGl2RwFcfLkSYFkE/fv3xc9PT1iaGgofJ+NjcgYJ5D4P96+fZuscAXZAOFRr1yFyGpsbLQePnwo5Rs0vh9lA0AlCAiTuHLlShgezQzfaZuamsoIjCGqq6s7AiDfrV692kEie9acyglXixiWlExWKKRdWFj4njnA9u3bRUNDg7h48aIEwWeEblF4TCNjHR0dEpRpWDXvYI7v+/v7LfocPst3De2Q+gGFhEo7C9ggCA5IIBUVFaKlpUWGhROZ4TGBM49oZ8+eXfAOY9cgaW1jTmm2Zg0qaoFq+RJhqTE7c3JNNUHR2traZK7wmWB4z/Do8JERvouypkJuL1++fIGY2lrhaNioBDY2ETXsK+GXExSNz1jecjJeaQcPHhRNTU3he903l2ErkYvFVTuswJ4ikw/6wR1yLKofOhm5TDk5J2WoTP3g8sXGJ1nQTEVDx7GRg/Lrt2zZIoHQFkg84kfp9blH4BqGB1kuY042mKy7du2SQDQT2giM+VFfXy/BRPODhs3zLlgP8D5QwLjJhTkiawlIcID6wk8mkz1m5+7ubnk9fvy4vDI/mAOcjOC08z10QjKk20QtnU7/QzzYQKWYhUWPQsVnB/THMEgC9UbjypUru8wBGHtqCZQx62p5EYOifgip6MZGOIu5UkrQAlNZA0zgI5vTly9f/uPo0aM9CFWDyQoTjyEh/VwlJhjmCsOWyxjyCxcu/IY5vEQi4SM/fJ2jjmpjsYICUuqFjXLQXrt2bT+LIHMgLe0MCQYTNTU1cuOjo4+4ceNGTiBYlZ/ehbEuwebHuiRcsjo0OlasylysoDzcJxDzViA/IV6DzczM/ITk/QK30/AUIpCG3niaEZms6iEAVQErKDFX2s2i4ylkeY94ReMYnZ2dp8Rc2cjxPaSBVHS9xZjFib6XGx82JReaEB8ZGSEzXy2VGehSBxL8S/igmK9ffb3rRieXZhwh9CEqhiLJRX2Sh+Rl4fxZdFfOZhQu6MU3586d+6G0tDSJD0qh3knyaEE2gjlJDzSYTOeakBkon4PccqC4MSRjDJtVDIA+QrIegQ7UZwKAMPyJhP8Vedbe29s7hD5kIY2xPIwVFkPCqM6yAVkARrODqsqB0LmYyBkbG4vt3LmzFPlUSxaxzAWEcBQa8R9UeFTMHx20e2LhMSLrQWuRGQW1bRw3E8idAlT4PGaWwEvh5fAy3iOM/K1YGEdPuD4PL+3ca57sxfwB3FVn2jiWed769es5Wb5y3nPZ63OvPIyrfq9ukb8aeDX/EXDU18qJ9b8FBpvCLDNy2UvRFa55pTsZ+gf62GouzTfK/gem2mK7tBpFOQAAAABJRU5ErkJggg==";var dc={exports:{}};/**
77
76
  * @license
78
77
  * Lodash <https://lodash.com/>
79
78
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
80
79
  * Released under MIT license <https://lodash.com/license>
81
80
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
82
81
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
83
- */fc.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",m=1,g=2,x=4,E=1,P=2,R=1,w=2,A=4,C=8,k=16,b=32,I=64,N=128,D=256,$=512,G=30,le="...",Ge=800,ot=16,wt=1,_e=2,ye=3,ze=1/0,H=9007199254740991,ee=17976931348623157e292,se=0/0,me=4294967295,Fe=me-1,Se=me>>>1,xt=[["ary",N],["bind",R],["bindKey",w],["curry",C],["curryRight",k],["flip",$],["partial",b],["partialRight",I],["rearg",D]],kt="[object Arguments]",ht="[object Array]",Kt="[object AsyncFunction]",$t="[object Boolean]",X="[object Date]",ce="[object DOMException]",Ce="[object Error]",Ee="[object Function]",te="[object GeneratorFunction]",pe="[object Map]",Ie="[object Number]",pt="[object Null]",At="[object Object]",tr="[object Promise]",uo="[object Proxy]",_i="[object RegExp]",jn="[object Set]",ds="[object String]",Qu="[object Symbol]",N2="[object Undefined]",hs="[object WeakMap]",F2="[object WeakSet]",ps="[object ArrayBuffer]",ao="[object DataView]",sf="[object Float32Array]",uf="[object Float64Array]",af="[object Int8Array]",lf="[object Int16Array]",cf="[object Int32Array]",ff="[object Uint8Array]",df="[object Uint8ClampedArray]",hf="[object Uint16Array]",pf="[object Uint32Array]",B2=/\b__p \+= '';/g,V2=/\b(__p \+=) '' \+/g,U2=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wg=/&(?:amp|lt|gt|quot|#39);/g,xg=/[&<>"']/g,j2=RegExp(wg.source),z2=RegExp(xg.source),W2=/<%-([\s\S]+?)%>/g,Q2=/<%([\s\S]+?)%>/g,Ag=/<%=([\s\S]+?)%>/g,H2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G2=/^\w*$/,K2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mf=/[\\^$.*+?()[\]{}|]/g,$2=RegExp(mf.source),gf=/^\s+/,q2=/\s/,Y2=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J2=/\{\n\/\* \[wrapped with (.+)\] \*/,X2=/,? & /,Z2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eE=/[()=,{}\[\]\/\s]/,tE=/\\(\\)?/g,nE=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sg=/\w*$/,rE=/^[-+]0x[0-9a-f]+$/i,iE=/^0b[01]+$/i,oE=/^\[object .+?Constructor\]$/,sE=/^0o[0-7]+$/i,uE=/^(?:0|[1-9]\d*)$/,aE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hu=/($^)/,lE=/['\n\r\u2028\u2029\\]/g,Gu="\\ud800-\\udfff",cE="\\u0300-\\u036f",fE="\\ufe20-\\ufe2f",dE="\\u20d0-\\u20ff",Cg=cE+fE+dE,Eg="\\u2700-\\u27bf",Pg="a-z\\xdf-\\xf6\\xf8-\\xff",hE="\\xac\\xb1\\xd7\\xf7",pE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mE="\\u2000-\\u206f",gE=" \\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",_g="A-Z\\xc0-\\xd6\\xd8-\\xde",Tg="\\ufe0e\\ufe0f",kg=hE+pE+mE+gE,yf="['’]",yE="["+Gu+"]",Rg="["+kg+"]",Ku="["+Cg+"]",Og="\\d+",vE="["+Eg+"]",Lg="["+Pg+"]",bg="[^"+Gu+kg+Og+Eg+Pg+_g+"]",vf="\\ud83c[\\udffb-\\udfff]",wE="(?:"+Ku+"|"+vf+")",Ig="[^"+Gu+"]",wf="(?:\\ud83c[\\udde6-\\uddff]){2}",xf="[\\ud800-\\udbff][\\udc00-\\udfff]",lo="["+_g+"]",Mg="\\u200d",Dg="(?:"+Lg+"|"+bg+")",xE="(?:"+lo+"|"+bg+")",Ng="(?:"+yf+"(?:d|ll|m|re|s|t|ve))?",Fg="(?:"+yf+"(?:D|LL|M|RE|S|T|VE))?",Bg=wE+"?",Vg="["+Tg+"]?",AE="(?:"+Mg+"(?:"+[Ig,wf,xf].join("|")+")"+Vg+Bg+")*",SE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",CE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ug=Vg+Bg+AE,EE="(?:"+[vE,wf,xf].join("|")+")"+Ug,PE="(?:"+[Ig+Ku+"?",Ku,wf,xf,yE].join("|")+")",_E=RegExp(yf,"g"),TE=RegExp(Ku,"g"),Af=RegExp(vf+"(?="+vf+")|"+PE+Ug,"g"),kE=RegExp([lo+"?"+Lg+"+"+Ng+"(?="+[Rg,lo,"$"].join("|")+")",xE+"+"+Fg+"(?="+[Rg,lo+Dg,"$"].join("|")+")",lo+"?"+Dg+"+"+Ng,lo+"+"+Fg,CE,SE,Og,EE].join("|"),"g"),RE=RegExp("["+Mg+Gu+Cg+Tg+"]"),OE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,LE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],bE=-1,Be={};Be[sf]=Be[uf]=Be[af]=Be[lf]=Be[cf]=Be[ff]=Be[df]=Be[hf]=Be[pf]=!0,Be[kt]=Be[ht]=Be[ps]=Be[$t]=Be[ao]=Be[X]=Be[Ce]=Be[Ee]=Be[pe]=Be[Ie]=Be[At]=Be[_i]=Be[jn]=Be[ds]=Be[hs]=!1;var Me={};Me[kt]=Me[ht]=Me[ps]=Me[ao]=Me[$t]=Me[X]=Me[sf]=Me[uf]=Me[af]=Me[lf]=Me[cf]=Me[pe]=Me[Ie]=Me[At]=Me[_i]=Me[jn]=Me[ds]=Me[Qu]=Me[ff]=Me[df]=Me[hf]=Me[pf]=!0,Me[Ce]=Me[Ee]=Me[hs]=!1;var IE={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ME={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},DE={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},NE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},FE=parseFloat,BE=parseInt,jg=typeof Os=="object"&&Os&&Os.Object===Object&&Os,VE=typeof self=="object"&&self&&self.Object===Object&&self,St=jg||VE||Function("return this")(),Sf=t&&!t.nodeType&&t,Ti=Sf&&!0&&e&&!e.nodeType&&e,zg=Ti&&Ti.exports===Sf,Cf=zg&&jg.process,Cn=function(){try{var O=Ti&&Ti.require&&Ti.require("util").types;return O||Cf&&Cf.binding&&Cf.binding("util")}catch(V){}}(),Wg=Cn&&Cn.isArrayBuffer,Qg=Cn&&Cn.isDate,Hg=Cn&&Cn.isMap,Gg=Cn&&Cn.isRegExp,Kg=Cn&&Cn.isSet,$g=Cn&&Cn.isTypedArray;function un(O,V,M){switch(M.length){case 0:return O.call(V);case 1:return O.call(V,M[0]);case 2:return O.call(V,M[0],M[1]);case 3:return O.call(V,M[0],M[1],M[2])}return O.apply(V,M)}function UE(O,V,M,Y){for(var ue=-1,Pe=O==null?0:O.length;++ue<Pe;){var at=O[ue];V(Y,at,M(at),O)}return Y}function En(O,V){for(var M=-1,Y=O==null?0:O.length;++M<Y&&V(O[M],M,O)!==!1;);return O}function jE(O,V){for(var M=O==null?0:O.length;M--&&V(O[M],M,O)!==!1;);return O}function qg(O,V){for(var M=-1,Y=O==null?0:O.length;++M<Y;)if(!V(O[M],M,O))return!1;return!0}function Fr(O,V){for(var M=-1,Y=O==null?0:O.length,ue=0,Pe=[];++M<Y;){var at=O[M];V(at,M,O)&&(Pe[ue++]=at)}return Pe}function $u(O,V){var M=O==null?0:O.length;return!!M&&co(O,V,0)>-1}function Ef(O,V,M){for(var Y=-1,ue=O==null?0:O.length;++Y<ue;)if(M(V,O[Y]))return!0;return!1}function We(O,V){for(var M=-1,Y=O==null?0:O.length,ue=Array(Y);++M<Y;)ue[M]=V(O[M],M,O);return ue}function Br(O,V){for(var M=-1,Y=V.length,ue=O.length;++M<Y;)O[ue+M]=V[M];return O}function Pf(O,V,M,Y){var ue=-1,Pe=O==null?0:O.length;for(Y&&Pe&&(M=O[++ue]);++ue<Pe;)M=V(M,O[ue],ue,O);return M}function zE(O,V,M,Y){var ue=O==null?0:O.length;for(Y&&ue&&(M=O[--ue]);ue--;)M=V(M,O[ue],ue,O);return M}function _f(O,V){for(var M=-1,Y=O==null?0:O.length;++M<Y;)if(V(O[M],M,O))return!0;return!1}var WE=Tf("length");function QE(O){return O.split("")}function HE(O){return O.match(Z2)||[]}function Yg(O,V,M){var Y;return M(O,function(ue,Pe,at){if(V(ue,Pe,at))return Y=Pe,!1}),Y}function qu(O,V,M,Y){for(var ue=O.length,Pe=M+(Y?1:-1);Y?Pe--:++Pe<ue;)if(V(O[Pe],Pe,O))return Pe;return-1}function co(O,V,M){return V===V?rP(O,V,M):qu(O,Jg,M)}function GE(O,V,M,Y){for(var ue=M-1,Pe=O.length;++ue<Pe;)if(Y(O[ue],V))return ue;return-1}function Jg(O){return O!==O}function Xg(O,V){var M=O==null?0:O.length;return M?Rf(O,V)/M:se}function Tf(O){return function(V){return V==null?n:V[O]}}function kf(O){return function(V){return O==null?n:O[V]}}function Zg(O,V,M,Y,ue){return ue(O,function(Pe,at,be){M=Y?(Y=!1,Pe):V(M,Pe,at,be)}),M}function KE(O,V){var M=O.length;for(O.sort(V);M--;)O[M]=O[M].value;return O}function Rf(O,V){for(var M,Y=-1,ue=O.length;++Y<ue;){var Pe=V(O[Y]);Pe!==n&&(M=M===n?Pe:M+Pe)}return M}function Of(O,V){for(var M=-1,Y=Array(O);++M<O;)Y[M]=V(M);return Y}function $E(O,V){return We(V,function(M){return[M,O[M]]})}function e0(O){return O&&O.slice(0,i0(O)+1).replace(gf,"")}function an(O){return function(V){return O(V)}}function Lf(O,V){return We(V,function(M){return O[M]})}function ms(O,V){return O.has(V)}function t0(O,V){for(var M=-1,Y=O.length;++M<Y&&co(V,O[M],0)>-1;);return M}function n0(O,V){for(var M=O.length;M--&&co(V,O[M],0)>-1;);return M}function qE(O,V){for(var M=O.length,Y=0;M--;)O[M]===V&&++Y;return Y}var YE=kf(IE),JE=kf(ME);function XE(O){return"\\"+NE[O]}function ZE(O,V){return O==null?n:O[V]}function fo(O){return RE.test(O)}function eP(O){return OE.test(O)}function tP(O){for(var V,M=[];!(V=O.next()).done;)M.push(V.value);return M}function bf(O){var V=-1,M=Array(O.size);return O.forEach(function(Y,ue){M[++V]=[ue,Y]}),M}function r0(O,V){return function(M){return O(V(M))}}function Vr(O,V){for(var M=-1,Y=O.length,ue=0,Pe=[];++M<Y;){var at=O[M];(at===V||at===p)&&(O[M]=p,Pe[ue++]=M)}return Pe}function Yu(O){var V=-1,M=Array(O.size);return O.forEach(function(Y){M[++V]=Y}),M}function nP(O){var V=-1,M=Array(O.size);return O.forEach(function(Y){M[++V]=[Y,Y]}),M}function rP(O,V,M){for(var Y=M-1,ue=O.length;++Y<ue;)if(O[Y]===V)return Y;return-1}function iP(O,V,M){for(var Y=M+1;Y--;)if(O[Y]===V)return Y;return Y}function ho(O){return fo(O)?sP(O):WE(O)}function zn(O){return fo(O)?uP(O):QE(O)}function i0(O){for(var V=O.length;V--&&q2.test(O.charAt(V)););return V}var oP=kf(DE);function sP(O){for(var V=Af.lastIndex=0;Af.test(O);)++V;return V}function uP(O){return O.match(Af)||[]}function aP(O){return O.match(kE)||[]}var lP=function O(V){V=V==null?St:po.defaults(St.Object(),V,po.pick(St,LE));var M=V.Array,Y=V.Date,ue=V.Error,Pe=V.Function,at=V.Math,be=V.Object,If=V.RegExp,cP=V.String,Pn=V.TypeError,Ju=M.prototype,fP=Pe.prototype,mo=be.prototype,Xu=V["__core-js_shared__"],Zu=fP.toString,ke=mo.hasOwnProperty,dP=0,o0=function(){var i=/[^.]+$/.exec(Xu&&Xu.keys&&Xu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),ea=mo.toString,hP=Zu.call(be),pP=St._,mP=If("^"+Zu.call(ke).replace(mf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ta=zg?V.Buffer:n,Ur=V.Symbol,na=V.Uint8Array,s0=ta?ta.allocUnsafe:n,ra=r0(be.getPrototypeOf,be),u0=be.create,a0=mo.propertyIsEnumerable,ia=Ju.splice,l0=Ur?Ur.isConcatSpreadable:n,gs=Ur?Ur.iterator:n,ki=Ur?Ur.toStringTag:n,oa=function(){try{var i=Ii(be,"defineProperty");return i({},"",{}),i}catch(s){}}(),gP=V.clearTimeout!==St.clearTimeout&&V.clearTimeout,yP=Y&&Y.now!==St.Date.now&&Y.now,vP=V.setTimeout!==St.setTimeout&&V.setTimeout,sa=at.ceil,ua=at.floor,Mf=be.getOwnPropertySymbols,wP=ta?ta.isBuffer:n,c0=V.isFinite,xP=Ju.join,AP=r0(be.keys,be),lt=at.max,Rt=at.min,SP=Y.now,CP=V.parseInt,f0=at.random,EP=Ju.reverse,Df=Ii(V,"DataView"),ys=Ii(V,"Map"),Nf=Ii(V,"Promise"),go=Ii(V,"Set"),vs=Ii(V,"WeakMap"),ws=Ii(be,"create"),aa=vs&&new vs,yo={},PP=Mi(Df),_P=Mi(ys),TP=Mi(Nf),kP=Mi(go),RP=Mi(vs),la=Ur?Ur.prototype:n,xs=la?la.valueOf:n,d0=la?la.toString:n;function v(i){if(Xe(i)&&!ae(i)&&!(i instanceof ve)){if(i instanceof _n)return i;if(ke.call(i,"__wrapped__"))return hy(i)}return new _n(i)}var vo=function(){function i(){}return function(s){if(!Ke(s))return{};if(u0)return u0(s);i.prototype=s;var l=new i;return i.prototype=n,l}}();function ca(){}function _n(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=n}v.templateSettings={escape:W2,evaluate:Q2,interpolate:Ag,variable:"",imports:{_:v}},v.prototype=ca.prototype,v.prototype.constructor=v,_n.prototype=vo(ca.prototype),_n.prototype.constructor=_n;function ve(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=me,this.__views__=[]}function OP(){var i=new ve(this.__wrapped__);return i.__actions__=qt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=qt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=qt(this.__views__),i}function LP(){if(this.__filtered__){var i=new ve(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function bP(){var i=this.__wrapped__.value(),s=this.__dir__,l=ae(i),h=s<0,y=l?i.length:0,S=Q_(0,y,this.__views__),_=S.start,T=S.end,L=T-_,U=h?T:_-1,j=this.__iteratees__,W=j.length,K=0,Z=Rt(L,this.__takeCount__);if(!l||!h&&y==L&&Z==L)return N0(i,this.__actions__);var re=[];e:for(;L--&&K<Z;){U+=s;for(var de=-1,ie=i[U];++de<W;){var ge=j[de],xe=ge.iteratee,fn=ge.type,jt=xe(ie);if(fn==_e)ie=jt;else if(!jt){if(fn==wt)continue e;break e}}re[K++]=ie}return re}ve.prototype=vo(ca.prototype),ve.prototype.constructor=ve;function Ri(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function IP(){this.__data__=ws?ws(null):{},this.size=0}function MP(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function DP(i){var s=this.__data__;if(ws){var l=s[i];return l===f?n:l}return ke.call(s,i)?s[i]:n}function NP(i){var s=this.__data__;return ws?s[i]!==n:ke.call(s,i)}function FP(i,s){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=ws&&s===n?f:s,this}Ri.prototype.clear=IP,Ri.prototype.delete=MP,Ri.prototype.get=DP,Ri.prototype.has=NP,Ri.prototype.set=FP;function dr(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function BP(){this.__data__=[],this.size=0}function VP(i){var s=this.__data__,l=fa(s,i);if(l<0)return!1;var h=s.length-1;return l==h?s.pop():ia.call(s,l,1),--this.size,!0}function UP(i){var s=this.__data__,l=fa(s,i);return l<0?n:s[l][1]}function jP(i){return fa(this.__data__,i)>-1}function zP(i,s){var l=this.__data__,h=fa(l,i);return h<0?(++this.size,l.push([i,s])):l[h][1]=s,this}dr.prototype.clear=BP,dr.prototype.delete=VP,dr.prototype.get=UP,dr.prototype.has=jP,dr.prototype.set=zP;function hr(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function WP(){this.size=0,this.__data__={hash:new Ri,map:new(ys||dr),string:new Ri}}function QP(i){var s=Ca(this,i).delete(i);return this.size-=s?1:0,s}function HP(i){return Ca(this,i).get(i)}function GP(i){return Ca(this,i).has(i)}function KP(i,s){var l=Ca(this,i),h=l.size;return l.set(i,s),this.size+=l.size==h?0:1,this}hr.prototype.clear=WP,hr.prototype.delete=QP,hr.prototype.get=HP,hr.prototype.has=GP,hr.prototype.set=KP;function Oi(i){var s=-1,l=i==null?0:i.length;for(this.__data__=new hr;++s<l;)this.add(i[s])}function $P(i){return this.__data__.set(i,f),this}function qP(i){return this.__data__.has(i)}Oi.prototype.add=Oi.prototype.push=$P,Oi.prototype.has=qP;function Wn(i){var s=this.__data__=new dr(i);this.size=s.size}function YP(){this.__data__=new dr,this.size=0}function JP(i){var s=this.__data__,l=s.delete(i);return this.size=s.size,l}function XP(i){return this.__data__.get(i)}function ZP(i){return this.__data__.has(i)}function e_(i,s){var l=this.__data__;if(l instanceof dr){var h=l.__data__;if(!ys||h.length<o-1)return h.push([i,s]),this.size=++l.size,this;l=this.__data__=new hr(h)}return l.set(i,s),this.size=l.size,this}Wn.prototype.clear=YP,Wn.prototype.delete=JP,Wn.prototype.get=XP,Wn.prototype.has=ZP,Wn.prototype.set=e_;function h0(i,s){var l=ae(i),h=!l&&Di(i),y=!l&&!h&&Hr(i),S=!l&&!h&&!y&&So(i),_=l||h||y||S,T=_?Of(i.length,cP):[],L=T.length;for(var U in i)(s||ke.call(i,U))&&!(_&&(U=="length"||y&&(U=="offset"||U=="parent")||S&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||yr(U,L)))&&T.push(U);return T}function p0(i){var s=i.length;return s?i[Kf(0,s-1)]:n}function t_(i,s){return Ea(qt(i),Li(s,0,i.length))}function n_(i){return Ea(qt(i))}function Ff(i,s,l){(l!==n&&!Qn(i[s],l)||l===n&&!(s in i))&&pr(i,s,l)}function As(i,s,l){var h=i[s];(!(ke.call(i,s)&&Qn(h,l))||l===n&&!(s in i))&&pr(i,s,l)}function fa(i,s){for(var l=i.length;l--;)if(Qn(i[l][0],s))return l;return-1}function r_(i,s,l,h){return jr(i,function(y,S,_){s(h,y,l(y),_)}),h}function m0(i,s){return i&&rr(s,mt(s),i)}function i_(i,s){return i&&rr(s,Jt(s),i)}function pr(i,s,l){s=="__proto__"&&oa?oa(i,s,{configurable:!0,enumerable:!0,value:l,writable:!0}):i[s]=l}function Bf(i,s){for(var l=-1,h=s.length,y=M(h),S=i==null;++l<h;)y[l]=S?n:vd(i,s[l]);return y}function Li(i,s,l){return i===i&&(l!==n&&(i=i<=l?i:l),s!==n&&(i=i>=s?i:s)),i}function Tn(i,s,l,h,y,S){var _,T=s&m,L=s&g,U=s&x;if(l&&(_=y?l(i,h,y,S):l(i)),_!==n)return _;if(!Ke(i))return i;var j=ae(i);if(j){if(_=G_(i),!T)return qt(i,_)}else{var W=Ot(i),K=W==Ee||W==te;if(Hr(i))return V0(i,T);if(W==At||W==kt||K&&!y){if(_=L||K?{}:iy(i),!T)return L?D_(i,i_(_,i)):M_(i,m0(_,i))}else{if(!Me[W])return y?i:{};_=K_(i,W,T)}}S||(S=new Wn);var Z=S.get(i);if(Z)return Z;S.set(i,_),Iy(i)?i.forEach(function(ie){_.add(Tn(ie,s,l,ie,i,S))}):Ly(i)&&i.forEach(function(ie,ge){_.set(ge,Tn(ie,s,l,ge,i,S))});var re=U?L?id:rd:L?Jt:mt,de=j?n:re(i);return En(de||i,function(ie,ge){de&&(ge=ie,ie=i[ge]),As(_,ge,Tn(ie,s,l,ge,i,S))}),_}function o_(i){var s=mt(i);return function(l){return g0(l,i,s)}}function g0(i,s,l){var h=l.length;if(i==null)return!h;for(i=be(i);h--;){var y=l[h],S=s[y],_=i[y];if(_===n&&!(y in i)||!S(_))return!1}return!0}function y0(i,s,l){if(typeof i!="function")throw new Pn(a);return ks(function(){i.apply(n,l)},s)}function Ss(i,s,l,h){var y=-1,S=$u,_=!0,T=i.length,L=[],U=s.length;if(!T)return L;l&&(s=We(s,an(l))),h?(S=Ef,_=!1):s.length>=o&&(S=ms,_=!1,s=new Oi(s));e:for(;++y<T;){var j=i[y],W=l==null?j:l(j);if(j=h||j!==0?j:0,_&&W===W){for(var K=U;K--;)if(s[K]===W)continue e;L.push(j)}else S(s,W,h)||L.push(j)}return L}var jr=Q0(nr),v0=Q0(Uf,!0);function s_(i,s){var l=!0;return jr(i,function(h,y,S){return l=!!s(h,y,S),l}),l}function da(i,s,l){for(var h=-1,y=i.length;++h<y;){var S=i[h],_=s(S);if(_!=null&&(T===n?_===_&&!cn(_):l(_,T)))var T=_,L=S}return L}function u_(i,s,l,h){var y=i.length;for(l=fe(l),l<0&&(l=-l>y?0:y+l),h=h===n||h>y?y:fe(h),h<0&&(h+=y),h=l>h?0:Dy(h);l<h;)i[l++]=s;return i}function w0(i,s){var l=[];return jr(i,function(h,y,S){s(h,y,S)&&l.push(h)}),l}function Ct(i,s,l,h,y){var S=-1,_=i.length;for(l||(l=q_),y||(y=[]);++S<_;){var T=i[S];s>0&&l(T)?s>1?Ct(T,s-1,l,h,y):Br(y,T):h||(y[y.length]=T)}return y}var Vf=H0(),x0=H0(!0);function nr(i,s){return i&&Vf(i,s,mt)}function Uf(i,s){return i&&x0(i,s,mt)}function ha(i,s){return Fr(s,function(l){return vr(i[l])})}function bi(i,s){s=Wr(s,i);for(var l=0,h=s.length;i!=null&&l<h;)i=i[ir(s[l++])];return l&&l==h?i:n}function A0(i,s,l){var h=s(i);return ae(i)?h:Br(h,l(i))}function Vt(i){return i==null?i===n?N2:pt:ki&&ki in be(i)?W_(i):nT(i)}function jf(i,s){return i>s}function a_(i,s){return i!=null&&ke.call(i,s)}function l_(i,s){return i!=null&&s in be(i)}function c_(i,s,l){return i>=Rt(s,l)&&i<lt(s,l)}function zf(i,s,l){for(var h=l?Ef:$u,y=i[0].length,S=i.length,_=S,T=M(S),L=1/0,U=[];_--;){var j=i[_];_&&s&&(j=We(j,an(s))),L=Rt(j.length,L),T[_]=!l&&(s||y>=120&&j.length>=120)?new Oi(_&&j):n}j=i[0];var W=-1,K=T[0];e:for(;++W<y&&U.length<L;){var Z=j[W],re=s?s(Z):Z;if(Z=l||Z!==0?Z:0,!(K?ms(K,re):h(U,re,l))){for(_=S;--_;){var de=T[_];if(!(de?ms(de,re):h(i[_],re,l)))continue e}K&&K.push(re),U.push(Z)}}return U}function f_(i,s,l,h){return nr(i,function(y,S,_){s(h,l(y),S,_)}),h}function Cs(i,s,l){s=Wr(s,i),i=ay(i,s);var h=i==null?i:i[ir(Rn(s))];return h==null?n:un(h,i,l)}function S0(i){return Xe(i)&&Vt(i)==kt}function d_(i){return Xe(i)&&Vt(i)==ps}function h_(i){return Xe(i)&&Vt(i)==X}function Es(i,s,l,h,y){return i===s?!0:i==null||s==null||!Xe(i)&&!Xe(s)?i!==i&&s!==s:p_(i,s,l,h,Es,y)}function p_(i,s,l,h,y,S){var _=ae(i),T=ae(s),L=_?ht:Ot(i),U=T?ht:Ot(s);L=L==kt?At:L,U=U==kt?At:U;var j=L==At,W=U==At,K=L==U;if(K&&Hr(i)){if(!Hr(s))return!1;_=!0,j=!1}if(K&&!j)return S||(S=new Wn),_||So(i)?ty(i,s,l,h,y,S):j_(i,s,L,l,h,y,S);if(!(l&E)){var Z=j&&ke.call(i,"__wrapped__"),re=W&&ke.call(s,"__wrapped__");if(Z||re){var de=Z?i.value():i,ie=re?s.value():s;return S||(S=new Wn),y(de,ie,l,h,S)}}return K?(S||(S=new Wn),z_(i,s,l,h,y,S)):!1}function m_(i){return Xe(i)&&Ot(i)==pe}function Wf(i,s,l,h){var y=l.length,S=y,_=!h;if(i==null)return!S;for(i=be(i);y--;){var T=l[y];if(_&&T[2]?T[1]!==i[T[0]]:!(T[0]in i))return!1}for(;++y<S;){T=l[y];var L=T[0],U=i[L],j=T[1];if(_&&T[2]){if(U===n&&!(L in i))return!1}else{var W=new Wn;if(h)var K=h(U,j,L,i,s,W);if(!(K===n?Es(j,U,E|P,h,W):K))return!1}}return!0}function C0(i){if(!Ke(i)||J_(i))return!1;var s=vr(i)?mP:oE;return s.test(Mi(i))}function g_(i){return Xe(i)&&Vt(i)==_i}function y_(i){return Xe(i)&&Ot(i)==jn}function v_(i){return Xe(i)&&Oa(i.length)&&!!Be[Vt(i)]}function E0(i){return typeof i=="function"?i:i==null?Xt:typeof i=="object"?ae(i)?T0(i[0],i[1]):_0(i):Gy(i)}function Qf(i){if(!Ts(i))return AP(i);var s=[];for(var l in be(i))ke.call(i,l)&&l!="constructor"&&s.push(l);return s}function w_(i){if(!Ke(i))return tT(i);var s=Ts(i),l=[];for(var h in i)h=="constructor"&&(s||!ke.call(i,h))||l.push(h);return l}function Hf(i,s){return i<s}function P0(i,s){var l=-1,h=Yt(i)?M(i.length):[];return jr(i,function(y,S,_){h[++l]=s(y,S,_)}),h}function _0(i){var s=sd(i);return s.length==1&&s[0][2]?sy(s[0][0],s[0][1]):function(l){return l===i||Wf(l,i,s)}}function T0(i,s){return ad(i)&&oy(s)?sy(ir(i),s):function(l){var h=vd(l,i);return h===n&&h===s?wd(l,i):Es(s,h,E|P)}}function pa(i,s,l,h,y){i!==s&&Vf(s,function(S,_){if(y||(y=new Wn),Ke(S))x_(i,s,_,l,pa,h,y);else{var T=h?h(cd(i,_),S,_+"",i,s,y):n;T===n&&(T=S),Ff(i,_,T)}},Jt)}function x_(i,s,l,h,y,S,_){var T=cd(i,l),L=cd(s,l),U=_.get(L);if(U){Ff(i,l,U);return}var j=S?S(T,L,l+"",i,s,_):n,W=j===n;if(W){var K=ae(L),Z=!K&&Hr(L),re=!K&&!Z&&So(L);j=L,K||Z||re?ae(T)?j=T:nt(T)?j=qt(T):Z?(W=!1,j=V0(L,!0)):re?(W=!1,j=U0(L,!0)):j=[]:Rs(L)||Di(L)?(j=T,Di(T)?j=Ny(T):(!Ke(T)||vr(T))&&(j=iy(L))):W=!1}W&&(_.set(L,j),y(j,L,h,S,_),_.delete(L)),Ff(i,l,j)}function k0(i,s){var l=i.length;if(l)return s+=s<0?l:0,yr(s,l)?i[s]:n}function R0(i,s,l){s.length?s=We(s,function(S){return ae(S)?function(_){return bi(_,S.length===1?S[0]:S)}:S}):s=[Xt];var h=-1;s=We(s,an(ne()));var y=P0(i,function(S,_,T){var L=We(s,function(U){return U(S)});return{criteria:L,index:++h,value:S}});return KE(y,function(S,_){return I_(S,_,l)})}function A_(i,s){return O0(i,s,function(l,h){return wd(i,h)})}function O0(i,s,l){for(var h=-1,y=s.length,S={};++h<y;){var _=s[h],T=bi(i,_);l(T,_)&&Ps(S,Wr(_,i),T)}return S}function S_(i){return function(s){return bi(s,i)}}function Gf(i,s,l,h){var y=h?GE:co,S=-1,_=s.length,T=i;for(i===s&&(s=qt(s)),l&&(T=We(i,an(l)));++S<_;)for(var L=0,U=s[S],j=l?l(U):U;(L=y(T,j,L,h))>-1;)T!==i&&ia.call(T,L,1),ia.call(i,L,1);return i}function L0(i,s){for(var l=i?s.length:0,h=l-1;l--;){var y=s[l];if(l==h||y!==S){var S=y;yr(y)?ia.call(i,y,1):Yf(i,y)}}return i}function Kf(i,s){return i+ua(f0()*(s-i+1))}function C_(i,s,l,h){for(var y=-1,S=lt(sa((s-i)/(l||1)),0),_=M(S);S--;)_[h?S:++y]=i,i+=l;return _}function $f(i,s){var l="";if(!i||s<1||s>H)return l;do s%2&&(l+=i),s=ua(s/2),s&&(i+=i);while(s);return l}function he(i,s){return fd(uy(i,s,Xt),i+"")}function E_(i){return p0(Co(i))}function P_(i,s){var l=Co(i);return Ea(l,Li(s,0,l.length))}function Ps(i,s,l,h){if(!Ke(i))return i;s=Wr(s,i);for(var y=-1,S=s.length,_=S-1,T=i;T!=null&&++y<S;){var L=ir(s[y]),U=l;if(L==="__proto__"||L==="constructor"||L==="prototype")return i;if(y!=_){var j=T[L];U=h?h(j,L,T):n,U===n&&(U=Ke(j)?j:yr(s[y+1])?[]:{})}As(T,L,U),T=T[L]}return i}var b0=aa?function(i,s){return aa.set(i,s),i}:Xt,__=oa?function(i,s){return oa(i,"toString",{configurable:!0,enumerable:!1,value:Ad(s),writable:!0})}:Xt;function T_(i){return Ea(Co(i))}function kn(i,s,l){var h=-1,y=i.length;s<0&&(s=-s>y?0:y+s),l=l>y?y:l,l<0&&(l+=y),y=s>l?0:l-s>>>0,s>>>=0;for(var S=M(y);++h<y;)S[h]=i[h+s];return S}function k_(i,s){var l;return jr(i,function(h,y,S){return l=s(h,y,S),!l}),!!l}function ma(i,s,l){var h=0,y=i==null?h:i.length;if(typeof s=="number"&&s===s&&y<=Se){for(;h<y;){var S=h+y>>>1,_=i[S];_!==null&&!cn(_)&&(l?_<=s:_<s)?h=S+1:y=S}return y}return qf(i,s,Xt,l)}function qf(i,s,l,h){var y=0,S=i==null?0:i.length;if(S===0)return 0;s=l(s);for(var _=s!==s,T=s===null,L=cn(s),U=s===n;y<S;){var j=ua((y+S)/2),W=l(i[j]),K=W!==n,Z=W===null,re=W===W,de=cn(W);if(_)var ie=h||re;else U?ie=re&&(h||K):T?ie=re&&K&&(h||!Z):L?ie=re&&K&&!Z&&(h||!de):Z||de?ie=!1:ie=h?W<=s:W<s;ie?y=j+1:S=j}return Rt(S,Fe)}function I0(i,s){for(var l=-1,h=i.length,y=0,S=[];++l<h;){var _=i[l],T=s?s(_):_;if(!l||!Qn(T,L)){var L=T;S[y++]=_===0?0:_}}return S}function M0(i){return typeof i=="number"?i:cn(i)?se:+i}function ln(i){if(typeof i=="string")return i;if(ae(i))return We(i,ln)+"";if(cn(i))return d0?d0.call(i):"";var s=i+"";return s=="0"&&1/i==-ze?"-0":s}function zr(i,s,l){var h=-1,y=$u,S=i.length,_=!0,T=[],L=T;if(l)_=!1,y=Ef;else if(S>=o){var U=s?null:V_(i);if(U)return Yu(U);_=!1,y=ms,L=new Oi}else L=s?[]:T;e:for(;++h<S;){var j=i[h],W=s?s(j):j;if(j=l||j!==0?j:0,_&&W===W){for(var K=L.length;K--;)if(L[K]===W)continue e;s&&L.push(W),T.push(j)}else y(L,W,l)||(L!==T&&L.push(W),T.push(j))}return T}function Yf(i,s){return s=Wr(s,i),i=ay(i,s),i==null||delete i[ir(Rn(s))]}function D0(i,s,l,h){return Ps(i,s,l(bi(i,s)),h)}function ga(i,s,l,h){for(var y=i.length,S=h?y:-1;(h?S--:++S<y)&&s(i[S],S,i););return l?kn(i,h?0:S,h?S+1:y):kn(i,h?S+1:0,h?y:S)}function N0(i,s){var l=i;return l instanceof ve&&(l=l.value()),Pf(s,function(h,y){return y.func.apply(y.thisArg,Br([h],y.args))},l)}function Jf(i,s,l){var h=i.length;if(h<2)return h?zr(i[0]):[];for(var y=-1,S=M(h);++y<h;)for(var _=i[y],T=-1;++T<h;)T!=y&&(S[y]=Ss(S[y]||_,i[T],s,l));return zr(Ct(S,1),s,l)}function F0(i,s,l){for(var h=-1,y=i.length,S=s.length,_={};++h<y;){var T=h<S?s[h]:n;l(_,i[h],T)}return _}function Xf(i){return nt(i)?i:[]}function Zf(i){return typeof i=="function"?i:Xt}function Wr(i,s){return ae(i)?i:ad(i,s)?[i]:dy(Te(i))}var R_=he;function Qr(i,s,l){var h=i.length;return l=l===n?h:l,!s&&l>=h?i:kn(i,s,l)}var B0=gP||function(i){return St.clearTimeout(i)};function V0(i,s){if(s)return i.slice();var l=i.length,h=s0?s0(l):new i.constructor(l);return i.copy(h),h}function ed(i){var s=new i.constructor(i.byteLength);return new na(s).set(new na(i)),s}function O_(i,s){var l=s?ed(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}function L_(i){var s=new i.constructor(i.source,Sg.exec(i));return s.lastIndex=i.lastIndex,s}function b_(i){return xs?be(xs.call(i)):{}}function U0(i,s){var l=s?ed(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}function j0(i,s){if(i!==s){var l=i!==n,h=i===null,y=i===i,S=cn(i),_=s!==n,T=s===null,L=s===s,U=cn(s);if(!T&&!U&&!S&&i>s||S&&_&&L&&!T&&!U||h&&_&&L||!l&&L||!y)return 1;if(!h&&!S&&!U&&i<s||U&&l&&y&&!h&&!S||T&&l&&y||!_&&y||!L)return-1}return 0}function I_(i,s,l){for(var h=-1,y=i.criteria,S=s.criteria,_=y.length,T=l.length;++h<_;){var L=j0(y[h],S[h]);if(L){if(h>=T)return L;var U=l[h];return L*(U=="desc"?-1:1)}}return i.index-s.index}function z0(i,s,l,h){for(var y=-1,S=i.length,_=l.length,T=-1,L=s.length,U=lt(S-_,0),j=M(L+U),W=!h;++T<L;)j[T]=s[T];for(;++y<_;)(W||y<S)&&(j[l[y]]=i[y]);for(;U--;)j[T++]=i[y++];return j}function W0(i,s,l,h){for(var y=-1,S=i.length,_=-1,T=l.length,L=-1,U=s.length,j=lt(S-T,0),W=M(j+U),K=!h;++y<j;)W[y]=i[y];for(var Z=y;++L<U;)W[Z+L]=s[L];for(;++_<T;)(K||y<S)&&(W[Z+l[_]]=i[y++]);return W}function qt(i,s){var l=-1,h=i.length;for(s||(s=M(h));++l<h;)s[l]=i[l];return s}function rr(i,s,l,h){var y=!l;l||(l={});for(var S=-1,_=s.length;++S<_;){var T=s[S],L=h?h(l[T],i[T],T,l,i):n;L===n&&(L=i[T]),y?pr(l,T,L):As(l,T,L)}return l}function M_(i,s){return rr(i,ud(i),s)}function D_(i,s){return rr(i,ny(i),s)}function ya(i,s){return function(l,h){var y=ae(l)?UE:r_,S=s?s():{};return y(l,i,ne(h,2),S)}}function wo(i){return he(function(s,l){var h=-1,y=l.length,S=y>1?l[y-1]:n,_=y>2?l[2]:n;for(S=i.length>3&&typeof S=="function"?(y--,S):n,_&&Ut(l[0],l[1],_)&&(S=y<3?n:S,y=1),s=be(s);++h<y;){var T=l[h];T&&i(s,T,h,S)}return s})}function Q0(i,s){return function(l,h){if(l==null)return l;if(!Yt(l))return i(l,h);for(var y=l.length,S=s?y:-1,_=be(l);(s?S--:++S<y)&&h(_[S],S,_)!==!1;);return l}}function H0(i){return function(s,l,h){for(var y=-1,S=be(s),_=h(s),T=_.length;T--;){var L=_[i?T:++y];if(l(S[L],L,S)===!1)break}return s}}function N_(i,s,l){var h=s&R,y=_s(i);function S(){var _=this&&this!==St&&this instanceof S?y:i;return _.apply(h?l:this,arguments)}return S}function G0(i){return function(s){s=Te(s);var l=fo(s)?zn(s):n,h=l?l[0]:s.charAt(0),y=l?Qr(l,1).join(""):s.slice(1);return h[i]()+y}}function xo(i){return function(s){return Pf(Qy(Wy(s).replace(_E,"")),i,"")}}function _s(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var l=vo(i.prototype),h=i.apply(l,s);return Ke(h)?h:l}}function F_(i,s,l){var h=_s(i);function y(){for(var S=arguments.length,_=M(S),T=S,L=Ao(y);T--;)_[T]=arguments[T];var U=S<3&&_[0]!==L&&_[S-1]!==L?[]:Vr(_,L);if(S-=U.length,S<l)return J0(i,s,va,y.placeholder,n,_,U,n,n,l-S);var j=this&&this!==St&&this instanceof y?h:i;return un(j,this,_)}return y}function K0(i){return function(s,l,h){var y=be(s);if(!Yt(s)){var S=ne(l,3);s=mt(s),l=function(T){return S(y[T],T,y)}}var _=i(s,l,h);return _>-1?y[S?s[_]:_]:n}}function $0(i){return gr(function(s){var l=s.length,h=l,y=_n.prototype.thru;for(i&&s.reverse();h--;){var S=s[h];if(typeof S!="function")throw new Pn(a);if(y&&!_&&Sa(S)=="wrapper")var _=new _n([],!0)}for(h=_?h:l;++h<l;){S=s[h];var T=Sa(S),L=T=="wrapper"?od(S):n;L&&ld(L[0])&&L[1]==(N|C|b|D)&&!L[4].length&&L[9]==1?_=_[Sa(L[0])].apply(_,L[3]):_=S.length==1&&ld(S)?_[T]():_.thru(S)}return function(){var U=arguments,j=U[0];if(_&&U.length==1&&ae(j))return _.plant(j).value();for(var W=0,K=l?s[W].apply(this,U):j;++W<l;)K=s[W].call(this,K);return K}})}function va(i,s,l,h,y,S,_,T,L,U){var j=s&N,W=s&R,K=s&w,Z=s&(C|k),re=s&$,de=K?n:_s(i);function ie(){for(var ge=arguments.length,xe=M(ge),fn=ge;fn--;)xe[fn]=arguments[fn];if(Z)var jt=Ao(ie),dn=qE(xe,jt);if(h&&(xe=z0(xe,h,y,Z)),S&&(xe=W0(xe,S,_,Z)),ge-=dn,Z&&ge<U){var rt=Vr(xe,jt);return J0(i,s,va,ie.placeholder,l,xe,rt,T,L,U-ge)}var Hn=W?l:this,xr=K?Hn[i]:i;return ge=xe.length,T?xe=rT(xe,T):re&&ge>1&&xe.reverse(),j&&L<ge&&(xe.length=L),this&&this!==St&&this instanceof ie&&(xr=de||_s(xr)),xr.apply(Hn,xe)}return ie}function q0(i,s){return function(l,h){return f_(l,i,s(h),{})}}function wa(i,s){return function(l,h){var y;if(l===n&&h===n)return s;if(l!==n&&(y=l),h!==n){if(y===n)return h;typeof l=="string"||typeof h=="string"?(l=ln(l),h=ln(h)):(l=M0(l),h=M0(h)),y=i(l,h)}return y}}function td(i){return gr(function(s){return s=We(s,an(ne())),he(function(l){var h=this;return i(s,function(y){return un(y,h,l)})})})}function xa(i,s){s=s===n?" ":ln(s);var l=s.length;if(l<2)return l?$f(s,i):s;var h=$f(s,sa(i/ho(s)));return fo(s)?Qr(zn(h),0,i).join(""):h.slice(0,i)}function B_(i,s,l,h){var y=s&R,S=_s(i);function _(){for(var T=-1,L=arguments.length,U=-1,j=h.length,W=M(j+L),K=this&&this!==St&&this instanceof _?S:i;++U<j;)W[U]=h[U];for(;L--;)W[U++]=arguments[++T];return un(K,y?l:this,W)}return _}function Y0(i){return function(s,l,h){return h&&typeof h!="number"&&Ut(s,l,h)&&(l=h=n),s=wr(s),l===n?(l=s,s=0):l=wr(l),h=h===n?s<l?1:-1:wr(h),C_(s,l,h,i)}}function Aa(i){return function(s,l){return typeof s=="string"&&typeof l=="string"||(s=On(s),l=On(l)),i(s,l)}}function J0(i,s,l,h,y,S,_,T,L,U){var j=s&C,W=j?_:n,K=j?n:_,Z=j?S:n,re=j?n:S;s|=j?b:I,s&=~(j?I:b),s&A||(s&=~(R|w));var de=[i,s,y,Z,W,re,K,T,L,U],ie=l.apply(n,de);return ld(i)&&ly(ie,de),ie.placeholder=h,cy(ie,i,s)}function nd(i){var s=at[i];return function(l,h){if(l=On(l),h=h==null?0:Rt(fe(h),292),h&&c0(l)){var y=(Te(l)+"e").split("e"),S=s(y[0]+"e"+(+y[1]+h));return y=(Te(S)+"e").split("e"),+(y[0]+"e"+(+y[1]-h))}return s(l)}}var V_=go&&1/Yu(new go([,-0]))[1]==ze?function(i){return new go(i)}:Ed;function X0(i){return function(s){var l=Ot(s);return l==pe?bf(s):l==jn?nP(s):$E(s,i(s))}}function mr(i,s,l,h,y,S,_,T){var L=s&w;if(!L&&typeof i!="function")throw new Pn(a);var U=h?h.length:0;if(U||(s&=~(b|I),h=y=n),_=_===n?_:lt(fe(_),0),T=T===n?T:fe(T),U-=y?y.length:0,s&I){var j=h,W=y;h=y=n}var K=L?n:od(i),Z=[i,s,l,h,y,j,W,S,_,T];if(K&&eT(Z,K),i=Z[0],s=Z[1],l=Z[2],h=Z[3],y=Z[4],T=Z[9]=Z[9]===n?L?0:i.length:lt(Z[9]-U,0),!T&&s&(C|k)&&(s&=~(C|k)),!s||s==R)var re=N_(i,s,l);else s==C||s==k?re=F_(i,s,T):(s==b||s==(R|b))&&!y.length?re=B_(i,s,l,h):re=va.apply(n,Z);var de=K?b0:ly;return cy(de(re,Z),i,s)}function Z0(i,s,l,h){return i===n||Qn(i,mo[l])&&!ke.call(h,l)?s:i}function ey(i,s,l,h,y,S){return Ke(i)&&Ke(s)&&(S.set(s,i),pa(i,s,n,ey,S),S.delete(s)),i}function U_(i){return Rs(i)?n:i}function ty(i,s,l,h,y,S){var _=l&E,T=i.length,L=s.length;if(T!=L&&!(_&&L>T))return!1;var U=S.get(i),j=S.get(s);if(U&&j)return U==s&&j==i;var W=-1,K=!0,Z=l&P?new Oi:n;for(S.set(i,s),S.set(s,i);++W<T;){var re=i[W],de=s[W];if(h)var ie=_?h(de,re,W,s,i,S):h(re,de,W,i,s,S);if(ie!==n){if(ie)continue;K=!1;break}if(Z){if(!_f(s,function(ge,xe){if(!ms(Z,xe)&&(re===ge||y(re,ge,l,h,S)))return Z.push(xe)})){K=!1;break}}else if(!(re===de||y(re,de,l,h,S))){K=!1;break}}return S.delete(i),S.delete(s),K}function j_(i,s,l,h,y,S,_){switch(l){case ao:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case ps:return!(i.byteLength!=s.byteLength||!S(new na(i),new na(s)));case $t:case X:case Ie:return Qn(+i,+s);case Ce:return i.name==s.name&&i.message==s.message;case _i:case ds:return i==s+"";case pe:var T=bf;case jn:var L=h&E;if(T||(T=Yu),i.size!=s.size&&!L)return!1;var U=_.get(i);if(U)return U==s;h|=P,_.set(i,s);var j=ty(T(i),T(s),h,y,S,_);return _.delete(i),j;case Qu:if(xs)return xs.call(i)==xs.call(s)}return!1}function z_(i,s,l,h,y,S){var _=l&E,T=rd(i),L=T.length,U=rd(s),j=U.length;if(L!=j&&!_)return!1;for(var W=L;W--;){var K=T[W];if(!(_?K in s:ke.call(s,K)))return!1}var Z=S.get(i),re=S.get(s);if(Z&&re)return Z==s&&re==i;var de=!0;S.set(i,s),S.set(s,i);for(var ie=_;++W<L;){K=T[W];var ge=i[K],xe=s[K];if(h)var fn=_?h(xe,ge,K,s,i,S):h(ge,xe,K,i,s,S);if(!(fn===n?ge===xe||y(ge,xe,l,h,S):fn)){de=!1;break}ie||(ie=K=="constructor")}if(de&&!ie){var jt=i.constructor,dn=s.constructor;jt!=dn&&"constructor"in i&&"constructor"in s&&!(typeof jt=="function"&&jt instanceof jt&&typeof dn=="function"&&dn instanceof dn)&&(de=!1)}return S.delete(i),S.delete(s),de}function gr(i){return fd(uy(i,n,gy),i+"")}function rd(i){return A0(i,mt,ud)}function id(i){return A0(i,Jt,ny)}var od=aa?function(i){return aa.get(i)}:Ed;function Sa(i){for(var s=i.name+"",l=yo[s],h=ke.call(yo,s)?l.length:0;h--;){var y=l[h],S=y.func;if(S==null||S==i)return y.name}return s}function Ao(i){var s=ke.call(v,"placeholder")?v:i;return s.placeholder}function ne(){var i=v.iteratee||Sd;return i=i===Sd?E0:i,arguments.length?i(arguments[0],arguments[1]):i}function Ca(i,s){var l=i.__data__;return Y_(s)?l[typeof s=="string"?"string":"hash"]:l.map}function sd(i){for(var s=mt(i),l=s.length;l--;){var h=s[l],y=i[h];s[l]=[h,y,oy(y)]}return s}function Ii(i,s){var l=ZE(i,s);return C0(l)?l:n}function W_(i){var s=ke.call(i,ki),l=i[ki];try{i[ki]=n;var h=!0}catch(S){}var y=ea.call(i);return h&&(s?i[ki]=l:delete i[ki]),y}var ud=Mf?function(i){return i==null?[]:(i=be(i),Fr(Mf(i),function(s){return a0.call(i,s)}))}:Pd,ny=Mf?function(i){for(var s=[];i;)Br(s,ud(i)),i=ra(i);return s}:Pd,Ot=Vt;(Df&&Ot(new Df(new ArrayBuffer(1)))!=ao||ys&&Ot(new ys)!=pe||Nf&&Ot(Nf.resolve())!=tr||go&&Ot(new go)!=jn||vs&&Ot(new vs)!=hs)&&(Ot=function(i){var s=Vt(i),l=s==At?i.constructor:n,h=l?Mi(l):"";if(h)switch(h){case PP:return ao;case _P:return pe;case TP:return tr;case kP:return jn;case RP:return hs}return s});function Q_(i,s,l){for(var h=-1,y=l.length;++h<y;){var S=l[h],_=S.size;switch(S.type){case"drop":i+=_;break;case"dropRight":s-=_;break;case"take":s=Rt(s,i+_);break;case"takeRight":i=lt(i,s-_);break}}return{start:i,end:s}}function H_(i){var s=i.match(J2);return s?s[1].split(X2):[]}function ry(i,s,l){s=Wr(s,i);for(var h=-1,y=s.length,S=!1;++h<y;){var _=ir(s[h]);if(!(S=i!=null&&l(i,_)))break;i=i[_]}return S||++h!=y?S:(y=i==null?0:i.length,!!y&&Oa(y)&&yr(_,y)&&(ae(i)||Di(i)))}function G_(i){var s=i.length,l=new i.constructor(s);return s&&typeof i[0]=="string"&&ke.call(i,"index")&&(l.index=i.index,l.input=i.input),l}function iy(i){return typeof i.constructor=="function"&&!Ts(i)?vo(ra(i)):{}}function K_(i,s,l){var h=i.constructor;switch(s){case ps:return ed(i);case $t:case X:return new h(+i);case ao:return O_(i,l);case sf:case uf:case af:case lf:case cf:case ff:case df:case hf:case pf:return U0(i,l);case pe:return new h;case Ie:case ds:return new h(i);case _i:return L_(i);case jn:return new h;case Qu:return b_(i)}}function $_(i,s){var l=s.length;if(!l)return i;var h=l-1;return s[h]=(l>1?"& ":"")+s[h],s=s.join(l>2?", ":" "),i.replace(Y2,`{
82
+ */dc.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",m=1,g=2,w=4,E=1,P=2,k=1,x=2,A=4,C=8,T=16,L=32,I=64,D=128,N=256,$=512,G=30,le="...",Ge=800,ot=16,wt=1,_e=2,ye=3,ze=1/0,H=9007199254740991,ee=17976931348623157e292,se=0/0,me=4294967295,Fe=me-1,Se=me>>>1,xt=[["ary",D],["bind",k],["bindKey",x],["curry",C],["curryRight",T],["flip",$],["partial",L],["partialRight",I],["rearg",N]],Rt="[object Arguments]",ht="[object Array]",$t="[object AsyncFunction]",qt="[object Boolean]",X="[object Date]",ce="[object DOMException]",Ce="[object Error]",Ee="[object Function]",te="[object GeneratorFunction]",pe="[object Map]",Me="[object Number]",pt="[object Null]",At="[object Object]",tr="[object Promise]",ao="[object Proxy]",Ti="[object RegExp]",jn="[object Set]",hs="[object String]",Hu="[object Symbol]",B2="[object Undefined]",ps="[object WeakMap]",V2="[object WeakSet]",ms="[object ArrayBuffer]",lo="[object DataView]",uf="[object Float32Array]",af="[object Float64Array]",lf="[object Int8Array]",cf="[object Int16Array]",ff="[object Int32Array]",df="[object Uint8Array]",hf="[object Uint8ClampedArray]",pf="[object Uint16Array]",mf="[object Uint32Array]",U2=/\b__p \+= '';/g,j2=/\b(__p \+=) '' \+/g,z2=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xg=/&(?:amp|lt|gt|quot|#39);/g,Ag=/[&<>"']/g,W2=RegExp(xg.source),Q2=RegExp(Ag.source),H2=/<%-([\s\S]+?)%>/g,G2=/<%([\s\S]+?)%>/g,Sg=/<%=([\s\S]+?)%>/g,K2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$2=/^\w*$/,q2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gf=/[\\^$.*+?()[\]{}|]/g,Y2=RegExp(gf.source),yf=/^\s+/,J2=/\s/,X2=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Z2=/\{\n\/\* \[wrapped with (.+)\] \*/,eE=/,? & /,tE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,nE=/[()=,{}\[\]\/\s]/,rE=/\\(\\)?/g,iE=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cg=/\w*$/,oE=/^[-+]0x[0-9a-f]+$/i,sE=/^0b[01]+$/i,uE=/^\[object .+?Constructor\]$/,aE=/^0o[0-7]+$/i,lE=/^(?:0|[1-9]\d*)$/,cE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gu=/($^)/,fE=/['\n\r\u2028\u2029\\]/g,Ku="\\ud800-\\udfff",dE="\\u0300-\\u036f",hE="\\ufe20-\\ufe2f",pE="\\u20d0-\\u20ff",Eg=dE+hE+pE,Pg="\\u2700-\\u27bf",_g="a-z\\xdf-\\xf6\\xf8-\\xff",mE="\\xac\\xb1\\xd7\\xf7",gE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yE="\\u2000-\\u206f",vE=" \\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",Tg="A-Z\\xc0-\\xd6\\xd8-\\xde",Rg="\\ufe0e\\ufe0f",kg=mE+gE+yE+vE,vf="['’]",wE="["+Ku+"]",Og="["+kg+"]",$u="["+Eg+"]",bg="\\d+",xE="["+Pg+"]",Lg="["+_g+"]",Ig="[^"+Ku+kg+bg+Pg+_g+Tg+"]",wf="\\ud83c[\\udffb-\\udfff]",AE="(?:"+$u+"|"+wf+")",Mg="[^"+Ku+"]",xf="(?:\\ud83c[\\udde6-\\uddff]){2}",Af="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Tg+"]",Dg="\\u200d",Ng="(?:"+Lg+"|"+Ig+")",SE="(?:"+co+"|"+Ig+")",Fg="(?:"+vf+"(?:d|ll|m|re|s|t|ve))?",Bg="(?:"+vf+"(?:D|LL|M|RE|S|T|VE))?",Vg=AE+"?",Ug="["+Rg+"]?",CE="(?:"+Dg+"(?:"+[Mg,xf,Af].join("|")+")"+Ug+Vg+")*",EE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",PE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jg=Ug+Vg+CE,_E="(?:"+[xE,xf,Af].join("|")+")"+jg,TE="(?:"+[Mg+$u+"?",$u,xf,Af,wE].join("|")+")",RE=RegExp(vf,"g"),kE=RegExp($u,"g"),Sf=RegExp(wf+"(?="+wf+")|"+TE+jg,"g"),OE=RegExp([co+"?"+Lg+"+"+Fg+"(?="+[Og,co,"$"].join("|")+")",SE+"+"+Bg+"(?="+[Og,co+Ng,"$"].join("|")+")",co+"?"+Ng+"+"+Fg,co+"+"+Bg,PE,EE,bg,_E].join("|"),"g"),bE=RegExp("["+Dg+Ku+Eg+Rg+"]"),LE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ME=-1,Be={};Be[uf]=Be[af]=Be[lf]=Be[cf]=Be[ff]=Be[df]=Be[hf]=Be[pf]=Be[mf]=!0,Be[Rt]=Be[ht]=Be[ms]=Be[qt]=Be[lo]=Be[X]=Be[Ce]=Be[Ee]=Be[pe]=Be[Me]=Be[At]=Be[Ti]=Be[jn]=Be[hs]=Be[ps]=!1;var De={};De[Rt]=De[ht]=De[ms]=De[lo]=De[qt]=De[X]=De[uf]=De[af]=De[lf]=De[cf]=De[ff]=De[pe]=De[Me]=De[At]=De[Ti]=De[jn]=De[hs]=De[Hu]=De[df]=De[hf]=De[pf]=De[mf]=!0,De[Ce]=De[Ee]=De[ps]=!1;var DE={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},NE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},FE={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},BE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},VE=parseFloat,UE=parseInt,zg=typeof bs=="object"&&bs&&bs.Object===Object&&bs,jE=typeof self=="object"&&self&&self.Object===Object&&self,St=zg||jE||Function("return this")(),Cf=t&&!t.nodeType&&t,Ri=Cf&&!0&&e&&!e.nodeType&&e,Wg=Ri&&Ri.exports===Cf,Ef=Wg&&zg.process,Cn=function(){try{var O=Ri&&Ri.require&&Ri.require("util").types;return O||Ef&&Ef.binding&&Ef.binding("util")}catch(V){}}(),Qg=Cn&&Cn.isArrayBuffer,Hg=Cn&&Cn.isDate,Gg=Cn&&Cn.isMap,Kg=Cn&&Cn.isRegExp,$g=Cn&&Cn.isSet,qg=Cn&&Cn.isTypedArray;function an(O,V,M){switch(M.length){case 0:return O.call(V);case 1:return O.call(V,M[0]);case 2:return O.call(V,M[0],M[1]);case 3:return O.call(V,M[0],M[1],M[2])}return O.apply(V,M)}function zE(O,V,M,Y){for(var ue=-1,Pe=O==null?0:O.length;++ue<Pe;){var at=O[ue];V(Y,at,M(at),O)}return Y}function En(O,V){for(var M=-1,Y=O==null?0:O.length;++M<Y&&V(O[M],M,O)!==!1;);return O}function WE(O,V){for(var M=O==null?0:O.length;M--&&V(O[M],M,O)!==!1;);return O}function Yg(O,V){for(var M=-1,Y=O==null?0:O.length;++M<Y;)if(!V(O[M],M,O))return!1;return!0}function Fr(O,V){for(var M=-1,Y=O==null?0:O.length,ue=0,Pe=[];++M<Y;){var at=O[M];V(at,M,O)&&(Pe[ue++]=at)}return Pe}function qu(O,V){var M=O==null?0:O.length;return!!M&&fo(O,V,0)>-1}function Pf(O,V,M){for(var Y=-1,ue=O==null?0:O.length;++Y<ue;)if(M(V,O[Y]))return!0;return!1}function We(O,V){for(var M=-1,Y=O==null?0:O.length,ue=Array(Y);++M<Y;)ue[M]=V(O[M],M,O);return ue}function Br(O,V){for(var M=-1,Y=V.length,ue=O.length;++M<Y;)O[ue+M]=V[M];return O}function _f(O,V,M,Y){var ue=-1,Pe=O==null?0:O.length;for(Y&&Pe&&(M=O[++ue]);++ue<Pe;)M=V(M,O[ue],ue,O);return M}function QE(O,V,M,Y){var ue=O==null?0:O.length;for(Y&&ue&&(M=O[--ue]);ue--;)M=V(M,O[ue],ue,O);return M}function Tf(O,V){for(var M=-1,Y=O==null?0:O.length;++M<Y;)if(V(O[M],M,O))return!0;return!1}var HE=Rf("length");function GE(O){return O.split("")}function KE(O){return O.match(tE)||[]}function Jg(O,V,M){var Y;return M(O,function(ue,Pe,at){if(V(ue,Pe,at))return Y=Pe,!1}),Y}function Yu(O,V,M,Y){for(var ue=O.length,Pe=M+(Y?1:-1);Y?Pe--:++Pe<ue;)if(V(O[Pe],Pe,O))return Pe;return-1}function fo(O,V,M){return V===V?oP(O,V,M):Yu(O,Xg,M)}function $E(O,V,M,Y){for(var ue=M-1,Pe=O.length;++ue<Pe;)if(Y(O[ue],V))return ue;return-1}function Xg(O){return O!==O}function Zg(O,V){var M=O==null?0:O.length;return M?Of(O,V)/M:se}function Rf(O){return function(V){return V==null?n:V[O]}}function kf(O){return function(V){return O==null?n:O[V]}}function e0(O,V,M,Y,ue){return ue(O,function(Pe,at,Ie){M=Y?(Y=!1,Pe):V(M,Pe,at,Ie)}),M}function qE(O,V){var M=O.length;for(O.sort(V);M--;)O[M]=O[M].value;return O}function Of(O,V){for(var M,Y=-1,ue=O.length;++Y<ue;){var Pe=V(O[Y]);Pe!==n&&(M=M===n?Pe:M+Pe)}return M}function bf(O,V){for(var M=-1,Y=Array(O);++M<O;)Y[M]=V(M);return Y}function YE(O,V){return We(V,function(M){return[M,O[M]]})}function t0(O){return O&&O.slice(0,o0(O)+1).replace(yf,"")}function ln(O){return function(V){return O(V)}}function Lf(O,V){return We(V,function(M){return O[M]})}function gs(O,V){return O.has(V)}function n0(O,V){for(var M=-1,Y=O.length;++M<Y&&fo(V,O[M],0)>-1;);return M}function r0(O,V){for(var M=O.length;M--&&fo(V,O[M],0)>-1;);return M}function JE(O,V){for(var M=O.length,Y=0;M--;)O[M]===V&&++Y;return Y}var XE=kf(DE),ZE=kf(NE);function eP(O){return"\\"+BE[O]}function tP(O,V){return O==null?n:O[V]}function ho(O){return bE.test(O)}function nP(O){return LE.test(O)}function rP(O){for(var V,M=[];!(V=O.next()).done;)M.push(V.value);return M}function If(O){var V=-1,M=Array(O.size);return O.forEach(function(Y,ue){M[++V]=[ue,Y]}),M}function i0(O,V){return function(M){return O(V(M))}}function Vr(O,V){for(var M=-1,Y=O.length,ue=0,Pe=[];++M<Y;){var at=O[M];(at===V||at===p)&&(O[M]=p,Pe[ue++]=M)}return Pe}function Ju(O){var V=-1,M=Array(O.size);return O.forEach(function(Y){M[++V]=Y}),M}function iP(O){var V=-1,M=Array(O.size);return O.forEach(function(Y){M[++V]=[Y,Y]}),M}function oP(O,V,M){for(var Y=M-1,ue=O.length;++Y<ue;)if(O[Y]===V)return Y;return-1}function sP(O,V,M){for(var Y=M+1;Y--;)if(O[Y]===V)return Y;return Y}function po(O){return ho(O)?aP(O):HE(O)}function zn(O){return ho(O)?lP(O):GE(O)}function o0(O){for(var V=O.length;V--&&J2.test(O.charAt(V)););return V}var uP=kf(FE);function aP(O){for(var V=Sf.lastIndex=0;Sf.test(O);)++V;return V}function lP(O){return O.match(Sf)||[]}function cP(O){return O.match(OE)||[]}var fP=function O(V){V=V==null?St:mo.defaults(St.Object(),V,mo.pick(St,IE));var M=V.Array,Y=V.Date,ue=V.Error,Pe=V.Function,at=V.Math,Ie=V.Object,Mf=V.RegExp,dP=V.String,Pn=V.TypeError,Xu=M.prototype,hP=Pe.prototype,go=Ie.prototype,Zu=V["__core-js_shared__"],ea=hP.toString,Re=go.hasOwnProperty,pP=0,s0=function(){var i=/[^.]+$/.exec(Zu&&Zu.keys&&Zu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),ta=go.toString,mP=ea.call(Ie),gP=St._,yP=Mf("^"+ea.call(Re).replace(gf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),na=Wg?V.Buffer:n,Ur=V.Symbol,ra=V.Uint8Array,u0=na?na.allocUnsafe:n,ia=i0(Ie.getPrototypeOf,Ie),a0=Ie.create,l0=go.propertyIsEnumerable,oa=Xu.splice,c0=Ur?Ur.isConcatSpreadable:n,ys=Ur?Ur.iterator:n,ki=Ur?Ur.toStringTag:n,sa=function(){try{var i=Mi(Ie,"defineProperty");return i({},"",{}),i}catch(s){}}(),vP=V.clearTimeout!==St.clearTimeout&&V.clearTimeout,wP=Y&&Y.now!==St.Date.now&&Y.now,xP=V.setTimeout!==St.setTimeout&&V.setTimeout,ua=at.ceil,aa=at.floor,Df=Ie.getOwnPropertySymbols,AP=na?na.isBuffer:n,f0=V.isFinite,SP=Xu.join,CP=i0(Ie.keys,Ie),lt=at.max,kt=at.min,EP=Y.now,PP=V.parseInt,d0=at.random,_P=Xu.reverse,Nf=Mi(V,"DataView"),vs=Mi(V,"Map"),Ff=Mi(V,"Promise"),yo=Mi(V,"Set"),ws=Mi(V,"WeakMap"),xs=Mi(Ie,"create"),la=ws&&new ws,vo={},TP=Di(Nf),RP=Di(vs),kP=Di(Ff),OP=Di(yo),bP=Di(ws),ca=Ur?Ur.prototype:n,As=ca?ca.valueOf:n,h0=ca?ca.toString:n;function v(i){if(Xe(i)&&!ae(i)&&!(i instanceof ve)){if(i instanceof _n)return i;if(Re.call(i,"__wrapped__"))return py(i)}return new _n(i)}var wo=function(){function i(){}return function(s){if(!Ke(s))return{};if(a0)return a0(s);i.prototype=s;var l=new i;return i.prototype=n,l}}();function fa(){}function _n(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=n}v.templateSettings={escape:H2,evaluate:G2,interpolate:Sg,variable:"",imports:{_:v}},v.prototype=fa.prototype,v.prototype.constructor=v,_n.prototype=wo(fa.prototype),_n.prototype.constructor=_n;function ve(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=me,this.__views__=[]}function LP(){var i=new ve(this.__wrapped__);return i.__actions__=Yt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Yt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Yt(this.__views__),i}function IP(){if(this.__filtered__){var i=new ve(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function MP(){var i=this.__wrapped__.value(),s=this.__dir__,l=ae(i),h=s<0,y=l?i.length:0,S=G_(0,y,this.__views__),_=S.start,R=S.end,b=R-_,U=h?R:_-1,j=this.__iteratees__,W=j.length,K=0,Z=kt(b,this.__takeCount__);if(!l||!h&&y==b&&Z==b)return F0(i,this.__actions__);var re=[];e:for(;b--&&K<Z;){U+=s;for(var de=-1,ie=i[U];++de<W;){var ge=j[de],xe=ge.iteratee,dn=ge.type,jt=xe(ie);if(dn==_e)ie=jt;else if(!jt){if(dn==wt)continue e;break e}}re[K++]=ie}return re}ve.prototype=wo(fa.prototype),ve.prototype.constructor=ve;function Oi(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function DP(){this.__data__=xs?xs(null):{},this.size=0}function NP(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function FP(i){var s=this.__data__;if(xs){var l=s[i];return l===f?n:l}return Re.call(s,i)?s[i]:n}function BP(i){var s=this.__data__;return xs?s[i]!==n:Re.call(s,i)}function VP(i,s){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=xs&&s===n?f:s,this}Oi.prototype.clear=DP,Oi.prototype.delete=NP,Oi.prototype.get=FP,Oi.prototype.has=BP,Oi.prototype.set=VP;function dr(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function UP(){this.__data__=[],this.size=0}function jP(i){var s=this.__data__,l=da(s,i);if(l<0)return!1;var h=s.length-1;return l==h?s.pop():oa.call(s,l,1),--this.size,!0}function zP(i){var s=this.__data__,l=da(s,i);return l<0?n:s[l][1]}function WP(i){return da(this.__data__,i)>-1}function QP(i,s){var l=this.__data__,h=da(l,i);return h<0?(++this.size,l.push([i,s])):l[h][1]=s,this}dr.prototype.clear=UP,dr.prototype.delete=jP,dr.prototype.get=zP,dr.prototype.has=WP,dr.prototype.set=QP;function hr(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function HP(){this.size=0,this.__data__={hash:new Oi,map:new(vs||dr),string:new Oi}}function GP(i){var s=Ea(this,i).delete(i);return this.size-=s?1:0,s}function KP(i){return Ea(this,i).get(i)}function $P(i){return Ea(this,i).has(i)}function qP(i,s){var l=Ea(this,i),h=l.size;return l.set(i,s),this.size+=l.size==h?0:1,this}hr.prototype.clear=HP,hr.prototype.delete=GP,hr.prototype.get=KP,hr.prototype.has=$P,hr.prototype.set=qP;function bi(i){var s=-1,l=i==null?0:i.length;for(this.__data__=new hr;++s<l;)this.add(i[s])}function YP(i){return this.__data__.set(i,f),this}function JP(i){return this.__data__.has(i)}bi.prototype.add=bi.prototype.push=YP,bi.prototype.has=JP;function Wn(i){var s=this.__data__=new dr(i);this.size=s.size}function XP(){this.__data__=new dr,this.size=0}function ZP(i){var s=this.__data__,l=s.delete(i);return this.size=s.size,l}function e_(i){return this.__data__.get(i)}function t_(i){return this.__data__.has(i)}function n_(i,s){var l=this.__data__;if(l instanceof dr){var h=l.__data__;if(!vs||h.length<o-1)return h.push([i,s]),this.size=++l.size,this;l=this.__data__=new hr(h)}return l.set(i,s),this.size=l.size,this}Wn.prototype.clear=XP,Wn.prototype.delete=ZP,Wn.prototype.get=e_,Wn.prototype.has=t_,Wn.prototype.set=n_;function p0(i,s){var l=ae(i),h=!l&&Ni(i),y=!l&&!h&&Hr(i),S=!l&&!h&&!y&&Co(i),_=l||h||y||S,R=_?bf(i.length,dP):[],b=R.length;for(var U in i)(s||Re.call(i,U))&&!(_&&(U=="length"||y&&(U=="offset"||U=="parent")||S&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||yr(U,b)))&&R.push(U);return R}function m0(i){var s=i.length;return s?i[$f(0,s-1)]:n}function r_(i,s){return Pa(Yt(i),Li(s,0,i.length))}function i_(i){return Pa(Yt(i))}function Bf(i,s,l){(l!==n&&!Qn(i[s],l)||l===n&&!(s in i))&&pr(i,s,l)}function Ss(i,s,l){var h=i[s];(!(Re.call(i,s)&&Qn(h,l))||l===n&&!(s in i))&&pr(i,s,l)}function da(i,s){for(var l=i.length;l--;)if(Qn(i[l][0],s))return l;return-1}function o_(i,s,l,h){return jr(i,function(y,S,_){s(h,y,l(y),_)}),h}function g0(i,s){return i&&rr(s,mt(s),i)}function s_(i,s){return i&&rr(s,Xt(s),i)}function pr(i,s,l){s=="__proto__"&&sa?sa(i,s,{configurable:!0,enumerable:!0,value:l,writable:!0}):i[s]=l}function Vf(i,s){for(var l=-1,h=s.length,y=M(h),S=i==null;++l<h;)y[l]=S?n:wd(i,s[l]);return y}function Li(i,s,l){return i===i&&(l!==n&&(i=i<=l?i:l),s!==n&&(i=i>=s?i:s)),i}function Tn(i,s,l,h,y,S){var _,R=s&m,b=s&g,U=s&w;if(l&&(_=y?l(i,h,y,S):l(i)),_!==n)return _;if(!Ke(i))return i;var j=ae(i);if(j){if(_=$_(i),!R)return Yt(i,_)}else{var W=Ot(i),K=W==Ee||W==te;if(Hr(i))return U0(i,R);if(W==At||W==Rt||K&&!y){if(_=b||K?{}:oy(i),!R)return b?F_(i,s_(_,i)):N_(i,g0(_,i))}else{if(!De[W])return y?i:{};_=q_(i,W,R)}}S||(S=new Wn);var Z=S.get(i);if(Z)return Z;S.set(i,_),My(i)?i.forEach(function(ie){_.add(Tn(ie,s,l,ie,i,S))}):Ly(i)&&i.forEach(function(ie,ge){_.set(ge,Tn(ie,s,l,ge,i,S))});var re=U?b?od:id:b?Xt:mt,de=j?n:re(i);return En(de||i,function(ie,ge){de&&(ge=ie,ie=i[ge]),Ss(_,ge,Tn(ie,s,l,ge,i,S))}),_}function u_(i){var s=mt(i);return function(l){return y0(l,i,s)}}function y0(i,s,l){var h=l.length;if(i==null)return!h;for(i=Ie(i);h--;){var y=l[h],S=s[y],_=i[y];if(_===n&&!(y in i)||!S(_))return!1}return!0}function v0(i,s,l){if(typeof i!="function")throw new Pn(a);return ks(function(){i.apply(n,l)},s)}function Cs(i,s,l,h){var y=-1,S=qu,_=!0,R=i.length,b=[],U=s.length;if(!R)return b;l&&(s=We(s,ln(l))),h?(S=Pf,_=!1):s.length>=o&&(S=gs,_=!1,s=new bi(s));e:for(;++y<R;){var j=i[y],W=l==null?j:l(j);if(j=h||j!==0?j:0,_&&W===W){for(var K=U;K--;)if(s[K]===W)continue e;b.push(j)}else S(s,W,h)||b.push(j)}return b}var jr=H0(nr),w0=H0(jf,!0);function a_(i,s){var l=!0;return jr(i,function(h,y,S){return l=!!s(h,y,S),l}),l}function ha(i,s,l){for(var h=-1,y=i.length;++h<y;){var S=i[h],_=s(S);if(_!=null&&(R===n?_===_&&!fn(_):l(_,R)))var R=_,b=S}return b}function l_(i,s,l,h){var y=i.length;for(l=fe(l),l<0&&(l=-l>y?0:y+l),h=h===n||h>y?y:fe(h),h<0&&(h+=y),h=l>h?0:Ny(h);l<h;)i[l++]=s;return i}function x0(i,s){var l=[];return jr(i,function(h,y,S){s(h,y,S)&&l.push(h)}),l}function Ct(i,s,l,h,y){var S=-1,_=i.length;for(l||(l=J_),y||(y=[]);++S<_;){var R=i[S];s>0&&l(R)?s>1?Ct(R,s-1,l,h,y):Br(y,R):h||(y[y.length]=R)}return y}var Uf=G0(),A0=G0(!0);function nr(i,s){return i&&Uf(i,s,mt)}function jf(i,s){return i&&A0(i,s,mt)}function pa(i,s){return Fr(s,function(l){return vr(i[l])})}function Ii(i,s){s=Wr(s,i);for(var l=0,h=s.length;i!=null&&l<h;)i=i[ir(s[l++])];return l&&l==h?i:n}function S0(i,s,l){var h=s(i);return ae(i)?h:Br(h,l(i))}function Vt(i){return i==null?i===n?B2:pt:ki&&ki in Ie(i)?H_(i):iT(i)}function zf(i,s){return i>s}function c_(i,s){return i!=null&&Re.call(i,s)}function f_(i,s){return i!=null&&s in Ie(i)}function d_(i,s,l){return i>=kt(s,l)&&i<lt(s,l)}function Wf(i,s,l){for(var h=l?Pf:qu,y=i[0].length,S=i.length,_=S,R=M(S),b=1/0,U=[];_--;){var j=i[_];_&&s&&(j=We(j,ln(s))),b=kt(j.length,b),R[_]=!l&&(s||y>=120&&j.length>=120)?new bi(_&&j):n}j=i[0];var W=-1,K=R[0];e:for(;++W<y&&U.length<b;){var Z=j[W],re=s?s(Z):Z;if(Z=l||Z!==0?Z:0,!(K?gs(K,re):h(U,re,l))){for(_=S;--_;){var de=R[_];if(!(de?gs(de,re):h(i[_],re,l)))continue e}K&&K.push(re),U.push(Z)}}return U}function h_(i,s,l,h){return nr(i,function(y,S,_){s(h,l(y),S,_)}),h}function Es(i,s,l){s=Wr(s,i),i=ly(i,s);var h=i==null?i:i[ir(kn(s))];return h==null?n:an(h,i,l)}function C0(i){return Xe(i)&&Vt(i)==Rt}function p_(i){return Xe(i)&&Vt(i)==ms}function m_(i){return Xe(i)&&Vt(i)==X}function Ps(i,s,l,h,y){return i===s?!0:i==null||s==null||!Xe(i)&&!Xe(s)?i!==i&&s!==s:g_(i,s,l,h,Ps,y)}function g_(i,s,l,h,y,S){var _=ae(i),R=ae(s),b=_?ht:Ot(i),U=R?ht:Ot(s);b=b==Rt?At:b,U=U==Rt?At:U;var j=b==At,W=U==At,K=b==U;if(K&&Hr(i)){if(!Hr(s))return!1;_=!0,j=!1}if(K&&!j)return S||(S=new Wn),_||Co(i)?ny(i,s,l,h,y,S):W_(i,s,b,l,h,y,S);if(!(l&E)){var Z=j&&Re.call(i,"__wrapped__"),re=W&&Re.call(s,"__wrapped__");if(Z||re){var de=Z?i.value():i,ie=re?s.value():s;return S||(S=new Wn),y(de,ie,l,h,S)}}return K?(S||(S=new Wn),Q_(i,s,l,h,y,S)):!1}function y_(i){return Xe(i)&&Ot(i)==pe}function Qf(i,s,l,h){var y=l.length,S=y,_=!h;if(i==null)return!S;for(i=Ie(i);y--;){var R=l[y];if(_&&R[2]?R[1]!==i[R[0]]:!(R[0]in i))return!1}for(;++y<S;){R=l[y];var b=R[0],U=i[b],j=R[1];if(_&&R[2]){if(U===n&&!(b in i))return!1}else{var W=new Wn;if(h)var K=h(U,j,b,i,s,W);if(!(K===n?Ps(j,U,E|P,h,W):K))return!1}}return!0}function E0(i){if(!Ke(i)||Z_(i))return!1;var s=vr(i)?yP:uE;return s.test(Di(i))}function v_(i){return Xe(i)&&Vt(i)==Ti}function w_(i){return Xe(i)&&Ot(i)==jn}function x_(i){return Xe(i)&&ba(i.length)&&!!Be[Vt(i)]}function P0(i){return typeof i=="function"?i:i==null?Zt:typeof i=="object"?ae(i)?R0(i[0],i[1]):T0(i):Ky(i)}function Hf(i){if(!Rs(i))return CP(i);var s=[];for(var l in Ie(i))Re.call(i,l)&&l!="constructor"&&s.push(l);return s}function A_(i){if(!Ke(i))return rT(i);var s=Rs(i),l=[];for(var h in i)h=="constructor"&&(s||!Re.call(i,h))||l.push(h);return l}function Gf(i,s){return i<s}function _0(i,s){var l=-1,h=Jt(i)?M(i.length):[];return jr(i,function(y,S,_){h[++l]=s(y,S,_)}),h}function T0(i){var s=ud(i);return s.length==1&&s[0][2]?uy(s[0][0],s[0][1]):function(l){return l===i||Qf(l,i,s)}}function R0(i,s){return ld(i)&&sy(s)?uy(ir(i),s):function(l){var h=wd(l,i);return h===n&&h===s?xd(l,i):Ps(s,h,E|P)}}function ma(i,s,l,h,y){i!==s&&Uf(s,function(S,_){if(y||(y=new Wn),Ke(S))S_(i,s,_,l,ma,h,y);else{var R=h?h(fd(i,_),S,_+"",i,s,y):n;R===n&&(R=S),Bf(i,_,R)}},Xt)}function S_(i,s,l,h,y,S,_){var R=fd(i,l),b=fd(s,l),U=_.get(b);if(U){Bf(i,l,U);return}var j=S?S(R,b,l+"",i,s,_):n,W=j===n;if(W){var K=ae(b),Z=!K&&Hr(b),re=!K&&!Z&&Co(b);j=b,K||Z||re?ae(R)?j=R:nt(R)?j=Yt(R):Z?(W=!1,j=U0(b,!0)):re?(W=!1,j=j0(b,!0)):j=[]:Os(b)||Ni(b)?(j=R,Ni(R)?j=Fy(R):(!Ke(R)||vr(R))&&(j=oy(b))):W=!1}W&&(_.set(b,j),y(j,b,h,S,_),_.delete(b)),Bf(i,l,j)}function k0(i,s){var l=i.length;if(l)return s+=s<0?l:0,yr(s,l)?i[s]:n}function O0(i,s,l){s.length?s=We(s,function(S){return ae(S)?function(_){return Ii(_,S.length===1?S[0]:S)}:S}):s=[Zt];var h=-1;s=We(s,ln(ne()));var y=_0(i,function(S,_,R){var b=We(s,function(U){return U(S)});return{criteria:b,index:++h,value:S}});return qE(y,function(S,_){return D_(S,_,l)})}function C_(i,s){return b0(i,s,function(l,h){return xd(i,h)})}function b0(i,s,l){for(var h=-1,y=s.length,S={};++h<y;){var _=s[h],R=Ii(i,_);l(R,_)&&_s(S,Wr(_,i),R)}return S}function E_(i){return function(s){return Ii(s,i)}}function Kf(i,s,l,h){var y=h?$E:fo,S=-1,_=s.length,R=i;for(i===s&&(s=Yt(s)),l&&(R=We(i,ln(l)));++S<_;)for(var b=0,U=s[S],j=l?l(U):U;(b=y(R,j,b,h))>-1;)R!==i&&oa.call(R,b,1),oa.call(i,b,1);return i}function L0(i,s){for(var l=i?s.length:0,h=l-1;l--;){var y=s[l];if(l==h||y!==S){var S=y;yr(y)?oa.call(i,y,1):Jf(i,y)}}return i}function $f(i,s){return i+aa(d0()*(s-i+1))}function P_(i,s,l,h){for(var y=-1,S=lt(ua((s-i)/(l||1)),0),_=M(S);S--;)_[h?S:++y]=i,i+=l;return _}function qf(i,s){var l="";if(!i||s<1||s>H)return l;do s%2&&(l+=i),s=aa(s/2),s&&(i+=i);while(s);return l}function he(i,s){return dd(ay(i,s,Zt),i+"")}function __(i){return m0(Eo(i))}function T_(i,s){var l=Eo(i);return Pa(l,Li(s,0,l.length))}function _s(i,s,l,h){if(!Ke(i))return i;s=Wr(s,i);for(var y=-1,S=s.length,_=S-1,R=i;R!=null&&++y<S;){var b=ir(s[y]),U=l;if(b==="__proto__"||b==="constructor"||b==="prototype")return i;if(y!=_){var j=R[b];U=h?h(j,b,R):n,U===n&&(U=Ke(j)?j:yr(s[y+1])?[]:{})}Ss(R,b,U),R=R[b]}return i}var I0=la?function(i,s){return la.set(i,s),i}:Zt,R_=sa?function(i,s){return sa(i,"toString",{configurable:!0,enumerable:!1,value:Sd(s),writable:!0})}:Zt;function k_(i){return Pa(Eo(i))}function Rn(i,s,l){var h=-1,y=i.length;s<0&&(s=-s>y?0:y+s),l=l>y?y:l,l<0&&(l+=y),y=s>l?0:l-s>>>0,s>>>=0;for(var S=M(y);++h<y;)S[h]=i[h+s];return S}function O_(i,s){var l;return jr(i,function(h,y,S){return l=s(h,y,S),!l}),!!l}function ga(i,s,l){var h=0,y=i==null?h:i.length;if(typeof s=="number"&&s===s&&y<=Se){for(;h<y;){var S=h+y>>>1,_=i[S];_!==null&&!fn(_)&&(l?_<=s:_<s)?h=S+1:y=S}return y}return Yf(i,s,Zt,l)}function Yf(i,s,l,h){var y=0,S=i==null?0:i.length;if(S===0)return 0;s=l(s);for(var _=s!==s,R=s===null,b=fn(s),U=s===n;y<S;){var j=aa((y+S)/2),W=l(i[j]),K=W!==n,Z=W===null,re=W===W,de=fn(W);if(_)var ie=h||re;else U?ie=re&&(h||K):R?ie=re&&K&&(h||!Z):b?ie=re&&K&&!Z&&(h||!de):Z||de?ie=!1:ie=h?W<=s:W<s;ie?y=j+1:S=j}return kt(S,Fe)}function M0(i,s){for(var l=-1,h=i.length,y=0,S=[];++l<h;){var _=i[l],R=s?s(_):_;if(!l||!Qn(R,b)){var b=R;S[y++]=_===0?0:_}}return S}function D0(i){return typeof i=="number"?i:fn(i)?se:+i}function cn(i){if(typeof i=="string")return i;if(ae(i))return We(i,cn)+"";if(fn(i))return h0?h0.call(i):"";var s=i+"";return s=="0"&&1/i==-ze?"-0":s}function zr(i,s,l){var h=-1,y=qu,S=i.length,_=!0,R=[],b=R;if(l)_=!1,y=Pf;else if(S>=o){var U=s?null:j_(i);if(U)return Ju(U);_=!1,y=gs,b=new bi}else b=s?[]:R;e:for(;++h<S;){var j=i[h],W=s?s(j):j;if(j=l||j!==0?j:0,_&&W===W){for(var K=b.length;K--;)if(b[K]===W)continue e;s&&b.push(W),R.push(j)}else y(b,W,l)||(b!==R&&b.push(W),R.push(j))}return R}function Jf(i,s){return s=Wr(s,i),i=ly(i,s),i==null||delete i[ir(kn(s))]}function N0(i,s,l,h){return _s(i,s,l(Ii(i,s)),h)}function ya(i,s,l,h){for(var y=i.length,S=h?y:-1;(h?S--:++S<y)&&s(i[S],S,i););return l?Rn(i,h?0:S,h?S+1:y):Rn(i,h?S+1:0,h?y:S)}function F0(i,s){var l=i;return l instanceof ve&&(l=l.value()),_f(s,function(h,y){return y.func.apply(y.thisArg,Br([h],y.args))},l)}function Xf(i,s,l){var h=i.length;if(h<2)return h?zr(i[0]):[];for(var y=-1,S=M(h);++y<h;)for(var _=i[y],R=-1;++R<h;)R!=y&&(S[y]=Cs(S[y]||_,i[R],s,l));return zr(Ct(S,1),s,l)}function B0(i,s,l){for(var h=-1,y=i.length,S=s.length,_={};++h<y;){var R=h<S?s[h]:n;l(_,i[h],R)}return _}function Zf(i){return nt(i)?i:[]}function ed(i){return typeof i=="function"?i:Zt}function Wr(i,s){return ae(i)?i:ld(i,s)?[i]:hy(Te(i))}var b_=he;function Qr(i,s,l){var h=i.length;return l=l===n?h:l,!s&&l>=h?i:Rn(i,s,l)}var V0=vP||function(i){return St.clearTimeout(i)};function U0(i,s){if(s)return i.slice();var l=i.length,h=u0?u0(l):new i.constructor(l);return i.copy(h),h}function td(i){var s=new i.constructor(i.byteLength);return new ra(s).set(new ra(i)),s}function L_(i,s){var l=s?td(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}function I_(i){var s=new i.constructor(i.source,Cg.exec(i));return s.lastIndex=i.lastIndex,s}function M_(i){return As?Ie(As.call(i)):{}}function j0(i,s){var l=s?td(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}function z0(i,s){if(i!==s){var l=i!==n,h=i===null,y=i===i,S=fn(i),_=s!==n,R=s===null,b=s===s,U=fn(s);if(!R&&!U&&!S&&i>s||S&&_&&b&&!R&&!U||h&&_&&b||!l&&b||!y)return 1;if(!h&&!S&&!U&&i<s||U&&l&&y&&!h&&!S||R&&l&&y||!_&&y||!b)return-1}return 0}function D_(i,s,l){for(var h=-1,y=i.criteria,S=s.criteria,_=y.length,R=l.length;++h<_;){var b=z0(y[h],S[h]);if(b){if(h>=R)return b;var U=l[h];return b*(U=="desc"?-1:1)}}return i.index-s.index}function W0(i,s,l,h){for(var y=-1,S=i.length,_=l.length,R=-1,b=s.length,U=lt(S-_,0),j=M(b+U),W=!h;++R<b;)j[R]=s[R];for(;++y<_;)(W||y<S)&&(j[l[y]]=i[y]);for(;U--;)j[R++]=i[y++];return j}function Q0(i,s,l,h){for(var y=-1,S=i.length,_=-1,R=l.length,b=-1,U=s.length,j=lt(S-R,0),W=M(j+U),K=!h;++y<j;)W[y]=i[y];for(var Z=y;++b<U;)W[Z+b]=s[b];for(;++_<R;)(K||y<S)&&(W[Z+l[_]]=i[y++]);return W}function Yt(i,s){var l=-1,h=i.length;for(s||(s=M(h));++l<h;)s[l]=i[l];return s}function rr(i,s,l,h){var y=!l;l||(l={});for(var S=-1,_=s.length;++S<_;){var R=s[S],b=h?h(l[R],i[R],R,l,i):n;b===n&&(b=i[R]),y?pr(l,R,b):Ss(l,R,b)}return l}function N_(i,s){return rr(i,ad(i),s)}function F_(i,s){return rr(i,ry(i),s)}function va(i,s){return function(l,h){var y=ae(l)?zE:o_,S=s?s():{};return y(l,i,ne(h,2),S)}}function xo(i){return he(function(s,l){var h=-1,y=l.length,S=y>1?l[y-1]:n,_=y>2?l[2]:n;for(S=i.length>3&&typeof S=="function"?(y--,S):n,_&&Ut(l[0],l[1],_)&&(S=y<3?n:S,y=1),s=Ie(s);++h<y;){var R=l[h];R&&i(s,R,h,S)}return s})}function H0(i,s){return function(l,h){if(l==null)return l;if(!Jt(l))return i(l,h);for(var y=l.length,S=s?y:-1,_=Ie(l);(s?S--:++S<y)&&h(_[S],S,_)!==!1;);return l}}function G0(i){return function(s,l,h){for(var y=-1,S=Ie(s),_=h(s),R=_.length;R--;){var b=_[i?R:++y];if(l(S[b],b,S)===!1)break}return s}}function B_(i,s,l){var h=s&k,y=Ts(i);function S(){var _=this&&this!==St&&this instanceof S?y:i;return _.apply(h?l:this,arguments)}return S}function K0(i){return function(s){s=Te(s);var l=ho(s)?zn(s):n,h=l?l[0]:s.charAt(0),y=l?Qr(l,1).join(""):s.slice(1);return h[i]()+y}}function Ao(i){return function(s){return _f(Hy(Qy(s).replace(RE,"")),i,"")}}function Ts(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var l=wo(i.prototype),h=i.apply(l,s);return Ke(h)?h:l}}function V_(i,s,l){var h=Ts(i);function y(){for(var S=arguments.length,_=M(S),R=S,b=So(y);R--;)_[R]=arguments[R];var U=S<3&&_[0]!==b&&_[S-1]!==b?[]:Vr(_,b);if(S-=U.length,S<l)return X0(i,s,wa,y.placeholder,n,_,U,n,n,l-S);var j=this&&this!==St&&this instanceof y?h:i;return an(j,this,_)}return y}function $0(i){return function(s,l,h){var y=Ie(s);if(!Jt(s)){var S=ne(l,3);s=mt(s),l=function(R){return S(y[R],R,y)}}var _=i(s,l,h);return _>-1?y[S?s[_]:_]:n}}function q0(i){return gr(function(s){var l=s.length,h=l,y=_n.prototype.thru;for(i&&s.reverse();h--;){var S=s[h];if(typeof S!="function")throw new Pn(a);if(y&&!_&&Ca(S)=="wrapper")var _=new _n([],!0)}for(h=_?h:l;++h<l;){S=s[h];var R=Ca(S),b=R=="wrapper"?sd(S):n;b&&cd(b[0])&&b[1]==(D|C|L|N)&&!b[4].length&&b[9]==1?_=_[Ca(b[0])].apply(_,b[3]):_=S.length==1&&cd(S)?_[R]():_.thru(S)}return function(){var U=arguments,j=U[0];if(_&&U.length==1&&ae(j))return _.plant(j).value();for(var W=0,K=l?s[W].apply(this,U):j;++W<l;)K=s[W].call(this,K);return K}})}function wa(i,s,l,h,y,S,_,R,b,U){var j=s&D,W=s&k,K=s&x,Z=s&(C|T),re=s&$,de=K?n:Ts(i);function ie(){for(var ge=arguments.length,xe=M(ge),dn=ge;dn--;)xe[dn]=arguments[dn];if(Z)var jt=So(ie),hn=JE(xe,jt);if(h&&(xe=W0(xe,h,y,Z)),S&&(xe=Q0(xe,S,_,Z)),ge-=hn,Z&&ge<U){var rt=Vr(xe,jt);return X0(i,s,wa,ie.placeholder,l,xe,rt,R,b,U-ge)}var Hn=W?l:this,xr=K?Hn[i]:i;return ge=xe.length,R?xe=oT(xe,R):re&&ge>1&&xe.reverse(),j&&b<ge&&(xe.length=b),this&&this!==St&&this instanceof ie&&(xr=de||Ts(xr)),xr.apply(Hn,xe)}return ie}function Y0(i,s){return function(l,h){return h_(l,i,s(h),{})}}function xa(i,s){return function(l,h){var y;if(l===n&&h===n)return s;if(l!==n&&(y=l),h!==n){if(y===n)return h;typeof l=="string"||typeof h=="string"?(l=cn(l),h=cn(h)):(l=D0(l),h=D0(h)),y=i(l,h)}return y}}function nd(i){return gr(function(s){return s=We(s,ln(ne())),he(function(l){var h=this;return i(s,function(y){return an(y,h,l)})})})}function Aa(i,s){s=s===n?" ":cn(s);var l=s.length;if(l<2)return l?qf(s,i):s;var h=qf(s,ua(i/po(s)));return ho(s)?Qr(zn(h),0,i).join(""):h.slice(0,i)}function U_(i,s,l,h){var y=s&k,S=Ts(i);function _(){for(var R=-1,b=arguments.length,U=-1,j=h.length,W=M(j+b),K=this&&this!==St&&this instanceof _?S:i;++U<j;)W[U]=h[U];for(;b--;)W[U++]=arguments[++R];return an(K,y?l:this,W)}return _}function J0(i){return function(s,l,h){return h&&typeof h!="number"&&Ut(s,l,h)&&(l=h=n),s=wr(s),l===n?(l=s,s=0):l=wr(l),h=h===n?s<l?1:-1:wr(h),P_(s,l,h,i)}}function Sa(i){return function(s,l){return typeof s=="string"&&typeof l=="string"||(s=On(s),l=On(l)),i(s,l)}}function X0(i,s,l,h,y,S,_,R,b,U){var j=s&C,W=j?_:n,K=j?n:_,Z=j?S:n,re=j?n:S;s|=j?L:I,s&=~(j?I:L),s&A||(s&=~(k|x));var de=[i,s,y,Z,W,re,K,R,b,U],ie=l.apply(n,de);return cd(i)&&cy(ie,de),ie.placeholder=h,fy(ie,i,s)}function rd(i){var s=at[i];return function(l,h){if(l=On(l),h=h==null?0:kt(fe(h),292),h&&f0(l)){var y=(Te(l)+"e").split("e"),S=s(y[0]+"e"+(+y[1]+h));return y=(Te(S)+"e").split("e"),+(y[0]+"e"+(+y[1]-h))}return s(l)}}var j_=yo&&1/Ju(new yo([,-0]))[1]==ze?function(i){return new yo(i)}:Pd;function Z0(i){return function(s){var l=Ot(s);return l==pe?If(s):l==jn?iP(s):YE(s,i(s))}}function mr(i,s,l,h,y,S,_,R){var b=s&x;if(!b&&typeof i!="function")throw new Pn(a);var U=h?h.length:0;if(U||(s&=~(L|I),h=y=n),_=_===n?_:lt(fe(_),0),R=R===n?R:fe(R),U-=y?y.length:0,s&I){var j=h,W=y;h=y=n}var K=b?n:sd(i),Z=[i,s,l,h,y,j,W,S,_,R];if(K&&nT(Z,K),i=Z[0],s=Z[1],l=Z[2],h=Z[3],y=Z[4],R=Z[9]=Z[9]===n?b?0:i.length:lt(Z[9]-U,0),!R&&s&(C|T)&&(s&=~(C|T)),!s||s==k)var re=B_(i,s,l);else s==C||s==T?re=V_(i,s,R):(s==L||s==(k|L))&&!y.length?re=U_(i,s,l,h):re=wa.apply(n,Z);var de=K?I0:cy;return fy(de(re,Z),i,s)}function ey(i,s,l,h){return i===n||Qn(i,go[l])&&!Re.call(h,l)?s:i}function ty(i,s,l,h,y,S){return Ke(i)&&Ke(s)&&(S.set(s,i),ma(i,s,n,ty,S),S.delete(s)),i}function z_(i){return Os(i)?n:i}function ny(i,s,l,h,y,S){var _=l&E,R=i.length,b=s.length;if(R!=b&&!(_&&b>R))return!1;var U=S.get(i),j=S.get(s);if(U&&j)return U==s&&j==i;var W=-1,K=!0,Z=l&P?new bi:n;for(S.set(i,s),S.set(s,i);++W<R;){var re=i[W],de=s[W];if(h)var ie=_?h(de,re,W,s,i,S):h(re,de,W,i,s,S);if(ie!==n){if(ie)continue;K=!1;break}if(Z){if(!Tf(s,function(ge,xe){if(!gs(Z,xe)&&(re===ge||y(re,ge,l,h,S)))return Z.push(xe)})){K=!1;break}}else if(!(re===de||y(re,de,l,h,S))){K=!1;break}}return S.delete(i),S.delete(s),K}function W_(i,s,l,h,y,S,_){switch(l){case lo:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case ms:return!(i.byteLength!=s.byteLength||!S(new ra(i),new ra(s)));case qt:case X:case Me:return Qn(+i,+s);case Ce:return i.name==s.name&&i.message==s.message;case Ti:case hs:return i==s+"";case pe:var R=If;case jn:var b=h&E;if(R||(R=Ju),i.size!=s.size&&!b)return!1;var U=_.get(i);if(U)return U==s;h|=P,_.set(i,s);var j=ny(R(i),R(s),h,y,S,_);return _.delete(i),j;case Hu:if(As)return As.call(i)==As.call(s)}return!1}function Q_(i,s,l,h,y,S){var _=l&E,R=id(i),b=R.length,U=id(s),j=U.length;if(b!=j&&!_)return!1;for(var W=b;W--;){var K=R[W];if(!(_?K in s:Re.call(s,K)))return!1}var Z=S.get(i),re=S.get(s);if(Z&&re)return Z==s&&re==i;var de=!0;S.set(i,s),S.set(s,i);for(var ie=_;++W<b;){K=R[W];var ge=i[K],xe=s[K];if(h)var dn=_?h(xe,ge,K,s,i,S):h(ge,xe,K,i,s,S);if(!(dn===n?ge===xe||y(ge,xe,l,h,S):dn)){de=!1;break}ie||(ie=K=="constructor")}if(de&&!ie){var jt=i.constructor,hn=s.constructor;jt!=hn&&"constructor"in i&&"constructor"in s&&!(typeof jt=="function"&&jt instanceof jt&&typeof hn=="function"&&hn instanceof hn)&&(de=!1)}return S.delete(i),S.delete(s),de}function gr(i){return dd(ay(i,n,yy),i+"")}function id(i){return S0(i,mt,ad)}function od(i){return S0(i,Xt,ry)}var sd=la?function(i){return la.get(i)}:Pd;function Ca(i){for(var s=i.name+"",l=vo[s],h=Re.call(vo,s)?l.length:0;h--;){var y=l[h],S=y.func;if(S==null||S==i)return y.name}return s}function So(i){var s=Re.call(v,"placeholder")?v:i;return s.placeholder}function ne(){var i=v.iteratee||Cd;return i=i===Cd?P0:i,arguments.length?i(arguments[0],arguments[1]):i}function Ea(i,s){var l=i.__data__;return X_(s)?l[typeof s=="string"?"string":"hash"]:l.map}function ud(i){for(var s=mt(i),l=s.length;l--;){var h=s[l],y=i[h];s[l]=[h,y,sy(y)]}return s}function Mi(i,s){var l=tP(i,s);return E0(l)?l:n}function H_(i){var s=Re.call(i,ki),l=i[ki];try{i[ki]=n;var h=!0}catch(S){}var y=ta.call(i);return h&&(s?i[ki]=l:delete i[ki]),y}var ad=Df?function(i){return i==null?[]:(i=Ie(i),Fr(Df(i),function(s){return l0.call(i,s)}))}:_d,ry=Df?function(i){for(var s=[];i;)Br(s,ad(i)),i=ia(i);return s}:_d,Ot=Vt;(Nf&&Ot(new Nf(new ArrayBuffer(1)))!=lo||vs&&Ot(new vs)!=pe||Ff&&Ot(Ff.resolve())!=tr||yo&&Ot(new yo)!=jn||ws&&Ot(new ws)!=ps)&&(Ot=function(i){var s=Vt(i),l=s==At?i.constructor:n,h=l?Di(l):"";if(h)switch(h){case TP:return lo;case RP:return pe;case kP:return tr;case OP:return jn;case bP:return ps}return s});function G_(i,s,l){for(var h=-1,y=l.length;++h<y;){var S=l[h],_=S.size;switch(S.type){case"drop":i+=_;break;case"dropRight":s-=_;break;case"take":s=kt(s,i+_);break;case"takeRight":i=lt(i,s-_);break}}return{start:i,end:s}}function K_(i){var s=i.match(Z2);return s?s[1].split(eE):[]}function iy(i,s,l){s=Wr(s,i);for(var h=-1,y=s.length,S=!1;++h<y;){var _=ir(s[h]);if(!(S=i!=null&&l(i,_)))break;i=i[_]}return S||++h!=y?S:(y=i==null?0:i.length,!!y&&ba(y)&&yr(_,y)&&(ae(i)||Ni(i)))}function $_(i){var s=i.length,l=new i.constructor(s);return s&&typeof i[0]=="string"&&Re.call(i,"index")&&(l.index=i.index,l.input=i.input),l}function oy(i){return typeof i.constructor=="function"&&!Rs(i)?wo(ia(i)):{}}function q_(i,s,l){var h=i.constructor;switch(s){case ms:return td(i);case qt:case X:return new h(+i);case lo:return L_(i,l);case uf:case af:case lf:case cf:case ff:case df:case hf:case pf:case mf:return j0(i,l);case pe:return new h;case Me:case hs:return new h(i);case Ti:return I_(i);case jn:return new h;case Hu:return M_(i)}}function Y_(i,s){var l=s.length;if(!l)return i;var h=l-1;return s[h]=(l>1?"& ":"")+s[h],s=s.join(l>2?", ":" "),i.replace(X2,`{
84
83
  /* [wrapped with `+s+`] */
85
- `)}function q_(i){return ae(i)||Di(i)||!!(l0&&i&&i[l0])}function yr(i,s){var l=typeof i;return s=s==null?H:s,!!s&&(l=="number"||l!="symbol"&&uE.test(i))&&i>-1&&i%1==0&&i<s}function Ut(i,s,l){if(!Ke(l))return!1;var h=typeof s;return(h=="number"?Yt(l)&&yr(s,l.length):h=="string"&&s in l)?Qn(l[s],i):!1}function ad(i,s){if(ae(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||cn(i)?!0:G2.test(i)||!H2.test(i)||s!=null&&i in be(s)}function Y_(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function ld(i){var s=Sa(i),l=v[s];if(typeof l!="function"||!(s in ve.prototype))return!1;if(i===l)return!0;var h=od(l);return!!h&&i===h[0]}function J_(i){return!!o0&&o0 in i}var X_=Xu?vr:_d;function Ts(i){var s=i&&i.constructor,l=typeof s=="function"&&s.prototype||mo;return i===l}function oy(i){return i===i&&!Ke(i)}function sy(i,s){return function(l){return l==null?!1:l[i]===s&&(s!==n||i in be(l))}}function Z_(i){var s=ka(i,function(h){return l.size===d&&l.clear(),h}),l=s.cache;return s}function eT(i,s){var l=i[1],h=s[1],y=l|h,S=y<(R|w|N),_=h==N&&l==C||h==N&&l==D&&i[7].length<=s[8]||h==(N|D)&&s[7].length<=s[8]&&l==C;if(!(S||_))return i;h&R&&(i[2]=s[2],y|=l&R?0:A);var T=s[3];if(T){var L=i[3];i[3]=L?z0(L,T,s[4]):T,i[4]=L?Vr(i[3],p):s[4]}return T=s[5],T&&(L=i[5],i[5]=L?W0(L,T,s[6]):T,i[6]=L?Vr(i[5],p):s[6]),T=s[7],T&&(i[7]=T),h&N&&(i[8]=i[8]==null?s[8]:Rt(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=y,i}function tT(i){var s=[];if(i!=null)for(var l in be(i))s.push(l);return s}function nT(i){return ea.call(i)}function uy(i,s,l){return s=lt(s===n?i.length-1:s,0),function(){for(var h=arguments,y=-1,S=lt(h.length-s,0),_=M(S);++y<S;)_[y]=h[s+y];y=-1;for(var T=M(s+1);++y<s;)T[y]=h[y];return T[s]=l(_),un(i,this,T)}}function ay(i,s){return s.length<2?i:bi(i,kn(s,0,-1))}function rT(i,s){for(var l=i.length,h=Rt(s.length,l),y=qt(i);h--;){var S=s[h];i[h]=yr(S,l)?y[S]:n}return i}function cd(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var ly=fy(b0),ks=vP||function(i,s){return St.setTimeout(i,s)},fd=fy(__);function cy(i,s,l){var h=s+"";return fd(i,$_(h,iT(H_(h),l)))}function fy(i){var s=0,l=0;return function(){var h=SP(),y=ot-(h-l);if(l=h,y>0){if(++s>=Ge)return arguments[0]}else s=0;return i.apply(n,arguments)}}function Ea(i,s){var l=-1,h=i.length,y=h-1;for(s=s===n?h:s;++l<s;){var S=Kf(l,y),_=i[S];i[S]=i[l],i[l]=_}return i.length=s,i}var dy=Z_(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(K2,function(l,h,y,S){s.push(y?S.replace(tE,"$1"):h||l)}),s});function ir(i){if(typeof i=="string"||cn(i))return i;var s=i+"";return s=="0"&&1/i==-ze?"-0":s}function Mi(i){if(i!=null){try{return Zu.call(i)}catch(s){}try{return i+""}catch(s){}}return""}function iT(i,s){return En(xt,function(l){var h="_."+l[0];s&l[1]&&!$u(i,h)&&i.push(h)}),i.sort()}function hy(i){if(i instanceof ve)return i.clone();var s=new _n(i.__wrapped__,i.__chain__);return s.__actions__=qt(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function oT(i,s,l){(l?Ut(i,s,l):s===n)?s=1:s=lt(fe(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var y=0,S=0,_=M(sa(h/s));y<h;)_[S++]=kn(i,y,y+=s);return _}function sT(i){for(var s=-1,l=i==null?0:i.length,h=0,y=[];++s<l;){var S=i[s];S&&(y[h++]=S)}return y}function uT(){var i=arguments.length;if(!i)return[];for(var s=M(i-1),l=arguments[0],h=i;h--;)s[h-1]=arguments[h];return Br(ae(l)?qt(l):[l],Ct(s,1))}var aT=he(function(i,s){return nt(i)?Ss(i,Ct(s,1,nt,!0)):[]}),lT=he(function(i,s){var l=Rn(s);return nt(l)&&(l=n),nt(i)?Ss(i,Ct(s,1,nt,!0),ne(l,2)):[]}),cT=he(function(i,s){var l=Rn(s);return nt(l)&&(l=n),nt(i)?Ss(i,Ct(s,1,nt,!0),n,l):[]});function fT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===n?1:fe(s),kn(i,s<0?0:s,h)):[]}function dT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===n?1:fe(s),s=h-s,kn(i,0,s<0?0:s)):[]}function hT(i,s){return i&&i.length?ga(i,ne(s,3),!0,!0):[]}function pT(i,s){return i&&i.length?ga(i,ne(s,3),!0):[]}function mT(i,s,l,h){var y=i==null?0:i.length;return y?(l&&typeof l!="number"&&Ut(i,s,l)&&(l=0,h=y),u_(i,s,l,h)):[]}function py(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=l==null?0:fe(l);return y<0&&(y=lt(h+y,0)),qu(i,ne(s,3),y)}function my(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=h-1;return l!==n&&(y=fe(l),y=l<0?lt(h+y,0):Rt(y,h-1)),qu(i,ne(s,3),y,!0)}function gy(i){var s=i==null?0:i.length;return s?Ct(i,1):[]}function gT(i){var s=i==null?0:i.length;return s?Ct(i,ze):[]}function yT(i,s){var l=i==null?0:i.length;return l?(s=s===n?1:fe(s),Ct(i,s)):[]}function vT(i){for(var s=-1,l=i==null?0:i.length,h={};++s<l;){var y=i[s];h[y[0]]=y[1]}return h}function yy(i){return i&&i.length?i[0]:n}function wT(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=l==null?0:fe(l);return y<0&&(y=lt(h+y,0)),co(i,s,y)}function xT(i){var s=i==null?0:i.length;return s?kn(i,0,-1):[]}var AT=he(function(i){var s=We(i,Xf);return s.length&&s[0]===i[0]?zf(s):[]}),ST=he(function(i){var s=Rn(i),l=We(i,Xf);return s===Rn(l)?s=n:l.pop(),l.length&&l[0]===i[0]?zf(l,ne(s,2)):[]}),CT=he(function(i){var s=Rn(i),l=We(i,Xf);return s=typeof s=="function"?s:n,s&&l.pop(),l.length&&l[0]===i[0]?zf(l,n,s):[]});function ET(i,s){return i==null?"":xP.call(i,s)}function Rn(i){var s=i==null?0:i.length;return s?i[s-1]:n}function PT(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=h;return l!==n&&(y=fe(l),y=y<0?lt(h+y,0):Rt(y,h-1)),s===s?iP(i,s,y):qu(i,Jg,y,!0)}function _T(i,s){return i&&i.length?k0(i,fe(s)):n}var TT=he(vy);function vy(i,s){return i&&i.length&&s&&s.length?Gf(i,s):i}function kT(i,s,l){return i&&i.length&&s&&s.length?Gf(i,s,ne(l,2)):i}function RT(i,s,l){return i&&i.length&&s&&s.length?Gf(i,s,n,l):i}var OT=gr(function(i,s){var l=i==null?0:i.length,h=Bf(i,s);return L0(i,We(s,function(y){return yr(y,l)?+y:y}).sort(j0)),h});function LT(i,s){var l=[];if(!(i&&i.length))return l;var h=-1,y=[],S=i.length;for(s=ne(s,3);++h<S;){var _=i[h];s(_,h,i)&&(l.push(_),y.push(h))}return L0(i,y),l}function dd(i){return i==null?i:EP.call(i)}function bT(i,s,l){var h=i==null?0:i.length;return h?(l&&typeof l!="number"&&Ut(i,s,l)?(s=0,l=h):(s=s==null?0:fe(s),l=l===n?h:fe(l)),kn(i,s,l)):[]}function IT(i,s){return ma(i,s)}function MT(i,s,l){return qf(i,s,ne(l,2))}function DT(i,s){var l=i==null?0:i.length;if(l){var h=ma(i,s);if(h<l&&Qn(i[h],s))return h}return-1}function NT(i,s){return ma(i,s,!0)}function FT(i,s,l){return qf(i,s,ne(l,2),!0)}function BT(i,s){var l=i==null?0:i.length;if(l){var h=ma(i,s,!0)-1;if(Qn(i[h],s))return h}return-1}function VT(i){return i&&i.length?I0(i):[]}function UT(i,s){return i&&i.length?I0(i,ne(s,2)):[]}function jT(i){var s=i==null?0:i.length;return s?kn(i,1,s):[]}function zT(i,s,l){return i&&i.length?(s=l||s===n?1:fe(s),kn(i,0,s<0?0:s)):[]}function WT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===n?1:fe(s),s=h-s,kn(i,s<0?0:s,h)):[]}function QT(i,s){return i&&i.length?ga(i,ne(s,3),!1,!0):[]}function HT(i,s){return i&&i.length?ga(i,ne(s,3)):[]}var GT=he(function(i){return zr(Ct(i,1,nt,!0))}),KT=he(function(i){var s=Rn(i);return nt(s)&&(s=n),zr(Ct(i,1,nt,!0),ne(s,2))}),$T=he(function(i){var s=Rn(i);return s=typeof s=="function"?s:n,zr(Ct(i,1,nt,!0),n,s)});function qT(i){return i&&i.length?zr(i):[]}function YT(i,s){return i&&i.length?zr(i,ne(s,2)):[]}function JT(i,s){return s=typeof s=="function"?s:n,i&&i.length?zr(i,n,s):[]}function hd(i){if(!(i&&i.length))return[];var s=0;return i=Fr(i,function(l){if(nt(l))return s=lt(l.length,s),!0}),Of(s,function(l){return We(i,Tf(l))})}function wy(i,s){if(!(i&&i.length))return[];var l=hd(i);return s==null?l:We(l,function(h){return un(s,n,h)})}var XT=he(function(i,s){return nt(i)?Ss(i,s):[]}),ZT=he(function(i){return Jf(Fr(i,nt))}),ek=he(function(i){var s=Rn(i);return nt(s)&&(s=n),Jf(Fr(i,nt),ne(s,2))}),tk=he(function(i){var s=Rn(i);return s=typeof s=="function"?s:n,Jf(Fr(i,nt),n,s)}),nk=he(hd);function rk(i,s){return F0(i||[],s||[],As)}function ik(i,s){return F0(i||[],s||[],Ps)}var ok=he(function(i){var s=i.length,l=s>1?i[s-1]:n;return l=typeof l=="function"?(i.pop(),l):n,wy(i,l)});function xy(i){var s=v(i);return s.__chain__=!0,s}function sk(i,s){return s(i),i}function Pa(i,s){return s(i)}var uk=gr(function(i){var s=i.length,l=s?i[0]:0,h=this.__wrapped__,y=function(S){return Bf(S,i)};return s>1||this.__actions__.length||!(h instanceof ve)||!yr(l)?this.thru(y):(h=h.slice(l,+l+(s?1:0)),h.__actions__.push({func:Pa,args:[y],thisArg:n}),new _n(h,this.__chain__).thru(function(S){return s&&!S.length&&S.push(n),S}))});function ak(){return xy(this)}function lk(){return new _n(this.value(),this.__chain__)}function ck(){this.__values__===n&&(this.__values__=My(this.value()));var i=this.__index__>=this.__values__.length,s=i?n:this.__values__[this.__index__++];return{done:i,value:s}}function fk(){return this}function dk(i){for(var s,l=this;l instanceof ca;){var h=hy(l);h.__index__=0,h.__values__=n,s?y.__wrapped__=h:s=h;var y=h;l=l.__wrapped__}return y.__wrapped__=i,s}function hk(){var i=this.__wrapped__;if(i instanceof ve){var s=i;return this.__actions__.length&&(s=new ve(this)),s=s.reverse(),s.__actions__.push({func:Pa,args:[dd],thisArg:n}),new _n(s,this.__chain__)}return this.thru(dd)}function pk(){return N0(this.__wrapped__,this.__actions__)}var mk=ya(function(i,s,l){ke.call(i,l)?++i[l]:pr(i,l,1)});function gk(i,s,l){var h=ae(i)?qg:s_;return l&&Ut(i,s,l)&&(s=n),h(i,ne(s,3))}function yk(i,s){var l=ae(i)?Fr:w0;return l(i,ne(s,3))}var vk=K0(py),wk=K0(my);function xk(i,s){return Ct(_a(i,s),1)}function Ak(i,s){return Ct(_a(i,s),ze)}function Sk(i,s,l){return l=l===n?1:fe(l),Ct(_a(i,s),l)}function Ay(i,s){var l=ae(i)?En:jr;return l(i,ne(s,3))}function Sy(i,s){var l=ae(i)?jE:v0;return l(i,ne(s,3))}var Ck=ya(function(i,s,l){ke.call(i,l)?i[l].push(s):pr(i,l,[s])});function Ek(i,s,l,h){i=Yt(i)?i:Co(i),l=l&&!h?fe(l):0;var y=i.length;return l<0&&(l=lt(y+l,0)),La(i)?l<=y&&i.indexOf(s,l)>-1:!!y&&co(i,s,l)>-1}var Pk=he(function(i,s,l){var h=-1,y=typeof s=="function",S=Yt(i)?M(i.length):[];return jr(i,function(_){S[++h]=y?un(s,_,l):Cs(_,s,l)}),S}),_k=ya(function(i,s,l){pr(i,l,s)});function _a(i,s){var l=ae(i)?We:P0;return l(i,ne(s,3))}function Tk(i,s,l,h){return i==null?[]:(ae(s)||(s=s==null?[]:[s]),l=h?n:l,ae(l)||(l=l==null?[]:[l]),R0(i,s,l))}var kk=ya(function(i,s,l){i[l?0:1].push(s)},function(){return[[],[]]});function Rk(i,s,l){var h=ae(i)?Pf:Zg,y=arguments.length<3;return h(i,ne(s,4),l,y,jr)}function Ok(i,s,l){var h=ae(i)?zE:Zg,y=arguments.length<3;return h(i,ne(s,4),l,y,v0)}function Lk(i,s){var l=ae(i)?Fr:w0;return l(i,Ra(ne(s,3)))}function bk(i){var s=ae(i)?p0:E_;return s(i)}function Ik(i,s,l){(l?Ut(i,s,l):s===n)?s=1:s=fe(s);var h=ae(i)?t_:P_;return h(i,s)}function Mk(i){var s=ae(i)?n_:T_;return s(i)}function Dk(i){if(i==null)return 0;if(Yt(i))return La(i)?ho(i):i.length;var s=Ot(i);return s==pe||s==jn?i.size:Qf(i).length}function Nk(i,s,l){var h=ae(i)?_f:k_;return l&&Ut(i,s,l)&&(s=n),h(i,ne(s,3))}var Fk=he(function(i,s){if(i==null)return[];var l=s.length;return l>1&&Ut(i,s[0],s[1])?s=[]:l>2&&Ut(s[0],s[1],s[2])&&(s=[s[0]]),R0(i,Ct(s,1),[])}),Ta=yP||function(){return St.Date.now()};function Bk(i,s){if(typeof s!="function")throw new Pn(a);return i=fe(i),function(){if(--i<1)return s.apply(this,arguments)}}function Cy(i,s,l){return s=l?n:s,s=i&&s==null?i.length:s,mr(i,N,n,n,n,n,s)}function Ey(i,s){var l;if(typeof s!="function")throw new Pn(a);return i=fe(i),function(){return--i>0&&(l=s.apply(this,arguments)),i<=1&&(s=n),l}}var pd=he(function(i,s,l){var h=R;if(l.length){var y=Vr(l,Ao(pd));h|=b}return mr(i,h,s,l,y)}),Py=he(function(i,s,l){var h=R|w;if(l.length){var y=Vr(l,Ao(Py));h|=b}return mr(s,h,i,l,y)});function _y(i,s,l){s=l?n:s;var h=mr(i,C,n,n,n,n,n,s);return h.placeholder=_y.placeholder,h}function Ty(i,s,l){s=l?n:s;var h=mr(i,k,n,n,n,n,n,s);return h.placeholder=Ty.placeholder,h}function ky(i,s,l){var h,y,S,_,T,L,U=0,j=!1,W=!1,K=!0;if(typeof i!="function")throw new Pn(a);s=On(s)||0,Ke(l)&&(j=!!l.leading,W="maxWait"in l,S=W?lt(On(l.maxWait)||0,s):S,K="trailing"in l?!!l.trailing:K);function Z(rt){var Hn=h,xr=y;return h=y=n,U=rt,_=i.apply(xr,Hn),_}function re(rt){return U=rt,T=ks(ge,s),j?Z(rt):_}function de(rt){var Hn=rt-L,xr=rt-U,Ky=s-Hn;return W?Rt(Ky,S-xr):Ky}function ie(rt){var Hn=rt-L,xr=rt-U;return L===n||Hn>=s||Hn<0||W&&xr>=S}function ge(){var rt=Ta();if(ie(rt))return xe(rt);T=ks(ge,de(rt))}function xe(rt){return T=n,K&&h?Z(rt):(h=y=n,_)}function fn(){T!==n&&B0(T),U=0,h=L=y=T=n}function jt(){return T===n?_:xe(Ta())}function dn(){var rt=Ta(),Hn=ie(rt);if(h=arguments,y=this,L=rt,Hn){if(T===n)return re(L);if(W)return B0(T),T=ks(ge,s),Z(L)}return T===n&&(T=ks(ge,s)),_}return dn.cancel=fn,dn.flush=jt,dn}var Vk=he(function(i,s){return y0(i,1,s)}),Uk=he(function(i,s,l){return y0(i,On(s)||0,l)});function jk(i){return mr(i,$)}function ka(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Pn(a);var l=function(){var h=arguments,y=s?s.apply(this,h):h[0],S=l.cache;if(S.has(y))return S.get(y);var _=i.apply(this,h);return l.cache=S.set(y,_)||S,_};return l.cache=new(ka.Cache||hr),l}ka.Cache=hr;function Ra(i){if(typeof i!="function")throw new Pn(a);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function zk(i){return Ey(2,i)}var Wk=R_(function(i,s){s=s.length==1&&ae(s[0])?We(s[0],an(ne())):We(Ct(s,1),an(ne()));var l=s.length;return he(function(h){for(var y=-1,S=Rt(h.length,l);++y<S;)h[y]=s[y].call(this,h[y]);return un(i,this,h)})}),md=he(function(i,s){var l=Vr(s,Ao(md));return mr(i,b,n,s,l)}),Ry=he(function(i,s){var l=Vr(s,Ao(Ry));return mr(i,I,n,s,l)}),Qk=gr(function(i,s){return mr(i,D,n,n,n,s)});function Hk(i,s){if(typeof i!="function")throw new Pn(a);return s=s===n?s:fe(s),he(i,s)}function Gk(i,s){if(typeof i!="function")throw new Pn(a);return s=s==null?0:lt(fe(s),0),he(function(l){var h=l[s],y=Qr(l,0,s);return h&&Br(y,h),un(i,this,y)})}function Kk(i,s,l){var h=!0,y=!0;if(typeof i!="function")throw new Pn(a);return Ke(l)&&(h="leading"in l?!!l.leading:h,y="trailing"in l?!!l.trailing:y),ky(i,s,{leading:h,maxWait:s,trailing:y})}function $k(i){return Cy(i,1)}function qk(i,s){return md(Zf(s),i)}function Yk(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function Jk(i){return Tn(i,x)}function Xk(i,s){return s=typeof s=="function"?s:n,Tn(i,x,s)}function Zk(i){return Tn(i,m|x)}function eR(i,s){return s=typeof s=="function"?s:n,Tn(i,m|x,s)}function tR(i,s){return s==null||g0(i,s,mt(s))}function Qn(i,s){return i===s||i!==i&&s!==s}var nR=Aa(jf),rR=Aa(function(i,s){return i>=s}),Di=S0(function(){return arguments}())?S0:function(i){return Xe(i)&&ke.call(i,"callee")&&!a0.call(i,"callee")},ae=M.isArray,iR=Wg?an(Wg):d_;function Yt(i){return i!=null&&Oa(i.length)&&!vr(i)}function nt(i){return Xe(i)&&Yt(i)}function oR(i){return i===!0||i===!1||Xe(i)&&Vt(i)==$t}var Hr=wP||_d,sR=Qg?an(Qg):h_;function uR(i){return Xe(i)&&i.nodeType===1&&!Rs(i)}function aR(i){if(i==null)return!0;if(Yt(i)&&(ae(i)||typeof i=="string"||typeof i.splice=="function"||Hr(i)||So(i)||Di(i)))return!i.length;var s=Ot(i);if(s==pe||s==jn)return!i.size;if(Ts(i))return!Qf(i).length;for(var l in i)if(ke.call(i,l))return!1;return!0}function lR(i,s){return Es(i,s)}function cR(i,s,l){l=typeof l=="function"?l:n;var h=l?l(i,s):n;return h===n?Es(i,s,n,l):!!h}function gd(i){if(!Xe(i))return!1;var s=Vt(i);return s==Ce||s==ce||typeof i.message=="string"&&typeof i.name=="string"&&!Rs(i)}function fR(i){return typeof i=="number"&&c0(i)}function vr(i){if(!Ke(i))return!1;var s=Vt(i);return s==Ee||s==te||s==Kt||s==uo}function Oy(i){return typeof i=="number"&&i==fe(i)}function Oa(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=H}function Ke(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function Xe(i){return i!=null&&typeof i=="object"}var Ly=Hg?an(Hg):m_;function dR(i,s){return i===s||Wf(i,s,sd(s))}function hR(i,s,l){return l=typeof l=="function"?l:n,Wf(i,s,sd(s),l)}function pR(i){return by(i)&&i!=+i}function mR(i){if(X_(i))throw new ue(u);return C0(i)}function gR(i){return i===null}function yR(i){return i==null}function by(i){return typeof i=="number"||Xe(i)&&Vt(i)==Ie}function Rs(i){if(!Xe(i)||Vt(i)!=At)return!1;var s=ra(i);if(s===null)return!0;var l=ke.call(s,"constructor")&&s.constructor;return typeof l=="function"&&l instanceof l&&Zu.call(l)==hP}var yd=Gg?an(Gg):g_;function vR(i){return Oy(i)&&i>=-H&&i<=H}var Iy=Kg?an(Kg):y_;function La(i){return typeof i=="string"||!ae(i)&&Xe(i)&&Vt(i)==ds}function cn(i){return typeof i=="symbol"||Xe(i)&&Vt(i)==Qu}var So=$g?an($g):v_;function wR(i){return i===n}function xR(i){return Xe(i)&&Ot(i)==hs}function AR(i){return Xe(i)&&Vt(i)==F2}var SR=Aa(Hf),CR=Aa(function(i,s){return i<=s});function My(i){if(!i)return[];if(Yt(i))return La(i)?zn(i):qt(i);if(gs&&i[gs])return tP(i[gs]());var s=Ot(i),l=s==pe?bf:s==jn?Yu:Co;return l(i)}function wr(i){if(!i)return i===0?i:0;if(i=On(i),i===ze||i===-ze){var s=i<0?-1:1;return s*ee}return i===i?i:0}function fe(i){var s=wr(i),l=s%1;return s===s?l?s-l:s:0}function Dy(i){return i?Li(fe(i),0,me):0}function On(i){if(typeof i=="number")return i;if(cn(i))return se;if(Ke(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Ke(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=e0(i);var l=iE.test(i);return l||sE.test(i)?BE(i.slice(2),l?2:8):rE.test(i)?se:+i}function Ny(i){return rr(i,Jt(i))}function ER(i){return i?Li(fe(i),-H,H):i===0?i:0}function Te(i){return i==null?"":ln(i)}var PR=wo(function(i,s){if(Ts(s)||Yt(s)){rr(s,mt(s),i);return}for(var l in s)ke.call(s,l)&&As(i,l,s[l])}),Fy=wo(function(i,s){rr(s,Jt(s),i)}),ba=wo(function(i,s,l,h){rr(s,Jt(s),i,h)}),_R=wo(function(i,s,l,h){rr(s,mt(s),i,h)}),TR=gr(Bf);function kR(i,s){var l=vo(i);return s==null?l:m0(l,s)}var RR=he(function(i,s){i=be(i);var l=-1,h=s.length,y=h>2?s[2]:n;for(y&&Ut(s[0],s[1],y)&&(h=1);++l<h;)for(var S=s[l],_=Jt(S),T=-1,L=_.length;++T<L;){var U=_[T],j=i[U];(j===n||Qn(j,mo[U])&&!ke.call(i,U))&&(i[U]=S[U])}return i}),OR=he(function(i){return i.push(n,ey),un(By,n,i)});function LR(i,s){return Yg(i,ne(s,3),nr)}function bR(i,s){return Yg(i,ne(s,3),Uf)}function IR(i,s){return i==null?i:Vf(i,ne(s,3),Jt)}function MR(i,s){return i==null?i:x0(i,ne(s,3),Jt)}function DR(i,s){return i&&nr(i,ne(s,3))}function NR(i,s){return i&&Uf(i,ne(s,3))}function FR(i){return i==null?[]:ha(i,mt(i))}function BR(i){return i==null?[]:ha(i,Jt(i))}function vd(i,s,l){var h=i==null?n:bi(i,s);return h===n?l:h}function VR(i,s){return i!=null&&ry(i,s,a_)}function wd(i,s){return i!=null&&ry(i,s,l_)}var UR=q0(function(i,s,l){s!=null&&typeof s.toString!="function"&&(s=ea.call(s)),i[s]=l},Ad(Xt)),jR=q0(function(i,s,l){s!=null&&typeof s.toString!="function"&&(s=ea.call(s)),ke.call(i,s)?i[s].push(l):i[s]=[l]},ne),zR=he(Cs);function mt(i){return Yt(i)?h0(i):Qf(i)}function Jt(i){return Yt(i)?h0(i,!0):w_(i)}function WR(i,s){var l={};return s=ne(s,3),nr(i,function(h,y,S){pr(l,s(h,y,S),h)}),l}function QR(i,s){var l={};return s=ne(s,3),nr(i,function(h,y,S){pr(l,y,s(h,y,S))}),l}var HR=wo(function(i,s,l){pa(i,s,l)}),By=wo(function(i,s,l,h){pa(i,s,l,h)}),GR=gr(function(i,s){var l={};if(i==null)return l;var h=!1;s=We(s,function(S){return S=Wr(S,i),h||(h=S.length>1),S}),rr(i,id(i),l),h&&(l=Tn(l,m|g|x,U_));for(var y=s.length;y--;)Yf(l,s[y]);return l});function KR(i,s){return Vy(i,Ra(ne(s)))}var $R=gr(function(i,s){return i==null?{}:A_(i,s)});function Vy(i,s){if(i==null)return{};var l=We(id(i),function(h){return[h]});return s=ne(s),O0(i,l,function(h,y){return s(h,y[0])})}function qR(i,s,l){s=Wr(s,i);var h=-1,y=s.length;for(y||(y=1,i=n);++h<y;){var S=i==null?n:i[ir(s[h])];S===n&&(h=y,S=l),i=vr(S)?S.call(i):S}return i}function YR(i,s,l){return i==null?i:Ps(i,s,l)}function JR(i,s,l,h){return h=typeof h=="function"?h:n,i==null?i:Ps(i,s,l,h)}var Uy=X0(mt),jy=X0(Jt);function XR(i,s,l){var h=ae(i),y=h||Hr(i)||So(i);if(s=ne(s,4),l==null){var S=i&&i.constructor;y?l=h?new S:[]:Ke(i)?l=vr(S)?vo(ra(i)):{}:l={}}return(y?En:nr)(i,function(_,T,L){return s(l,_,T,L)}),l}function ZR(i,s){return i==null?!0:Yf(i,s)}function eO(i,s,l){return i==null?i:D0(i,s,Zf(l))}function tO(i,s,l,h){return h=typeof h=="function"?h:n,i==null?i:D0(i,s,Zf(l),h)}function Co(i){return i==null?[]:Lf(i,mt(i))}function nO(i){return i==null?[]:Lf(i,Jt(i))}function rO(i,s,l){return l===n&&(l=s,s=n),l!==n&&(l=On(l),l=l===l?l:0),s!==n&&(s=On(s),s=s===s?s:0),Li(On(i),s,l)}function iO(i,s,l){return s=wr(s),l===n?(l=s,s=0):l=wr(l),i=On(i),c_(i,s,l)}function oO(i,s,l){if(l&&typeof l!="boolean"&&Ut(i,s,l)&&(s=l=n),l===n&&(typeof s=="boolean"?(l=s,s=n):typeof i=="boolean"&&(l=i,i=n)),i===n&&s===n?(i=0,s=1):(i=wr(i),s===n?(s=i,i=0):s=wr(s)),i>s){var h=i;i=s,s=h}if(l||i%1||s%1){var y=f0();return Rt(i+y*(s-i+FE("1e-"+((y+"").length-1))),s)}return Kf(i,s)}var sO=xo(function(i,s,l){return s=s.toLowerCase(),i+(l?zy(s):s)});function zy(i){return xd(Te(i).toLowerCase())}function Wy(i){return i=Te(i),i&&i.replace(aE,YE).replace(TE,"")}function uO(i,s,l){i=Te(i),s=ln(s);var h=i.length;l=l===n?h:Li(fe(l),0,h);var y=l;return l-=s.length,l>=0&&i.slice(l,y)==s}function aO(i){return i=Te(i),i&&z2.test(i)?i.replace(xg,JE):i}function lO(i){return i=Te(i),i&&$2.test(i)?i.replace(mf,"\\$&"):i}var cO=xo(function(i,s,l){return i+(l?"-":"")+s.toLowerCase()}),fO=xo(function(i,s,l){return i+(l?" ":"")+s.toLowerCase()}),dO=G0("toLowerCase");function hO(i,s,l){i=Te(i),s=fe(s);var h=s?ho(i):0;if(!s||h>=s)return i;var y=(s-h)/2;return xa(ua(y),l)+i+xa(sa(y),l)}function pO(i,s,l){i=Te(i),s=fe(s);var h=s?ho(i):0;return s&&h<s?i+xa(s-h,l):i}function mO(i,s,l){i=Te(i),s=fe(s);var h=s?ho(i):0;return s&&h<s?xa(s-h,l)+i:i}function gO(i,s,l){return l||s==null?s=0:s&&(s=+s),CP(Te(i).replace(gf,""),s||0)}function yO(i,s,l){return(l?Ut(i,s,l):s===n)?s=1:s=fe(s),$f(Te(i),s)}function vO(){var i=arguments,s=Te(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var wO=xo(function(i,s,l){return i+(l?"_":"")+s.toLowerCase()});function xO(i,s,l){return l&&typeof l!="number"&&Ut(i,s,l)&&(s=l=n),l=l===n?me:l>>>0,l?(i=Te(i),i&&(typeof s=="string"||s!=null&&!yd(s))&&(s=ln(s),!s&&fo(i))?Qr(zn(i),0,l):i.split(s,l)):[]}var AO=xo(function(i,s,l){return i+(l?" ":"")+xd(s)});function SO(i,s,l){return i=Te(i),l=l==null?0:Li(fe(l),0,i.length),s=ln(s),i.slice(l,l+s.length)==s}function CO(i,s,l){var h=v.templateSettings;l&&Ut(i,s,l)&&(s=n),i=Te(i),s=ba({},s,h,Z0);var y=ba({},s.imports,h.imports,Z0),S=mt(y),_=Lf(y,S),T,L,U=0,j=s.interpolate||Hu,W="__p += '",K=If((s.escape||Hu).source+"|"+j.source+"|"+(j===Ag?nE:Hu).source+"|"+(s.evaluate||Hu).source+"|$","g"),Z="//# sourceURL="+(ke.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bE+"]")+`
86
- `;i.replace(K,function(ie,ge,xe,fn,jt,dn){return xe||(xe=fn),W+=i.slice(U,dn).replace(lE,XE),ge&&(T=!0,W+=`' +
84
+ `)}function J_(i){return ae(i)||Ni(i)||!!(c0&&i&&i[c0])}function yr(i,s){var l=typeof i;return s=s==null?H:s,!!s&&(l=="number"||l!="symbol"&&lE.test(i))&&i>-1&&i%1==0&&i<s}function Ut(i,s,l){if(!Ke(l))return!1;var h=typeof s;return(h=="number"?Jt(l)&&yr(s,l.length):h=="string"&&s in l)?Qn(l[s],i):!1}function ld(i,s){if(ae(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||fn(i)?!0:$2.test(i)||!K2.test(i)||s!=null&&i in Ie(s)}function X_(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function cd(i){var s=Ca(i),l=v[s];if(typeof l!="function"||!(s in ve.prototype))return!1;if(i===l)return!0;var h=sd(l);return!!h&&i===h[0]}function Z_(i){return!!s0&&s0 in i}var eT=Zu?vr:Td;function Rs(i){var s=i&&i.constructor,l=typeof s=="function"&&s.prototype||go;return i===l}function sy(i){return i===i&&!Ke(i)}function uy(i,s){return function(l){return l==null?!1:l[i]===s&&(s!==n||i in Ie(l))}}function tT(i){var s=ka(i,function(h){return l.size===d&&l.clear(),h}),l=s.cache;return s}function nT(i,s){var l=i[1],h=s[1],y=l|h,S=y<(k|x|D),_=h==D&&l==C||h==D&&l==N&&i[7].length<=s[8]||h==(D|N)&&s[7].length<=s[8]&&l==C;if(!(S||_))return i;h&k&&(i[2]=s[2],y|=l&k?0:A);var R=s[3];if(R){var b=i[3];i[3]=b?W0(b,R,s[4]):R,i[4]=b?Vr(i[3],p):s[4]}return R=s[5],R&&(b=i[5],i[5]=b?Q0(b,R,s[6]):R,i[6]=b?Vr(i[5],p):s[6]),R=s[7],R&&(i[7]=R),h&D&&(i[8]=i[8]==null?s[8]:kt(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=y,i}function rT(i){var s=[];if(i!=null)for(var l in Ie(i))s.push(l);return s}function iT(i){return ta.call(i)}function ay(i,s,l){return s=lt(s===n?i.length-1:s,0),function(){for(var h=arguments,y=-1,S=lt(h.length-s,0),_=M(S);++y<S;)_[y]=h[s+y];y=-1;for(var R=M(s+1);++y<s;)R[y]=h[y];return R[s]=l(_),an(i,this,R)}}function ly(i,s){return s.length<2?i:Ii(i,Rn(s,0,-1))}function oT(i,s){for(var l=i.length,h=kt(s.length,l),y=Yt(i);h--;){var S=s[h];i[h]=yr(S,l)?y[S]:n}return i}function fd(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var cy=dy(I0),ks=xP||function(i,s){return St.setTimeout(i,s)},dd=dy(R_);function fy(i,s,l){var h=s+"";return dd(i,Y_(h,sT(K_(h),l)))}function dy(i){var s=0,l=0;return function(){var h=EP(),y=ot-(h-l);if(l=h,y>0){if(++s>=Ge)return arguments[0]}else s=0;return i.apply(n,arguments)}}function Pa(i,s){var l=-1,h=i.length,y=h-1;for(s=s===n?h:s;++l<s;){var S=$f(l,y),_=i[S];i[S]=i[l],i[l]=_}return i.length=s,i}var hy=tT(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(q2,function(l,h,y,S){s.push(y?S.replace(rE,"$1"):h||l)}),s});function ir(i){if(typeof i=="string"||fn(i))return i;var s=i+"";return s=="0"&&1/i==-ze?"-0":s}function Di(i){if(i!=null){try{return ea.call(i)}catch(s){}try{return i+""}catch(s){}}return""}function sT(i,s){return En(xt,function(l){var h="_."+l[0];s&l[1]&&!qu(i,h)&&i.push(h)}),i.sort()}function py(i){if(i instanceof ve)return i.clone();var s=new _n(i.__wrapped__,i.__chain__);return s.__actions__=Yt(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function uT(i,s,l){(l?Ut(i,s,l):s===n)?s=1:s=lt(fe(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var y=0,S=0,_=M(ua(h/s));y<h;)_[S++]=Rn(i,y,y+=s);return _}function aT(i){for(var s=-1,l=i==null?0:i.length,h=0,y=[];++s<l;){var S=i[s];S&&(y[h++]=S)}return y}function lT(){var i=arguments.length;if(!i)return[];for(var s=M(i-1),l=arguments[0],h=i;h--;)s[h-1]=arguments[h];return Br(ae(l)?Yt(l):[l],Ct(s,1))}var cT=he(function(i,s){return nt(i)?Cs(i,Ct(s,1,nt,!0)):[]}),fT=he(function(i,s){var l=kn(s);return nt(l)&&(l=n),nt(i)?Cs(i,Ct(s,1,nt,!0),ne(l,2)):[]}),dT=he(function(i,s){var l=kn(s);return nt(l)&&(l=n),nt(i)?Cs(i,Ct(s,1,nt,!0),n,l):[]});function hT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===n?1:fe(s),Rn(i,s<0?0:s,h)):[]}function pT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===n?1:fe(s),s=h-s,Rn(i,0,s<0?0:s)):[]}function mT(i,s){return i&&i.length?ya(i,ne(s,3),!0,!0):[]}function gT(i,s){return i&&i.length?ya(i,ne(s,3),!0):[]}function yT(i,s,l,h){var y=i==null?0:i.length;return y?(l&&typeof l!="number"&&Ut(i,s,l)&&(l=0,h=y),l_(i,s,l,h)):[]}function my(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=l==null?0:fe(l);return y<0&&(y=lt(h+y,0)),Yu(i,ne(s,3),y)}function gy(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=h-1;return l!==n&&(y=fe(l),y=l<0?lt(h+y,0):kt(y,h-1)),Yu(i,ne(s,3),y,!0)}function yy(i){var s=i==null?0:i.length;return s?Ct(i,1):[]}function vT(i){var s=i==null?0:i.length;return s?Ct(i,ze):[]}function wT(i,s){var l=i==null?0:i.length;return l?(s=s===n?1:fe(s),Ct(i,s)):[]}function xT(i){for(var s=-1,l=i==null?0:i.length,h={};++s<l;){var y=i[s];h[y[0]]=y[1]}return h}function vy(i){return i&&i.length?i[0]:n}function AT(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=l==null?0:fe(l);return y<0&&(y=lt(h+y,0)),fo(i,s,y)}function ST(i){var s=i==null?0:i.length;return s?Rn(i,0,-1):[]}var CT=he(function(i){var s=We(i,Zf);return s.length&&s[0]===i[0]?Wf(s):[]}),ET=he(function(i){var s=kn(i),l=We(i,Zf);return s===kn(l)?s=n:l.pop(),l.length&&l[0]===i[0]?Wf(l,ne(s,2)):[]}),PT=he(function(i){var s=kn(i),l=We(i,Zf);return s=typeof s=="function"?s:n,s&&l.pop(),l.length&&l[0]===i[0]?Wf(l,n,s):[]});function _T(i,s){return i==null?"":SP.call(i,s)}function kn(i){var s=i==null?0:i.length;return s?i[s-1]:n}function TT(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var y=h;return l!==n&&(y=fe(l),y=y<0?lt(h+y,0):kt(y,h-1)),s===s?sP(i,s,y):Yu(i,Xg,y,!0)}function RT(i,s){return i&&i.length?k0(i,fe(s)):n}var kT=he(wy);function wy(i,s){return i&&i.length&&s&&s.length?Kf(i,s):i}function OT(i,s,l){return i&&i.length&&s&&s.length?Kf(i,s,ne(l,2)):i}function bT(i,s,l){return i&&i.length&&s&&s.length?Kf(i,s,n,l):i}var LT=gr(function(i,s){var l=i==null?0:i.length,h=Vf(i,s);return L0(i,We(s,function(y){return yr(y,l)?+y:y}).sort(z0)),h});function IT(i,s){var l=[];if(!(i&&i.length))return l;var h=-1,y=[],S=i.length;for(s=ne(s,3);++h<S;){var _=i[h];s(_,h,i)&&(l.push(_),y.push(h))}return L0(i,y),l}function hd(i){return i==null?i:_P.call(i)}function MT(i,s,l){var h=i==null?0:i.length;return h?(l&&typeof l!="number"&&Ut(i,s,l)?(s=0,l=h):(s=s==null?0:fe(s),l=l===n?h:fe(l)),Rn(i,s,l)):[]}function DT(i,s){return ga(i,s)}function NT(i,s,l){return Yf(i,s,ne(l,2))}function FT(i,s){var l=i==null?0:i.length;if(l){var h=ga(i,s);if(h<l&&Qn(i[h],s))return h}return-1}function BT(i,s){return ga(i,s,!0)}function VT(i,s,l){return Yf(i,s,ne(l,2),!0)}function UT(i,s){var l=i==null?0:i.length;if(l){var h=ga(i,s,!0)-1;if(Qn(i[h],s))return h}return-1}function jT(i){return i&&i.length?M0(i):[]}function zT(i,s){return i&&i.length?M0(i,ne(s,2)):[]}function WT(i){var s=i==null?0:i.length;return s?Rn(i,1,s):[]}function QT(i,s,l){return i&&i.length?(s=l||s===n?1:fe(s),Rn(i,0,s<0?0:s)):[]}function HT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===n?1:fe(s),s=h-s,Rn(i,s<0?0:s,h)):[]}function GT(i,s){return i&&i.length?ya(i,ne(s,3),!1,!0):[]}function KT(i,s){return i&&i.length?ya(i,ne(s,3)):[]}var $T=he(function(i){return zr(Ct(i,1,nt,!0))}),qT=he(function(i){var s=kn(i);return nt(s)&&(s=n),zr(Ct(i,1,nt,!0),ne(s,2))}),YT=he(function(i){var s=kn(i);return s=typeof s=="function"?s:n,zr(Ct(i,1,nt,!0),n,s)});function JT(i){return i&&i.length?zr(i):[]}function XT(i,s){return i&&i.length?zr(i,ne(s,2)):[]}function ZT(i,s){return s=typeof s=="function"?s:n,i&&i.length?zr(i,n,s):[]}function pd(i){if(!(i&&i.length))return[];var s=0;return i=Fr(i,function(l){if(nt(l))return s=lt(l.length,s),!0}),bf(s,function(l){return We(i,Rf(l))})}function xy(i,s){if(!(i&&i.length))return[];var l=pd(i);return s==null?l:We(l,function(h){return an(s,n,h)})}var eR=he(function(i,s){return nt(i)?Cs(i,s):[]}),tR=he(function(i){return Xf(Fr(i,nt))}),nR=he(function(i){var s=kn(i);return nt(s)&&(s=n),Xf(Fr(i,nt),ne(s,2))}),rR=he(function(i){var s=kn(i);return s=typeof s=="function"?s:n,Xf(Fr(i,nt),n,s)}),iR=he(pd);function oR(i,s){return B0(i||[],s||[],Ss)}function sR(i,s){return B0(i||[],s||[],_s)}var uR=he(function(i){var s=i.length,l=s>1?i[s-1]:n;return l=typeof l=="function"?(i.pop(),l):n,xy(i,l)});function Ay(i){var s=v(i);return s.__chain__=!0,s}function aR(i,s){return s(i),i}function _a(i,s){return s(i)}var lR=gr(function(i){var s=i.length,l=s?i[0]:0,h=this.__wrapped__,y=function(S){return Vf(S,i)};return s>1||this.__actions__.length||!(h instanceof ve)||!yr(l)?this.thru(y):(h=h.slice(l,+l+(s?1:0)),h.__actions__.push({func:_a,args:[y],thisArg:n}),new _n(h,this.__chain__).thru(function(S){return s&&!S.length&&S.push(n),S}))});function cR(){return Ay(this)}function fR(){return new _n(this.value(),this.__chain__)}function dR(){this.__values__===n&&(this.__values__=Dy(this.value()));var i=this.__index__>=this.__values__.length,s=i?n:this.__values__[this.__index__++];return{done:i,value:s}}function hR(){return this}function pR(i){for(var s,l=this;l instanceof fa;){var h=py(l);h.__index__=0,h.__values__=n,s?y.__wrapped__=h:s=h;var y=h;l=l.__wrapped__}return y.__wrapped__=i,s}function mR(){var i=this.__wrapped__;if(i instanceof ve){var s=i;return this.__actions__.length&&(s=new ve(this)),s=s.reverse(),s.__actions__.push({func:_a,args:[hd],thisArg:n}),new _n(s,this.__chain__)}return this.thru(hd)}function gR(){return F0(this.__wrapped__,this.__actions__)}var yR=va(function(i,s,l){Re.call(i,l)?++i[l]:pr(i,l,1)});function vR(i,s,l){var h=ae(i)?Yg:a_;return l&&Ut(i,s,l)&&(s=n),h(i,ne(s,3))}function wR(i,s){var l=ae(i)?Fr:x0;return l(i,ne(s,3))}var xR=$0(my),AR=$0(gy);function SR(i,s){return Ct(Ta(i,s),1)}function CR(i,s){return Ct(Ta(i,s),ze)}function ER(i,s,l){return l=l===n?1:fe(l),Ct(Ta(i,s),l)}function Sy(i,s){var l=ae(i)?En:jr;return l(i,ne(s,3))}function Cy(i,s){var l=ae(i)?WE:w0;return l(i,ne(s,3))}var PR=va(function(i,s,l){Re.call(i,l)?i[l].push(s):pr(i,l,[s])});function _R(i,s,l,h){i=Jt(i)?i:Eo(i),l=l&&!h?fe(l):0;var y=i.length;return l<0&&(l=lt(y+l,0)),La(i)?l<=y&&i.indexOf(s,l)>-1:!!y&&fo(i,s,l)>-1}var TR=he(function(i,s,l){var h=-1,y=typeof s=="function",S=Jt(i)?M(i.length):[];return jr(i,function(_){S[++h]=y?an(s,_,l):Es(_,s,l)}),S}),RR=va(function(i,s,l){pr(i,l,s)});function Ta(i,s){var l=ae(i)?We:_0;return l(i,ne(s,3))}function kR(i,s,l,h){return i==null?[]:(ae(s)||(s=s==null?[]:[s]),l=h?n:l,ae(l)||(l=l==null?[]:[l]),O0(i,s,l))}var OR=va(function(i,s,l){i[l?0:1].push(s)},function(){return[[],[]]});function bR(i,s,l){var h=ae(i)?_f:e0,y=arguments.length<3;return h(i,ne(s,4),l,y,jr)}function LR(i,s,l){var h=ae(i)?QE:e0,y=arguments.length<3;return h(i,ne(s,4),l,y,w0)}function IR(i,s){var l=ae(i)?Fr:x0;return l(i,Oa(ne(s,3)))}function MR(i){var s=ae(i)?m0:__;return s(i)}function DR(i,s,l){(l?Ut(i,s,l):s===n)?s=1:s=fe(s);var h=ae(i)?r_:T_;return h(i,s)}function NR(i){var s=ae(i)?i_:k_;return s(i)}function FR(i){if(i==null)return 0;if(Jt(i))return La(i)?po(i):i.length;var s=Ot(i);return s==pe||s==jn?i.size:Hf(i).length}function BR(i,s,l){var h=ae(i)?Tf:O_;return l&&Ut(i,s,l)&&(s=n),h(i,ne(s,3))}var VR=he(function(i,s){if(i==null)return[];var l=s.length;return l>1&&Ut(i,s[0],s[1])?s=[]:l>2&&Ut(s[0],s[1],s[2])&&(s=[s[0]]),O0(i,Ct(s,1),[])}),Ra=wP||function(){return St.Date.now()};function UR(i,s){if(typeof s!="function")throw new Pn(a);return i=fe(i),function(){if(--i<1)return s.apply(this,arguments)}}function Ey(i,s,l){return s=l?n:s,s=i&&s==null?i.length:s,mr(i,D,n,n,n,n,s)}function Py(i,s){var l;if(typeof s!="function")throw new Pn(a);return i=fe(i),function(){return--i>0&&(l=s.apply(this,arguments)),i<=1&&(s=n),l}}var md=he(function(i,s,l){var h=k;if(l.length){var y=Vr(l,So(md));h|=L}return mr(i,h,s,l,y)}),_y=he(function(i,s,l){var h=k|x;if(l.length){var y=Vr(l,So(_y));h|=L}return mr(s,h,i,l,y)});function Ty(i,s,l){s=l?n:s;var h=mr(i,C,n,n,n,n,n,s);return h.placeholder=Ty.placeholder,h}function Ry(i,s,l){s=l?n:s;var h=mr(i,T,n,n,n,n,n,s);return h.placeholder=Ry.placeholder,h}function ky(i,s,l){var h,y,S,_,R,b,U=0,j=!1,W=!1,K=!0;if(typeof i!="function")throw new Pn(a);s=On(s)||0,Ke(l)&&(j=!!l.leading,W="maxWait"in l,S=W?lt(On(l.maxWait)||0,s):S,K="trailing"in l?!!l.trailing:K);function Z(rt){var Hn=h,xr=y;return h=y=n,U=rt,_=i.apply(xr,Hn),_}function re(rt){return U=rt,R=ks(ge,s),j?Z(rt):_}function de(rt){var Hn=rt-b,xr=rt-U,$y=s-Hn;return W?kt($y,S-xr):$y}function ie(rt){var Hn=rt-b,xr=rt-U;return b===n||Hn>=s||Hn<0||W&&xr>=S}function ge(){var rt=Ra();if(ie(rt))return xe(rt);R=ks(ge,de(rt))}function xe(rt){return R=n,K&&h?Z(rt):(h=y=n,_)}function dn(){R!==n&&V0(R),U=0,h=b=y=R=n}function jt(){return R===n?_:xe(Ra())}function hn(){var rt=Ra(),Hn=ie(rt);if(h=arguments,y=this,b=rt,Hn){if(R===n)return re(b);if(W)return V0(R),R=ks(ge,s),Z(b)}return R===n&&(R=ks(ge,s)),_}return hn.cancel=dn,hn.flush=jt,hn}var jR=he(function(i,s){return v0(i,1,s)}),zR=he(function(i,s,l){return v0(i,On(s)||0,l)});function WR(i){return mr(i,$)}function ka(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Pn(a);var l=function(){var h=arguments,y=s?s.apply(this,h):h[0],S=l.cache;if(S.has(y))return S.get(y);var _=i.apply(this,h);return l.cache=S.set(y,_)||S,_};return l.cache=new(ka.Cache||hr),l}ka.Cache=hr;function Oa(i){if(typeof i!="function")throw new Pn(a);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function QR(i){return Py(2,i)}var HR=b_(function(i,s){s=s.length==1&&ae(s[0])?We(s[0],ln(ne())):We(Ct(s,1),ln(ne()));var l=s.length;return he(function(h){for(var y=-1,S=kt(h.length,l);++y<S;)h[y]=s[y].call(this,h[y]);return an(i,this,h)})}),gd=he(function(i,s){var l=Vr(s,So(gd));return mr(i,L,n,s,l)}),Oy=he(function(i,s){var l=Vr(s,So(Oy));return mr(i,I,n,s,l)}),GR=gr(function(i,s){return mr(i,N,n,n,n,s)});function KR(i,s){if(typeof i!="function")throw new Pn(a);return s=s===n?s:fe(s),he(i,s)}function $R(i,s){if(typeof i!="function")throw new Pn(a);return s=s==null?0:lt(fe(s),0),he(function(l){var h=l[s],y=Qr(l,0,s);return h&&Br(y,h),an(i,this,y)})}function qR(i,s,l){var h=!0,y=!0;if(typeof i!="function")throw new Pn(a);return Ke(l)&&(h="leading"in l?!!l.leading:h,y="trailing"in l?!!l.trailing:y),ky(i,s,{leading:h,maxWait:s,trailing:y})}function YR(i){return Ey(i,1)}function JR(i,s){return gd(ed(s),i)}function XR(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function ZR(i){return Tn(i,w)}function ek(i,s){return s=typeof s=="function"?s:n,Tn(i,w,s)}function tk(i){return Tn(i,m|w)}function nk(i,s){return s=typeof s=="function"?s:n,Tn(i,m|w,s)}function rk(i,s){return s==null||y0(i,s,mt(s))}function Qn(i,s){return i===s||i!==i&&s!==s}var ik=Sa(zf),ok=Sa(function(i,s){return i>=s}),Ni=C0(function(){return arguments}())?C0:function(i){return Xe(i)&&Re.call(i,"callee")&&!l0.call(i,"callee")},ae=M.isArray,sk=Qg?ln(Qg):p_;function Jt(i){return i!=null&&ba(i.length)&&!vr(i)}function nt(i){return Xe(i)&&Jt(i)}function uk(i){return i===!0||i===!1||Xe(i)&&Vt(i)==qt}var Hr=AP||Td,ak=Hg?ln(Hg):m_;function lk(i){return Xe(i)&&i.nodeType===1&&!Os(i)}function ck(i){if(i==null)return!0;if(Jt(i)&&(ae(i)||typeof i=="string"||typeof i.splice=="function"||Hr(i)||Co(i)||Ni(i)))return!i.length;var s=Ot(i);if(s==pe||s==jn)return!i.size;if(Rs(i))return!Hf(i).length;for(var l in i)if(Re.call(i,l))return!1;return!0}function fk(i,s){return Ps(i,s)}function dk(i,s,l){l=typeof l=="function"?l:n;var h=l?l(i,s):n;return h===n?Ps(i,s,n,l):!!h}function yd(i){if(!Xe(i))return!1;var s=Vt(i);return s==Ce||s==ce||typeof i.message=="string"&&typeof i.name=="string"&&!Os(i)}function hk(i){return typeof i=="number"&&f0(i)}function vr(i){if(!Ke(i))return!1;var s=Vt(i);return s==Ee||s==te||s==$t||s==ao}function by(i){return typeof i=="number"&&i==fe(i)}function ba(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=H}function Ke(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function Xe(i){return i!=null&&typeof i=="object"}var Ly=Gg?ln(Gg):y_;function pk(i,s){return i===s||Qf(i,s,ud(s))}function mk(i,s,l){return l=typeof l=="function"?l:n,Qf(i,s,ud(s),l)}function gk(i){return Iy(i)&&i!=+i}function yk(i){if(eT(i))throw new ue(u);return E0(i)}function vk(i){return i===null}function wk(i){return i==null}function Iy(i){return typeof i=="number"||Xe(i)&&Vt(i)==Me}function Os(i){if(!Xe(i)||Vt(i)!=At)return!1;var s=ia(i);if(s===null)return!0;var l=Re.call(s,"constructor")&&s.constructor;return typeof l=="function"&&l instanceof l&&ea.call(l)==mP}var vd=Kg?ln(Kg):v_;function xk(i){return by(i)&&i>=-H&&i<=H}var My=$g?ln($g):w_;function La(i){return typeof i=="string"||!ae(i)&&Xe(i)&&Vt(i)==hs}function fn(i){return typeof i=="symbol"||Xe(i)&&Vt(i)==Hu}var Co=qg?ln(qg):x_;function Ak(i){return i===n}function Sk(i){return Xe(i)&&Ot(i)==ps}function Ck(i){return Xe(i)&&Vt(i)==V2}var Ek=Sa(Gf),Pk=Sa(function(i,s){return i<=s});function Dy(i){if(!i)return[];if(Jt(i))return La(i)?zn(i):Yt(i);if(ys&&i[ys])return rP(i[ys]());var s=Ot(i),l=s==pe?If:s==jn?Ju:Eo;return l(i)}function wr(i){if(!i)return i===0?i:0;if(i=On(i),i===ze||i===-ze){var s=i<0?-1:1;return s*ee}return i===i?i:0}function fe(i){var s=wr(i),l=s%1;return s===s?l?s-l:s:0}function Ny(i){return i?Li(fe(i),0,me):0}function On(i){if(typeof i=="number")return i;if(fn(i))return se;if(Ke(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Ke(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=t0(i);var l=sE.test(i);return l||aE.test(i)?UE(i.slice(2),l?2:8):oE.test(i)?se:+i}function Fy(i){return rr(i,Xt(i))}function _k(i){return i?Li(fe(i),-H,H):i===0?i:0}function Te(i){return i==null?"":cn(i)}var Tk=xo(function(i,s){if(Rs(s)||Jt(s)){rr(s,mt(s),i);return}for(var l in s)Re.call(s,l)&&Ss(i,l,s[l])}),By=xo(function(i,s){rr(s,Xt(s),i)}),Ia=xo(function(i,s,l,h){rr(s,Xt(s),i,h)}),Rk=xo(function(i,s,l,h){rr(s,mt(s),i,h)}),kk=gr(Vf);function Ok(i,s){var l=wo(i);return s==null?l:g0(l,s)}var bk=he(function(i,s){i=Ie(i);var l=-1,h=s.length,y=h>2?s[2]:n;for(y&&Ut(s[0],s[1],y)&&(h=1);++l<h;)for(var S=s[l],_=Xt(S),R=-1,b=_.length;++R<b;){var U=_[R],j=i[U];(j===n||Qn(j,go[U])&&!Re.call(i,U))&&(i[U]=S[U])}return i}),Lk=he(function(i){return i.push(n,ty),an(Vy,n,i)});function Ik(i,s){return Jg(i,ne(s,3),nr)}function Mk(i,s){return Jg(i,ne(s,3),jf)}function Dk(i,s){return i==null?i:Uf(i,ne(s,3),Xt)}function Nk(i,s){return i==null?i:A0(i,ne(s,3),Xt)}function Fk(i,s){return i&&nr(i,ne(s,3))}function Bk(i,s){return i&&jf(i,ne(s,3))}function Vk(i){return i==null?[]:pa(i,mt(i))}function Uk(i){return i==null?[]:pa(i,Xt(i))}function wd(i,s,l){var h=i==null?n:Ii(i,s);return h===n?l:h}function jk(i,s){return i!=null&&iy(i,s,c_)}function xd(i,s){return i!=null&&iy(i,s,f_)}var zk=Y0(function(i,s,l){s!=null&&typeof s.toString!="function"&&(s=ta.call(s)),i[s]=l},Sd(Zt)),Wk=Y0(function(i,s,l){s!=null&&typeof s.toString!="function"&&(s=ta.call(s)),Re.call(i,s)?i[s].push(l):i[s]=[l]},ne),Qk=he(Es);function mt(i){return Jt(i)?p0(i):Hf(i)}function Xt(i){return Jt(i)?p0(i,!0):A_(i)}function Hk(i,s){var l={};return s=ne(s,3),nr(i,function(h,y,S){pr(l,s(h,y,S),h)}),l}function Gk(i,s){var l={};return s=ne(s,3),nr(i,function(h,y,S){pr(l,y,s(h,y,S))}),l}var Kk=xo(function(i,s,l){ma(i,s,l)}),Vy=xo(function(i,s,l,h){ma(i,s,l,h)}),$k=gr(function(i,s){var l={};if(i==null)return l;var h=!1;s=We(s,function(S){return S=Wr(S,i),h||(h=S.length>1),S}),rr(i,od(i),l),h&&(l=Tn(l,m|g|w,z_));for(var y=s.length;y--;)Jf(l,s[y]);return l});function qk(i,s){return Uy(i,Oa(ne(s)))}var Yk=gr(function(i,s){return i==null?{}:C_(i,s)});function Uy(i,s){if(i==null)return{};var l=We(od(i),function(h){return[h]});return s=ne(s),b0(i,l,function(h,y){return s(h,y[0])})}function Jk(i,s,l){s=Wr(s,i);var h=-1,y=s.length;for(y||(y=1,i=n);++h<y;){var S=i==null?n:i[ir(s[h])];S===n&&(h=y,S=l),i=vr(S)?S.call(i):S}return i}function Xk(i,s,l){return i==null?i:_s(i,s,l)}function Zk(i,s,l,h){return h=typeof h=="function"?h:n,i==null?i:_s(i,s,l,h)}var jy=Z0(mt),zy=Z0(Xt);function eO(i,s,l){var h=ae(i),y=h||Hr(i)||Co(i);if(s=ne(s,4),l==null){var S=i&&i.constructor;y?l=h?new S:[]:Ke(i)?l=vr(S)?wo(ia(i)):{}:l={}}return(y?En:nr)(i,function(_,R,b){return s(l,_,R,b)}),l}function tO(i,s){return i==null?!0:Jf(i,s)}function nO(i,s,l){return i==null?i:N0(i,s,ed(l))}function rO(i,s,l,h){return h=typeof h=="function"?h:n,i==null?i:N0(i,s,ed(l),h)}function Eo(i){return i==null?[]:Lf(i,mt(i))}function iO(i){return i==null?[]:Lf(i,Xt(i))}function oO(i,s,l){return l===n&&(l=s,s=n),l!==n&&(l=On(l),l=l===l?l:0),s!==n&&(s=On(s),s=s===s?s:0),Li(On(i),s,l)}function sO(i,s,l){return s=wr(s),l===n?(l=s,s=0):l=wr(l),i=On(i),d_(i,s,l)}function uO(i,s,l){if(l&&typeof l!="boolean"&&Ut(i,s,l)&&(s=l=n),l===n&&(typeof s=="boolean"?(l=s,s=n):typeof i=="boolean"&&(l=i,i=n)),i===n&&s===n?(i=0,s=1):(i=wr(i),s===n?(s=i,i=0):s=wr(s)),i>s){var h=i;i=s,s=h}if(l||i%1||s%1){var y=d0();return kt(i+y*(s-i+VE("1e-"+((y+"").length-1))),s)}return $f(i,s)}var aO=Ao(function(i,s,l){return s=s.toLowerCase(),i+(l?Wy(s):s)});function Wy(i){return Ad(Te(i).toLowerCase())}function Qy(i){return i=Te(i),i&&i.replace(cE,XE).replace(kE,"")}function lO(i,s,l){i=Te(i),s=cn(s);var h=i.length;l=l===n?h:Li(fe(l),0,h);var y=l;return l-=s.length,l>=0&&i.slice(l,y)==s}function cO(i){return i=Te(i),i&&Q2.test(i)?i.replace(Ag,ZE):i}function fO(i){return i=Te(i),i&&Y2.test(i)?i.replace(gf,"\\$&"):i}var dO=Ao(function(i,s,l){return i+(l?"-":"")+s.toLowerCase()}),hO=Ao(function(i,s,l){return i+(l?" ":"")+s.toLowerCase()}),pO=K0("toLowerCase");function mO(i,s,l){i=Te(i),s=fe(s);var h=s?po(i):0;if(!s||h>=s)return i;var y=(s-h)/2;return Aa(aa(y),l)+i+Aa(ua(y),l)}function gO(i,s,l){i=Te(i),s=fe(s);var h=s?po(i):0;return s&&h<s?i+Aa(s-h,l):i}function yO(i,s,l){i=Te(i),s=fe(s);var h=s?po(i):0;return s&&h<s?Aa(s-h,l)+i:i}function vO(i,s,l){return l||s==null?s=0:s&&(s=+s),PP(Te(i).replace(yf,""),s||0)}function wO(i,s,l){return(l?Ut(i,s,l):s===n)?s=1:s=fe(s),qf(Te(i),s)}function xO(){var i=arguments,s=Te(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var AO=Ao(function(i,s,l){return i+(l?"_":"")+s.toLowerCase()});function SO(i,s,l){return l&&typeof l!="number"&&Ut(i,s,l)&&(s=l=n),l=l===n?me:l>>>0,l?(i=Te(i),i&&(typeof s=="string"||s!=null&&!vd(s))&&(s=cn(s),!s&&ho(i))?Qr(zn(i),0,l):i.split(s,l)):[]}var CO=Ao(function(i,s,l){return i+(l?" ":"")+Ad(s)});function EO(i,s,l){return i=Te(i),l=l==null?0:Li(fe(l),0,i.length),s=cn(s),i.slice(l,l+s.length)==s}function PO(i,s,l){var h=v.templateSettings;l&&Ut(i,s,l)&&(s=n),i=Te(i),s=Ia({},s,h,ey);var y=Ia({},s.imports,h.imports,ey),S=mt(y),_=Lf(y,S),R,b,U=0,j=s.interpolate||Gu,W="__p += '",K=Mf((s.escape||Gu).source+"|"+j.source+"|"+(j===Sg?iE:Gu).source+"|"+(s.evaluate||Gu).source+"|$","g"),Z="//# sourceURL="+(Re.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ME+"]")+`
85
+ `;i.replace(K,function(ie,ge,xe,dn,jt,hn){return xe||(xe=dn),W+=i.slice(U,hn).replace(fE,eP),ge&&(R=!0,W+=`' +
87
86
  __e(`+ge+`) +
88
- '`),jt&&(L=!0,W+=`';
87
+ '`),jt&&(b=!0,W+=`';
89
88
  `+jt+`;
90
89
  __p += '`),xe&&(W+=`' +
91
90
  ((__t = (`+xe+`)) == null ? '' : __t) +
92
- '`),U=dn+ie.length,ie}),W+=`';
93
- `;var re=ke.call(s,"variable")&&s.variable;if(!re)W=`with (obj) {
91
+ '`),U=hn+ie.length,ie}),W+=`';
92
+ `;var re=Re.call(s,"variable")&&s.variable;if(!re)W=`with (obj) {
94
93
  `+W+`
95
94
  }
96
- `;else if(eE.test(re))throw new ue(c);W=(L?W.replace(B2,""):W).replace(V2,"$1").replace(U2,"$1;"),W="function("+(re||"obj")+`) {
95
+ `;else if(nE.test(re))throw new ue(c);W=(b?W.replace(U2,""):W).replace(j2,"$1").replace(z2,"$1;"),W="function("+(re||"obj")+`) {
97
96
  `+(re?"":`obj || (obj = {});
98
- `)+"var __t, __p = ''"+(T?", __e = _.escape":"")+(L?`, __j = Array.prototype.join;
97
+ `)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(b?`, __j = Array.prototype.join;
99
98
  function print() { __p += __j.call(arguments, '') }
100
99
  `:`;
101
100
  `)+W+`return __p
102
- }`;var de=Hy(function(){return Pe(S,Z+"return "+W).apply(n,_)});if(de.source=W,gd(de))throw de;return de}function EO(i){return Te(i).toLowerCase()}function PO(i){return Te(i).toUpperCase()}function _O(i,s,l){if(i=Te(i),i&&(l||s===n))return e0(i);if(!i||!(s=ln(s)))return i;var h=zn(i),y=zn(s),S=t0(h,y),_=n0(h,y)+1;return Qr(h,S,_).join("")}function TO(i,s,l){if(i=Te(i),i&&(l||s===n))return i.slice(0,i0(i)+1);if(!i||!(s=ln(s)))return i;var h=zn(i),y=n0(h,zn(s))+1;return Qr(h,0,y).join("")}function kO(i,s,l){if(i=Te(i),i&&(l||s===n))return i.replace(gf,"");if(!i||!(s=ln(s)))return i;var h=zn(i),y=t0(h,zn(s));return Qr(h,y).join("")}function RO(i,s){var l=G,h=le;if(Ke(s)){var y="separator"in s?s.separator:y;l="length"in s?fe(s.length):l,h="omission"in s?ln(s.omission):h}i=Te(i);var S=i.length;if(fo(i)){var _=zn(i);S=_.length}if(l>=S)return i;var T=l-ho(h);if(T<1)return h;var L=_?Qr(_,0,T).join(""):i.slice(0,T);if(y===n)return L+h;if(_&&(T+=L.length-T),yd(y)){if(i.slice(T).search(y)){var U,j=L;for(y.global||(y=If(y.source,Te(Sg.exec(y))+"g")),y.lastIndex=0;U=y.exec(j);)var W=U.index;L=L.slice(0,W===n?T:W)}}else if(i.indexOf(ln(y),T)!=T){var K=L.lastIndexOf(y);K>-1&&(L=L.slice(0,K))}return L+h}function OO(i){return i=Te(i),i&&j2.test(i)?i.replace(wg,oP):i}var LO=xo(function(i,s,l){return i+(l?" ":"")+s.toUpperCase()}),xd=G0("toUpperCase");function Qy(i,s,l){return i=Te(i),s=l?n:s,s===n?eP(i)?aP(i):HE(i):i.match(s)||[]}var Hy=he(function(i,s){try{return un(i,n,s)}catch(l){return gd(l)?l:new ue(l)}}),bO=gr(function(i,s){return En(s,function(l){l=ir(l),pr(i,l,pd(i[l],i))}),i});function IO(i){var s=i==null?0:i.length,l=ne();return i=s?We(i,function(h){if(typeof h[1]!="function")throw new Pn(a);return[l(h[0]),h[1]]}):[],he(function(h){for(var y=-1;++y<s;){var S=i[y];if(un(S[0],this,h))return un(S[1],this,h)}})}function MO(i){return o_(Tn(i,m))}function Ad(i){return function(){return i}}function DO(i,s){return i==null||i!==i?s:i}var NO=$0(),FO=$0(!0);function Xt(i){return i}function Sd(i){return E0(typeof i=="function"?i:Tn(i,m))}function BO(i){return _0(Tn(i,m))}function VO(i,s){return T0(i,Tn(s,m))}var UO=he(function(i,s){return function(l){return Cs(l,i,s)}}),jO=he(function(i,s){return function(l){return Cs(i,l,s)}});function Cd(i,s,l){var h=mt(s),y=ha(s,h);l==null&&!(Ke(s)&&(y.length||!h.length))&&(l=s,s=i,i=this,y=ha(s,mt(s)));var S=!(Ke(l)&&"chain"in l)||!!l.chain,_=vr(i);return En(y,function(T){var L=s[T];i[T]=L,_&&(i.prototype[T]=function(){var U=this.__chain__;if(S||U){var j=i(this.__wrapped__),W=j.__actions__=qt(this.__actions__);return W.push({func:L,args:arguments,thisArg:i}),j.__chain__=U,j}return L.apply(i,Br([this.value()],arguments))})}),i}function zO(){return St._===this&&(St._=pP),this}function Ed(){}function WO(i){return i=fe(i),he(function(s){return k0(s,i)})}var QO=td(We),HO=td(qg),GO=td(_f);function Gy(i){return ad(i)?Tf(ir(i)):S_(i)}function KO(i){return function(s){return i==null?n:bi(i,s)}}var $O=Y0(),qO=Y0(!0);function Pd(){return[]}function _d(){return!1}function YO(){return{}}function JO(){return""}function XO(){return!0}function ZO(i,s){if(i=fe(i),i<1||i>H)return[];var l=me,h=Rt(i,me);s=ne(s),i-=me;for(var y=Of(h,s);++l<i;)s(l);return y}function e3(i){return ae(i)?We(i,ir):cn(i)?[i]:qt(dy(Te(i)))}function t3(i){var s=++dP;return Te(i)+s}var n3=wa(function(i,s){return i+s},0),r3=nd("ceil"),i3=wa(function(i,s){return i/s},1),o3=nd("floor");function s3(i){return i&&i.length?da(i,Xt,jf):n}function u3(i,s){return i&&i.length?da(i,ne(s,2),jf):n}function a3(i){return Xg(i,Xt)}function l3(i,s){return Xg(i,ne(s,2))}function c3(i){return i&&i.length?da(i,Xt,Hf):n}function f3(i,s){return i&&i.length?da(i,ne(s,2),Hf):n}var d3=wa(function(i,s){return i*s},1),h3=nd("round"),p3=wa(function(i,s){return i-s},0);function m3(i){return i&&i.length?Rf(i,Xt):0}function g3(i,s){return i&&i.length?Rf(i,ne(s,2)):0}return v.after=Bk,v.ary=Cy,v.assign=PR,v.assignIn=Fy,v.assignInWith=ba,v.assignWith=_R,v.at=TR,v.before=Ey,v.bind=pd,v.bindAll=bO,v.bindKey=Py,v.castArray=Yk,v.chain=xy,v.chunk=oT,v.compact=sT,v.concat=uT,v.cond=IO,v.conforms=MO,v.constant=Ad,v.countBy=mk,v.create=kR,v.curry=_y,v.curryRight=Ty,v.debounce=ky,v.defaults=RR,v.defaultsDeep=OR,v.defer=Vk,v.delay=Uk,v.difference=aT,v.differenceBy=lT,v.differenceWith=cT,v.drop=fT,v.dropRight=dT,v.dropRightWhile=hT,v.dropWhile=pT,v.fill=mT,v.filter=yk,v.flatMap=xk,v.flatMapDeep=Ak,v.flatMapDepth=Sk,v.flatten=gy,v.flattenDeep=gT,v.flattenDepth=yT,v.flip=jk,v.flow=NO,v.flowRight=FO,v.fromPairs=vT,v.functions=FR,v.functionsIn=BR,v.groupBy=Ck,v.initial=xT,v.intersection=AT,v.intersectionBy=ST,v.intersectionWith=CT,v.invert=UR,v.invertBy=jR,v.invokeMap=Pk,v.iteratee=Sd,v.keyBy=_k,v.keys=mt,v.keysIn=Jt,v.map=_a,v.mapKeys=WR,v.mapValues=QR,v.matches=BO,v.matchesProperty=VO,v.memoize=ka,v.merge=HR,v.mergeWith=By,v.method=UO,v.methodOf=jO,v.mixin=Cd,v.negate=Ra,v.nthArg=WO,v.omit=GR,v.omitBy=KR,v.once=zk,v.orderBy=Tk,v.over=QO,v.overArgs=Wk,v.overEvery=HO,v.overSome=GO,v.partial=md,v.partialRight=Ry,v.partition=kk,v.pick=$R,v.pickBy=Vy,v.property=Gy,v.propertyOf=KO,v.pull=TT,v.pullAll=vy,v.pullAllBy=kT,v.pullAllWith=RT,v.pullAt=OT,v.range=$O,v.rangeRight=qO,v.rearg=Qk,v.reject=Lk,v.remove=LT,v.rest=Hk,v.reverse=dd,v.sampleSize=Ik,v.set=YR,v.setWith=JR,v.shuffle=Mk,v.slice=bT,v.sortBy=Fk,v.sortedUniq=VT,v.sortedUniqBy=UT,v.split=xO,v.spread=Gk,v.tail=jT,v.take=zT,v.takeRight=WT,v.takeRightWhile=QT,v.takeWhile=HT,v.tap=sk,v.throttle=Kk,v.thru=Pa,v.toArray=My,v.toPairs=Uy,v.toPairsIn=jy,v.toPath=e3,v.toPlainObject=Ny,v.transform=XR,v.unary=$k,v.union=GT,v.unionBy=KT,v.unionWith=$T,v.uniq=qT,v.uniqBy=YT,v.uniqWith=JT,v.unset=ZR,v.unzip=hd,v.unzipWith=wy,v.update=eO,v.updateWith=tO,v.values=Co,v.valuesIn=nO,v.without=XT,v.words=Qy,v.wrap=qk,v.xor=ZT,v.xorBy=ek,v.xorWith=tk,v.zip=nk,v.zipObject=rk,v.zipObjectDeep=ik,v.zipWith=ok,v.entries=Uy,v.entriesIn=jy,v.extend=Fy,v.extendWith=ba,Cd(v,v),v.add=n3,v.attempt=Hy,v.camelCase=sO,v.capitalize=zy,v.ceil=r3,v.clamp=rO,v.clone=Jk,v.cloneDeep=Zk,v.cloneDeepWith=eR,v.cloneWith=Xk,v.conformsTo=tR,v.deburr=Wy,v.defaultTo=DO,v.divide=i3,v.endsWith=uO,v.eq=Qn,v.escape=aO,v.escapeRegExp=lO,v.every=gk,v.find=vk,v.findIndex=py,v.findKey=LR,v.findLast=wk,v.findLastIndex=my,v.findLastKey=bR,v.floor=o3,v.forEach=Ay,v.forEachRight=Sy,v.forIn=IR,v.forInRight=MR,v.forOwn=DR,v.forOwnRight=NR,v.get=vd,v.gt=nR,v.gte=rR,v.has=VR,v.hasIn=wd,v.head=yy,v.identity=Xt,v.includes=Ek,v.indexOf=wT,v.inRange=iO,v.invoke=zR,v.isArguments=Di,v.isArray=ae,v.isArrayBuffer=iR,v.isArrayLike=Yt,v.isArrayLikeObject=nt,v.isBoolean=oR,v.isBuffer=Hr,v.isDate=sR,v.isElement=uR,v.isEmpty=aR,v.isEqual=lR,v.isEqualWith=cR,v.isError=gd,v.isFinite=fR,v.isFunction=vr,v.isInteger=Oy,v.isLength=Oa,v.isMap=Ly,v.isMatch=dR,v.isMatchWith=hR,v.isNaN=pR,v.isNative=mR,v.isNil=yR,v.isNull=gR,v.isNumber=by,v.isObject=Ke,v.isObjectLike=Xe,v.isPlainObject=Rs,v.isRegExp=yd,v.isSafeInteger=vR,v.isSet=Iy,v.isString=La,v.isSymbol=cn,v.isTypedArray=So,v.isUndefined=wR,v.isWeakMap=xR,v.isWeakSet=AR,v.join=ET,v.kebabCase=cO,v.last=Rn,v.lastIndexOf=PT,v.lowerCase=fO,v.lowerFirst=dO,v.lt=SR,v.lte=CR,v.max=s3,v.maxBy=u3,v.mean=a3,v.meanBy=l3,v.min=c3,v.minBy=f3,v.stubArray=Pd,v.stubFalse=_d,v.stubObject=YO,v.stubString=JO,v.stubTrue=XO,v.multiply=d3,v.nth=_T,v.noConflict=zO,v.noop=Ed,v.now=Ta,v.pad=hO,v.padEnd=pO,v.padStart=mO,v.parseInt=gO,v.random=oO,v.reduce=Rk,v.reduceRight=Ok,v.repeat=yO,v.replace=vO,v.result=qR,v.round=h3,v.runInContext=O,v.sample=bk,v.size=Dk,v.snakeCase=wO,v.some=Nk,v.sortedIndex=IT,v.sortedIndexBy=MT,v.sortedIndexOf=DT,v.sortedLastIndex=NT,v.sortedLastIndexBy=FT,v.sortedLastIndexOf=BT,v.startCase=AO,v.startsWith=SO,v.subtract=p3,v.sum=m3,v.sumBy=g3,v.template=CO,v.times=ZO,v.toFinite=wr,v.toInteger=fe,v.toLength=Dy,v.toLower=EO,v.toNumber=On,v.toSafeInteger=ER,v.toString=Te,v.toUpper=PO,v.trim=_O,v.trimEnd=TO,v.trimStart=kO,v.truncate=RO,v.unescape=OO,v.uniqueId=t3,v.upperCase=LO,v.upperFirst=xd,v.each=Ay,v.eachRight=Sy,v.first=yy,Cd(v,function(){var i={};return nr(v,function(s,l){ke.call(v.prototype,l)||(i[l]=s)}),i}(),{chain:!1}),v.VERSION=r,En(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){v[i].placeholder=v}),En(["drop","take"],function(i,s){ve.prototype[i]=function(l){l=l===n?1:lt(fe(l),0);var h=this.__filtered__&&!s?new ve(this):this.clone();return h.__filtered__?h.__takeCount__=Rt(l,h.__takeCount__):h.__views__.push({size:Rt(l,me),type:i+(h.__dir__<0?"Right":"")}),h},ve.prototype[i+"Right"]=function(l){return this.reverse()[i](l).reverse()}}),En(["filter","map","takeWhile"],function(i,s){var l=s+1,h=l==wt||l==ye;ve.prototype[i]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:ne(y,3),type:l}),S.__filtered__=S.__filtered__||h,S}}),En(["head","last"],function(i,s){var l="take"+(s?"Right":"");ve.prototype[i]=function(){return this[l](1).value()[0]}}),En(["initial","tail"],function(i,s){var l="drop"+(s?"":"Right");ve.prototype[i]=function(){return this.__filtered__?new ve(this):this[l](1)}}),ve.prototype.compact=function(){return this.filter(Xt)},ve.prototype.find=function(i){return this.filter(i).head()},ve.prototype.findLast=function(i){return this.reverse().find(i)},ve.prototype.invokeMap=he(function(i,s){return typeof i=="function"?new ve(this):this.map(function(l){return Cs(l,i,s)})}),ve.prototype.reject=function(i){return this.filter(Ra(ne(i)))},ve.prototype.slice=function(i,s){i=fe(i);var l=this;return l.__filtered__&&(i>0||s<0)?new ve(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),s!==n&&(s=fe(s),l=s<0?l.dropRight(-s):l.take(s-i)),l)},ve.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},ve.prototype.toArray=function(){return this.take(me)},nr(ve.prototype,function(i,s){var l=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),y=v[h?"take"+(s=="last"?"Right":""):s],S=h||/^find/.test(s);y&&(v.prototype[s]=function(){var _=this.__wrapped__,T=h?[1]:arguments,L=_ instanceof ve,U=T[0],j=L||ae(_),W=function(ge){var xe=y.apply(v,Br([ge],T));return h&&K?xe[0]:xe};j&&l&&typeof U=="function"&&U.length!=1&&(L=j=!1);var K=this.__chain__,Z=!!this.__actions__.length,re=S&&!K,de=L&&!Z;if(!S&&j){_=de?_:new ve(this);var ie=i.apply(_,T);return ie.__actions__.push({func:Pa,args:[W],thisArg:n}),new _n(ie,K)}return re&&de?i.apply(this,T):(ie=this.thru(W),re?h?ie.value()[0]:ie.value():ie)})}),En(["pop","push","shift","sort","splice","unshift"],function(i){var s=Ju[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);v.prototype[i]=function(){var y=arguments;if(h&&!this.__chain__){var S=this.value();return s.apply(ae(S)?S:[],y)}return this[l](function(_){return s.apply(ae(_)?_:[],y)})}}),nr(ve.prototype,function(i,s){var l=v[s];if(l){var h=l.name+"";ke.call(yo,h)||(yo[h]=[]),yo[h].push({name:s,func:l})}}),yo[va(n,w).name]=[{name:"wrapper",func:n}],ve.prototype.clone=OP,ve.prototype.reverse=LP,ve.prototype.value=bP,v.prototype.at=uk,v.prototype.chain=ak,v.prototype.commit=lk,v.prototype.next=ck,v.prototype.plant=dk,v.prototype.reverse=hk,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=pk,v.prototype.first=v.prototype.head,gs&&(v.prototype[gs]=fk),v},po=lP();Ti?((Ti.exports=po)._=po,Sf._=po):St._=po}).call(Os)})(fc,fc.exports);var O2=fc.exports;const JN=()=>{const[e,t]=B.useState(window.innerWidth<=768);return B.useEffect(()=>{const n=O2.debounce(()=>{const r=window.innerWidth;t(r<=768)},100);return window.addEventListener("resize",n),()=>{n.cancel(),window.removeEventListener("resize",n)}},[]),{isMobileView:e}};var L2={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},jw=Jn.createContext&&Jn.createContext(L2),mi=globalThis&&globalThis.__assign||function(){return mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},mi.apply(this,arguments)},XN=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function b2(e){return e&&e.map(function(t,n){return Jn.createElement(t.tag,mi({key:n},t.attr),b2(t.child))})}function Wu(e){return function(t){return Jn.createElement(ZN,mi({attr:mi({},e.attr)},t),b2(e.child))}}function ZN(e){var t=function(n){var r=e.attr,o=e.size,u=e.title,a=XN(e,["attr","size","title"]),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),Jn.createElement("svg",mi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:f,style:mi(mi({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&Jn.createElement("title",null,u),e.children)};return jw!==void 0?Jn.createElement(jw.Consumer,null,function(n){return t(n)}):t(L2)}function e8(e){return Wu({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 0 0-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]})(e)}function t8(e){return Wu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7.25361 18.4944L7.97834 18.917C9.18909 19.623 10.5651 20 12.001 20C16.4193 20 20.001 16.4183 20.001 12C20.001 7.58172 16.4193 4 12.001 4C7.5827 4 4.00098 7.58172 4.00098 12C4.00098 13.4363 4.37821 14.8128 5.08466 16.0238L5.50704 16.7478L4.85355 19.1494L7.25361 18.4944ZM2.00516 22L3.35712 17.0315C2.49494 15.5536 2.00098 13.8345 2.00098 12C2.00098 6.47715 6.47813 2 12.001 2C17.5238 2 22.001 6.47715 22.001 12C22.001 17.5228 17.5238 22 12.001 22C10.1671 22 8.44851 21.5064 6.97086 20.6447L2.00516 22ZM8.39232 7.30833C8.5262 7.29892 8.66053 7.29748 8.79459 7.30402C8.84875 7.30758 8.90265 7.31384 8.95659 7.32007C9.11585 7.33846 9.29098 7.43545 9.34986 7.56894C9.64818 8.24536 9.93764 8.92565 10.2182 9.60963C10.2801 9.76062 10.2428 9.95633 10.125 10.1457C10.0652 10.2428 9.97128 10.379 9.86248 10.5183C9.74939 10.663 9.50599 10.9291 9.50599 10.9291C9.50599 10.9291 9.40738 11.0473 9.44455 11.1944C9.45903 11.25 9.50521 11.331 9.54708 11.3991C9.57027 11.4368 9.5918 11.4705 9.60577 11.4938C9.86169 11.9211 10.2057 12.3543 10.6259 12.7616C10.7463 12.8783 10.8631 12.9974 10.9887 13.108C11.457 13.5209 11.9868 13.8583 12.559 14.1082L12.5641 14.1105C12.6486 14.1469 12.692 14.1668 12.8157 14.2193C12.8781 14.2457 12.9419 14.2685 13.0074 14.2858C13.0311 14.292 13.0554 14.2955 13.0798 14.2972C13.2415 14.3069 13.335 14.2032 13.3749 14.1555C14.0984 13.279 14.1646 13.2218 14.1696 13.2222V13.2238C14.2647 13.1236 14.4142 13.0888 14.5476 13.097C14.6085 13.1007 14.6691 13.1124 14.7245 13.1377C15.2563 13.3803 16.1258 13.7587 16.1258 13.7587L16.7073 14.0201C16.8047 14.0671 16.8936 14.1778 16.8979 14.2854C16.9005 14.3523 16.9077 14.4603 16.8838 14.6579C16.8525 14.9166 16.7738 15.2281 16.6956 15.3913C16.6406 15.5058 16.5694 15.6074 16.4866 15.6934C16.3743 15.81 16.2909 15.8808 16.1559 15.9814C16.0737 16.0426 16.0311 16.0714 16.0311 16.0714C15.8922 16.159 15.8139 16.2028 15.6484 16.2909C15.391 16.428 15.1066 16.5068 14.8153 16.5218C14.6296 16.5313 14.4444 16.5447 14.2589 16.5347C14.2507 16.5342 13.6907 16.4482 13.6907 16.4482C12.2688 16.0742 10.9538 15.3736 9.85034 14.402C9.62473 14.2034 9.4155 13.9885 9.20194 13.7759C8.31288 12.8908 7.63982 11.9364 7.23169 11.0336C7.03043 10.5884 6.90299 10.1116 6.90098 9.62098C6.89729 9.01405 7.09599 8.4232 7.46569 7.94186C7.53857 7.84697 7.60774 7.74855 7.72709 7.63586C7.85348 7.51651 7.93392 7.45244 8.02057 7.40811C8.13607 7.34902 8.26293 7.31742 8.39232 7.30833Z"}}]})(e)}function n8(e){return Wu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2 2v13.5a.5.5 0 0 0 .74.439L8 13.069l5.26 2.87A.5.5 0 0 0 14 15.5V2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2z"}}]})(e)}function r8(e){return Wu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z"}}]})(e)}const i8=()=>{const[e,t]=B.useState(!1),n=qm(),{isPublicApp:r}=B.useContext(ls),{data:o,refetch:u}=Bu({queryKey:["alreadyBookmarkedRoute"],queryFn:()=>fetcher('/api/resource/Chatnext Bookmark?fields="*"').then(d=>d.json()).then(d=>(window.frappe.boot.chatnextBookmarks=[...d.data],d.data)),enabled:!r}),{mutateAsync:a}=to({mutationFn:()=>{var m,g,x;const d=new Headers;d.append("x-frappe-csrf-token",(m=window==null?void 0:window.frappe)==null?void 0:m.csrf_token);const p=JSON.stringify({label:document.title,route:window.location.pathname,user:(g=window==null?void 0:window.frappe)==null?void 0:g.user.name,frappe_route:((x=window==null?void 0:window.frappe)==null?void 0:x.get_route)||""});return fetcher("/api/resource/Chatnext Bookmark",{method:"POST",headers:d,body:p,redirect:"follow"}).then(E=>E.json())},onSuccess:()=>{n.invalidateQueries({queryKey:["alreadyBookmarkedRoute"]})}}),{mutateAsync:c}=to({mutationFn:d=>{var m;const p=new Headers;return p.append("x-frappe-csrf-token",(m=window==null?void 0:window.frappe)==null?void 0:m.csrf_token),fetcher(`/api/resource/Chatnext Bookmark/${d}`,{method:"DELETE",headers:p,redirect:"follow"}).then(g=>g.json())},onSuccess:()=>{n.invalidateQueries({queryKey:["alreadyBookmarkedRoute"]})}}),f=[{id:1,color:"#fffffff",callback:()=>{var d;e?c((d=o==null?void 0:o[0])==null?void 0:d.name).then(()=>u()):a().then(()=>u())}}];return B.useEffect(()=>{o!=null&&o.some(d=>d.route===window.location.pathname)?t(!0):t(!1)},[o]),z(Ir,{children:f.map(d=>z("button",{onClick:d.callback,style:{background:d.color},className:"md:tw-w-[12px] tw-mt-[10px] md:tw-mt-0 tw-w-[24px] tw-flex tw-h-[24px] tw-rounded-full md:tw-h-[12px] tw-cursor-pointer ta-outline-none tw-bg-black tw-mb-2 focus:tw-outline-none",children:e?z(n8,{className:"tw-fill-white tw-opacity-50"}):z(r8,{className:"tw-fill-white tw-opacity-80"})},d.id))})},o8=()=>ct(Ft,null,function*(){var e;return window.fetcher("/api/method/nextai.nextai.doctype.chatnext_settings.chatnext_settings.is_document_search_enabled",{headers:{"X-Frappe-Csrf-Token":(e=window==null?void 0:window.frappe)==null?void 0:e.csrf_token}}).then(t=>t.json()).catch(t=>{console.error("Error getting settings :- ",t)})}),s8=e=>Bu({queryKey:["ChatnextSettings","isDocumentChatEnabled"],queryFn:o8,enabled:!e}),I2=B.forwardRef((e,t)=>{var ht,Kt,$t;const{isOpen:n,isPinned:r}=gn(X=>X.chatButton),o=gn(X=>X.chatButton.isOpenPop),u=gn(X=>X.user.session_id),{getSearchContext:a,handleRouteClick:c,isPublicApp:f}=B.useContext(ls),d=B.useRef(null),[p,m]=B.useState(0),[g,x]=B.useState(""),[E,P]=B.useState(!1),[R,w]=B.useState({x:0,y:0}),[A,C]=B.useState({x:0,y:0}),[k,b]=B.useState([]),[I,N]=B.useState([]),{data:D}=s8(f),{mutateAsync:$}=P2(f),G=()=>{const X=window.innerWidth,ce=window.innerHeight,Ce=document.getElementById("draggable-element");if(Ce){const Ee=Ce.offsetWidth,te=Ce.offsetHeight;let pe,Ie;X<=768?(pe=(X-Ee)/2,Ie=10):(pe=(X-Ee)/2,Ie=(ce-te)/3),Ce.style.left=`${pe}px`,Ce.style.top=`${Ie}px`,w({x:pe,y:Ie})}};B.useEffect(()=>(G(),window.addEventListener("resize",G),()=>{window.removeEventListener("resize",G)}),[]),B.useEffect(()=>{const X=new CustomEvent("chatnext:modal:search:open");return document.dispatchEvent(X),()=>{const ce=new CustomEvent("chatnext:modal:search:close");document.dispatchEvent(ce)}},[]);const le=X=>{P(!0),C({x:X.clientX-R.x,y:X.clientY-R.y})},Ge=X=>{if(E){const ce=X.clientX-A.x,Ce=X.clientY-A.y,Ee=window.innerWidth,te=window.innerHeight,pe=document.getElementById("draggable-element");if(!pe)return;const Ie=pe.offsetWidth,pt=pe.offsetHeight,At=Ee-Ie,tr=te-pt,uo=Math.max(0,Math.min(ce,At)),_i=Math.max(0,Math.min(Ce,tr));w({x:uo,y:_i})}},ot=()=>{P(!1)};B.useEffect(()=>(E?(window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",ot)):(window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",ot)),()=>{window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",ot)}),[E]);const wt=B.useRef(null),_e=io(),{isMobileView:ye}=JN(),ze=($t=(Kt=(ht=window==null?void 0:window.frappe)==null?void 0:ht.user)==null?void 0:Kt.has_role)==null?void 0:$t.call(Kt,"Chatnext AI User"),H=X=>ct(Ft,null,function*(){var ce,Ce,Ee,te;if(f||!n&&ze){const pe=((Ce=(ce=window.frappe)==null?void 0:ce.get_route)==null?void 0:Ce.call(ce))||[],Ie={};pe.length&&pe[0]==="Form"&&(Ie.docname=pe[2]);const pt=f?"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_public_trigger.trigger":"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.trigger",tr=yield(yield fetcher(pt,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","X-Frappe-Csrf-Token":(Ee=window==null?void 0:window.frappe)==null?void 0:Ee.csrf_token},body:JSON.stringify({definition_name:X,variables:Ie})})).json(),uo=((te=tr==null?void 0:tr.message)==null?void 0:te.session)||"";uo?(_e(yl()),_e(Zt()),_e(Tu(uo))):console.error("Session not found")}}),ee=()=>ct(Ft,null,function*(){var X;try{if(!!(D!=null&&D.message)&&g.length>3){const Ce="/api/method/frappe.utils.global_search.search",Ee=new URLSearchParams({text:g,start:"0",limit:"100",doctype:""}),te=yield fetcher(Ce,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Frappe-Csrf-Token":(X=window==null?void 0:window.frappe)==null?void 0:X.csrf_token},body:Ee.toString()});if(!te.ok)throw new Error(`HTTP error! Status: ${te.status}`);const Ie=(yield te.json()).message.map((pt,At,tr)=>At===0||pt.doctype!==tr[At-1].doctype?q(F({},pt),{iname:pt.doctype}):pt);b(Ie)}else b([])}catch(ce){console.error("Error fetching data:",ce)}}),se=O2.debounce(ee,500);B.useEffect(()=>(se(),()=>{se.cancel()}),[g]),B.useEffect(()=>{(()=>ct(Ft,null,function*(){const ce=yield a(g),Ce=ce==null?void 0:ce.results;let Ee=[];g.length>3?Ee=[...Ce,...k||[]]:Ce.some(te=>te.type==="Assistant")?Ee=Ce.filter(te=>te.type==="Assistant"):Ee=Ce,N(Ee)}))()},[g,a,k]),B.useEffect(()=>{if(wt.current){const X=wt.current.querySelector(`[data-index="${p}"]`);X&&X.scrollIntoView({behavior:"smooth",block:"nearest"})}},[p]);const me=()=>{d.current&&(d.current.style.height="auto",d.current.style.height=`${d.current.scrollHeight}px`)};B.useEffect(()=>{const X=ce=>{var Ce,Ee;if(ce.key==="ArrowUp")m(te=>Math.max(te-1,-1));else if(ce.key==="ArrowDown")m(te=>Math.min(te+1,I.length-1));else if(ce.key==="Enter"&&!ce.shiftKey){ce.preventDefault();const te=I==null?void 0:I[p];if(!te){console.log("Send raw message",g),$({message:g}).then(pe=>{var pt;x("");const Ie=((pt=pe==null?void 0:pe.message)==null?void 0:pt.session)||"";Ie?(_e(yl()),_e(Zt()),_e(Tu(Ie))):console.error("Session not found")});return}if(te!=null&&te.isChatNextSearch)return;if((te==null?void 0:te.type)==="Assistant"){H(te.funnel_defination_id),_e(Zt());return}if(te!=null&&te.onclick)te.onclick(),_e(Zt());else if((Ce=te==null?void 0:te.route)!=null&&Ce.length){const pe=te.route.join("/");c(`/app/${pe}`),_e(Zt())}else if(window!=null&&window.frappe){const pe=I==null?void 0:I[p],Ie=pe.doctype,pt=pe.name;window==null||window.frappe.set_route((Ee=Ie==null?void 0:Ie.toLocaleLowerCase())==null?void 0:Ee.replaceAll(" ","-"),pt),_e(Zt())}else x((te==null?void 0:te.value)||""),m(0)}};return window.addEventListener("keydown",X),()=>{window.removeEventListener("keydown",X)}},[I,c,p]);const Fe=(X,ce,Ce,Ee,te,pe,Ie)=>()=>{var pt;if(pe&&pe==="Assistant")H(Ie||"");else if(Ce)Ce(),_e(Zt());else if(ce!=null&&ce.length){const At=ce.join("/");c(`/app/${At}`),_e(Zt())}else Ee&&te&&(window!=null&&window.frappe)?(window==null||window.frappe.set_route((pt=Ee==null?void 0:Ee.toLocaleLowerCase())==null?void 0:pt.replaceAll(" ","-"),te),_e(Zt())):(x(X||""),m(0))},Se=X=>{x(X.target.value),m(0),me()},xt=(X,ce)=>z("li",{"data-index":ce,tabIndex:0,role:"button",className:`
103
- tw-list-none tw-cursor-pointer tw-py-2 ${ce===0?"tw-mt-2":""} tw-px-5 tw-text-[#9E9E9E] ${ce===p?"tw-bg-[#00000099] tw-text-[#FFFFFF] tw-rounded-lg":""} tw-w-[95%] tw-ml-3 md:tw-text-[15px] tw-text-[18px] tw-font-500`,onClick:Fe(X.value,X.route,X.onclick,X.doctype,X.name,X.type,X.funnel_defination_id),children:X.label?z("div",{dangerouslySetInnerHTML:{__html:X.label}}):X.value||X.name},ce),kt=u?()=>{_e(yl()),_e(Zt())}:void 0;return o?De("div",{ref:t,id:"draggable-element",className:"tw-absolute tw-rounded-md tw-overflow-hidden tw-max-h-96 tw-flex tw-items-center tw-justify-center tw-w-[95%] md:tw-w-[60%] tw-mx-5 tw-flex-col",style:{zIndex:1e5,position:"absolute",maxWidth:ye?"380px":"600px",margin:"auto",left:`${R.x}px`,top:`${R.y}px`},onMouseDown:le,children:[De("div",{className:"tw-pt-[6px] tw-bg-[#090909] tw-rounded-t-md tw-w-full tw-flex tw-justify-between tw-items-center",children:[!f&&z(t8,{className:" tw-cursor-pointer tw-mb-1 tw-w-[24px] md:tw-w-[16px] md:tw-mx-5 tw-mx-3 tw-h-[24px] md:tw-h-[16px] tw-text-[#9E9E9E] ",onClick:()=>{window.location.href="/app/whatsapp_manager"}}),De("div",{className:Np("tw-flex tw-justify-between tw-w-16 tw-items-center",f&&"tw-ml-auto"),children:[!f&&z(i8,{}),z(e8,{className:Np("md:tw-w-[16px] tw-w-[24px] tw-p-[1.5px] tw-mb-1 tw-rounded-full tw-mr-3 tw-text-white tw-h-[24px] md:tw-h-[16px] tw-cursor-pointer tw-bg-[#9E9E9E]",r?"tw-opacity-80":"tw-opacity-50",f&&"tw-ml-auto"),onClick:()=>_e(OI())})]})]}),De("div",{className:"tw-w-full tw-py-5 md:tw-py-7 tw-flex tw-flex-row-reverse tw-space-x-2 tw-items-center tw-bg-[#202020]",children:[z("textarea",{ref:d,value:g,rows:1,onKeyDown:X=>{const ce=["ArrowDown","ArrowUp"];I.length>1&&ce.includes(X.key)&&X.preventDefault()},autoFocus:!0,placeholder:"Search or Type command (ctrl+G)",className:"tw-text-md tw-bg-[#202020] tw-text-white tw-w-[90%] tw-mr-2 tw-scroll-smooth tw-outline-none tw-overflow-y-auto tw-resize-none tw-border-0 focus:tw-ring-0 focus-visible:tw-ring-0 tw-px-3 custom-chatnext-scrollbar",style:{maxHeight:"200px",height:"30px"},onChange:Se}),z("span",{"aria-label":"ChatNext",tabIndex:0,children:z("img",{src:YN,alt:"ChatNext Logo",onClick:kt,className:`${ze?"tw-cursor-pointer":""} md:tw-w-[34px] md:tw-h-[35px] tw-w-[44px] tw-h-[45px]`})})]}),I.length>0&&z("div",{className:"tw-w-full tw-overflow-hidden tw-overflow-y-auto custom-chatnext-scrollbar tw-bg-[#2B2B2B]",children:z("ul",{ref:wt,children:I.map((X,ce)=>De("div",{children:[X.iname&&X.doctype!=="Contact"&&z("li",{className:"tw-text-gray-200 tw-my-1 tw-font-semibold",style:{marginLeft:"30px"},children:X.iname}),xt(X,ce)]},ce))})}),u&&z("div",{onClick:kt,role:"button",className:"tw-w-full tw-rounded-b-md tw-flex tw-justify-center tw-items-center tw-bg-[#202020]",children:De("div",{className:"tw-bg-[#202020] tw-w-full tw-h-full md:tw-pl-5 tw-pl-3 tw-pr-2 tw-rounded-b-md tw-py-2 tw-cursor-pointer tw-text-white tw-flex tw-justify-between",children:[z("p",{className:"tw-truncate tw-m-0 ",children:z("span",{className:"tw-text-[#9E9E9E] md:tw-text-sm tw-text-md",children:"Continue with Assistant..."})}),De("span",{className:" tw-flex tw-items-center tw-space-x-1",children:[z("img",{src:T2,className:"md:tw-w-[18px] md:tw-h-[18px] tw-h-6 tw-w-6 tw-rounded-full tw-p-[2.5px] tw-bg-white",alt:"ChatNext Logo"}),z("span",{className:"tw-w-16 tw-h-4 tw-text-white md:tw-text-xs tw-text-sm md:tw-font-bold tw-font-semibold",children:"ChatNext"})]})]})})]}):null});I2.displayName="Popup";let rl;const u8=new Uint8Array(16);function a8(){if(!rl&&(rl=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rl(u8)}const Et=[];for(let e=0;e<256;++e)Et.push((e+256).toString(16).slice(1));function l8(e,t=0){return Et[e[t+0]]+Et[e[t+1]]+Et[e[t+2]]+Et[e[t+3]]+"-"+Et[e[t+4]]+Et[e[t+5]]+"-"+Et[e[t+6]]+Et[e[t+7]]+"-"+Et[e[t+8]]+Et[e[t+9]]+"-"+Et[e[t+10]]+Et[e[t+11]]+Et[e[t+12]]+Et[e[t+13]]+Et[e[t+14]]+Et[e[t+15]]}const c8=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zw={randomUUID:c8};function f8(e,t,n){if(zw.randomUUID&&!t&&!e)return zw.randomUUID();e=e||{};const r=e.random||(e.rng||a8)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return l8(r)}const d8=(e,t)=>{const n=r=>{e.current&&!e.current.contains(r.target)&&t()};B.useEffect(()=>(document.addEventListener("click",n),()=>{document.removeEventListener("click",n)}))};function h8(e){return Wu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}const p8=()=>{const[e,t]=B.useState(0);return B.useEffect(()=>{function n(r){window.nativeInterface.logToNative(r),window.nativeInterface.logToNative(r.payload),window.nativeInterface.logToNative("haha"),t(r.payload.length||0)}return window.nativeInterface.subscribeToEvent("BACKGROUND_RUNNING_TASKS",n),()=>{window.nativeInterface.unsubscribeToEvent("BACKGROUND_RUNNING_TASKS",n)}},[]),e<=0?null:z("div",{className:`tw-fixed transform tw-bottom-0 tw-right-[10px] tw-m-0 tw-cursor-pointer tw-w-[120px] tw-h-[40px] tw-z-[10] tw-flex-col tw-items-center tw-justify-center tw-rounded-tr-md tw-rounded-tl-md tw-p-2 tw-bg-blue-700 tw-text-white ${e<=0?"tw-hidden":"tw-flex"}`,children:z("div",{className:`tw-flex tw-h-full tw-w-full tw-transform tw-items-center tw-justify-center tw-rounded-full tw-transition-all tw-delay-75 tw-duration-100 tw-ease-in-out
104
- `,children:z("div",{className:"btn-open-popup__icon w-full tw-h-9 tw-flex tw-items-center tw-justify-center tw-text-center tw-text-sm",children:De("div",{className:"tw-flex tw-gap-2 tw-items-center w-full",children:[z(h8,{})," ",e," ",z("span",{children:"Pending"})]})})})})},M2=new tM({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),m8=()=>{const e=io(),t=B.useRef(null),{isOpenPop:n,isPinned:r}=gn(u=>u.chatButton);return B.useEffect(()=>{const u=a=>{if((a.metaKey||a.ctrlKey)&&a.key.toLocaleLowerCase()==="g")a.preventDefault(),e(n?Zt():FS());else if(a.key.toLocaleLowerCase()==="escape"){a.preventDefault();const c=f8();e(Hm()),e(Zt()),e(bI()),e(Tu(c))}};return window.addEventListener("keydown",u,!1),()=>{window.removeEventListener("keydown",u,!1)}},[n]),d8(t,()=>{!r&&n&&e(Zt())}),De(Ir,{children:[z(p8,{}),z(UI,{}),n&&z(I2,{ref:t}),z(R2,{})]})},g8=e=>z(PS,{propsData:e,children:z(ZS,{client:M2,children:z(xS,{store:jS,children:z(m8,{})})})}),y8=e=>z(PS,{propsData:e,children:z(ZS,{client:M2,children:z(xS,{store:jS,children:z(R2,{})})})});function v8(){let e="",t,n;for(t=0;t<32;t++)n=Math.random()*16|0,(t===8||t===12||t===16||t===20)&&(e+="-"),e+=(t===12?4:t===16?n&3|8:n).toString(16);return e}class w8{constructor(t){this.listeners=[t]}subscribe(t){this.listeners.push(t)}unsubscribe(t){const n=this.listeners.findIndex(t);this.listeners.splice(n,1)}notifyUpdate(t){this.listeners.map(n=>n(t))}}class x8{constructor(){Da(this,"registeredFunction",{});Da(this,"eventKeys",{});Da(this,"pendingExecutions",[])}execute(t,n){return new Promise((r,o)=>{this._execute(t,n,u=>u.e?o(u.e):r(u.result))})}_execute(t,n,r){if(window!=null&&window.ReactNativeWebView){const o=v8(),u={type:"FUNCTION",function_name:t,payload:n,eventId:o};this.pendingExecutions.push(q(F({},u),{cb:r})),window.ReactNativeWebView.postMessage(JSON.stringify(u))}}onMessageExecutor(t){try{let n;switch(typeof t.data=="object"?n=JSON.parse(JSON.stringify(t.data)):typeof t.data=="string"&&(n=JSON.parse(t.data)),n.type){case"EVENT":this.emitCustomEvent(n);break;case"RESULT":this.responseExecutor(t);break;case"FUNCTION":this.logToNative("here"),this.runJsFunctionInNative(t);break}}catch(n){console.log(n)}}subscribeToEvent(t,n){this.eventKeys[t]?this.eventKeys.subscribe(n):this.eventKeys[t]=new w8(n)}unsubscribeToEvent(t,n){this.eventKeys[t]&&this.eventKeys.unsubscribe(n)}emitCustomEvent(t){this.eventKeys[t.function_name]&&this.eventKeys[t.function_name].notifyUpdate(t)}runJsFunctionInNative(t){return ct(this,null,function*(){const n=JSON.parse(t.data);let r={type:"RESULT",function_name:n.function_name,payload:n.payload,eventId:n.eventId};try{r.result=yield this.registeredFunction[n.function_name](n.payload)}catch(o){r.e=o.message}window.ReactNativeWebView.postMessage(JSON.stringify(r))})}responseExecutor(t){try{const n=JSON.parse(t.data),r=this.pendingExecutions.findIndex(u=>n.eventId===u.eventId);this.pendingExecutions[r].cb({e:n.e,result:n.result}),this.pendingExecutions.splice(r,1)}catch(n){this.logToNative(F({message:"Unable to log to native"},JSON.parse(t.data))),console.error(n)}}logToNative(t){const n={type:"LOG",payload:t};window.ReactNativeWebView.postMessage(JSON.stringify(n))}registerInterfacingFunction(t,n){this.registeredFunction[t]=n}}const vg=new x8,dc=Symbol.for("r2wc.reactRender"),Ww=Symbol.for("r2wc.shouldRender"),il=Symbol.for("r2wc.root");function A8(e=""){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function S8(e=""){return e.replace(/-([a-z0-9])/g,function(t){return t[1].toUpperCase()})}var Qw={expando:function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:function(){return n},set:function(r){n=r,this[dc]()}}),e[dc]()}};function D2(e,t,n,r={}){var o={isConnected:"isConnected"in HTMLElement.prototype},u=!1,a=function(){var d=Reflect.construct(HTMLElement,arguments,this.constructor);return typeof r.shadow=="string"?d.attachShadow({mode:r.shadow}):r.shadow&&(console.warn('Specifying the "shadow" option as a boolean is deprecated and will be removed in a future version.'),d.attachShadow({mode:"open"})),d},c=Object.create(HTMLElement.prototype);c.constructor=a;var f=new Proxy(c,{has:function(d,p){return p in e.propTypes||p in c},set:function(d,p,m,g){return u&&(o[p]=!0),typeof p=="symbol"||o[p]||p in d?(e.propTypes&&p in e.propTypes&&Qw.expando(g,p,m),Reflect.set(d,p,m,g)):(Qw.expando(g,p,m),!0)},getOwnPropertyDescriptor:function(d,p){var m=Reflect.getOwnPropertyDescriptor(d,p);if(m)return m;if(p in e.propTypes)return{configurable:!0,enumerable:!0,writable:!0,value:void 0}}});return a.prototype=f,c.connectedCallback=function(){this[Ww]=!0,this[dc]()},c.disconnectedCallback=function(){typeof n.createRoot=="function"?this[il].unmount():n.unmountComponentAtNode(this)},c[dc]=function(){if(this[Ww]===!0){var d={};Object.keys(this).forEach(function(g){o[g]!==!1&&(d[g]=this[g])},this),u=!0;const p=r.shadow?this.shadowRoot:this,m=t.createElement(e,d);typeof n.createRoot=="function"?(this[il]||(this[il]=n.createRoot(p)),this[il].render(m)):n.render(m,p),u=!1}},e.propTypes&&(a.observedAttributes=r.dashStyleAttributes?Object.keys(e.propTypes).map(function(d){return A8(d)}):Object.keys(e.propTypes),c.attributeChangedCallback=function(d,p,m){var g=r.dashStyleAttributes?S8(d):d;this[g]=m}),a}var Hw;window.fetcher=(Hw=window.fetcher)!=null?Hw:(...e)=>{const[t,...n]=e;return!String(t).startsWith("/")||!window.__chatnext_app_origin?window.fetch(t,...n):window.fetch(window.__chatnext_app_origin+t,...n)};window.global=window;var Gw;window.__=(Gw=window.__)!=null?Gw:e=>e;customElements.define("chatnext-app",D2(g8,Jn,Sl));customElements.define("chatnext-chat-app",D2(y8,Jn,Sl));window.nativeInterface=vg;window.isApp=!!window.ReactNativeWebView;window.addEventListener("message",e=>vg.onMessageExecutor(e));document.addEventListener("message",e=>vg.onMessageExecutor(e))});export default C8();
101
+ }`;var de=Gy(function(){return Pe(S,Z+"return "+W).apply(n,_)});if(de.source=W,yd(de))throw de;return de}function _O(i){return Te(i).toLowerCase()}function TO(i){return Te(i).toUpperCase()}function RO(i,s,l){if(i=Te(i),i&&(l||s===n))return t0(i);if(!i||!(s=cn(s)))return i;var h=zn(i),y=zn(s),S=n0(h,y),_=r0(h,y)+1;return Qr(h,S,_).join("")}function kO(i,s,l){if(i=Te(i),i&&(l||s===n))return i.slice(0,o0(i)+1);if(!i||!(s=cn(s)))return i;var h=zn(i),y=r0(h,zn(s))+1;return Qr(h,0,y).join("")}function OO(i,s,l){if(i=Te(i),i&&(l||s===n))return i.replace(yf,"");if(!i||!(s=cn(s)))return i;var h=zn(i),y=n0(h,zn(s));return Qr(h,y).join("")}function bO(i,s){var l=G,h=le;if(Ke(s)){var y="separator"in s?s.separator:y;l="length"in s?fe(s.length):l,h="omission"in s?cn(s.omission):h}i=Te(i);var S=i.length;if(ho(i)){var _=zn(i);S=_.length}if(l>=S)return i;var R=l-po(h);if(R<1)return h;var b=_?Qr(_,0,R).join(""):i.slice(0,R);if(y===n)return b+h;if(_&&(R+=b.length-R),vd(y)){if(i.slice(R).search(y)){var U,j=b;for(y.global||(y=Mf(y.source,Te(Cg.exec(y))+"g")),y.lastIndex=0;U=y.exec(j);)var W=U.index;b=b.slice(0,W===n?R:W)}}else if(i.indexOf(cn(y),R)!=R){var K=b.lastIndexOf(y);K>-1&&(b=b.slice(0,K))}return b+h}function LO(i){return i=Te(i),i&&W2.test(i)?i.replace(xg,uP):i}var IO=Ao(function(i,s,l){return i+(l?" ":"")+s.toUpperCase()}),Ad=K0("toUpperCase");function Hy(i,s,l){return i=Te(i),s=l?n:s,s===n?nP(i)?cP(i):KE(i):i.match(s)||[]}var Gy=he(function(i,s){try{return an(i,n,s)}catch(l){return yd(l)?l:new ue(l)}}),MO=gr(function(i,s){return En(s,function(l){l=ir(l),pr(i,l,md(i[l],i))}),i});function DO(i){var s=i==null?0:i.length,l=ne();return i=s?We(i,function(h){if(typeof h[1]!="function")throw new Pn(a);return[l(h[0]),h[1]]}):[],he(function(h){for(var y=-1;++y<s;){var S=i[y];if(an(S[0],this,h))return an(S[1],this,h)}})}function NO(i){return u_(Tn(i,m))}function Sd(i){return function(){return i}}function FO(i,s){return i==null||i!==i?s:i}var BO=q0(),VO=q0(!0);function Zt(i){return i}function Cd(i){return P0(typeof i=="function"?i:Tn(i,m))}function UO(i){return T0(Tn(i,m))}function jO(i,s){return R0(i,Tn(s,m))}var zO=he(function(i,s){return function(l){return Es(l,i,s)}}),WO=he(function(i,s){return function(l){return Es(i,l,s)}});function Ed(i,s,l){var h=mt(s),y=pa(s,h);l==null&&!(Ke(s)&&(y.length||!h.length))&&(l=s,s=i,i=this,y=pa(s,mt(s)));var S=!(Ke(l)&&"chain"in l)||!!l.chain,_=vr(i);return En(y,function(R){var b=s[R];i[R]=b,_&&(i.prototype[R]=function(){var U=this.__chain__;if(S||U){var j=i(this.__wrapped__),W=j.__actions__=Yt(this.__actions__);return W.push({func:b,args:arguments,thisArg:i}),j.__chain__=U,j}return b.apply(i,Br([this.value()],arguments))})}),i}function QO(){return St._===this&&(St._=gP),this}function Pd(){}function HO(i){return i=fe(i),he(function(s){return k0(s,i)})}var GO=nd(We),KO=nd(Yg),$O=nd(Tf);function Ky(i){return ld(i)?Rf(ir(i)):E_(i)}function qO(i){return function(s){return i==null?n:Ii(i,s)}}var YO=J0(),JO=J0(!0);function _d(){return[]}function Td(){return!1}function XO(){return{}}function ZO(){return""}function e3(){return!0}function t3(i,s){if(i=fe(i),i<1||i>H)return[];var l=me,h=kt(i,me);s=ne(s),i-=me;for(var y=bf(h,s);++l<i;)s(l);return y}function n3(i){return ae(i)?We(i,ir):fn(i)?[i]:Yt(hy(Te(i)))}function r3(i){var s=++pP;return Te(i)+s}var i3=xa(function(i,s){return i+s},0),o3=rd("ceil"),s3=xa(function(i,s){return i/s},1),u3=rd("floor");function a3(i){return i&&i.length?ha(i,Zt,zf):n}function l3(i,s){return i&&i.length?ha(i,ne(s,2),zf):n}function c3(i){return Zg(i,Zt)}function f3(i,s){return Zg(i,ne(s,2))}function d3(i){return i&&i.length?ha(i,Zt,Gf):n}function h3(i,s){return i&&i.length?ha(i,ne(s,2),Gf):n}var p3=xa(function(i,s){return i*s},1),m3=rd("round"),g3=xa(function(i,s){return i-s},0);function y3(i){return i&&i.length?Of(i,Zt):0}function v3(i,s){return i&&i.length?Of(i,ne(s,2)):0}return v.after=UR,v.ary=Ey,v.assign=Tk,v.assignIn=By,v.assignInWith=Ia,v.assignWith=Rk,v.at=kk,v.before=Py,v.bind=md,v.bindAll=MO,v.bindKey=_y,v.castArray=XR,v.chain=Ay,v.chunk=uT,v.compact=aT,v.concat=lT,v.cond=DO,v.conforms=NO,v.constant=Sd,v.countBy=yR,v.create=Ok,v.curry=Ty,v.curryRight=Ry,v.debounce=ky,v.defaults=bk,v.defaultsDeep=Lk,v.defer=jR,v.delay=zR,v.difference=cT,v.differenceBy=fT,v.differenceWith=dT,v.drop=hT,v.dropRight=pT,v.dropRightWhile=mT,v.dropWhile=gT,v.fill=yT,v.filter=wR,v.flatMap=SR,v.flatMapDeep=CR,v.flatMapDepth=ER,v.flatten=yy,v.flattenDeep=vT,v.flattenDepth=wT,v.flip=WR,v.flow=BO,v.flowRight=VO,v.fromPairs=xT,v.functions=Vk,v.functionsIn=Uk,v.groupBy=PR,v.initial=ST,v.intersection=CT,v.intersectionBy=ET,v.intersectionWith=PT,v.invert=zk,v.invertBy=Wk,v.invokeMap=TR,v.iteratee=Cd,v.keyBy=RR,v.keys=mt,v.keysIn=Xt,v.map=Ta,v.mapKeys=Hk,v.mapValues=Gk,v.matches=UO,v.matchesProperty=jO,v.memoize=ka,v.merge=Kk,v.mergeWith=Vy,v.method=zO,v.methodOf=WO,v.mixin=Ed,v.negate=Oa,v.nthArg=HO,v.omit=$k,v.omitBy=qk,v.once=QR,v.orderBy=kR,v.over=GO,v.overArgs=HR,v.overEvery=KO,v.overSome=$O,v.partial=gd,v.partialRight=Oy,v.partition=OR,v.pick=Yk,v.pickBy=Uy,v.property=Ky,v.propertyOf=qO,v.pull=kT,v.pullAll=wy,v.pullAllBy=OT,v.pullAllWith=bT,v.pullAt=LT,v.range=YO,v.rangeRight=JO,v.rearg=GR,v.reject=IR,v.remove=IT,v.rest=KR,v.reverse=hd,v.sampleSize=DR,v.set=Xk,v.setWith=Zk,v.shuffle=NR,v.slice=MT,v.sortBy=VR,v.sortedUniq=jT,v.sortedUniqBy=zT,v.split=SO,v.spread=$R,v.tail=WT,v.take=QT,v.takeRight=HT,v.takeRightWhile=GT,v.takeWhile=KT,v.tap=aR,v.throttle=qR,v.thru=_a,v.toArray=Dy,v.toPairs=jy,v.toPairsIn=zy,v.toPath=n3,v.toPlainObject=Fy,v.transform=eO,v.unary=YR,v.union=$T,v.unionBy=qT,v.unionWith=YT,v.uniq=JT,v.uniqBy=XT,v.uniqWith=ZT,v.unset=tO,v.unzip=pd,v.unzipWith=xy,v.update=nO,v.updateWith=rO,v.values=Eo,v.valuesIn=iO,v.without=eR,v.words=Hy,v.wrap=JR,v.xor=tR,v.xorBy=nR,v.xorWith=rR,v.zip=iR,v.zipObject=oR,v.zipObjectDeep=sR,v.zipWith=uR,v.entries=jy,v.entriesIn=zy,v.extend=By,v.extendWith=Ia,Ed(v,v),v.add=i3,v.attempt=Gy,v.camelCase=aO,v.capitalize=Wy,v.ceil=o3,v.clamp=oO,v.clone=ZR,v.cloneDeep=tk,v.cloneDeepWith=nk,v.cloneWith=ek,v.conformsTo=rk,v.deburr=Qy,v.defaultTo=FO,v.divide=s3,v.endsWith=lO,v.eq=Qn,v.escape=cO,v.escapeRegExp=fO,v.every=vR,v.find=xR,v.findIndex=my,v.findKey=Ik,v.findLast=AR,v.findLastIndex=gy,v.findLastKey=Mk,v.floor=u3,v.forEach=Sy,v.forEachRight=Cy,v.forIn=Dk,v.forInRight=Nk,v.forOwn=Fk,v.forOwnRight=Bk,v.get=wd,v.gt=ik,v.gte=ok,v.has=jk,v.hasIn=xd,v.head=vy,v.identity=Zt,v.includes=_R,v.indexOf=AT,v.inRange=sO,v.invoke=Qk,v.isArguments=Ni,v.isArray=ae,v.isArrayBuffer=sk,v.isArrayLike=Jt,v.isArrayLikeObject=nt,v.isBoolean=uk,v.isBuffer=Hr,v.isDate=ak,v.isElement=lk,v.isEmpty=ck,v.isEqual=fk,v.isEqualWith=dk,v.isError=yd,v.isFinite=hk,v.isFunction=vr,v.isInteger=by,v.isLength=ba,v.isMap=Ly,v.isMatch=pk,v.isMatchWith=mk,v.isNaN=gk,v.isNative=yk,v.isNil=wk,v.isNull=vk,v.isNumber=Iy,v.isObject=Ke,v.isObjectLike=Xe,v.isPlainObject=Os,v.isRegExp=vd,v.isSafeInteger=xk,v.isSet=My,v.isString=La,v.isSymbol=fn,v.isTypedArray=Co,v.isUndefined=Ak,v.isWeakMap=Sk,v.isWeakSet=Ck,v.join=_T,v.kebabCase=dO,v.last=kn,v.lastIndexOf=TT,v.lowerCase=hO,v.lowerFirst=pO,v.lt=Ek,v.lte=Pk,v.max=a3,v.maxBy=l3,v.mean=c3,v.meanBy=f3,v.min=d3,v.minBy=h3,v.stubArray=_d,v.stubFalse=Td,v.stubObject=XO,v.stubString=ZO,v.stubTrue=e3,v.multiply=p3,v.nth=RT,v.noConflict=QO,v.noop=Pd,v.now=Ra,v.pad=mO,v.padEnd=gO,v.padStart=yO,v.parseInt=vO,v.random=uO,v.reduce=bR,v.reduceRight=LR,v.repeat=wO,v.replace=xO,v.result=Jk,v.round=m3,v.runInContext=O,v.sample=MR,v.size=FR,v.snakeCase=AO,v.some=BR,v.sortedIndex=DT,v.sortedIndexBy=NT,v.sortedIndexOf=FT,v.sortedLastIndex=BT,v.sortedLastIndexBy=VT,v.sortedLastIndexOf=UT,v.startCase=CO,v.startsWith=EO,v.subtract=g3,v.sum=y3,v.sumBy=v3,v.template=PO,v.times=t3,v.toFinite=wr,v.toInteger=fe,v.toLength=Ny,v.toLower=_O,v.toNumber=On,v.toSafeInteger=_k,v.toString=Te,v.toUpper=TO,v.trim=RO,v.trimEnd=kO,v.trimStart=OO,v.truncate=bO,v.unescape=LO,v.uniqueId=r3,v.upperCase=IO,v.upperFirst=Ad,v.each=Sy,v.eachRight=Cy,v.first=vy,Ed(v,function(){var i={};return nr(v,function(s,l){Re.call(v.prototype,l)||(i[l]=s)}),i}(),{chain:!1}),v.VERSION=r,En(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){v[i].placeholder=v}),En(["drop","take"],function(i,s){ve.prototype[i]=function(l){l=l===n?1:lt(fe(l),0);var h=this.__filtered__&&!s?new ve(this):this.clone();return h.__filtered__?h.__takeCount__=kt(l,h.__takeCount__):h.__views__.push({size:kt(l,me),type:i+(h.__dir__<0?"Right":"")}),h},ve.prototype[i+"Right"]=function(l){return this.reverse()[i](l).reverse()}}),En(["filter","map","takeWhile"],function(i,s){var l=s+1,h=l==wt||l==ye;ve.prototype[i]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:ne(y,3),type:l}),S.__filtered__=S.__filtered__||h,S}}),En(["head","last"],function(i,s){var l="take"+(s?"Right":"");ve.prototype[i]=function(){return this[l](1).value()[0]}}),En(["initial","tail"],function(i,s){var l="drop"+(s?"":"Right");ve.prototype[i]=function(){return this.__filtered__?new ve(this):this[l](1)}}),ve.prototype.compact=function(){return this.filter(Zt)},ve.prototype.find=function(i){return this.filter(i).head()},ve.prototype.findLast=function(i){return this.reverse().find(i)},ve.prototype.invokeMap=he(function(i,s){return typeof i=="function"?new ve(this):this.map(function(l){return Es(l,i,s)})}),ve.prototype.reject=function(i){return this.filter(Oa(ne(i)))},ve.prototype.slice=function(i,s){i=fe(i);var l=this;return l.__filtered__&&(i>0||s<0)?new ve(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),s!==n&&(s=fe(s),l=s<0?l.dropRight(-s):l.take(s-i)),l)},ve.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},ve.prototype.toArray=function(){return this.take(me)},nr(ve.prototype,function(i,s){var l=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),y=v[h?"take"+(s=="last"?"Right":""):s],S=h||/^find/.test(s);y&&(v.prototype[s]=function(){var _=this.__wrapped__,R=h?[1]:arguments,b=_ instanceof ve,U=R[0],j=b||ae(_),W=function(ge){var xe=y.apply(v,Br([ge],R));return h&&K?xe[0]:xe};j&&l&&typeof U=="function"&&U.length!=1&&(b=j=!1);var K=this.__chain__,Z=!!this.__actions__.length,re=S&&!K,de=b&&!Z;if(!S&&j){_=de?_:new ve(this);var ie=i.apply(_,R);return ie.__actions__.push({func:_a,args:[W],thisArg:n}),new _n(ie,K)}return re&&de?i.apply(this,R):(ie=this.thru(W),re?h?ie.value()[0]:ie.value():ie)})}),En(["pop","push","shift","sort","splice","unshift"],function(i){var s=Xu[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);v.prototype[i]=function(){var y=arguments;if(h&&!this.__chain__){var S=this.value();return s.apply(ae(S)?S:[],y)}return this[l](function(_){return s.apply(ae(_)?_:[],y)})}}),nr(ve.prototype,function(i,s){var l=v[s];if(l){var h=l.name+"";Re.call(vo,h)||(vo[h]=[]),vo[h].push({name:s,func:l})}}),vo[wa(n,x).name]=[{name:"wrapper",func:n}],ve.prototype.clone=LP,ve.prototype.reverse=IP,ve.prototype.value=MP,v.prototype.at=lR,v.prototype.chain=cR,v.prototype.commit=fR,v.prototype.next=dR,v.prototype.plant=pR,v.prototype.reverse=mR,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=gR,v.prototype.first=v.prototype.head,ys&&(v.prototype[ys]=hR),v},mo=fP();Ri?((Ri.exports=mo)._=mo,Cf._=mo):St._=mo}).call(bs)})(dc,dc.exports);var L2=dc.exports;const ZN=()=>{const[e,t]=B.useState(window.innerWidth<=768);return B.useEffect(()=>{const n=L2.debounce(()=>{const r=window.innerWidth;t(r<=768)},100);return window.addEventListener("resize",n),()=>{n.cancel(),window.removeEventListener("resize",n)}},[]),{isMobileView:e}};var I2={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zw=Jn.createContext&&Jn.createContext(I2),mi=globalThis&&globalThis.__assign||function(){return mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},mi.apply(this,arguments)},e8=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function M2(e){return e&&e.map(function(t,n){return Jn.createElement(t.tag,mi({key:n},t.attr),M2(t.child))})}function Qu(e){return function(t){return Jn.createElement(t8,mi({attr:mi({},e.attr)},t),M2(e.child))}}function t8(e){var t=function(n){var r=e.attr,o=e.size,u=e.title,a=e8(e,["attr","size","title"]),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),Jn.createElement("svg",mi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:f,style:mi(mi({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&Jn.createElement("title",null,u),e.children)};return zw!==void 0?Jn.createElement(zw.Consumer,null,function(n){return t(n)}):t(I2)}function n8(e){return Qu({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 0 0-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]})(e)}function r8(e){return Qu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7.25361 18.4944L7.97834 18.917C9.18909 19.623 10.5651 20 12.001 20C16.4193 20 20.001 16.4183 20.001 12C20.001 7.58172 16.4193 4 12.001 4C7.5827 4 4.00098 7.58172 4.00098 12C4.00098 13.4363 4.37821 14.8128 5.08466 16.0238L5.50704 16.7478L4.85355 19.1494L7.25361 18.4944ZM2.00516 22L3.35712 17.0315C2.49494 15.5536 2.00098 13.8345 2.00098 12C2.00098 6.47715 6.47813 2 12.001 2C17.5238 2 22.001 6.47715 22.001 12C22.001 17.5228 17.5238 22 12.001 22C10.1671 22 8.44851 21.5064 6.97086 20.6447L2.00516 22ZM8.39232 7.30833C8.5262 7.29892 8.66053 7.29748 8.79459 7.30402C8.84875 7.30758 8.90265 7.31384 8.95659 7.32007C9.11585 7.33846 9.29098 7.43545 9.34986 7.56894C9.64818 8.24536 9.93764 8.92565 10.2182 9.60963C10.2801 9.76062 10.2428 9.95633 10.125 10.1457C10.0652 10.2428 9.97128 10.379 9.86248 10.5183C9.74939 10.663 9.50599 10.9291 9.50599 10.9291C9.50599 10.9291 9.40738 11.0473 9.44455 11.1944C9.45903 11.25 9.50521 11.331 9.54708 11.3991C9.57027 11.4368 9.5918 11.4705 9.60577 11.4938C9.86169 11.9211 10.2057 12.3543 10.6259 12.7616C10.7463 12.8783 10.8631 12.9974 10.9887 13.108C11.457 13.5209 11.9868 13.8583 12.559 14.1082L12.5641 14.1105C12.6486 14.1469 12.692 14.1668 12.8157 14.2193C12.8781 14.2457 12.9419 14.2685 13.0074 14.2858C13.0311 14.292 13.0554 14.2955 13.0798 14.2972C13.2415 14.3069 13.335 14.2032 13.3749 14.1555C14.0984 13.279 14.1646 13.2218 14.1696 13.2222V13.2238C14.2647 13.1236 14.4142 13.0888 14.5476 13.097C14.6085 13.1007 14.6691 13.1124 14.7245 13.1377C15.2563 13.3803 16.1258 13.7587 16.1258 13.7587L16.7073 14.0201C16.8047 14.0671 16.8936 14.1778 16.8979 14.2854C16.9005 14.3523 16.9077 14.4603 16.8838 14.6579C16.8525 14.9166 16.7738 15.2281 16.6956 15.3913C16.6406 15.5058 16.5694 15.6074 16.4866 15.6934C16.3743 15.81 16.2909 15.8808 16.1559 15.9814C16.0737 16.0426 16.0311 16.0714 16.0311 16.0714C15.8922 16.159 15.8139 16.2028 15.6484 16.2909C15.391 16.428 15.1066 16.5068 14.8153 16.5218C14.6296 16.5313 14.4444 16.5447 14.2589 16.5347C14.2507 16.5342 13.6907 16.4482 13.6907 16.4482C12.2688 16.0742 10.9538 15.3736 9.85034 14.402C9.62473 14.2034 9.4155 13.9885 9.20194 13.7759C8.31288 12.8908 7.63982 11.9364 7.23169 11.0336C7.03043 10.5884 6.90299 10.1116 6.90098 9.62098C6.89729 9.01405 7.09599 8.4232 7.46569 7.94186C7.53857 7.84697 7.60774 7.74855 7.72709 7.63586C7.85348 7.51651 7.93392 7.45244 8.02057 7.40811C8.13607 7.34902 8.26293 7.31742 8.39232 7.30833Z"}}]})(e)}function i8(e){return Qu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2 2v13.5a.5.5 0 0 0 .74.439L8 13.069l5.26 2.87A.5.5 0 0 0 14 15.5V2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2z"}}]})(e)}function o8(e){return Qu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z"}}]})(e)}const s8=()=>{const[e,t]=B.useState(!1),n=Ym(),{isPublicApp:r}=B.useContext(oo),{data:o,refetch:u}=Vu({queryKey:["alreadyBookmarkedRoute"],queryFn:()=>fetcher('/api/resource/Chatnext Bookmark?fields="*"').then(d=>d.json()).then(d=>(window.frappe.boot.chatnextBookmarks=[...d.data],d.data)),enabled:!r}),{mutateAsync:a}=no({mutationFn:()=>{var m,g,w;const d=new Headers;d.append("x-frappe-csrf-token",(m=window==null?void 0:window.frappe)==null?void 0:m.csrf_token);const p=JSON.stringify({label:document.title,route:window.location.pathname,user:(g=window==null?void 0:window.frappe)==null?void 0:g.user.name,frappe_route:((w=window==null?void 0:window.frappe)==null?void 0:w.get_route)||""});return fetcher("/api/resource/Chatnext Bookmark",{method:"POST",headers:d,body:p,redirect:"follow"}).then(E=>E.json())},onSuccess:()=>{n.invalidateQueries({queryKey:["alreadyBookmarkedRoute"]})}}),{mutateAsync:c}=no({mutationFn:d=>{var m;const p=new Headers;return p.append("x-frappe-csrf-token",(m=window==null?void 0:window.frappe)==null?void 0:m.csrf_token),fetcher(`/api/resource/Chatnext Bookmark/${d}`,{method:"DELETE",headers:p,redirect:"follow"}).then(g=>g.json())},onSuccess:()=>{n.invalidateQueries({queryKey:["alreadyBookmarkedRoute"]})}}),f=[{id:1,color:"#fffffff",callback:()=>{var d;e?c((d=o==null?void 0:o[0])==null?void 0:d.name).then(()=>u()):a().then(()=>u())}}];return B.useEffect(()=>{o!=null&&o.some(d=>d.route===window.location.pathname)?t(!0):t(!1)},[o]),z(Ir,{children:f.map(d=>z("button",{onClick:d.callback,style:{background:d.color},className:"md:tw-w-[12px] tw-mt-[10px] md:tw-mt-0 tw-w-[24px] tw-flex tw-h-[24px] tw-rounded-full md:tw-h-[12px] tw-cursor-pointer ta-outline-none tw-bg-black tw-mb-2 focus:tw-outline-none",children:e?z(i8,{className:"tw-fill-white tw-opacity-50"}):z(o8,{className:"tw-fill-white tw-opacity-80"})},d.id))})},u8=()=>ct(Ft,null,function*(){var e;return window.fetcher("/api/method/nextai.nextai.doctype.chatnext_settings.chatnext_settings.is_document_search_enabled",{headers:{"X-Frappe-Csrf-Token":(e=window==null?void 0:window.frappe)==null?void 0:e.csrf_token}}).then(t=>t.json()).catch(t=>{console.error("Error getting settings :- ",t)})}),a8=e=>Vu({queryKey:["ChatnextSettings","isDocumentChatEnabled"],queryFn:u8,enabled:!e}),D2=B.forwardRef((e,t)=>{var ht,$t,qt;const{isOpen:n,isPinned:r}=Ht(X=>X.chatButton),o=Ht(X=>X.chatButton.isOpenPop),u=Ht(X=>X.user.session_id),{getSearchContext:a,handleRouteClick:c,isPublicApp:f}=B.useContext(oo),d=B.useRef(null),[p,m]=B.useState(0),[g,w]=B.useState(""),[E,P]=B.useState(!1),[k,x]=B.useState({x:0,y:0}),[A,C]=B.useState({x:0,y:0}),[T,L]=B.useState([]),[I,D]=B.useState([]),{data:N}=a8(f),{mutateAsync:$}=R2(f),G=()=>{const X=window.innerWidth,ce=window.innerHeight,Ce=document.getElementById("draggable-element");if(Ce){const Ee=Ce.offsetWidth,te=Ce.offsetHeight;let pe,Me;X<=768?(pe=(X-Ee)/2,Me=10):(pe=(X-Ee)/2,Me=(ce-te)/3),Ce.style.left=`${pe}px`,Ce.style.top=`${Me}px`,x({x:pe,y:Me})}};B.useEffect(()=>(G(),window.addEventListener("resize",G),()=>{window.removeEventListener("resize",G)}),[]),B.useEffect(()=>{const X=new CustomEvent("chatnext:modal:search:open");return document.dispatchEvent(X),()=>{const ce=new CustomEvent("chatnext:modal:search:close");document.dispatchEvent(ce)}},[]);const le=X=>{P(!0),C({x:X.clientX-k.x,y:X.clientY-k.y})},Ge=X=>{if(E){const ce=X.clientX-A.x,Ce=X.clientY-A.y,Ee=window.innerWidth,te=window.innerHeight,pe=document.getElementById("draggable-element");if(!pe)return;const Me=pe.offsetWidth,pt=pe.offsetHeight,At=Ee-Me,tr=te-pt,ao=Math.max(0,Math.min(ce,At)),Ti=Math.max(0,Math.min(Ce,tr));x({x:ao,y:Ti})}},ot=()=>{P(!1)};B.useEffect(()=>(E?(window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",ot)):(window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",ot)),()=>{window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",ot)}),[E]);const wt=B.useRef(null),_e=Pi(),{isMobileView:ye}=ZN(),ze=(qt=($t=(ht=window==null?void 0:window.frappe)==null?void 0:ht.user)==null?void 0:$t.has_role)==null?void 0:qt.call($t,"Chatnext AI User"),H=X=>ct(Ft,null,function*(){var ce,Ce,Ee,te;if(f||!n&&ze){const pe=((Ce=(ce=window.frappe)==null?void 0:ce.get_route)==null?void 0:Ce.call(ce))||[],Me={};pe.length&&pe[0]==="Form"&&(Me.docname=pe[2]);const pt=f?"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_public_trigger.trigger":"/api/method/nextai.funnel.doctype.funnel_task.triggers.chatnext_assistant_trigger.trigger",tr=yield(yield fetcher(pt,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","X-Frappe-Csrf-Token":(Ee=window==null?void 0:window.frappe)==null?void 0:Ee.csrf_token},body:JSON.stringify({definition_name:X,variables:Me})})).json(),ao=((te=tr==null?void 0:tr.message)==null?void 0:te.session)||"";ao?(_e(vl()),_e(en()),_e(Ru(ao))):console.error("Session not found")}}),ee=()=>ct(Ft,null,function*(){var X;try{if(!!(N!=null&&N.message)&&g.length>3){const Ce="/api/method/frappe.utils.global_search.search",Ee=new URLSearchParams({text:g,start:"0",limit:"100",doctype:""}),te=yield fetcher(Ce,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Frappe-Csrf-Token":(X=window==null?void 0:window.frappe)==null?void 0:X.csrf_token},body:Ee.toString()});if(!te.ok)throw new Error(`HTTP error! Status: ${te.status}`);const Me=(yield te.json()).message.map((pt,At,tr)=>At===0||pt.doctype!==tr[At-1].doctype?q(F({},pt),{iname:pt.doctype}):pt);L(Me)}else L([])}catch(ce){console.error("Error fetching data:",ce)}}),se=L2.debounce(ee,500);B.useEffect(()=>(se(),()=>{se.cancel()}),[g]),B.useEffect(()=>{(()=>ct(Ft,null,function*(){const ce=yield a(g),Ce=ce==null?void 0:ce.results;let Ee=[];g.length>3?Ee=[...Ce,...T||[]]:Ce.some(te=>te.type==="Assistant")?Ee=Ce.filter(te=>te.type==="Assistant"):Ee=Ce,D(Ee)}))()},[g,a,T]),B.useEffect(()=>{if(wt.current){const X=wt.current.querySelector(`[data-index="${p}"]`);X&&X.scrollIntoView({behavior:"smooth",block:"nearest"})}},[p]);const me=()=>{d.current&&(d.current.style.height="auto",d.current.style.height=`${d.current.scrollHeight}px`)};B.useEffect(()=>{const X=ce=>{var Ce,Ee;if(ce.key==="ArrowUp")m(te=>Math.max(te-1,-1));else if(ce.key==="ArrowDown")m(te=>Math.min(te+1,I.length-1));else if(ce.key==="Enter"&&!ce.shiftKey){ce.preventDefault();const te=I==null?void 0:I[p];if(!te){console.log("Send raw message",g),$({message:g}).then(pe=>{var pt;w("");const Me=((pt=pe==null?void 0:pe.message)==null?void 0:pt.session)||"";Me?(_e(vl()),_e(en()),_e(Ru(Me))):console.error("Session not found")});return}if(te!=null&&te.isChatNextSearch)return;if((te==null?void 0:te.type)==="Assistant"){H(te.funnel_defination_id),_e(en());return}if(te!=null&&te.onclick)te.onclick(),_e(en());else if((Ce=te==null?void 0:te.route)!=null&&Ce.length){const pe=te.route.join("/");c(`/app/${pe}`),_e(en())}else if(window!=null&&window.frappe){const pe=I==null?void 0:I[p],Me=pe.doctype,pt=pe.name;window==null||window.frappe.set_route((Ee=Me==null?void 0:Me.toLocaleLowerCase())==null?void 0:Ee.replaceAll(" ","-"),pt),_e(en())}else w((te==null?void 0:te.value)||""),m(0)}};return window.addEventListener("keydown",X),()=>{window.removeEventListener("keydown",X)}},[I,c,p]);const Fe=(X,ce,Ce,Ee,te,pe,Me)=>()=>{var pt;if(pe&&pe==="Assistant")H(Me||"");else if(Ce)Ce(),_e(en());else if(ce!=null&&ce.length){const At=ce.join("/");c(`/app/${At}`),_e(en())}else Ee&&te&&(window!=null&&window.frappe)?(window==null||window.frappe.set_route((pt=Ee==null?void 0:Ee.toLocaleLowerCase())==null?void 0:pt.replaceAll(" ","-"),te),_e(en())):(w(X||""),m(0))},Se=X=>{w(X.target.value),m(0),me()},xt=(X,ce)=>z("li",{"data-index":ce,tabIndex:0,role:"button",className:`
102
+ tw-list-none tw-cursor-pointer tw-py-2 ${ce===0?"tw-mt-2":""} tw-px-5 tw-text-[#9E9E9E] ${ce===p?"tw-bg-[#00000099] tw-text-[#FFFFFF] tw-rounded-lg":""} tw-w-[95%] tw-ml-3 md:tw-text-[15px] tw-text-[18px] tw-font-500`,onClick:Fe(X.value,X.route,X.onclick,X.doctype,X.name,X.type,X.funnel_defination_id),children:X.label?z("div",{dangerouslySetInnerHTML:{__html:X.label}}):X.value||X.name},ce),Rt=u?()=>{_e(vl()),_e(en())}:void 0;return o?be("div",{ref:t,id:"draggable-element",className:"tw-absolute tw-rounded-md tw-overflow-hidden tw-max-h-96 tw-flex tw-items-center tw-justify-center tw-w-[95%] md:tw-w-[60%] tw-mx-5 tw-flex-col",style:{zIndex:1e5,position:"absolute",maxWidth:ye?"380px":"600px",margin:"auto",left:`${k.x}px`,top:`${k.y}px`},onMouseDown:le,children:[be("div",{className:"tw-pt-[6px] tw-bg-[#090909] tw-rounded-t-md tw-w-full tw-flex tw-justify-between tw-items-center",children:[!f&&z(r8,{className:" tw-cursor-pointer tw-mb-1 tw-w-[24px] md:tw-w-[16px] md:tw-mx-5 tw-mx-3 tw-h-[24px] md:tw-h-[16px] tw-text-[#9E9E9E] ",onClick:()=>{window.location.href="/app/whatsapp_manager"}}),be("div",{className:os("tw-flex tw-justify-between tw-w-16 tw-items-center",f&&"tw-ml-auto"),children:[!f&&z(s8,{}),z(n8,{className:os("md:tw-w-[16px] tw-w-[24px] tw-p-[1.5px] tw-mb-1 tw-rounded-full tw-mr-3 tw-text-white tw-h-[24px] md:tw-h-[16px] tw-cursor-pointer tw-bg-[#9E9E9E]",r?"tw-opacity-80":"tw-opacity-50",f&&"tw-ml-auto"),onClick:()=>_e(LI())})]})]}),be("div",{className:"tw-w-full tw-py-5 md:tw-py-7 tw-flex tw-flex-row-reverse tw-space-x-2 tw-items-center tw-bg-[#202020]",children:[z("textarea",{ref:d,value:g,rows:1,onKeyDown:X=>{const ce=["ArrowDown","ArrowUp"];I.length>1&&ce.includes(X.key)&&X.preventDefault()},autoFocus:!0,placeholder:"Search or Type command (ctrl+G)",className:"tw-text-md tw-bg-[#202020] tw-text-white tw-w-[90%] tw-mr-2 tw-scroll-smooth tw-outline-none tw-overflow-y-auto tw-resize-none tw-border-0 focus:tw-ring-0 focus-visible:tw-ring-0 tw-px-3 custom-chatnext-scrollbar",style:{maxHeight:"200px",height:"30px"},onChange:Se}),z("span",{"aria-label":"ChatNext",tabIndex:0,children:z("img",{src:XN,alt:"ChatNext Logo",onClick:Rt,className:`${ze?"tw-cursor-pointer":""} md:tw-w-[34px] md:tw-h-[35px] tw-w-[44px] tw-h-[45px]`})})]}),I.length>0&&z("div",{className:"tw-w-full tw-overflow-hidden tw-overflow-y-auto custom-chatnext-scrollbar tw-bg-[#2B2B2B]",children:z("ul",{ref:wt,children:I.map((X,ce)=>be("div",{children:[X.iname&&X.doctype!=="Contact"&&z("li",{className:"tw-text-gray-200 tw-my-1 tw-font-semibold",style:{marginLeft:"30px"},children:X.iname}),xt(X,ce)]},ce))})}),u&&z("div",{onClick:Rt,role:"button",className:"tw-w-full tw-rounded-b-md tw-flex tw-justify-center tw-items-center tw-bg-[#202020]",children:be("div",{className:"tw-bg-[#202020] tw-w-full tw-h-full md:tw-pl-5 tw-pl-3 tw-pr-2 tw-rounded-b-md tw-py-2 tw-cursor-pointer tw-text-white tw-flex tw-justify-between",children:[z("p",{className:"tw-truncate tw-m-0 ",children:z("span",{className:"tw-text-[#9E9E9E] md:tw-text-sm tw-text-md",children:"Continue with Assistant..."})}),be("span",{className:" tw-flex tw-items-center tw-space-x-1",children:[z("img",{src:O2,className:"md:tw-w-[18px] md:tw-h-[18px] tw-h-6 tw-w-6 tw-rounded-full tw-p-[2.5px] tw-bg-white",alt:"ChatNext Logo"}),z("span",{className:"tw-w-16 tw-h-4 tw-text-white md:tw-text-xs tw-text-sm md:tw-font-bold tw-font-semibold",children:"ChatNext"})]})]})})]}):null});D2.displayName="Popup";let il;const l8=new Uint8Array(16);function c8(){if(!il&&(il=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!il))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return il(l8)}const Et=[];for(let e=0;e<256;++e)Et.push((e+256).toString(16).slice(1));function f8(e,t=0){return Et[e[t+0]]+Et[e[t+1]]+Et[e[t+2]]+Et[e[t+3]]+"-"+Et[e[t+4]]+Et[e[t+5]]+"-"+Et[e[t+6]]+Et[e[t+7]]+"-"+Et[e[t+8]]+Et[e[t+9]]+"-"+Et[e[t+10]]+Et[e[t+11]]+Et[e[t+12]]+Et[e[t+13]]+Et[e[t+14]]+Et[e[t+15]]}const d8=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ww={randomUUID:d8};function h8(e,t,n){if(Ww.randomUUID&&!t&&!e)return Ww.randomUUID();e=e||{};const r=e.random||(e.rng||c8)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return f8(r)}const p8=(e,t)=>{const n=r=>{e.current&&!e.current.contains(r.target)&&t()};B.useEffect(()=>(document.addEventListener("click",n),()=>{document.removeEventListener("click",n)}))};function m8(e){return Qu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}const g8=()=>{const[e,t]=B.useState(0);return B.useEffect(()=>{function n(r){window.nativeInterface.logToNative(r),window.nativeInterface.logToNative(r.payload),window.nativeInterface.logToNative("haha"),t(r.payload.length||0)}return window.nativeInterface.subscribeToEvent("BACKGROUND_RUNNING_TASKS",n),()=>{window.nativeInterface.unsubscribeToEvent("BACKGROUND_RUNNING_TASKS",n)}},[]),e<=0?null:z("div",{className:`tw-fixed transform tw-bottom-0 tw-right-[10px] tw-m-0 tw-cursor-pointer tw-w-[120px] tw-h-[40px] tw-z-[10] tw-flex-col tw-items-center tw-justify-center tw-rounded-tr-md tw-rounded-tl-md tw-p-2 tw-bg-blue-700 tw-text-white ${e<=0?"tw-hidden":"tw-flex"}`,children:z("div",{className:`tw-flex tw-h-full tw-w-full tw-transform tw-items-center tw-justify-center tw-rounded-full tw-transition-all tw-delay-75 tw-duration-100 tw-ease-in-out
103
+ `,children:z("div",{className:"btn-open-popup__icon w-full tw-h-9 tw-flex tw-items-center tw-justify-center tw-text-center tw-text-sm",children:be("div",{className:"tw-flex tw-gap-2 tw-items-center w-full",children:[z(m8,{})," ",e," ",z("span",{children:"Pending"})]})})})})},N2=new rM({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),y8=()=>{const e=Pi(),t=B.useRef(null),{isOpenPop:n,isPinned:r}=Ht(a=>a.chatButton),{disableCtrlG:o}=B.useContext(oo);return B.useEffect(()=>{const a=c=>{if((c.metaKey||c.ctrlKey)&&c.key.toLocaleLowerCase()==="g"&&!o)c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation(),e(n?en():BS());else if(c.key.toLocaleLowerCase()==="escape"&&!o){c.preventDefault();const f=h8();e(Gm()),e(en()),e(MI()),e(Ru(f))}};return window.addEventListener("keydown",a,!0),()=>{window.removeEventListener("keydown",a,!0)}},[n]),p8(t,()=>{!r&&n&&e(en())}),be(Ir,{children:[z(g8,{}),z(zI,{}),n&&z(D2,{ref:t}),z(b2,{})]})},v8=e=>z(_S,{propsData:e,children:z(tC,{client:N2,children:z(AS,{store:WS,children:z(y8,{})})})}),w8=e=>z(_S,{propsData:e,children:z(tC,{client:N2,children:z(AS,{store:WS,children:z(b2,{})})})});function x8(){let e="",t,n;for(t=0;t<32;t++)n=Math.random()*16|0,(t===8||t===12||t===16||t===20)&&(e+="-"),e+=(t===12?4:t===16?n&3|8:n).toString(16);return e}class A8{constructor(t){this.listeners=[t]}subscribe(t){this.listeners.push(t)}unsubscribe(t){const n=this.listeners.findIndex(t);this.listeners.splice(n,1)}notifyUpdate(t){this.listeners.map(n=>n(t))}}class S8{constructor(){Na(this,"registeredFunction",{});Na(this,"eventKeys",{});Na(this,"pendingExecutions",[])}execute(t,n){return new Promise((r,o)=>{this._execute(t,n,u=>u.e?o(u.e):r(u.result))})}_execute(t,n,r){if(window!=null&&window.ReactNativeWebView){const o=x8(),u={type:"FUNCTION",function_name:t,payload:n,eventId:o};this.pendingExecutions.push(q(F({},u),{cb:r})),window.ReactNativeWebView.postMessage(JSON.stringify(u))}}onMessageExecutor(t){try{let n;switch(typeof t.data=="object"?n=JSON.parse(JSON.stringify(t.data)):typeof t.data=="string"&&(n=JSON.parse(t.data)),n.type){case"EVENT":this.emitCustomEvent(n);break;case"RESULT":this.responseExecutor(t);break;case"FUNCTION":this.logToNative("here"),this.runJsFunctionInNative(t);break}}catch(n){console.log(n)}}subscribeToEvent(t,n){this.eventKeys[t]?this.eventKeys.subscribe(n):this.eventKeys[t]=new A8(n)}unsubscribeToEvent(t,n){this.eventKeys[t]&&this.eventKeys.unsubscribe(n)}emitCustomEvent(t){this.eventKeys[t.function_name]&&this.eventKeys[t.function_name].notifyUpdate(t)}runJsFunctionInNative(t){return ct(this,null,function*(){const n=JSON.parse(t.data);let r={type:"RESULT",function_name:n.function_name,payload:n.payload,eventId:n.eventId};try{r.result=yield this.registeredFunction[n.function_name](n.payload)}catch(o){r.e=o.message}window.ReactNativeWebView.postMessage(JSON.stringify(r))})}responseExecutor(t){try{const n=JSON.parse(t.data),r=this.pendingExecutions.findIndex(u=>n.eventId===u.eventId);this.pendingExecutions[r].cb({e:n.e,result:n.result}),this.pendingExecutions.splice(r,1)}catch(n){this.logToNative(F({message:"Unable to log to native"},JSON.parse(t.data))),console.error(n)}}logToNative(t){const n={type:"LOG",payload:t};window.ReactNativeWebView.postMessage(JSON.stringify(n))}registerInterfacingFunction(t,n){this.registeredFunction[t]=n}}const wg=new S8,hc=Symbol.for("r2wc.reactRender"),Qw=Symbol.for("r2wc.shouldRender"),ol=Symbol.for("r2wc.root");function C8(e=""){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function E8(e=""){return e.replace(/-([a-z0-9])/g,function(t){return t[1].toUpperCase()})}var Hw={expando:function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:function(){return n},set:function(r){n=r,this[hc]()}}),e[hc]()}};function F2(e,t,n,r={}){var o={isConnected:"isConnected"in HTMLElement.prototype},u=!1,a=function(){var d=Reflect.construct(HTMLElement,arguments,this.constructor);return typeof r.shadow=="string"?d.attachShadow({mode:r.shadow}):r.shadow&&(console.warn('Specifying the "shadow" option as a boolean is deprecated and will be removed in a future version.'),d.attachShadow({mode:"open"})),d},c=Object.create(HTMLElement.prototype);c.constructor=a;var f=new Proxy(c,{has:function(d,p){return p in e.propTypes||p in c},set:function(d,p,m,g){return u&&(o[p]=!0),typeof p=="symbol"||o[p]||p in d?(e.propTypes&&p in e.propTypes&&Hw.expando(g,p,m),Reflect.set(d,p,m,g)):(Hw.expando(g,p,m),!0)},getOwnPropertyDescriptor:function(d,p){var m=Reflect.getOwnPropertyDescriptor(d,p);if(m)return m;if(p in e.propTypes)return{configurable:!0,enumerable:!0,writable:!0,value:void 0}}});return a.prototype=f,c.connectedCallback=function(){this[Qw]=!0,this[hc]()},c.disconnectedCallback=function(){typeof n.createRoot=="function"?this[ol].unmount():n.unmountComponentAtNode(this)},c[hc]=function(){if(this[Qw]===!0){var d={};Object.keys(this).forEach(function(g){o[g]!==!1&&(d[g]=this[g])},this),u=!0;const p=r.shadow?this.shadowRoot:this,m=t.createElement(e,d);typeof n.createRoot=="function"?(this[ol]||(this[ol]=n.createRoot(p)),this[ol].render(m)):n.render(m,p),u=!1}},e.propTypes&&(a.observedAttributes=r.dashStyleAttributes?Object.keys(e.propTypes).map(function(d){return C8(d)}):Object.keys(e.propTypes),c.attributeChangedCallback=function(d,p,m){var g=r.dashStyleAttributes?E8(d):d;this[g]=m}),a}var Gw;window.fetcher=(Gw=window.fetcher)!=null?Gw:(...e)=>{const[t,...n]=e;return!String(t).startsWith("/")||!window.__chatnext_app_origin?window.fetch(t,...n):window.fetch(window.__chatnext_app_origin+t,...n)};window.global=window;var Kw;window.__=(Kw=window.__)!=null?Kw:e=>e;customElements.define("chatnext-app",F2(v8,Jn,Cl));customElements.define("chatnext-chat-app",F2(w8,Jn,Cl));window.nativeInterface=wg;window.isApp=!!window.ReactNativeWebView;window.addEventListener("message",e=>wg.onMessageExecutor(e));document.addEventListener("message",e=>wg.onMessageExecutor(e))});export default P8();