@xapp/chat-widget 1.71.0 → 1.72.0
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.css +1 -1
- package/dist/index.es.js +31 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +31 -5
- package/dist/index.js.map +1 -1
- package/dist/xapp-chat-widget.css +1 -1
- package/dist/xapp-chat-widget.js +1 -1
- package/dist/xapp-chat-widget.js.map +1 -1
- package/package.json +2 -2
package/dist/xapp-chat-widget.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var XAppChatWidget=function(e){"use strict";!function(){const e="prod";try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,u)}s((r=r.apply(e,t||[])).next())}))}function r(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function a(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u={exports:{}},s={},l=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.iterator;var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,_={};function O(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||w}function S(){}function P(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||w}O.prototype.isReactComponent={},O.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=O.prototype;var E=P.prototype=new S;E.constructor=P,k(E,O.prototype),E.isPureReactComponent=!0;var M=Array.isArray,T=Object.prototype.hasOwnProperty,C={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,a={},o=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)T.call(t,r)&&!N.hasOwnProperty(r)&&(a[r]=t[r]);var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];a.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===a[r]&&(a[r]=u[r]);return{$$typeof:l,type:e,key:o,ref:i,props:a,_owner:C.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var I=/\/+/g;function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function L(e,t,n,r,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var i=!1;if(null===e)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case c:i=!0}}if(i)return a=a(i=e),e=""===r?"."+R(i,0):r,M(a)?(n="",null!=e&&(n=e.replace(I,"$&/")+"/"),L(a,t,n,"",(function(e){return e}))):null!=a&&(j(a)&&(a=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(I,"$&/")+"/")+e)),t.push(a)),1;if(i=0,r=""===r?".":r+":",M(e))for(var u=0;u<e.length;u++){var s=r+R(o=e[u],u);i+=L(o,t,n,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),u=0;!(o=e.next()).done;)i+=L(o=o.value,t,n,s=r+R(o,u++),a);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function U(e,t,n){if(null==e)return e;var r=[],a=0;return L(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var F={current:null},z={transition:null},W={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:z,ReactCurrentOwner:C};function Y(){throw Error("act(...) is not supported in production builds of React.")}s.Children={map:U,forEach:function(e,t,n){U(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return U(e,(function(){t++})),t},toArray:function(e){return U(e,(function(e){return e}))||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},s.Component=O,s.Fragment=d,s.Profiler=p,s.PureComponent=P,s.StrictMode=f,s.Suspense=g,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,s.act=Y,s.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=k({},e.props),a=e.key,o=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,i=C.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)T.call(t,s)&&!N.hasOwnProperty(s)&&(r[s]=void 0===t[s]&&void 0!==u?u[s]:t[s])}var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){u=Array(s);for(var c=0;c<s;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:l,type:e.type,key:a,ref:o,props:r,_owner:i}},s.createContext=function(e){return(e={$$typeof:h,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:v,_context:e},e.Consumer=e},s.createElement=D,s.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},s.createRef=function(){return{current:null}},s.forwardRef=function(e){return{$$typeof:m,render:e}},s.isValidElement=j,s.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:A}},s.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},s.startTransition=function(e){var t=z.transition;z.transition={};try{e()}finally{z.transition=t}},s.unstable_act=Y,s.useCallback=function(e,t){return F.current.useCallback(e,t)},s.useContext=function(e){return F.current.useContext(e)},s.useDebugValue=function(){},s.useDeferredValue=function(e){return F.current.useDeferredValue(e)},s.useEffect=function(e,t){return F.current.useEffect(e,t)},s.useId=function(){return F.current.useId()},s.useImperativeHandle=function(e,t,n){return F.current.useImperativeHandle(e,t,n)},s.useInsertionEffect=function(e,t){return F.current.useInsertionEffect(e,t)},s.useLayoutEffect=function(e,t){return F.current.useLayoutEffect(e,t)},s.useMemo=function(e,t){return F.current.useMemo(e,t)},s.useReducer=function(e,t,n){return F.current.useReducer(e,t,n)},s.useRef=function(e){return F.current.useRef(e)},s.useState=function(e){return F.current.useState(e)},s.useSyncExternalStore=function(e,t,n){return F.current.useSyncExternalStore(e,t,n)},s.useTransition=function(){return F.current.useTransition()},s.version="18.3.1",u.exports=s;var H=i(u.exports),B={exports:{}},q={},V={exports:{}},Q={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var u=2*(r+1)-1,s=e[u],l=u+1,c=e[l];if(0>a(s,n))l<o&&0>a(c,s)?(e[r]=c,e[l]=n,r=l):(e[r]=s,e[u]=n,r=u);else{if(!(l<o&&0>a(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],l=[],c=1,d=null,f=3,p=!1,v=!1,h=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function x(e){for(var a=n(l);null!==a;){if(null===a.callback)r(l);else{if(!(a.startTime<=e))break;r(l),a.sortIndex=a.expirationTime,t(s,a)}a=n(l)}}function b(e){if(h=!1,x(e),!v)if(null!==n(s))v=!0,D(w);else{var t=n(l);null!==t&&j(b,t.startTime-e)}}function w(t,a){v=!1,h&&(h=!1,g(S),S=-1),p=!0;var o=f;try{for(x(a),d=n(s);null!==d&&(!(d.expirationTime>a)||t&&!M());){var i=d.callback;if("function"==typeof i){d.callback=null,f=d.priorityLevel;var u=i(d.expirationTime<=a);a=e.unstable_now(),"function"==typeof u?d.callback=u:d===n(s)&&r(s),x(a)}else r(s);d=n(s)}if(null!==d)var c=!0;else{var m=n(l);null!==m&&j(b,m.startTime-a),c=!1}return c}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,_=!1,O=null,S=-1,P=5,E=-1;function M(){return!(e.unstable_now()-E<P)}function T(){if(null!==O){var t=e.unstable_now();E=t;var n=!0;try{n=O(!0,t)}finally{n?k():(_=!1,O=null)}}else _=!1}if("function"==typeof y)k=function(){y(T)};else if("undefined"!=typeof MessageChannel){var C=new MessageChannel,N=C.port2;C.port1.onmessage=T,k=function(){N.postMessage(null)}}else k=function(){m(T,0)};function D(e){O=e,_||(_=!0,k())}function j(t,n){S=m((function(){t(e.unstable_now())}),n)}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(e){e.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,D(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,a,o){var i=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?i+o:i:o=i,r){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return r={id:c++,callback:a,priorityLevel:r,startTime:o,expirationTime:u=o+u,sortIndex:-1},o>i?(r.sortIndex=o,t(l,r),null===n(s)&&r===n(l)&&(h?(g(S),S=-1):h=!0,j(b,o-i))):(r.sortIndex=u,t(s,r),v||p||(v=!0,D(w))),r},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Q),function(e){e.exports=Q}(V);var $=u.exports,K=V.exports;function J(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 X=new Set,G={};function Z(e,t){ee(e,t),ee(e+"Capture",t)}function ee(e,t){for(G[e]=t,e=0;e<t.length;e++)X.add(t[e])}var te=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ne=Object.prototype.hasOwnProperty,re=/^[: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]*$/,ae={},oe={};function ie(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ue[e]=new ie(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ue[t]=new ie(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ue[e]=new ie(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ue[e]=new ie(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){ue[e]=new ie(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ue[e]=new ie(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){ue[e]=new ie(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){ue[e]=new ie(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){ue[e]=new ie(e,5,!1,e.toLowerCase(),null,!1,!1)}));var se=/[\-:]([a-z])/g;function le(e){return e[1].toUpperCase()}function ce(e,t,n,r){var a=ue.hasOwnProperty(t)?ue[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!ne.call(oe,e)||!ne.call(ae,e)&&(re.test(e)?oe[e]=!0:(ae[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(se,le);ue[t]=new ie(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(se,le);ue[t]=new ie(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(se,le);ue[t]=new ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){ue[e]=new ie(e,1,!1,e.toLowerCase(),null,!1,!1)})),ue.xlinkHref=new ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){ue[e]=new ie(e,1,!1,e.toLowerCase(),null,!0,!0)}));var de=$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fe=Symbol.for("react.element"),pe=Symbol.for("react.portal"),ve=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),ge=Symbol.for("react.provider"),ye=Symbol.for("react.context"),xe=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),we=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),Oe=Symbol.for("react.offscreen"),Se=Symbol.iterator;function Pe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Se&&e[Se]||e["@@iterator"])?e:null}var Ee,Me=Object.assign;function Te(e){if(void 0===Ee)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||""}return"\n"+Ee+e}var Ce=!1;function Ne(e,t){if(!e||Ce)return"";Ce=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,u=o.length-1;1<=i&&0<=u&&a[i]!==o[u];)u--;for(;1<=i&&0<=u;i--,u--)if(a[i]!==o[u]){if(1!==i||1!==u)do{if(i--,0>--u||a[i]!==o[u]){var s="\n"+a[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=i&&0<=u);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Te(e):""}function De(e){switch(e.tag){case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return Te("Suspense");case 19:return Te("SuspenseList");case 0:case 2:case 15:return e=Ne(e.type,!1);case 11:return e=Ne(e.type.render,!1);case 1:return e=Ne(e.type,!0);default:return""}}function je(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ve:return"Fragment";case pe:return"Portal";case me:return"Profiler";case he:return"StrictMode";case be:return"Suspense";case we:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ye:return(e.displayName||"Context")+".Consumer";case ge:return(e._context.displayName||"Context")+".Provider";case xe:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return null!==(t=e.displayName||null)?t:je(e.type)||"Memo";case _e:t=e._payload,e=e._init;try{return je(e(t))}catch(e){}}return null}function Ie(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=(e=t.render).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 je(t);case 8:return t===he?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Le(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ue(e){e._valueTracker||(e._valueTracker=function(e){var t=Le(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ae(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Le(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Fe(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ze(e,t){var n=t.checked;return Me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function We(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Re(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ye(e,t){null!=(t=t.checked)&&ce(e,"checked",t,!1)}function He(e,t){Ye(e,t);var n=Re(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?qe(e,t.type,n):t.hasOwnProperty("defaultValue")&&qe(e,t.type,Re(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Be(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function qe(e,t,n){"number"===t&&Fe(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ve=Array.isArray;function Qe(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Re(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function $e(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(J(91));return Me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ke(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(J(92));if(Ve(n)){if(1<n.length)throw Error(J(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Re(n)}}function Je(e,t){var n=Re(t.value),r=Re(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Xe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ge(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 Ze(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ge(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var et,tt,nt=(tt=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((et=et||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=et.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return tt(e,t)}))}:tt);function rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var at={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},ot=["Webkit","ms","Moz","O"];function it(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||at.hasOwnProperty(e)&&at[e]?(""+t).trim():t+"px"}function ut(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=it(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(at).forEach((function(e){ot.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),at[t]=at[e]}))}));var st=Me({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lt(e,t){if(t){if(st[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(J(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(J(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(J(62))}}function ct(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 dt=null;function ft(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var pt=null,vt=null,ht=null;function mt(e){if(e=co(e)){if("function"!=typeof pt)throw Error(J(280));var t=e.stateNode;t&&(t=po(t),pt(e.stateNode,e.type,t))}}function gt(e){vt?ht?ht.push(e):ht=[e]:vt=e}function yt(){if(vt){var e=vt,t=ht;if(ht=vt=null,mt(e),t)for(e=0;e<t.length;e++)mt(t[e])}}function xt(e,t){return e(t)}function bt(){}var wt=!1;function kt(e,t,n){if(wt)return e(t,n);wt=!0;try{return xt(e,t,n)}finally{wt=!1,(null!==vt||null!==ht)&&(bt(),yt())}}function _t(e,t){var n=e.stateNode;if(null===n)return null;var r=po(n);if(null===r)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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(J(231,t,typeof n));return n}var Ot=!1;if(te)try{var St={};Object.defineProperty(St,"passive",{get:function(){Ot=!0}}),window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch(tt){Ot=!1}function Pt(e,t,n,r,a,o,i,u,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Et=!1,Mt=null,Tt=!1,Ct=null,Nt={onError:function(e){Et=!0,Mt=e}};function Dt(e,t,n,r,a,o,i,u,s){Et=!1,Mt=null,Pt.apply(Nt,arguments)}function jt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function It(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Rt(e){if(jt(e)!==e)throw Error(J(188))}function Lt(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=jt(e)))throw Error(J(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Rt(a),e;if(o===r)return Rt(a),t;o=o.sibling}throw Error(J(188))}if(n.return!==r.return)n=a,r=o;else{for(var i=!1,u=a.child;u;){if(u===n){i=!0,n=a,r=o;break}if(u===r){i=!0,r=a,n=o;break}u=u.sibling}if(!i){for(u=o.child;u;){if(u===n){i=!0,n=o,r=a;break}if(u===r){i=!0,r=o,n=a;break}u=u.sibling}if(!i)throw Error(J(189))}}if(n.alternate!==r)throw Error(J(190))}if(3!==n.tag)throw Error(J(188));return n.stateNode.current===n?e:t}(e),null!==e?Ut(e):null}function Ut(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ut(e);if(null!==t)return t;e=e.sibling}return null}var At=K.unstable_scheduleCallback,Ft=K.unstable_cancelCallback,zt=K.unstable_shouldYield,Wt=K.unstable_requestPaint,Yt=K.unstable_now,Ht=K.unstable_getCurrentPriorityLevel,Bt=K.unstable_ImmediatePriority,qt=K.unstable_UserBlockingPriority,Vt=K.unstable_NormalPriority,Qt=K.unstable_LowPriority,$t=K.unstable_IdlePriority,Kt=null,Jt=null;var Xt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Gt(e)/Zt|0)|0},Gt=Math.log,Zt=Math.LN2;var en=64,tn=4194304;function nn(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var u=i&~a;0!==u?r=nn(u):0!==(o&=i)&&(r=nn(o))}else 0!==(i=n&~a)?r=nn(i):0!==o&&(r=nn(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-Xt(t)),r|=e[n],t&=~a;return r}function an(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;default:return-1}}function on(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function un(){var e=en;return 0==(4194240&(en<<=1))&&(en=64),e}function sn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ln(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-Xt(t)]=n}function cn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xt(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var dn=0;function fn(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var pn,vn,hn,mn,gn,yn=!1,xn=[],bn=null,wn=null,kn=null,_n=new Map,On=new Map,Sn=[],Pn="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 En(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":_n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":On.delete(t.pointerId)}}function Mn(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&(null!==(t=co(t))&&vn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function Tn(e){var t=lo(e.target);if(null!==t){var n=jt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=It(n)))return e.blockedOn=t,void gn(e.priority,(function(){hn(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Cn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=co(n))&&vn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);dt=r,n.target.dispatchEvent(r),dt=null,t.shift()}return!0}function Nn(e,t,n){Cn(e)&&n.delete(t)}function Dn(){yn=!1,null!==bn&&Cn(bn)&&(bn=null),null!==wn&&Cn(wn)&&(wn=null),null!==kn&&Cn(kn)&&(kn=null),_n.forEach(Nn),On.forEach(Nn)}function jn(e,t){e.blockedOn===t&&(e.blockedOn=null,yn||(yn=!0,K.unstable_scheduleCallback(K.unstable_NormalPriority,Dn)))}function In(e){function t(t){return jn(t,e)}if(0<xn.length){jn(xn[0],e);for(var n=1;n<xn.length;n++){var r=xn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bn&&jn(bn,e),null!==wn&&jn(wn,e),null!==kn&&jn(kn,e),_n.forEach(t),On.forEach(t),n=0;n<Sn.length;n++)(r=Sn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Sn.length&&null===(n=Sn[0]).blockedOn;)Tn(n),null===n.blockedOn&&Sn.shift()}var Rn=de.ReactCurrentBatchConfig,Ln=!0;function Un(e,t,n,r){var a=dn,o=Rn.transition;Rn.transition=null;try{dn=1,Fn(e,t,n,r)}finally{dn=a,Rn.transition=o}}function An(e,t,n,r){var a=dn,o=Rn.transition;Rn.transition=null;try{dn=4,Fn(e,t,n,r)}finally{dn=a,Rn.transition=o}}function Fn(e,t,n,r){if(Ln){var a=Wn(e,t,n,r);if(null===a)Ra(e,t,r,zn,n),En(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return bn=Mn(bn,e,t,n,r,a),!0;case"dragenter":return wn=Mn(wn,e,t,n,r,a),!0;case"mouseover":return kn=Mn(kn,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return _n.set(o,Mn(_n.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,On.set(o,Mn(On.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(En(e,r),4&t&&-1<Pn.indexOf(e)){for(;null!==a;){var o=co(a);if(null!==o&&pn(o),null===(o=Wn(e,t,n,r))&&Ra(e,t,r,zn,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else Ra(e,t,r,null,n)}}var zn=null;function Wn(e,t,n,r){if(zn=null,null!==(e=lo(e=ft(r))))if(null===(t=jt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=It(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return zn=e,null}function Yn(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ht()){case Bt:return 1;case qt:return 4;case Vt:case Qt:return 16;case $t:return 536870912;default:return 16}default:return 16}}var Hn=null,Bn=null,qn=null;function Vn(){if(qn)return qn;var e,t,n=Bn,r=n.length,a="value"in Hn?Hn.value:Hn.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return qn=a.slice(e,1<t?1-t:void 0)}function Qn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function $n(){return!0}function Kn(){return!1}function Jn(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?$n:Kn,this.isPropagationStopped=Kn,this}return Me(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=$n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=$n)},persist:function(){},isPersistent:$n}),t}var Xn,Gn,Zn,er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tr=Jn(er),nr=Me({},er,{view:0,detail:0}),rr=Jn(nr),ar=Me({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zn&&(Zn&&"mousemove"===e.type?(Xn=e.screenX-Zn.screenX,Gn=e.screenY-Zn.screenY):Gn=Xn=0,Zn=e),Xn)},movementY:function(e){return"movementY"in e?e.movementY:Gn}}),or=Jn(ar),ir=Jn(Me({},ar,{dataTransfer:0})),ur=Jn(Me({},nr,{relatedTarget:0})),sr=Jn(Me({},er,{animationName:0,elapsedTime:0,pseudoElement:0})),lr=Me({},er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cr=Jn(lr),dr=Jn(Me({},er,{data:0})),fr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pr={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"},vr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=vr[e])&&!!t[e]}function mr(){return hr}var gr=Me({},nr,{key:function(e){if(e.key){var t=fr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mr,charCode:function(e){return"keypress"===e.type?Qn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),yr=Jn(gr),xr=Jn(Me({},ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),br=Jn(Me({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mr})),wr=Jn(Me({},er,{propertyName:0,elapsedTime:0,pseudoElement:0})),kr=Me({},ar,{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}),_r=Jn(kr),Or=[9,13,27,32],Sr=te&&"CompositionEvent"in window,Pr=null;te&&"documentMode"in document&&(Pr=document.documentMode);var Er=te&&"TextEvent"in window&&!Pr,Mr=te&&(!Sr||Pr&&8<Pr&&11>=Pr),Tr=String.fromCharCode(32),Cr=!1;function Nr(e,t){switch(e){case"keyup":return-1!==Or.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var jr=!1;var Ir={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 Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ir[e.type]:"textarea"===t}function Lr(e,t,n,r){gt(r),0<(t=Ua(t,"onChange")).length&&(n=new tr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ur=null,Ar=null;function Fr(e){Ta(e,0)}function zr(e){if(Ae(fo(e)))return e}function Wr(e,t){if("change"===e)return t}var Yr=!1;if(te){var Hr;if(te){var Br="oninput"in document;if(!Br){var qr=document.createElement("div");qr.setAttribute("oninput","return;"),Br="function"==typeof qr.oninput}Hr=Br}else Hr=!1;Yr=Hr&&(!document.documentMode||9<document.documentMode)}function Vr(){Ur&&(Ur.detachEvent("onpropertychange",Qr),Ar=Ur=null)}function Qr(e){if("value"===e.propertyName&&zr(Ar)){var t=[];Lr(t,Ar,e,ft(e)),kt(Fr,t)}}function $r(e,t,n){"focusin"===e?(Vr(),Ar=n,(Ur=t).attachEvent("onpropertychange",Qr)):"focusout"===e&&Vr()}function Kr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return zr(Ar)}function Jr(e,t){if("click"===e)return zr(t)}function Xr(e,t){if("input"===e||"change"===e)return zr(t)}var Gr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Zr(e,t){if(Gr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 a=n[r];if(!ne.call(t,a)||!Gr(e[a],t[a]))return!1}return!0}function ea(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ta(e,t){var n,r=ea(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ea(r)}}function na(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?na(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ra(){for(var e=window,t=Fe();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Fe((e=t.contentWindow).document)}return t}function aa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function oa(e){var t=ra(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&na(n.ownerDocument.documentElement,n)){if(null!==r&&aa(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=ta(n,o);var i=ta(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ia=te&&"documentMode"in document&&11>=document.documentMode,ua=null,sa=null,la=null,ca=!1;function da(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ca||null==ua||ua!==Fe(r)||("selectionStart"in(r=ua)&&aa(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},la&&Zr(la,r)||(la=r,0<(r=Ua(sa,"onSelect")).length&&(t=new tr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ua)))}function fa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pa={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionend:fa("Transition","TransitionEnd")},va={},ha={};function ma(e){if(va[e])return va[e];if(!pa[e])return e;var t,n=pa[e];for(t in n)if(n.hasOwnProperty(t)&&t in ha)return va[e]=n[t];return e}te&&(ha=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);var ga=ma("animationend"),ya=ma("animationiteration"),xa=ma("animationstart"),ba=ma("transitionend"),wa=new Map,ka="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 _a(e,t){wa.set(e,t),Z(t,[e])}for(var Oa=0;Oa<ka.length;Oa++){var Sa=ka[Oa];_a(Sa.toLowerCase(),"on"+(Sa[0].toUpperCase()+Sa.slice(1)))}_a(ga,"onAnimationEnd"),_a(ya,"onAnimationIteration"),_a(xa,"onAnimationStart"),_a("dblclick","onDoubleClick"),_a("focusin","onFocus"),_a("focusout","onBlur"),_a(ba,"onTransitionEnd"),ee("onMouseEnter",["mouseout","mouseover"]),ee("onMouseLeave",["mouseout","mouseover"]),ee("onPointerEnter",["pointerout","pointerover"]),ee("onPointerLeave",["pointerout","pointerover"]),Z("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Z("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Z("onBeforeInput",["compositionend","keypress","textInput","paste"]),Z("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),Ea=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pa));function Ma(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,i,u,s){if(Dt.apply(this,arguments),Et){if(!Et)throw Error(J(198));var l=Mt;Et=!1,Mt=null,Tt||(Tt=!0,Ct=l)}}(r,t,void 0,e),e.currentTarget=null}function Ta(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var u=r[i],s=u.instance,l=u.currentTarget;if(u=u.listener,s!==o&&a.isPropagationStopped())break e;Ma(a,u,l),o=s}else for(i=0;i<r.length;i++){if(s=(u=r[i]).instance,l=u.currentTarget,u=u.listener,s!==o&&a.isPropagationStopped())break e;Ma(a,u,l),o=s}}}if(Tt)throw e=Ct,Tt=!1,Ct=null,e}function Ca(e,t){var n=t[io];void 0===n&&(n=t[io]=new Set);var r=e+"__bubble";n.has(r)||(Ia(t,e,2,!1),n.add(r))}function Na(e,t,n){var r=0;t&&(r|=4),Ia(n,e,r,t)}var Da="_reactListening"+Math.random().toString(36).slice(2);function ja(e){if(!e[Da]){e[Da]=!0,X.forEach((function(t){"selectionchange"!==t&&(Ea.has(t)||Na(t,!1,e),Na(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Da]||(t[Da]=!0,Na("selectionchange",!1,t))}}function Ia(e,t,n,r){switch(Yn(t)){case 1:var a=Un;break;case 4:a=An;break;default:a=Fn}n=a.bind(null,t,n,e),a=void 0,!Ot||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Ra(e,t,n,r,a){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var u=r.stateNode.containerInfo;if(u===a||8===u.nodeType&&u.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;i=i.return}for(;null!==u;){if(null===(i=lo(u)))return;if(5===(s=i.tag)||6===s){r=o=i;continue e}u=u.parentNode}}r=r.return}kt((function(){var r=o,a=ft(n),i=[];e:{var u=wa.get(e);if(void 0!==u){var s=tr,l=e;switch(e){case"keypress":if(0===Qn(n))break e;case"keydown":case"keyup":s=yr;break;case"focusin":l="focus",s=ur;break;case"focusout":l="blur",s=ur;break;case"beforeblur":case"afterblur":s=ur;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=ir;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=br;break;case ga:case ya:case xa:s=sr;break;case ba:s=wr;break;case"scroll":s=rr;break;case"wheel":s=_r;break;case"copy":case"cut":case"paste":s=cr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=xr}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==u?u+"Capture":null:u;c=[];for(var p,v=r;null!==v;){var h=(p=v).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==f&&(null!=(h=_t(v,f))&&c.push(La(v,h,p)))),d)break;v=v.return}0<c.length&&(u=new s(u,l,null,n,a),i.push({event:u,listeners:c}))}}if(0==(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||n===dt||!(l=n.relatedTarget||n.fromElement)||!lo(l)&&!l[oo])&&(s||u)&&(u=a.window===a?a:(u=a.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(l=(l=n.relatedTarget||n.toElement)?lo(l):null)&&(l!==(d=jt(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(s=null,l=r),s!==l)){if(c=or,h="onMouseLeave",f="onMouseEnter",v="mouse","pointerout"!==e&&"pointerover"!==e||(c=xr,h="onPointerLeave",f="onPointerEnter",v="pointer"),d=null==s?u:fo(s),p=null==l?u:fo(l),(u=new c(h,v+"leave",s,n,a)).target=d,u.relatedTarget=p,h=null,lo(a)===r&&((c=new c(f,v+"enter",l,n,a)).target=p,c.relatedTarget=d,h=c),d=h,s&&l)e:{for(f=l,v=0,p=c=s;p;p=Aa(p))v++;for(p=0,h=f;h;h=Aa(h))p++;for(;0<v-p;)c=Aa(c),v--;for(;0<p-v;)f=Aa(f),p--;for(;v--;){if(c===f||null!==f&&c===f.alternate)break e;c=Aa(c),f=Aa(f)}c=null}else c=null;null!==s&&Fa(i,u,s,c,!1),null!==l&&null!==d&&Fa(i,d,l,c,!0)}if("select"===(s=(u=r?fo(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var m=Wr;else if(Rr(u))if(Yr)m=Xr;else{m=Kr;var g=$r}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(m=Jr);switch(m&&(m=m(e,r))?Lr(i,m,n,a):(g&&g(e,u,r),"focusout"===e&&(g=u._wrapperState)&&g.controlled&&"number"===u.type&&qe(u,"number",u.value)),g=r?fo(r):window,e){case"focusin":(Rr(g)||"true"===g.contentEditable)&&(ua=g,sa=r,la=null);break;case"focusout":la=sa=ua=null;break;case"mousedown":ca=!0;break;case"contextmenu":case"mouseup":case"dragend":ca=!1,da(i,n,a);break;case"selectionchange":if(ia)break;case"keydown":case"keyup":da(i,n,a)}var y;if(Sr)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else jr?Nr(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Mr&&"ko"!==n.locale&&(jr||"onCompositionStart"!==x?"onCompositionEnd"===x&&jr&&(y=Vn()):(Bn="value"in(Hn=a)?Hn.value:Hn.textContent,jr=!0)),0<(g=Ua(r,x)).length&&(x=new dr(x,e,null,n,a),i.push({event:x,listeners:g}),y?x.data=y:null!==(y=Dr(n))&&(x.data=y))),(y=Er?function(e,t){switch(e){case"compositionend":return Dr(t);case"keypress":return 32!==t.which?null:(Cr=!0,Tr);case"textInput":return(e=t.data)===Tr&&Cr?null:e;default:return null}}(e,n):function(e,t){if(jr)return"compositionend"===e||!Sr&&Nr(e,t)?(e=Vn(),qn=Bn=Hn=null,jr=!1,e):null;switch(e){case"paste":default: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 Mr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ua(r,"onBeforeInput")).length&&(a=new dr("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=y))}Ta(i,t)}))}function La(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ua(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=_t(e,n))&&r.unshift(La(e,o,a)),null!=(o=_t(e,t))&&r.push(La(e,o,a))),e=e.return}return r}function Aa(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Fa(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var u=n,s=u.alternate,l=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==l&&(u=l,a?null!=(s=_t(n,o))&&i.unshift(La(n,s,u)):a||null!=(s=_t(n,o))&&i.push(La(n,s,u))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var za=/\r\n?/g,Wa=/\u0000|\uFFFD/g;function Ya(e){return("string"==typeof e?e:""+e).replace(za,"\n").replace(Wa,"")}function Ha(e,t,n){if(t=Ya(t),Ya(e)!==t&&n)throw Error(J(425))}function Ba(){}var qa=null,Va=null;function Qa(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var $a="function"==typeof setTimeout?setTimeout:void 0,Ka="function"==typeof clearTimeout?clearTimeout:void 0,Ja="function"==typeof Promise?Promise:void 0,Xa="function"==typeof queueMicrotask?queueMicrotask:void 0!==Ja?function(e){return Ja.resolve(null).then(e).catch(Ga)}:$a;function Ga(e){setTimeout((function(){throw e}))}function Za(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)){if(0===r)return e.removeChild(a),void In(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=a}while(n);In(t)}function eo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function to(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var no=Math.random().toString(36).slice(2),ro="__reactFiber$"+no,ao="__reactProps$"+no,oo="__reactContainer$"+no,io="__reactEvents$"+no,uo="__reactListeners$"+no,so="__reactHandles$"+no;function lo(e){var t=e[ro];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oo]||n[ro]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=to(e);null!==e;){if(n=e[ro])return n;e=to(e)}return t}n=(e=n).parentNode}return null}function co(e){return!(e=e[ro]||e[oo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function fo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(J(33))}function po(e){return e[ao]||null}var vo=[],ho=-1;function mo(e){return{current:e}}function go(e){0>ho||(e.current=vo[ho],vo[ho]=null,ho--)}function yo(e,t){ho++,vo[ho]=e.current,e.current=t}var xo={},bo=mo(xo),wo=mo(!1),ko=xo;function _o(e,t){var n=e.type.contextTypes;if(!n)return xo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oo(e){return null!=(e=e.childContextTypes)}function So(){go(wo),go(bo)}function Po(e,t,n){if(bo.current!==xo)throw Error(J(168));yo(bo,t),yo(wo,n)}function Eo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(J(108,Ie(e)||"Unknown",a));return Me({},n,r)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xo,ko=bo.current,yo(bo,e),yo(wo,wo.current),!0}function To(e,t,n){var r=e.stateNode;if(!r)throw Error(J(169));n?(e=Eo(e,t,ko),r.__reactInternalMemoizedMergedChildContext=e,go(wo),go(bo),yo(bo,e)):go(wo),yo(wo,n)}var Co=null,No=!1,Do=!1;function jo(e){null===Co?Co=[e]:Co.push(e)}function Io(){if(!Do&&null!==Co){Do=!0;var e=0,t=dn;try{var n=Co;for(dn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Co=null,No=!1}catch(t){throw null!==Co&&(Co=Co.slice(e+1)),At(Bt,Io),t}finally{dn=t,Do=!1}}return null}var Ro=[],Lo=0,Uo=null,Ao=0,Fo=[],zo=0,Wo=null,Yo=1,Ho="";function Bo(e,t){Ro[Lo++]=Ao,Ro[Lo++]=Uo,Uo=e,Ao=t}function qo(e,t,n){Fo[zo++]=Yo,Fo[zo++]=Ho,Fo[zo++]=Wo,Wo=e;var r=Yo;e=Ho;var a=32-Xt(r)-1;r&=~(1<<a),n+=1;var o=32-Xt(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,Yo=1<<32-Xt(t)+a|n<<a|r,Ho=o+e}else Yo=1<<o|n<<a|r,Ho=e}function Vo(e){null!==e.return&&(Bo(e,1),qo(e,1,0))}function Qo(e){for(;e===Uo;)Uo=Ro[--Lo],Ro[Lo]=null,Ao=Ro[--Lo],Ro[Lo]=null;for(;e===Wo;)Wo=Fo[--zo],Fo[zo]=null,Ho=Fo[--zo],Fo[zo]=null,Yo=Fo[--zo],Fo[zo]=null}var $o=null,Ko=null,Jo=!1,Xo=null;function Go(e,t){var n=kc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Zo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,$o=e,Ko=eo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,$o=e,Ko=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Wo?{id:Yo,overflow:Ho}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=kc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,$o=e,Ko=null,!0);default:return!1}}function ei(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ti(e){if(Jo){var t=Ko;if(t){var n=t;if(!Zo(e,t)){if(ei(e))throw Error(J(418));t=eo(n.nextSibling);var r=$o;t&&Zo(e,t)?Go(r,n):(e.flags=-4097&e.flags|2,Jo=!1,$o=e)}}else{if(ei(e))throw Error(J(418));e.flags=-4097&e.flags|2,Jo=!1,$o=e}}}function ni(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;$o=e}function ri(e){if(e!==$o)return!1;if(!Jo)return ni(e),Jo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Qa(e.type,e.memoizedProps)),t&&(t=Ko)){if(ei(e))throw ai(),Error(J(418));for(;t;)Go(e,t),t=eo(t.nextSibling)}if(ni(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(J(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ko=eo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ko=null}}else Ko=$o?eo(e.stateNode.nextSibling):null;return!0}function ai(){for(var e=Ko;e;)e=eo(e.nextSibling)}function oi(){Ko=$o=null,Jo=!1}function ii(e){null===Xo?Xo=[e]:Xo.push(e)}var ui=de.ReactCurrentBatchConfig;function si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(J(309));var r=n.stateNode}if(!r)throw Error(J(147,e));var a=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(J(284));if(!n._owner)throw Error(J(290,e))}return e}function li(e,t){throw e=Object.prototype.toString.call(t),Error(J(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ci(e){return(0,e._init)(e._payload)}function di(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Oc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Mc(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){var o=n.type;return o===ve?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===_e&&ci(o)===t.type)?((r=a(t,n.props)).ref=si(e,t,n),r.return=e,r):((r=Sc(n.type,n.key,n.props,null,e.mode,r)).ref=si(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Tc(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Mc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case fe:return(n=Sc(t.type,t.key,t.props,null,e.mode,n)).ref=si(e,null,t),n.return=e,n;case pe:return(t=Tc(t,e.mode,n)).return=e,t;case _e:return d(e,(0,t._init)(t._payload),n)}if(Ve(t)||Pe(t))return(t=Pc(t,e.mode,n,null)).return=e,t;li(e,t)}return null}function f(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==a?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case fe:return n.key===a?s(e,t,n,r):null;case pe:return n.key===a?l(e,t,n,r):null;case _e:return f(e,t,(a=n._init)(n._payload),r)}if(Ve(n)||Pe(n))return null!==a?null:c(e,t,n,r,null);li(e,n)}return null}function p(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case fe:return s(t,e=e.get(null===r.key?n:r.key)||null,r,a);case pe:return l(t,e=e.get(null===r.key?n:r.key)||null,r,a);case _e:return p(e,t,n,(0,r._init)(r._payload),a)}if(Ve(r)||Pe(r))return c(t,e=e.get(n)||null,r,a,null);li(t,r)}return null}function v(a,i,u,s){for(var l=null,c=null,v=i,h=i=0,m=null;null!==v&&h<u.length;h++){v.index>h?(m=v,v=null):m=v.sibling;var g=f(a,v,u[h],s);if(null===g){null===v&&(v=m);break}e&&v&&null===g.alternate&&t(a,v),i=o(g,i,h),null===c?l=g:c.sibling=g,c=g,v=m}if(h===u.length)return n(a,v),Jo&&Bo(a,h),l;if(null===v){for(;h<u.length;h++)null!==(v=d(a,u[h],s))&&(i=o(v,i,h),null===c?l=v:c.sibling=v,c=v);return Jo&&Bo(a,h),l}for(v=r(a,v);h<u.length;h++)null!==(m=p(v,a,h,u[h],s))&&(e&&null!==m.alternate&&v.delete(null===m.key?h:m.key),i=o(m,i,h),null===c?l=m:c.sibling=m,c=m);return e&&v.forEach((function(e){return t(a,e)})),Jo&&Bo(a,h),l}function h(a,i,u,s){var l=Pe(u);if("function"!=typeof l)throw Error(J(150));if(null==(u=l.call(u)))throw Error(J(151));for(var c=l=null,v=i,h=i=0,m=null,g=u.next();null!==v&&!g.done;h++,g=u.next()){v.index>h?(m=v,v=null):m=v.sibling;var y=f(a,v,g.value,s);if(null===y){null===v&&(v=m);break}e&&v&&null===y.alternate&&t(a,v),i=o(y,i,h),null===c?l=y:c.sibling=y,c=y,v=m}if(g.done)return n(a,v),Jo&&Bo(a,h),l;if(null===v){for(;!g.done;h++,g=u.next())null!==(g=d(a,g.value,s))&&(i=o(g,i,h),null===c?l=g:c.sibling=g,c=g);return Jo&&Bo(a,h),l}for(v=r(a,v);!g.done;h++,g=u.next())null!==(g=p(v,a,h,g.value,s))&&(e&&null!==g.alternate&&v.delete(null===g.key?h:g.key),i=o(g,i,h),null===c?l=g:c.sibling=g,c=g);return e&&v.forEach((function(e){return t(a,e)})),Jo&&Bo(a,h),l}return function e(r,o,u,s){if("object"==typeof u&&null!==u&&u.type===ve&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case fe:e:{for(var l=u.key,c=o;null!==c;){if(c.key===l){if((l=u.type)===ve){if(7===c.tag){n(r,c.sibling),(o=a(c,u.props.children)).return=r,r=o;break e}}else if(c.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===_e&&ci(l)===c.type){n(r,c.sibling),(o=a(c,u.props)).ref=si(r,c,u),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}u.type===ve?((o=Pc(u.props.children,r.mode,s,u.key)).return=r,r=o):((s=Sc(u.type,u.key,u.props,null,r.mode,s)).ref=si(r,o,u),s.return=r,r=s)}return i(r);case pe:e:{for(c=u.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===u.containerInfo&&o.stateNode.implementation===u.implementation){n(r,o.sibling),(o=a(o,u.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Tc(u,r.mode,s)).return=r,r=o}return i(r);case _e:return e(r,o,(c=u._init)(u._payload),s)}if(Ve(u))return v(r,o,u,s);if(Pe(u))return h(r,o,u,s);li(r,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==o&&6===o.tag?(n(r,o.sibling),(o=a(o,u)).return=r,r=o):(n(r,o),(o=Mc(u,r.mode,s)).return=r,r=o),i(r)):n(r,o)}}var fi=di(!0),pi=di(!1),vi=mo(null),hi=null,mi=null,gi=null;function yi(){gi=mi=hi=null}function xi(e){var t=vi.current;go(vi),e._currentValue=t}function bi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wi(e,t){hi=e,gi=mi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(cs=!0),e.firstContext=null)}function ki(e){var t=e._currentValue;if(gi!==e)if(e={context:e,memoizedValue:t,next:null},null===mi){if(null===hi)throw Error(J(308));mi=e,hi.dependencies={lanes:0,firstContext:e}}else mi=mi.next=e;return t}var _i=null;function Oi(e){null===_i?_i=[e]:_i.push(e)}function Si(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,Oi(t)):(n.next=a.next,a.next=n),t.interleaved=n,Pi(e,r)}function Pi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ei=!1;function Mi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ti(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 Ci(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ni(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&xl)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Pi(e,n)}return null===(a=r.interleaved)?(t.next=t,Oi(r)):(t.next=a.next,a.next=t),r.interleaved=t,Pi(e,n)}function Di(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,cn(e,n)}}function ji(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ii(e,t,n,r){var a=e.updateQueue;Ei=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,u=a.shared.pending;if(null!==u){a.shared.pending=null;var s=u,l=s.next;s.next=null,null===i?o=l:i.next=l,i=s;var c=e.alternate;null!==c&&((u=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===u?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(i=0,c=l=s=null,u=o;;){var f=u.lane,p=u.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var v=e,h=u;switch(f=t,p=n,h.tag){case 1:if("function"==typeof(v=h.payload)){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=-65537&v.flags|128;case 0:if(null==(f="function"==typeof(v=h.payload)?v.call(p,d,f):v))break e;d=Me({},d,f);break e;case 2:Ei=!0}}null!==u.callback&&0!==u.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[u]:f.push(u))}else p={eventTime:p,lane:f,tag:u.tag,payload:u.payload,callback:u.callback,next:null},null===c?(l=c=p,s=d):c=c.next=p,i|=f;if(null===(u=u.next)){if(null===(u=a.shared.pending))break;u=(f=u).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=l,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);El|=i,e.lanes=i,e.memoizedState=d}}function Ri(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(J(191,a));a.call(r)}}}var Li={},Ui=mo(Li),Ai=mo(Li),Fi=mo(Li);function zi(e){if(e===Li)throw Error(J(174));return e}function Wi(e,t){switch(yo(Fi,t),yo(Ai,e),yo(Ui,Li),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ze(null,"");break;default:t=Ze(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}go(Ui),yo(Ui,t)}function Yi(){go(Ui),go(Ai),go(Fi)}function Hi(e){zi(Fi.current);var t=zi(Ui.current),n=Ze(t,e.type);t!==n&&(yo(Ai,e),yo(Ui,n))}function Bi(e){Ai.current===e&&(go(Ui),go(Ai))}var qi=mo(0);function Vi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Qi=[];function $i(){for(var e=0;e<Qi.length;e++)Qi[e]._workInProgressVersionPrimary=null;Qi.length=0}var Ki=de.ReactCurrentDispatcher,Ji=de.ReactCurrentBatchConfig,Xi=0,Gi=null,Zi=null,eu=null,tu=!1,nu=!1,ru=0,au=0;function ou(){throw Error(J(321))}function iu(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gr(e[n],t[n]))return!1;return!0}function uu(e,t,n,r,a,o){if(Xi=o,Gi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ki.current=null===e||null===e.memoizedState?Bu:qu,e=n(r,a),nu){o=0;do{if(nu=!1,ru=0,25<=o)throw Error(J(301));o+=1,eu=Zi=null,t.updateQueue=null,Ki.current=Vu,e=n(r,a)}while(nu)}if(Ki.current=Hu,t=null!==Zi&&null!==Zi.next,Xi=0,eu=Zi=Gi=null,tu=!1,t)throw Error(J(300));return e}function su(){var e=0!==ru;return ru=0,e}function lu(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===eu?Gi.memoizedState=eu=e:eu=eu.next=e,eu}function cu(){if(null===Zi){var e=Gi.alternate;e=null!==e?e.memoizedState:null}else e=Zi.next;var t=null===eu?Gi.memoizedState:eu.next;if(null!==t)eu=t,Zi=e;else{if(null===e)throw Error(J(310));e={memoizedState:(Zi=e).memoizedState,baseState:Zi.baseState,baseQueue:Zi.baseQueue,queue:Zi.queue,next:null},null===eu?Gi.memoizedState=eu=e:eu=eu.next=e}return eu}function du(e,t){return"function"==typeof t?t(e):t}function fu(e){var t=cu(),n=t.queue;if(null===n)throw Error(J(311));n.lastRenderedReducer=e;var r=Zi,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var i=a.next;a.next=o.next,o.next=i}r.baseQueue=a=o,n.pending=null}if(null!==a){o=a.next,r=r.baseState;var u=i=null,s=null,l=o;do{var c=l.lane;if((Xi&c)===c)null!==s&&(s=s.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===s?(u=s=d,i=r):s=s.next=d,Gi.lanes|=c,El|=c}l=l.next}while(null!==l&&l!==o);null===s?i=r:s.next=u,Gr(r,t.memoizedState)||(cs=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}if(null!==(e=n.interleaved)){a=e;do{o=a.lane,Gi.lanes|=o,El|=o,a=a.next}while(a!==e)}else null===a&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pu(e){var t=cu(),n=t.queue;if(null===n)throw Error(J(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{o=e(o,i.action),i=i.next}while(i!==a);Gr(o,t.memoizedState)||(cs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vu(){}function hu(e,t){var n=Gi,r=cu(),a=t(),o=!Gr(r.memoizedState,a);if(o&&(r.memoizedState=a,cs=!0),r=r.queue,Eu(yu.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==eu&&1&eu.memoizedState.tag){if(n.flags|=2048,ku(9,gu.bind(null,n,r,a,t),void 0,null),null===bl)throw Error(J(349));0!=(30&Xi)||mu(n,t,a)}return a}function mu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Gi.updateQueue)?(t={lastEffect:null,stores:null},Gi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function gu(e,t,n,r){t.value=n,t.getSnapshot=r,xu(t)&&bu(e)}function yu(e,t,n){return n((function(){xu(t)&&bu(e)}))}function xu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gr(e,n)}catch(e){return!0}}function bu(e){var t=Pi(e,1);null!==t&&Ql(t,e,1,-1)}function wu(e){var t=lu();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:du,lastRenderedState:e},t.queue=e,e=e.dispatch=Fu.bind(null,Gi,e),[t.memoizedState,e]}function ku(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Gi.updateQueue)?(t={lastEffect:null,stores:null},Gi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function _u(){return cu().memoizedState}function Ou(e,t,n,r){var a=lu();Gi.flags|=e,a.memoizedState=ku(1|t,n,void 0,void 0===r?null:r)}function Su(e,t,n,r){var a=cu();r=void 0===r?null:r;var o=void 0;if(null!==Zi){var i=Zi.memoizedState;if(o=i.destroy,null!==r&&iu(r,i.deps))return void(a.memoizedState=ku(t,n,o,r))}Gi.flags|=e,a.memoizedState=ku(1|t,n,o,r)}function Pu(e,t){return Ou(8390656,8,e,t)}function Eu(e,t){return Su(2048,8,e,t)}function Mu(e,t){return Su(4,2,e,t)}function Tu(e,t){return Su(4,4,e,t)}function Cu(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Nu(e,t,n){return n=null!=n?n.concat([e]):null,Su(4,4,Cu.bind(null,t,e),n)}function Du(){}function ju(e,t){var n=cu();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&iu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Iu(e,t){var n=cu();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&iu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ru(e,t,n){return 0==(21&Xi)?(e.baseState&&(e.baseState=!1,cs=!0),e.memoizedState=n):(Gr(n,t)||(n=un(),Gi.lanes|=n,El|=n,e.baseState=!0),t)}function Lu(e,t){var n=dn;dn=0!==n&&4>n?n:4,e(!0);var r=Ji.transition;Ji.transition={};try{e(!1),t()}finally{dn=n,Ji.transition=r}}function Uu(){return cu().memoizedState}function Au(e,t,n){var r=Vl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zu(e))Wu(t,n);else if(null!==(n=Si(e,t,n,r))){Ql(n,e,r,ql()),Yu(n,t,r)}}function Fu(e,t,n){var r=Vl(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zu(e))Wu(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,u=o(i,n);if(a.hasEagerState=!0,a.eagerState=u,Gr(u,i)){var s=t.interleaved;return null===s?(a.next=a,Oi(t)):(a.next=s.next,s.next=a),void(t.interleaved=a)}}catch(e){}null!==(n=Si(e,t,a,r))&&(Ql(n,e,r,a=ql()),Yu(n,t,r))}}function zu(e){var t=e.alternate;return e===Gi||null!==t&&t===Gi}function Wu(e,t){nu=tu=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yu(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,cn(e,n)}}var Hu={readContext:ki,useCallback:ou,useContext:ou,useEffect:ou,useImperativeHandle:ou,useInsertionEffect:ou,useLayoutEffect:ou,useMemo:ou,useReducer:ou,useRef:ou,useState:ou,useDebugValue:ou,useDeferredValue:ou,useTransition:ou,useMutableSource:ou,useSyncExternalStore:ou,useId:ou,unstable_isNewReconciler:!1},Bu={readContext:ki,useCallback:function(e,t){return lu().memoizedState=[e,void 0===t?null:t],e},useContext:ki,useEffect:Pu,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ou(4194308,4,Cu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ou(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ou(4,2,e,t)},useMemo:function(e,t){var n=lu();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lu();return t=void 0!==n?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=Au.bind(null,Gi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},lu().memoizedState=e},useState:wu,useDebugValue:Du,useDeferredValue:function(e){return lu().memoizedState=e},useTransition:function(){var e=wu(!1),t=e[0];return e=Lu.bind(null,e[1]),lu().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Gi,a=lu();if(Jo){if(void 0===n)throw Error(J(407));n=n()}else{if(n=t(),null===bl)throw Error(J(349));0!=(30&Xi)||mu(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Pu(yu.bind(null,r,o,e),[e]),r.flags|=2048,ku(9,gu.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lu(),t=bl.identifierPrefix;if(Jo){var n=Ho;t=":"+t+"R"+(n=(Yo&~(1<<32-Xt(Yo)-1)).toString(32)+n),0<(n=ru++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=au++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qu={readContext:ki,useCallback:ju,useContext:ki,useEffect:Eu,useImperativeHandle:Nu,useInsertionEffect:Mu,useLayoutEffect:Tu,useMemo:Iu,useReducer:fu,useRef:_u,useState:function(){return fu(du)},useDebugValue:Du,useDeferredValue:function(e){return Ru(cu(),Zi.memoizedState,e)},useTransition:function(){return[fu(du)[0],cu().memoizedState]},useMutableSource:vu,useSyncExternalStore:hu,useId:Uu,unstable_isNewReconciler:!1},Vu={readContext:ki,useCallback:ju,useContext:ki,useEffect:Eu,useImperativeHandle:Nu,useInsertionEffect:Mu,useLayoutEffect:Tu,useMemo:Iu,useReducer:pu,useRef:_u,useState:function(){return pu(du)},useDebugValue:Du,useDeferredValue:function(e){var t=cu();return null===Zi?t.memoizedState=e:Ru(t,Zi.memoizedState,e)},useTransition:function(){return[pu(du)[0],cu().memoizedState]},useMutableSource:vu,useSyncExternalStore:hu,useId:Uu,unstable_isNewReconciler:!1};function Qu(e,t){if(e&&e.defaultProps){for(var n in t=Me({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function $u(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Me({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ku={isMounted:function(e){return!!(e=e._reactInternals)&&jt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ql(),a=Vl(e),o=Ci(r,a);o.payload=t,null!=n&&(o.callback=n),null!==(t=Ni(e,o,a))&&(Ql(t,e,a,r),Di(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ql(),a=Vl(e),o=Ci(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Ni(e,o,a))&&(Ql(t,e,a,r),Di(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ql(),r=Vl(e),a=Ci(n,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Ni(e,a,r))&&(Ql(t,e,r,n),Di(t,e,r))}};function Ju(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!Zr(n,r)||!Zr(a,o))}function Xu(e,t,n){var r=!1,a=xo,o=t.contextType;return"object"==typeof o&&null!==o?o=ki(o):(a=Oo(t)?ko:bo.current,o=(r=null!=(r=t.contextTypes))?_o(e,a):xo),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ku,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function Gu(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ku.enqueueReplaceState(t,t.state,null)}function Zu(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Mi(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=ki(o):(o=Oo(t)?ko:bo.current,a.context=_o(e,o)),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&($u(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&Ku.enqueueReplaceState(a,a.state,null),Ii(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function es(e,t){try{var n="",r=t;do{n+=De(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a,digest:null}}function ts(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ns(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var rs="function"==typeof WeakMap?WeakMap:Map;function as(e,t,n){(n=Ci(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rl||(Rl=!0,Ll=r),ns(0,t)},n}function os(e,t,n){(n=Ci(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){ns(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ns(0,t),"function"!=typeof r&&(null===Ul?Ul=new Set([this]):Ul.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function is(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new rs;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=mc.bind(null,e,t,n),t.then(e,e))}function us(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ss(e,t,n,r,a){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ci(-1,1)).tag=2,Ni(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var ls=de.ReactCurrentOwner,cs=!1;function ds(e,t,n,r){t.child=null===e?pi(t,null,n,r):fi(t,e.child,n,r)}function fs(e,t,n,r,a){n=n.render;var o=t.ref;return wi(t,a),r=uu(e,t,n,r,o,a),n=su(),null===e||cs?(Jo&&n&&Vo(t),t.flags|=1,ds(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Rs(e,t,a))}function ps(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||_c(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Sc(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,vs(e,t,o,r,a))}if(o=e.child,0==(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:Zr)(i,r)&&e.ref===t.ref)return Rs(e,t,a)}return t.flags|=1,(e=Oc(o,r)).ref=t.ref,e.return=t,t.child=e}function vs(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(Zr(o,r)&&e.ref===t.ref){if(cs=!1,t.pendingProps=r=o,0==(e.lanes&a))return t.lanes=e.lanes,Rs(e,t,a);0!=(131072&e.flags)&&(cs=!0)}}return gs(e,t,n,r,a)}function hs(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yo(Ol,_l),_l|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yo(Ol,_l),_l|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,yo(Ol,_l),_l|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,yo(Ol,_l),_l|=r;return ds(e,t,a,n),t.child}function ms(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gs(e,t,n,r,a){var o=Oo(n)?ko:bo.current;return o=_o(t,o),wi(t,a),n=uu(e,t,n,r,o,a),r=su(),null===e||cs?(Jo&&r&&Vo(t),t.flags|=1,ds(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Rs(e,t,a))}function ys(e,t,n,r,a){if(Oo(n)){var o=!0;Mo(t)}else o=!1;if(wi(t,a),null===t.stateNode)Is(e,t),Xu(t,n,r),Zu(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,l=n.contextType;"object"==typeof l&&null!==l?l=ki(l):l=_o(t,l=Oo(n)?ko:bo.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(u!==r||s!==l)&&Gu(t,i,r,l),Ei=!1;var f=t.memoizedState;i.state=f,Ii(t,r,i,a),s=t.memoizedState,u!==r||f!==s||wo.current||Ei?("function"==typeof c&&($u(t,n,c,r),s=t.memoizedState),(u=Ei||Ju(t,n,u,r,f,s,l))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=l,r=u):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ti(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:Qu(t.type,u),i.props=l,d=t.pendingProps,f=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=ki(s):s=_o(t,s=Oo(n)?ko:bo.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(u!==d||f!==s)&&Gu(t,i,r,s),Ei=!1,f=t.memoizedState,i.state=f,Ii(t,r,i,a);var v=t.memoizedState;u!==d||f!==v||wo.current||Ei?("function"==typeof p&&($u(t,n,p,r),v=t.memoizedState),(l=Ei||Ju(t,n,l,r,f,v,s)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,v,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,v,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=s,r=l):("function"!=typeof i.componentDidUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return xs(e,t,n,r,o,a)}function xs(e,t,n,r,a,o){ms(e,t);var i=0!=(128&t.flags);if(!r&&!i)return a&&To(t,n,!1),Rs(e,t,o);r=t.stateNode,ls.current=t;var u=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=fi(t,e.child,null,o),t.child=fi(t,null,u,o)):ds(e,t,u,o),t.memoizedState=r.state,a&&To(t,n,!0),t.child}function bs(e){var t=e.stateNode;t.pendingContext?Po(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Po(0,t.context,!1),Wi(e,t.containerInfo)}function ws(e,t,n,r,a){return oi(),ii(a),t.flags|=256,ds(e,t,n,r),t.child}var ks,_s,Os,Ss,Ps={dehydrated:null,treeContext:null,retryLane:0};function Es(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ms(e,t,n){var r,a=t.pendingProps,o=qi.current,i=!1,u=0!=(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),yo(qi,1&o),null===e)return ti(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=a.children,e=a.fallback,i?(a=t.mode,i=t.child,u={mode:"hidden",children:u},0==(1&a)&&null!==i?(i.childLanes=0,i.pendingProps=u):i=Ec(u,a,0,null),e=Pc(e,a,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Es(n),t.memoizedState=Ps,e):Ts(t,u));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,a,o,i){if(n)return 256&t.flags?(t.flags&=-257,Cs(e,t,i,r=ts(Error(J(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,a=t.mode,r=Ec({mode:"visible",children:r.children},a,0,null),(o=Pc(o,a,i,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&fi(t,e.child,null,i),t.child.memoizedState=Es(i),t.memoizedState=Ps,o);if(0==(1&t.mode))return Cs(e,t,i,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var u=r.dgst;return r=u,Cs(e,t,i,r=ts(o=Error(J(419)),r,void 0))}if(u=0!=(i&e.childLanes),cs||u){if(null!==(r=bl)){switch(i&-i){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=0!=(a&(r.suspendedLanes|i))?0:a)&&a!==o.retryLane&&(o.retryLane=a,Pi(e,a),Ql(r,e,a,-1))}return ic(),Cs(e,t,i,r=ts(Error(J(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=yc.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ko=eo(a.nextSibling),$o=t,Jo=!0,Xo=null,null!==e&&(Fo[zo++]=Yo,Fo[zo++]=Ho,Fo[zo++]=Wo,Yo=e.id,Ho=e.overflow,Wo=t),t=Ts(t,r.children),t.flags|=4096,t)}(e,t,u,a,r,o,n);if(i){i=a.fallback,u=t.mode,r=(o=e.child).sibling;var s={mode:"hidden",children:a.children};return 0==(1&u)&&t.child!==o?((a=t.child).childLanes=0,a.pendingProps=s,t.deletions=null):(a=Oc(o,s)).subtreeFlags=14680064&o.subtreeFlags,null!==r?i=Oc(r,i):(i=Pc(i,u,n,null)).flags|=2,i.return=t,a.return=t,a.sibling=i,t.child=a,a=i,i=t.child,u=null===(u=e.child.memoizedState)?Es(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},i.memoizedState=u,i.childLanes=e.childLanes&~n,t.memoizedState=Ps,a}return e=(i=e.child).sibling,a=Oc(i,{mode:"visible",children:a.children}),0==(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function Ts(e,t){return(t=Ec({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Cs(e,t,n,r){return null!==r&&ii(r),fi(t,e.child,null,n),(e=Ts(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ns(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),bi(e.return,t,n)}function Ds(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function js(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ds(e,t,r.children,n),0!=(2&(r=qi.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ns(e,n,t);else if(19===e.tag)Ns(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(yo(qi,r),0==(1&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Vi(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ds(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Vi(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ds(t,!0,n,null,o);break;case"together":Ds(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Is(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),El|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(J(153));if(null!==t.child){for(n=Oc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Oc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ls(e,t){if(!Jo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Us(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function As(e,t,n){var r=t.pendingProps;switch(Qo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Us(t),null;case 1:case 17:return Oo(t.type)&&So(),Us(t),null;case 3:return r=t.stateNode,Yi(),go(wo),go(bo),$i(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ri(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Xo&&(Xl(Xo),Xo=null))),_s(e,t),Us(t),null;case 5:Bi(t);var a=zi(Fi.current);if(n=t.type,null!==e&&null!=t.stateNode)Os(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(J(166));return Us(t),null}if(e=zi(Ui.current),ri(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ro]=t,r[ao]=o,e=0!=(1&t.mode),n){case"dialog":Ca("cancel",r),Ca("close",r);break;case"iframe":case"object":case"embed":Ca("load",r);break;case"video":case"audio":for(a=0;a<Pa.length;a++)Ca(Pa[a],r);break;case"source":Ca("error",r);break;case"img":case"image":case"link":Ca("error",r),Ca("load",r);break;case"details":Ca("toggle",r);break;case"input":We(r,o),Ca("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ca("invalid",r);break;case"textarea":Ke(r,o),Ca("invalid",r)}for(var i in lt(n,o),a=null,o)if(o.hasOwnProperty(i)){var u=o[i];"children"===i?"string"==typeof u?r.textContent!==u&&(!0!==o.suppressHydrationWarning&&Ha(r.textContent,u,e),a=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==o.suppressHydrationWarning&&Ha(r.textContent,u,e),a=["children",""+u]):G.hasOwnProperty(i)&&null!=u&&"onScroll"===i&&Ca("scroll",r)}switch(n){case"input":Ue(r),Be(r,o,!0);break;case"textarea":Ue(r),Xe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Ba)}r=a,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Ge(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ro]=t,e[ao]=r,ks(e,t,!1,!1),t.stateNode=e;e:{switch(i=ct(n,r),n){case"dialog":Ca("cancel",e),Ca("close",e),a=r;break;case"iframe":case"object":case"embed":Ca("load",e),a=r;break;case"video":case"audio":for(a=0;a<Pa.length;a++)Ca(Pa[a],e);a=r;break;case"source":Ca("error",e),a=r;break;case"img":case"image":case"link":Ca("error",e),Ca("load",e),a=r;break;case"details":Ca("toggle",e),a=r;break;case"input":We(e,r),a=ze(e,r),Ca("invalid",e);break;case"option":default:a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Me({},r,{value:void 0}),Ca("invalid",e);break;case"textarea":Ke(e,r),a=$e(e,r),Ca("invalid",e)}for(o in lt(n,a),u=a)if(u.hasOwnProperty(o)){var s=u[o];"style"===o?ut(e,s):"dangerouslySetInnerHTML"===o?null!=(s=s?s.__html:void 0)&&nt(e,s):"children"===o?"string"==typeof s?("textarea"!==n||""!==s)&&rt(e,s):"number"==typeof s&&rt(e,""+s):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(G.hasOwnProperty(o)?null!=s&&"onScroll"===o&&Ca("scroll",e):null!=s&&ce(e,o,s,i))}switch(n){case"input":Ue(e),Be(e,r,!1);break;case"textarea":Ue(e),Xe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Re(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?Qe(e,!!r.multiple,o,!1):null!=r.defaultValue&&Qe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Ba)}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)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Us(t),null;case 6:if(e&&null!=t.stateNode)Ss(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(J(166));if(n=zi(Fi.current),zi(Ui.current),ri(t)){if(r=t.stateNode,n=t.memoizedProps,r[ro]=t,(o=r.nodeValue!==n)&&null!==(e=$o))switch(e.tag){case 3:Ha(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ha(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ro]=t,t.stateNode=r}return Us(t),null;case 13:if(go(qi),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Jo&&null!==Ko&&0!=(1&t.mode)&&0==(128&t.flags))ai(),oi(),t.flags|=98560,o=!1;else if(o=ri(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(J(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(J(317));o[ro]=t}else oi(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Us(t),o=!1}else null!==Xo&&(Xl(Xo),Xo=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&qi.current)?0===Sl&&(Sl=3):ic())),null!==t.updateQueue&&(t.flags|=4),Us(t),null);case 4:return Yi(),_s(e,t),null===e&&ja(t.stateNode.containerInfo),Us(t),null;case 10:return xi(t.type._context),Us(t),null;case 19:if(go(qi),null===(o=t.memoizedState))return Us(t),null;if(r=0!=(128&t.flags),null===(i=o.rendering))if(r)Ls(o,!1);else{if(0!==Sl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=Vi(e))){for(t.flags|=128,Ls(o,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(i=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return yo(qi,1&qi.current|2),t.child}e=e.sibling}null!==o.tail&&Yt()>jl&&(t.flags|=128,r=!0,Ls(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Vi(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ls(o,!0),null===o.tail&&"hidden"===o.tailMode&&!i.alternate&&!Jo)return Us(t),null}else 2*Yt()-o.renderingStartTime>jl&&1073741824!==n&&(t.flags|=128,r=!0,Ls(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=o.last)?n.sibling=i:t.child=i,o.last=i)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Yt(),t.sibling=null,n=qi.current,yo(qi,r?1&n|2:1&n),t):(Us(t),null);case 22:case 23:return nc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&_l)&&(Us(t),6&t.subtreeFlags&&(t.flags|=8192)):Us(t),null;case 24:case 25:return null}throw Error(J(156,t.tag))}function Fs(e,t){switch(Qo(t),t.tag){case 1:return Oo(t.type)&&So(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yi(),go(wo),go(bo),$i(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Bi(t),null;case 13:if(go(qi),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(J(340));oi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return go(qi),null;case 4:return Yi(),null;case 10:return xi(t.type._context),null;case 22:case 23:return nc(),null;default:return null}}ks=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_s=function(){},Os=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,zi(Ui.current);var o,i=null;switch(n){case"input":a=ze(e,a),r=ze(e,r),i=[];break;case"select":a=Me({},a,{value:void 0}),r=Me({},r,{value:void 0}),i=[];break;case"textarea":a=$e(e,a),r=$e(e,r),i=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=Ba)}for(l in lt(n,r),n=null,a)if(!r.hasOwnProperty(l)&&a.hasOwnProperty(l)&&null!=a[l])if("style"===l){var u=a[l];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(G.hasOwnProperty(l)?i||(i=[]):(i=i||[]).push(l,null));for(l in r){var s=r[l];if(u=null!=a?a[l]:void 0,r.hasOwnProperty(l)&&s!==u&&(null!=s||null!=u))if("style"===l)if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(i||(i=[]),i.push(l,n)),n=s;else"dangerouslySetInnerHTML"===l?(s=s?s.__html:void 0,u=u?u.__html:void 0,null!=s&&u!==s&&(i=i||[]).push(l,s)):"children"===l?"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(l,""+s):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(G.hasOwnProperty(l)?(null!=s&&"onScroll"===l&&Ca("scroll",e),i||u===s||(i=[])):(i=i||[]).push(l,s))}n&&(i=i||[]).push("style",n);var l=i;(t.updateQueue=l)&&(t.flags|=4)}},Ss=function(e,t,n,r){n!==r&&(t.flags|=4)};var zs=!1,Ws=!1,Ys="function"==typeof WeakSet?WeakSet:Set,Hs=null;function Bs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){hc(e,t,n)}else n.current=null}function qs(e,t,n){try{n()}catch(n){hc(e,t,n)}}var Vs=!1;function Qs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&qs(t,n,o)}a=a.next}while(a!==r)}}function $s(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 Ks(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Js(e){var t=e.alternate;null!==t&&(e.alternate=null,Js(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ro],delete t[ao],delete t[io],delete t[uo],delete t[so])),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 Xs(e){return 5===e.tag||3===e.tag||4===e.tag}function Gs(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Xs(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Zs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Ba));else if(4!==r&&null!==(e=e.child))for(Zs(e,t,n),e=e.sibling;null!==e;)Zs(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(el(e,t,n),e=e.sibling;null!==e;)el(e,t,n),e=e.sibling}var tl=null,nl=!1;function rl(e,t,n){for(n=n.child;null!==n;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Jt&&"function"==typeof Jt.onCommitFiberUnmount)try{Jt.onCommitFiberUnmount(Kt,n)}catch(e){}switch(n.tag){case 5:Ws||Bs(n,t);case 6:var r=tl,a=nl;tl=null,rl(e,t,n),nl=a,null!==(tl=r)&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):tl.removeChild(n.stateNode));break;case 18:null!==tl&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?Za(e.parentNode,n):1===e.nodeType&&Za(e,n),In(e)):Za(tl,n.stateNode));break;case 4:r=tl,a=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=a;break;case 0:case 11:case 14:case 15:if(!Ws&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(0!=(2&o)||0!=(4&o))&&qs(n,t,i),a=a.next}while(a!==r)}rl(e,t,n);break;case 1:if(!Ws&&(Bs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){hc(n,t,e)}rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:1&n.mode?(Ws=(r=Ws)||null!==n.memoizedState,rl(e,t,n),Ws=r):rl(e,t,n);break;default:rl(e,t,n)}}function ol(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ys),t.forEach((function(t){var r=xc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function il(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r];try{var o=e,i=t,u=i;e:for(;null!==u;){switch(u.tag){case 5:tl=u.stateNode,nl=!1;break e;case 3:case 4:tl=u.stateNode.containerInfo,nl=!0;break e}u=u.return}if(null===tl)throw Error(J(160));al(o,i,a),tl=null,nl=!1;var s=a.alternate;null!==s&&(s.return=null),a.return=null}catch(e){hc(a,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ul(t,e),t=t.sibling}function ul(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(il(t,e),sl(e),4&r){try{Qs(3,e,e.return),$s(3,e)}catch(t){hc(e,e.return,t)}try{Qs(5,e,e.return)}catch(t){hc(e,e.return,t)}}break;case 1:il(t,e),sl(e),512&r&&null!==n&&Bs(n,n.return);break;case 5:if(il(t,e),sl(e),512&r&&null!==n&&Bs(n,n.return),32&e.flags){var a=e.stateNode;try{rt(a,"")}catch(t){hc(e,e.return,t)}}if(4&r&&null!=(a=e.stateNode)){var o=e.memoizedProps,i=null!==n?n.memoizedProps:o,u=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===u&&"radio"===o.type&&null!=o.name&&Ye(a,o),ct(u,i);var l=ct(u,o);for(i=0;i<s.length;i+=2){var c=s[i],d=s[i+1];"style"===c?ut(a,d):"dangerouslySetInnerHTML"===c?nt(a,d):"children"===c?rt(a,d):ce(a,c,d,l)}switch(u){case"input":He(a,o);break;case"textarea":Je(a,o);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?Qe(a,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?Qe(a,!!o.multiple,o.defaultValue,!0):Qe(a,!!o.multiple,o.multiple?[]:"",!1))}a[ao]=o}catch(t){hc(e,e.return,t)}}break;case 6:if(il(t,e),sl(e),4&r){if(null===e.stateNode)throw Error(J(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){hc(e,e.return,t)}}break;case 3:if(il(t,e),sl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{In(t.containerInfo)}catch(t){hc(e,e.return,t)}break;case 4:default:il(t,e),sl(e);break;case 13:il(t,e),sl(e),8192&(a=e.child).flags&&(o=null!==a.memoizedState,a.stateNode.isHidden=o,!o||null!==a.alternate&&null!==a.alternate.memoizedState||(Dl=Yt())),4&r&&ol(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(Ws=(l=Ws)||c,il(t,e),Ws=l):il(t,e),sl(e),8192&r){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!c&&0!=(1&e.mode))for(Hs=e,c=e.child;null!==c;){for(d=Hs=c;null!==Hs;){switch(p=(f=Hs).child,f.tag){case 0:case 11:case 14:case 15:Qs(4,f,f.return);break;case 1:Bs(f,f.return);var v=f.stateNode;if("function"==typeof v.componentWillUnmount){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(e){hc(r,n,e)}}break;case 5:Bs(f,f.return);break;case 22:if(null!==f.memoizedState){fl(d);continue}}null!==p?(p.return=f,Hs=p):fl(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{a=d.stateNode,l?"function"==typeof(o=a.style).setProperty?o.setProperty("display","none","important"):o.display="none":(u=d.stateNode,i=null!=(s=d.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,u.style.display=it("display",i))}catch(t){hc(e,e.return,t)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(t){hc(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:il(t,e),sl(e),4&r&&ol(e);case 21:}}function sl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Xs(n)){var r=n;break e}n=n.return}throw Error(J(160))}switch(r.tag){case 5:var a=r.stateNode;32&r.flags&&(rt(a,""),r.flags&=-33),el(e,Gs(e),a);break;case 3:case 4:var o=r.stateNode.containerInfo;Zs(e,Gs(e),o);break;default:throw Error(J(161))}}catch(t){hc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ll(e,t,n){Hs=e,cl(e)}function cl(e,t,n){for(var r=0!=(1&e.mode);null!==Hs;){var a=Hs,o=a.child;if(22===a.tag&&r){var i=null!==a.memoizedState||zs;if(!i){var u=a.alternate,s=null!==u&&null!==u.memoizedState||Ws;u=zs;var l=Ws;if(zs=i,(Ws=s)&&!l)for(Hs=a;null!==Hs;)s=(i=Hs).child,22===i.tag&&null!==i.memoizedState?pl(a):null!==s?(s.return=i,Hs=s):pl(a);for(;null!==o;)Hs=o,cl(o),o=o.sibling;Hs=a,zs=u,Ws=l}dl(e)}else 0!=(8772&a.subtreeFlags)&&null!==o?(o.return=a,Hs=o):dl(e)}}function dl(e){for(;null!==Hs;){var t=Hs;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ws||$s(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ws)if(null===n)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Qu(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ri(t,o,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ri(t,i,n)}break;case 5:var u=t.stateNode;if(null===n&&4&t.flags){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var c=l.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&In(d)}}}break;default:throw Error(J(163))}Ws||512&t.flags&&Ks(t)}catch(e){hc(t,t.return,e)}}if(t===e){Hs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Hs=n;break}Hs=t.return}}function fl(e){for(;null!==Hs;){var t=Hs;if(t===e){Hs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Hs=n;break}Hs=t.return}}function pl(e){for(;null!==Hs;){var t=Hs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{$s(4,t)}catch(e){hc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(e){hc(t,a,e)}}var o=t.return;try{Ks(t)}catch(e){hc(t,o,e)}break;case 5:var i=t.return;try{Ks(t)}catch(e){hc(t,i,e)}}}catch(e){hc(t,t.return,e)}if(t===e){Hs=null;break}var u=t.sibling;if(null!==u){u.return=t.return,Hs=u;break}Hs=t.return}}var vl,hl=Math.ceil,ml=de.ReactCurrentDispatcher,gl=de.ReactCurrentOwner,yl=de.ReactCurrentBatchConfig,xl=0,bl=null,wl=null,kl=0,_l=0,Ol=mo(0),Sl=0,Pl=null,El=0,Ml=0,Tl=0,Cl=null,Nl=null,Dl=0,jl=1/0,Il=null,Rl=!1,Ll=null,Ul=null,Al=!1,Fl=null,zl=0,Wl=0,Yl=null,Hl=-1,Bl=0;function ql(){return 0!=(6&xl)?Yt():-1!==Hl?Hl:Hl=Yt()}function Vl(e){return 0==(1&e.mode)?1:0!=(2&xl)&&0!==kl?kl&-kl:null!==ui.transition?(0===Bl&&(Bl=un()),Bl):0!==(e=dn)?e:e=void 0===(e=window.event)?16:Yn(e.type)}function Ql(e,t,n,r){if(50<Wl)throw Wl=0,Yl=null,Error(J(185));ln(e,n,r),0!=(2&xl)&&e===bl||(e===bl&&(0==(2&xl)&&(Ml|=n),4===Sl&&Gl(e,kl)),$l(e,r),1===n&&0===xl&&0==(1&t.mode)&&(jl=Yt()+500,No&&Io()))}function $l(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Xt(o),u=1<<i,s=a[i];-1===s?0!=(u&n)&&0==(u&r)||(a[i]=an(u,t)):s<=t&&(e.expiredLanes|=u),o&=~u}}(e,t);var r=rn(e,e===bl?kl:0);if(0===r)null!==n&&Ft(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ft(n),1===t)0===e.tag?function(e){No=!0,jo(e)}(Zl.bind(null,e)):jo(Zl.bind(null,e)),Xa((function(){0==(6&xl)&&Io()})),n=null;else{switch(fn(r)){case 1:n=Bt;break;case 4:n=qt;break;case 16:default:n=Vt;break;case 536870912:n=$t}n=bc(n,Kl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Kl(e,t){if(Hl=-1,Bl=0,0!=(6&xl))throw Error(J(327));var n=e.callbackNode;if(pc()&&e.callbackNode!==n)return null;var r=rn(e,e===bl?kl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=uc(e,r);else{t=r;var a=xl;xl|=2;var o=oc();for(bl===e&&kl===t||(Il=null,jl=Yt()+500,rc(e,t));;)try{lc();break}catch(t){ac(e,t)}yi(),ml.current=o,xl=a,null!==wl?t=0:(bl=null,kl=0,t=Sl)}if(0!==t){if(2===t&&(0!==(a=on(e))&&(r=a,t=Jl(e,a))),1===t)throw n=Pl,rc(e,0),Gl(e,r),$l(e,Yt()),n;if(6===t)Gl(e,r);else{if(a=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!Gr(o(),a))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(a)&&(2===(t=uc(e,r))&&(0!==(o=on(e))&&(r=o,t=Jl(e,o))),1===t))throw n=Pl,rc(e,0),Gl(e,r),$l(e,Yt()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(J(345));case 2:case 5:fc(e,Nl,Il);break;case 3:if(Gl(e,r),(130023424&r)===r&&10<(t=Dl+500-Yt())){if(0!==rn(e,0))break;if(((a=e.suspendedLanes)&r)!==r){ql(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=$a(fc.bind(null,e,Nl,Il),t);break}fc(e,Nl,Il);break;case 4:if(Gl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,a=-1;0<r;){var i=31-Xt(r);o=1<<i,(i=t[i])>a&&(a=i),r&=~o}if(r=a,10<(r=(120>(r=Yt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hl(r/1960))-r)){e.timeoutHandle=$a(fc.bind(null,e,Nl,Il),r);break}fc(e,Nl,Il);break;default:throw Error(J(329))}}}return $l(e,Yt()),e.callbackNode===n?Kl.bind(null,e):null}function Jl(e,t){var n=Cl;return e.current.memoizedState.isDehydrated&&(rc(e,t).flags|=256),2!==(e=uc(e,t))&&(t=Nl,Nl=n,null!==t&&Xl(t)),e}function Xl(e){null===Nl?Nl=e:Nl.push.apply(Nl,e)}function Gl(e,t){for(t&=~Tl,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xt(t),r=1<<n;e[n]=-1,t&=~r}}function Zl(e){if(0!=(6&xl))throw Error(J(327));pc();var t=rn(e,0);if(0==(1&t))return $l(e,Yt()),null;var n=uc(e,t);if(0!==e.tag&&2===n){var r=on(e);0!==r&&(t=r,n=Jl(e,r))}if(1===n)throw n=Pl,rc(e,0),Gl(e,t),$l(e,Yt()),n;if(6===n)throw Error(J(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fc(e,Nl,Il),$l(e,Yt()),null}function ec(e,t){var n=xl;xl|=1;try{return e(t)}finally{0===(xl=n)&&(jl=Yt()+500,No&&Io())}}function tc(e){null!==Fl&&0===Fl.tag&&0==(6&xl)&&pc();var t=xl;xl|=1;var n=yl.transition,r=dn;try{if(yl.transition=null,dn=1,e)return e()}finally{dn=r,yl.transition=n,0==(6&(xl=t))&&Io()}}function nc(){_l=Ol.current,go(Ol)}function rc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ka(n)),null!==wl)for(n=wl.return;null!==n;){var r=n;switch(Qo(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&So();break;case 3:Yi(),go(wo),go(bo),$i();break;case 5:Bi(r);break;case 4:Yi();break;case 13:case 19:go(qi);break;case 10:xi(r.type._context);break;case 22:case 23:nc()}n=n.return}if(bl=e,wl=e=Oc(e.current,null),kl=_l=t,Sl=0,Pl=null,Tl=Ml=El=0,Nl=Cl=null,null!==_i){for(t=0;t<_i.length;t++)if(null!==(r=(n=_i[t]).interleaved)){n.interleaved=null;var a=r.next,o=n.pending;if(null!==o){var i=o.next;o.next=a,r.next=i}n.pending=r}_i=null}return e}function ac(e,t){for(;;){var n=wl;try{if(yi(),Ki.current=Hu,tu){for(var r=Gi.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}tu=!1}if(Xi=0,eu=Zi=Gi=null,nu=!1,ru=0,gl.current=null,null===n||null===n.return){Sl=1,Pl=t,wl=null;break}e:{var o=e,i=n.return,u=n,s=t;if(t=kl,u.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s,c=u,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=us(i);if(null!==p){p.flags&=-257,ss(p,i,u,0,t),1&p.mode&&is(o,l,t),s=l;var v=(t=p).updateQueue;if(null===v){var h=new Set;h.add(s),t.updateQueue=h}else v.add(s);break e}if(0==(1&t)){is(o,l,t),ic();break e}s=Error(J(426))}else if(Jo&&1&u.mode){var m=us(i);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),ss(m,i,u,0,t),ii(es(s,u));break e}}o=s=es(s,u),4!==Sl&&(Sl=2),null===Cl?Cl=[o]:Cl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ji(o,as(0,s,t));break e;case 1:u=s;var g=o.type,y=o.stateNode;if(0==(128&o.flags)&&("function"==typeof g.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Ul||!Ul.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t,ji(o,os(o,u,t));break e}}o=o.return}while(null!==o)}dc(n)}catch(e){t=e,wl===n&&null!==n&&(wl=n=n.return);continue}break}}function oc(){var e=ml.current;return ml.current=Hu,null===e?Hu:e}function ic(){0!==Sl&&3!==Sl&&2!==Sl||(Sl=4),null===bl||0==(268435455&El)&&0==(268435455&Ml)||Gl(bl,kl)}function uc(e,t){var n=xl;xl|=2;var r=oc();for(bl===e&&kl===t||(Il=null,rc(e,t));;)try{sc();break}catch(t){ac(e,t)}if(yi(),xl=n,ml.current=r,null!==wl)throw Error(J(261));return bl=null,kl=0,Sl}function sc(){for(;null!==wl;)cc(wl)}function lc(){for(;null!==wl&&!zt();)cc(wl)}function cc(e){var t=vl(e.alternate,e,_l);e.memoizedProps=e.pendingProps,null===t?dc(e):wl=t,gl.current=null}function dc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=As(n,t,_l)))return void(wl=n)}else{if(null!==(n=Fs(n,t)))return n.flags&=32767,void(wl=n);if(null===e)return Sl=6,void(wl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(wl=t);wl=t=e}while(null!==t);0===Sl&&(Sl=5)}function fc(e,t,n){var r=dn,a=yl.transition;try{yl.transition=null,dn=1,function(e,t,n,r){do{pc()}while(null!==Fl);if(0!=(6&xl))throw Error(J(327));n=e.finishedWork;var a=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(J(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(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 a=31-Xt(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}(e,o),e===bl&&(wl=bl=null,kl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Al||(Al=!0,bc(Vt,(function(){return pc(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=yl.transition,yl.transition=null;var i=dn;dn=1;var u=xl;xl|=4,gl.current=null,function(e,t){if(qa=Ln,aa(e=ra())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var i=0,u=-1,s=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==a&&3!==d.nodeType||(u=i+a),d!==o||0!==r&&3!==d.nodeType||(s=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===a&&(u=i),f===o&&++c===r&&(s=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===u||-1===s?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Va={focusedElem:e,selectionRange:n},Ln=!1,Hs=t;null!==Hs;)if(e=(t=Hs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Hs=e;else for(;null!==Hs;){t=Hs;try{var v=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var h=v.memoizedProps,m=v.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?h:Qu(t.type,h),m);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(J(163))}}catch(e){hc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Hs=e;break}Hs=t.return}v=Vs,Vs=!1}(e,n),ul(n,e),oa(Va),Ln=!!qa,Va=qa=null,e.current=n,ll(n),Wt(),xl=u,dn=i,yl.transition=o}else e.current=n;if(Al&&(Al=!1,Fl=e,zl=a),o=e.pendingLanes,0===o&&(Ul=null),function(e){if(Jt&&"function"==typeof Jt.onCommitFiberRoot)try{Jt.onCommitFiberRoot(Kt,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),$l(e,Yt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(Rl)throw Rl=!1,e=Ll,Ll=null,e;0!=(1&zl)&&0!==e.tag&&pc(),o=e.pendingLanes,0!=(1&o)?e===Yl?Wl++:(Wl=0,Yl=e):Wl=0,Io()}(e,t,n,r)}finally{yl.transition=a,dn=r}return null}function pc(){if(null!==Fl){var e=fn(zl),t=yl.transition,n=dn;try{if(yl.transition=null,dn=16>e?16:e,null===Fl)var r=!1;else{if(e=Fl,Fl=null,zl=0,0!=(6&xl))throw Error(J(331));var a=xl;for(xl|=4,Hs=e.current;null!==Hs;){var o=Hs,i=o.child;if(0!=(16&Hs.flags)){var u=o.deletions;if(null!==u){for(var s=0;s<u.length;s++){var l=u[s];for(Hs=l;null!==Hs;){var c=Hs;switch(c.tag){case 0:case 11:case 15:Qs(8,c,o)}var d=c.child;if(null!==d)d.return=c,Hs=d;else for(;null!==Hs;){var f=(c=Hs).sibling,p=c.return;if(Js(c),c===l){Hs=null;break}if(null!==f){f.return=p,Hs=f;break}Hs=p}}}var v=o.alternate;if(null!==v){var h=v.child;if(null!==h){v.child=null;do{var m=h.sibling;h.sibling=null,h=m}while(null!==h)}}Hs=o}}if(0!=(2064&o.subtreeFlags)&&null!==i)i.return=o,Hs=i;else e:for(;null!==Hs;){if(0!=(2048&(o=Hs).flags))switch(o.tag){case 0:case 11:case 15:Qs(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,Hs=g;break e}Hs=o.return}}var y=e.current;for(Hs=y;null!==Hs;){var x=(i=Hs).child;if(0!=(2064&i.subtreeFlags)&&null!==x)x.return=i,Hs=x;else e:for(i=y;null!==Hs;){if(0!=(2048&(u=Hs).flags))try{switch(u.tag){case 0:case 11:case 15:$s(9,u)}}catch(e){hc(u,u.return,e)}if(u===i){Hs=null;break e}var b=u.sibling;if(null!==b){b.return=u.return,Hs=b;break e}Hs=u.return}}if(xl=a,Io(),Jt&&"function"==typeof Jt.onPostCommitFiberRoot)try{Jt.onPostCommitFiberRoot(Kt,e)}catch(e){}r=!0}return r}finally{dn=n,yl.transition=t}}return!1}function vc(e,t,n){e=Ni(e,t=as(0,t=es(n,t),1),1),t=ql(),null!==e&&(ln(e,1,t),$l(e,t))}function hc(e,t,n){if(3===e.tag)vc(e,e,n);else for(;null!==t;){if(3===t.tag){vc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ul||!Ul.has(r))){t=Ni(t,e=os(t,e=es(n,e),1),1),e=ql(),null!==t&&(ln(t,1,e),$l(t,e));break}}t=t.return}}function mc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ql(),e.pingedLanes|=e.suspendedLanes&n,bl===e&&(kl&n)===n&&(4===Sl||3===Sl&&(130023424&kl)===kl&&500>Yt()-Dl?rc(e,0):Tl|=n),$l(e,t)}function gc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=tn,0==(130023424&(tn<<=1))&&(tn=4194304)));var n=ql();null!==(e=Pi(e,t))&&(ln(e,t,n),$l(e,n))}function yc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),gc(e,n)}function xc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(J(314))}null!==r&&r.delete(t),gc(e,n)}function bc(e,t){return At(e,t)}function wc(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 kc(e,t,n,r){return new wc(e,t,n,r)}function _c(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var n=e.alternate;return null===n?((n=kc(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Sc(e,t,n,r,a,o){var i=2;if(r=e,"function"==typeof e)_c(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case ve:return Pc(n.children,a,o,t);case he:i=8,a|=8;break;case me:return(e=kc(12,n,t,2|a)).elementType=me,e.lanes=o,e;case be:return(e=kc(13,n,t,a)).elementType=be,e.lanes=o,e;case we:return(e=kc(19,n,t,a)).elementType=we,e.lanes=o,e;case Oe:return Ec(n,a,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ge:i=10;break e;case ye:i=9;break e;case xe:i=11;break e;case ke:i=14;break e;case _e:i=16,r=null;break e}throw Error(J(130,null==e?e:typeof e,""))}return(t=kc(i,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Pc(e,t,n,r){return(e=kc(7,e,r,t)).lanes=n,e}function Ec(e,t,n,r){return(e=kc(22,e,r,t)).elementType=Oe,e.lanes=n,e.stateNode={isHidden:!1},e}function Mc(e,t,n){return(e=kc(6,e,null,t)).lanes=n,e}function Tc(e,t,n){return(t=kc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cc(e,t,n,r,a){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=sn(0),this.expirationTimes=sn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sn(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Nc(e,t,n,r,a,o,i,u,s){return e=new Cc(e,t,n,u,s),1===t?(t=1,!0===o&&(t|=8)):t=0,o=kc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mi(o),e}function Dc(e){if(!e)return xo;e:{if(jt(e=e._reactInternals)!==e||1!==e.tag)throw Error(J(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(J(171))}if(1===e.tag){var n=e.type;if(Oo(n))return Eo(e,n,t)}return t}function jc(e,t,n,r,a,o,i,u,s){return(e=Nc(n,r,!0,e,0,o,0,u,s)).context=Dc(null),n=e.current,(o=Ci(r=ql(),a=Vl(n))).callback=null!=t?t:null,Ni(n,o,a),e.current.lanes=a,ln(e,a,r),$l(e,r),e}function Ic(e,t,n,r){var a=t.current,o=ql(),i=Vl(a);return n=Dc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ci(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ni(a,t,i))&&(Ql(e,a,i,o),Di(e,a,i)),i}function Rc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Lc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Uc(e,t){Lc(e,t),(e=e.alternate)&&Lc(e,t)}vl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||wo.current)cs=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return cs=!1,function(e,t,n){switch(t.tag){case 3:bs(t),oi();break;case 5:Hi(t);break;case 1:Oo(t.type)&&Mo(t);break;case 4:Wi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;yo(vi,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(yo(qi,1&qi.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ms(e,t,n):(yo(qi,1&qi.current),null!==(e=Rs(e,t,n))?e.sibling:null);yo(qi,1&qi.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return js(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),yo(qi,qi.current),r)break;return null;case 22:case 23:return t.lanes=0,hs(e,t,n)}return Rs(e,t,n)}(e,t,n);cs=0!=(131072&e.flags)}else cs=!1,Jo&&0!=(1048576&t.flags)&&qo(t,Ao,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Is(e,t),e=t.pendingProps;var a=_o(t,bo.current);wi(t,n),a=uu(null,t,r,e,a,n);var o=su();return t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(r)?(o=!0,Mo(t)):o=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,Mi(t),a.updater=Ku,t.stateNode=a,a._reactInternals=t,Zu(t,r,e,n),t=xs(null,t,r,!0,o,n)):(t.tag=0,Jo&&o&&Vo(t),ds(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Is(e,t),e=t.pendingProps,r=(a=r._init)(r._payload),t.type=r,a=t.tag=function(e){if("function"==typeof e)return _c(e)?1:0;if(null!=e){if((e=e.$$typeof)===xe)return 11;if(e===ke)return 14}return 2}(r),e=Qu(r,e),a){case 0:t=gs(null,t,r,e,n);break e;case 1:t=ys(null,t,r,e,n);break e;case 11:t=fs(null,t,r,e,n);break e;case 14:t=ps(null,t,r,Qu(r.type,e),n);break e}throw Error(J(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,gs(e,t,r,a=t.elementType===r?a:Qu(r,a),n);case 1:return r=t.type,a=t.pendingProps,ys(e,t,r,a=t.elementType===r?a:Qu(r,a),n);case 3:e:{if(bs(t),null===e)throw Error(J(387));r=t.pendingProps,a=(o=t.memoizedState).element,Ti(e,t),Ii(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=ws(e,t,r,n,a=es(Error(J(423)),t));break e}if(r!==a){t=ws(e,t,r,n,a=es(Error(J(424)),t));break e}for(Ko=eo(t.stateNode.containerInfo.firstChild),$o=t,Jo=!0,Xo=null,n=pi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(oi(),r===a){t=Rs(e,t,n);break e}ds(e,t,r,n)}t=t.child}return t;case 5:return Hi(t),null===e&&ti(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,i=a.children,Qa(r,a)?i=null:null!==o&&Qa(r,o)&&(t.flags|=32),ms(e,t),ds(e,t,i,n),t.child;case 6:return null===e&&ti(t),null;case 13:return Ms(e,t,n);case 4:return Wi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=fi(t,null,r,n):ds(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,fs(e,t,r,a=t.elementType===r?a:Qu(r,a),n);case 7:return ds(e,t,t.pendingProps,n),t.child;case 8:case 12:return ds(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,yo(vi,r._currentValue),r._currentValue=i,null!==o)if(Gr(o.value,i)){if(o.children===a.children&&!wo.current){t=Rs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){i=o.child;for(var s=u.firstContext;null!==s;){if(s.context===r){if(1===o.tag){(s=Ci(-1,n&-n)).tag=2;var l=o.updateQueue;if(null!==l){var c=(l=l.shared).pending;null===c?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),bi(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(10===o.tag)i=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(i=o.return))throw Error(J(341));i.lanes|=n,null!==(u=i.alternate)&&(u.lanes|=n),bi(i,n,t),i=o.sibling}else i=o.child;if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===t){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}ds(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,wi(t,n),r=r(a=ki(a)),t.flags|=1,ds(e,t,r,n),t.child;case 14:return a=Qu(r=t.type,t.pendingProps),ps(e,t,r,a=Qu(r.type,a),n);case 15:return vs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Qu(r,a),Is(e,t),t.tag=1,Oo(r)?(e=!0,Mo(t)):e=!1,wi(t,n),Xu(t,r,a),Zu(t,r,a,n),xs(null,t,r,!0,e,n);case 19:return js(e,t,n);case 22:return hs(e,t,n)}throw Error(J(156,t.tag))};var Ac="function"==typeof reportError?reportError:function(e){console.error(e)};function Fc(e){this._internalRoot=e}function zc(e){this._internalRoot=e}function Wc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hc(){}function Bc(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o;if("function"==typeof a){var u=a;a=function(){var e=Rc(i);u.call(e)}}Ic(t,i,e,a)}else i=function(e,t,n,r,a){if(a){if("function"==typeof r){var o=r;r=function(){var e=Rc(i);o.call(e)}}var i=jc(t,r,e,0,null,!1,0,"",Hc);return e._reactRootContainer=i,e[oo]=i.current,ja(8===e.nodeType?e.parentNode:e),tc(),i}for(;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var u=r;r=function(){var e=Rc(s);u.call(e)}}var s=Nc(e,0,!1,null,0,!1,0,"",Hc);return e._reactRootContainer=s,e[oo]=s.current,ja(8===e.nodeType?e.parentNode:e),tc((function(){Ic(t,s,n,r)})),s}(n,t,e,a,r);return Rc(i)}zc.prototype.render=Fc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(J(409));Ic(e,t,null,null)},zc.prototype.unmount=Fc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;tc((function(){Ic(null,e,null,null)})),t[oo]=null}},zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=mn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sn.length&&0!==t&&t<Sn[n].priority;n++);Sn.splice(n,0,e),0===n&&Tn(e)}},pn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=nn(t.pendingLanes);0!==n&&(cn(t,1|n),$l(t,Yt()),0==(6&xl)&&(jl=Yt()+500,Io()))}break;case 13:tc((function(){var t=Pi(e,1);if(null!==t){var n=ql();Ql(t,e,1,n)}})),Uc(e,1)}},vn=function(e){if(13===e.tag){var t=Pi(e,134217728);if(null!==t)Ql(t,e,134217728,ql());Uc(e,134217728)}},hn=function(e){if(13===e.tag){var t=Vl(e),n=Pi(e,t);if(null!==n)Ql(n,e,t,ql());Uc(e,t)}},mn=function(){return dn},gn=function(e,t){var n=dn;try{return dn=e,t()}finally{dn=n}},pt=function(e,t,n){switch(t){case"input":if(He(e,n),t=n.name,"radio"===n.type&&null!=t){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 a=po(r);if(!a)throw Error(J(90));Ae(r),He(r,a)}}}break;case"textarea":Je(e,n);break;case"select":null!=(t=n.value)&&Qe(e,!!n.multiple,t,!1)}},xt=ec,bt=tc;var qc={usingClientEntryPoint:!1,Events:[co,fo,po,gt,yt,ec]},Vc={findFiberByHostInstance:lo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qc={bundleType:Vc.bundleType,version:Vc.version,rendererPackageName:Vc.rendererPackageName,rendererConfig:Vc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:de.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Lt(e))?null:e.stateNode},findFiberByHostInstance:Vc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var $c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$c.isDisabled&&$c.supportsFiber)try{Kt=$c.inject(Qc),Jt=$c}catch(tt){}}q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qc,q.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Wc(t))throw Error(J(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:pe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},q.createRoot=function(e,t){if(!Wc(e))throw Error(J(299));var n=!1,r="",a=Ac;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(a=t.onRecoverableError)),t=Nc(e,1,!1,null,0,n,0,r,a),e[oo]=t.current,ja(8===e.nodeType?e.parentNode:e),new Fc(t)},q.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(J(188));throw e=Object.keys(e).join(","),Error(J(268,e))}return e=null===(e=Lt(t))?null:e.stateNode},q.flushSync=function(e){return tc(e)},q.hydrate=function(e,t,n){if(!Yc(t))throw Error(J(200));return Bc(null,e,t,!0,n)},q.hydrateRoot=function(e,t,n){if(!Wc(e))throw Error(J(405));var r=null!=n&&n.hydratedSources||null,a=!1,o="",i=Ac;if(null!=n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=jc(t,null,e,1,null!=n?n:null,a,0,o,i),e[oo]=t.current,ja(e),r)for(e=0;e<r.length;e++)a=(a=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new zc(t)},q.render=function(e,t,n){if(!Yc(t))throw Error(J(200));return Bc(null,e,t,!1,n)},q.unmountComponentAtNode=function(e){if(!Yc(e))throw Error(J(40));return!!e._reactRootContainer&&(tc((function(){Bc(null,null,e,!1,(function(){e._reactRootContainer=null,e[oo]=null}))})),!0)},q.unstable_batchedUpdates=ec,q.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yc(n))throw Error(J(200));if(null==e||void 0===e._reactInternals)throw Error(J(38));return Bc(e,t,n,!1,r)},q.version="18.3.1-next-f1338f8080-20240426",function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=q}(B);var Kc=i(B.exports),Jc={},Xc={},Gc={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Gc);var Zc={},ed={exports:{}},td={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(td),function(e){var t=td.exports.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var a=n(r);if(a&&a.has(e))return a.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(o,u,s):o[u]=e[u]}return o.default=e,a&&a.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports}(ed);var nd={exports:{}},rd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function ad(){}function od(){}od.resetWarningCache=ad;nd.exports=function(){function e(e,t,n,r,a,o){if(o!==rd){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:od,resetWarningCache:ad};return n.PropTypes=n,n}();var id={};!function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=e.ReactReduxContext=void 0;var n=t(u.exports).default.createContext(null);e.ReactReduxContext=n;var r=n;e.default=r}(id);var ud={},sd={};sd.__esModule=!0,sd.setBatch=sd.getBatch=void 0;var ld=function(e){e()};sd.setBatch=function(e){return ld=e};sd.getBatch=function(){return ld},ud.__esModule=!0,ud.createSubscription=function(e,t){var n,r=dd;function a(){i.onStateChange&&i.onStateChange()}function o(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){var e=(0,cd.getBatch)(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,a=n={callback:e,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){r&&null!==t&&(r=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}())}var i={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=dd)},getListeners:function(){return r}};return i};var cd=sd;var dd={notify:function(){},get:function(){return[]}};var fd={__esModule:!0,useIsomorphicLayoutEffect:void 0},pd=u.exports,vd="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?pd.useLayoutEffect:pd.useEffect;fd.useIsomorphicLayoutEffect=vd,function(e){var t=Gc.exports.default,n=ed.exports.default;e.__esModule=!0,e.default=void 0;var r=n(u.exports);t(nd.exports);var a=id,o=ud,i=fd;var s=function(e){var t=e.store,n=e.context,u=e.children,s=(0,r.useMemo)((function(){var e=(0,o.createSubscription)(t);return{store:t,subscription:e}}),[t]),l=(0,r.useMemo)((function(){return t.getState()}),[t]);(0,i.useIsomorphicLayoutEffect)((function(){var e=s.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,l]);var c=n||a.ReactReduxContext;return r.default.createElement(c.Provider,{value:s},u)};e.default=s}(Zc);var hd={},md={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(md);var gd={exports:{}};!function(e){e.exports=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports}(gd);var yd={exports:{}},xd={},bd="function"==typeof Symbol&&Symbol.for,wd=bd?Symbol.for("react.element"):60103,kd=bd?Symbol.for("react.portal"):60106,_d=bd?Symbol.for("react.fragment"):60107,Od=bd?Symbol.for("react.strict_mode"):60108,Sd=bd?Symbol.for("react.profiler"):60114,Pd=bd?Symbol.for("react.provider"):60109,Ed=bd?Symbol.for("react.context"):60110,Md=bd?Symbol.for("react.async_mode"):60111,Td=bd?Symbol.for("react.concurrent_mode"):60111,Cd=bd?Symbol.for("react.forward_ref"):60112,Nd=bd?Symbol.for("react.suspense"):60113,Dd=bd?Symbol.for("react.suspense_list"):60120,jd=bd?Symbol.for("react.memo"):60115,Id=bd?Symbol.for("react.lazy"):60116,Rd=bd?Symbol.for("react.block"):60121,Ld=bd?Symbol.for("react.fundamental"):60117,Ud=bd?Symbol.for("react.responder"):60118,Ad=bd?Symbol.for("react.scope"):60119;function Fd(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case wd:switch(e=e.type){case Md:case Td:case _d:case Sd:case Od:case Nd:return e;default:switch(e=e&&e.$$typeof){case Ed:case Cd:case Id:case jd:case Pd:return e;default:return t}}case kd:return t}}}function zd(e){return Fd(e)===Td}xd.AsyncMode=Md,xd.ConcurrentMode=Td,xd.ContextConsumer=Ed,xd.ContextProvider=Pd,xd.Element=wd,xd.ForwardRef=Cd,xd.Fragment=_d,xd.Lazy=Id,xd.Memo=jd,xd.Portal=kd,xd.Profiler=Sd,xd.StrictMode=Od,xd.Suspense=Nd,xd.isAsyncMode=function(e){return zd(e)||Fd(e)===Md},xd.isConcurrentMode=zd,xd.isContextConsumer=function(e){return Fd(e)===Ed},xd.isContextProvider=function(e){return Fd(e)===Pd},xd.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===wd},xd.isForwardRef=function(e){return Fd(e)===Cd},xd.isFragment=function(e){return Fd(e)===_d},xd.isLazy=function(e){return Fd(e)===Id},xd.isMemo=function(e){return Fd(e)===jd},xd.isPortal=function(e){return Fd(e)===kd},xd.isProfiler=function(e){return Fd(e)===Sd},xd.isStrictMode=function(e){return Fd(e)===Od},xd.isSuspense=function(e){return Fd(e)===Nd},xd.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===_d||e===Td||e===Sd||e===Od||e===Nd||e===Dd||"object"==typeof e&&null!==e&&(e.$$typeof===Id||e.$$typeof===jd||e.$$typeof===Pd||e.$$typeof===Ed||e.$$typeof===Cd||e.$$typeof===Ld||e.$$typeof===Ud||e.$$typeof===Ad||e.$$typeof===Rd)},xd.typeOf=Fd,function(e){e.exports=xd}(yd);var Wd=yd.exports,Yd={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Hd={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Bd={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qd={};function Vd(e){return Wd.isMemo(e)?Bd:qd[e.$$typeof]||Yd}qd[Wd.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qd[Wd.Memo]=Bd;var Qd=Object.defineProperty,$d=Object.getOwnPropertyNames,Kd=Object.getOwnPropertySymbols,Jd=Object.getOwnPropertyDescriptor,Xd=Object.getPrototypeOf,Gd=Object.prototype;var Zd=function e(t,n,r){if("string"!=typeof n){if(Gd){var a=Xd(n);a&&a!==Gd&&e(t,a,r)}var o=$d(n);Kd&&(o=o.concat(Kd(n)));for(var i=Vd(t),u=Vd(n),s=0;s<o.length;++s){var l=o[s];if(!(Hd[l]||r&&r[l]||u&&u[l]||i&&i[l])){var c=Jd(n,l);try{Qd(t,l,c)}catch(e){}}}}return t},ef={exports:{}},tf={},nf=60103,rf=60106,af=60107,of=60108,uf=60114,sf=60109,lf=60110,cf=60112,df=60113,ff=60120,pf=60115,vf=60116,hf=60121,mf=60122,gf=60117,yf=60129,xf=60131;if("function"==typeof Symbol&&Symbol.for){var bf=Symbol.for;nf=bf("react.element"),rf=bf("react.portal"),af=bf("react.fragment"),of=bf("react.strict_mode"),uf=bf("react.profiler"),sf=bf("react.provider"),lf=bf("react.context"),cf=bf("react.forward_ref"),df=bf("react.suspense"),ff=bf("react.suspense_list"),pf=bf("react.memo"),vf=bf("react.lazy"),hf=bf("react.block"),mf=bf("react.server.block"),gf=bf("react.fundamental"),yf=bf("react.debug_trace_mode"),xf=bf("react.legacy_hidden")}function wf(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case nf:switch(e=e.type){case af:case uf:case of:case df:case ff:return e;default:switch(e=e&&e.$$typeof){case lf:case cf:case vf:case pf:case sf:return e;default:return t}}case rf:return t}}}var kf=sf,_f=nf,Of=cf,Sf=af,Pf=vf,Ef=pf,Mf=rf,Tf=uf,Cf=of,Nf=df;tf.ContextConsumer=lf,tf.ContextProvider=kf,tf.Element=_f,tf.ForwardRef=Of,tf.Fragment=Sf,tf.Lazy=Pf,tf.Memo=Ef,tf.Portal=Mf,tf.Profiler=Tf,tf.StrictMode=Cf,tf.Suspense=Nf,tf.isAsyncMode=function(){return!1},tf.isConcurrentMode=function(){return!1},tf.isContextConsumer=function(e){return wf(e)===lf},tf.isContextProvider=function(e){return wf(e)===sf},tf.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===nf},tf.isForwardRef=function(e){return wf(e)===cf},tf.isFragment=function(e){return wf(e)===af},tf.isLazy=function(e){return wf(e)===vf},tf.isMemo=function(e){return wf(e)===pf},tf.isPortal=function(e){return wf(e)===rf},tf.isProfiler=function(e){return wf(e)===uf},tf.isStrictMode=function(e){return wf(e)===of},tf.isSuspense=function(e){return wf(e)===df},tf.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===af||e===uf||e===yf||e===of||e===df||e===ff||e===xf||"object"==typeof e&&null!==e&&(e.$$typeof===vf||e.$$typeof===pf||e.$$typeof===sf||e.$$typeof===lf||e.$$typeof===cf||e.$$typeof===gf||e.$$typeof===hf||e[0]===mf)},tf.typeOf=wf,function(e){e.exports=tf}(ef),function(e){var t=Gc.exports.default,n=ed.exports.default;e.__esModule=!0,e.default=function(e,t){void 0===t&&(t={});var n=t,u=n.getDisplayName,c=void 0===u?function(e){return"ConnectAdvanced("+e+")"}:u,w=n.methodName,k=void 0===w?"connectAdvanced":w,_=n.renderCountProp,O=void 0===_?void 0:_,S=n.shouldHandleStateChanges,P=void 0===S||S,E=n.storeKey,M=void 0===E?"store":E;n.withRef;var T=n.forwardRef,C=void 0!==T&&T,N=n.context,D=void 0===N?d.ReactReduxContext:N,j=(0,a.default)(n,f),I=D;return function(t){var n=t.displayName||t.name||"Component",u=c(n),d=(0,r.default)({},j,{getDisplayName:c,methodName:k,renderCountProp:O,shouldHandleStateChanges:P,storeKey:M,displayName:u,wrappedComponentName:n,WrappedComponent:t}),f=j.pure;var w=f?i.useMemo:function(e){return e()};function _(n){var o=(0,i.useMemo)((function(){var e=n.reactReduxForwardedRef,t=(0,a.default)(n,p);return[n.context,e,t]}),[n]),u=o[0],c=o[1],f=o[2],k=(0,i.useMemo)((function(){return u&&u.Consumer&&(0,s.isContextConsumer)(i.default.createElement(u.Consumer,null))?u:I}),[u,I]),_=(0,i.useContext)(k),O=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(_)&&Boolean(_.store);var S=O?n.store:_.store,E=(0,i.useMemo)((function(){return function(t){return e(t.dispatch,d)}(S)}),[S]),M=(0,i.useMemo)((function(){if(!P)return h;var e=(0,l.createSubscription)(S,O?null:_.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[S,O,_]),T=M[0],C=M[1],N=(0,i.useMemo)((function(){return O?_:(0,r.default)({},_,{subscription:T})}),[O,_,T]),D=(0,i.useReducer)(m,v,b),j=D[0][0],R=D[1];if(j&&j.error)throw j.error;var L=(0,i.useRef)(),U=(0,i.useRef)(f),A=(0,i.useRef)(),F=(0,i.useRef)(!1),z=w((function(){return A.current&&f===U.current?A.current:E(S.getState(),f)}),[S,j,f]);g(y,[U,L,F,f,z,A,C]),g(x,[P,S,T,E,U,L,F,A,C,R],[S,T,E]);var W=(0,i.useMemo)((function(){return i.default.createElement(t,(0,r.default)({},z,{ref:c}))}),[c,t,z]);return(0,i.useMemo)((function(){return P?i.default.createElement(k.Provider,{value:N},W):W}),[k,W,N])}var S=f?i.default.memo(_):_;if(S.WrappedComponent=t,S.displayName=_.displayName=u,C){var E=i.default.forwardRef((function(e,t){return i.default.createElement(S,(0,r.default)({},e,{reactReduxForwardedRef:t}))}));return E.displayName=u,E.WrappedComponent=t,(0,o.default)(E,t)}return(0,o.default)(S,t)}};var r=t(md.exports),a=t(gd.exports),o=t(Zd),i=n(u.exports),s=ef.exports,l=ud,c=fd,d=id,f=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],p=["reactReduxForwardedRef"],v=[],h=[null,null];function m(e,t){var n=e[1];return[t.payload,n+1]}function g(e,t,n){(0,c.useIsomorphicLayoutEffect)((function(){return e.apply(void 0,t)}),n)}function y(e,t,n,r,a,o,i){e.current=r,t.current=a,n.current=!1,o.current&&(o.current=null,i())}function x(e,t,n,r,a,o,i,u,s,l){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,a.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?i.current||s():(o.current=e,u.current=e,i.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var b=function(){return[null,0]}}(hd);var Df={},jf={};!function(e){function t(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.__esModule=!0,e.default=function(e,n){if(t(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var r=Object.keys(e),a=Object.keys(n);if(r.length!==a.length)return!1;for(var o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(n,r[o])||!t(e[r[o]],n[r[o]]))return!1;return!0}}(jf);var If={},Rf={};!function(e){e.__esModule=!0,e.default=function(e,t){var n={},r=function(r){var a=e[r];"function"==typeof a&&(n[r]=function(){return t(a.apply(void 0,arguments))})};for(var a in e)r(a);return n}}(Rf);var Lf={},Uf={},Af={};!function(e){e.__esModule=!0,e.default=function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}}(Af);var Ff={};!function(e){e.__esModule=!0,e.default=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}}(Ff),function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=function(e,t,a){(0,n.default)(e)||(0,r.default)(a+"() in "+t+" must return a plain object. Instead received "+e+".")};var n=t(Af),r=t(Ff)}(Uf);var zf=Gc.exports.default;function Wf(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}Lf.__esModule=!0,Lf.getDependsOnOwnProps=Wf,Lf.wrapMapToPropsConstant=function(e){return function(t,n){var r=e(t,n);function a(){return r}return a.dependsOnOwnProps=!1,a}},Lf.wrapMapToPropsFunc=function(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Wf(e);var a=r(t,n);return"function"==typeof a&&(r.mapToProps=a,r.dependsOnOwnProps=Wf(a),a=r(t,n)),a},r}},zf(Uf),function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=void 0,e.whenMapDispatchToPropsIsFunction=a,e.whenMapDispatchToPropsIsMissing=o,e.whenMapDispatchToPropsIsObject=i;var n=t(Rf),r=Lf;function a(e){return"function"==typeof e?(0,r.wrapMapToPropsFunc)(e,"mapDispatchToProps"):void 0}function o(e){return e?void 0:(0,r.wrapMapToPropsConstant)((function(e){return{dispatch:e}}))}function i(e){return e&&"object"==typeof e?(0,r.wrapMapToPropsConstant)((function(t){return(0,n.default)(e,t)})):void 0}var u=[a,o,i];e.default=u}(If);var Yf={};!function(e){e.__esModule=!0,e.default=void 0,e.whenMapStateToPropsIsFunction=n,e.whenMapStateToPropsIsMissing=r;var t=Lf;function n(e){return"function"==typeof e?(0,t.wrapMapToPropsFunc)(e,"mapStateToProps"):void 0}function r(e){return e?void 0:(0,t.wrapMapToPropsConstant)((function(){return{}}))}var a=[n,r];e.default=a}(Yf);var Hf={};!function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=void 0,e.defaultMergeProps=r,e.whenMergePropsIsFunction=o,e.whenMergePropsIsOmitted=i,e.wrapMergePropsFunc=a;var n=t(md.exports);function r(e,t,r){return(0,n.default)({},r,e,t)}function a(e){return function(t,n){n.displayName;var r,a=n.pure,o=n.areMergedPropsEqual,i=!1;return function(t,n,u){var s=e(t,n,u);return i?a&&o(s,r)||(r=s):(i=!0,r=s),r}}}function o(e){return"function"==typeof e?a(e):void 0}function i(e){return e?void 0:function(){return r}}t(Uf);var u=[o,i];e.default=u}(Hf);var Bf={},qf={};!function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=function(e,t,n,a){r(e,"mapStateToProps",a),r(t,"mapDispatchToProps",a),r(n,"mergeProps",a)};var n=t(Ff);function r(e,t,r){if(!e)throw new Error("Unexpected value for "+t+" in "+r+".");"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||(0,n.default)("The selector for "+t+" of "+r+" did not specify a value for dependsOnOwnProps.")}}(qf),function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=function(e,t){var i=t.initMapStateToProps,u=t.initMapDispatchToProps,s=t.initMergeProps,l=(0,n.default)(t,r),c=i(e,l),d=u(e,l),f=s(e,l),p=l.pure?o:a;return p(c,d,f,e,l)},e.impureFinalPropsSelectorFactory=a,e.pureFinalPropsSelectorFactory=o;var n=t(gd.exports);t(qf);var r=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function a(e,t,n,r){return function(a,o){return n(e(a,o),t(r,o),o)}}function o(e,t,n,r,a){var o,i,u,s,l,c=a.areStatesEqual,d=a.areOwnPropsEqual,f=a.areStatePropsEqual,p=!1;function v(a,p){var v,h,m=!d(p,i),g=!c(a,o,p,i);return o=a,i=p,m&&g?(u=e(o,i),t.dependsOnOwnProps&&(s=t(r,i)),l=n(u,s,i)):m?(e.dependsOnOwnProps&&(u=e(o,i)),t.dependsOnOwnProps&&(s=t(r,i)),l=n(u,s,i)):g?(v=e(o,i),h=!f(v,u),u=v,h&&(l=n(u,s,i)),l):l}return function(a,c){return p?v(a,c):(u=e(o=a,i=c),s=t(r,i),l=n(u,s,i),p=!0,l)}}}(Bf),function(e){var t=Gc.exports.default;e.__esModule=!0,e.createConnect=p,e.default=void 0;var n=t(md.exports),r=t(gd.exports),a=t(hd),o=t(jf),i=t(If),u=t(Yf),s=t(Hf),l=t(Bf),c=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function d(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function f(e,t){return e===t}function p(e){var t=void 0===e?{}:e,p=t.connectHOC,v=void 0===p?a.default:p,h=t.mapStateToPropsFactories,m=void 0===h?u.default:h,g=t.mapDispatchToPropsFactories,y=void 0===g?i.default:g,x=t.mergePropsFactories,b=void 0===x?s.default:x,w=t.selectorFactory,k=void 0===w?l.default:w;return function(e,t,a,i){void 0===i&&(i={});var u=i,s=u.pure,l=void 0===s||s,p=u.areStatesEqual,h=void 0===p?f:p,g=u.areOwnPropsEqual,x=void 0===g?o.default:g,w=u.areStatePropsEqual,_=void 0===w?o.default:w,O=u.areMergedPropsEqual,S=void 0===O?o.default:O,P=(0,r.default)(u,c),E=d(e,m,"mapStateToProps"),M=d(t,y,"mapDispatchToProps"),T=d(a,b,"mergeProps");return v(k,(0,n.default)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:M,initMergeProps:T,pure:l,areStatesEqual:h,areOwnPropsEqual:x,areStatePropsEqual:_,areMergedPropsEqual:S},P))}}var v=p();e.default=v}(Df);var Vf={},Qf={},$f={__esModule:!0,useReduxContext:function(){return(0,Kf.useContext)(Jf.ReactReduxContext)}},Kf=u.exports,Jf=id;Qf.__esModule=!0,Qf.createStoreHook=ep,Qf.useStore=void 0;var Xf=u.exports,Gf=id,Zf=$f;function ep(e){void 0===e&&(e=Gf.ReactReduxContext);var t=e===Gf.ReactReduxContext?Zf.useReduxContext:function(){return(0,Xf.useContext)(e)};return function(){return t().store}}var tp=ep();Qf.useStore=tp,Vf.__esModule=!0,Vf.createDispatchHook=ap,Vf.useDispatch=void 0;var np=id,rp=Qf;function ap(e){void 0===e&&(e=np.ReactReduxContext);var t=e===np.ReactReduxContext?rp.useStore:(0,rp.createStoreHook)(e);return function(){return t().dispatch}}var op=ap();Vf.useDispatch=op;var ip={__esModule:!0};ip.createSelectorHook=pp,ip.useSelector=void 0;var up=u.exports,sp=$f,lp=ud,cp=fd,dp=id,fp=function(e,t){return e===t};function pp(e){void 0===e&&(e=dp.ReactReduxContext);var t=e===dp.ReactReduxContext?sp.useReduxContext:function(){return(0,up.useContext)(e)};return function(e,n){void 0===n&&(n=fp);var r=t(),a=function(e,t,n,r){var a,o=(0,up.useReducer)((function(e){return e+1}),0)[1],i=(0,up.useMemo)((function(){return(0,lp.createSubscription)(n,r)}),[n,r]),u=(0,up.useRef)(),s=(0,up.useRef)(),l=(0,up.useRef)(),c=(0,up.useRef)(),d=n.getState();try{if(e!==s.current||d!==l.current||u.current){var f=e(d);a=void 0!==c.current&&t(f,c.current)?c.current:f}else a=c.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return(0,cp.useIsomorphicLayoutEffect)((function(){s.current=e,l.current=d,c.current=a,u.current=void 0})),(0,cp.useIsomorphicLayoutEffect)((function(){function e(){try{var e=n.getState();if(e===l.current)return;var r=s.current(e);if(t(r,c.current))return;c.current=r,l.current=e}catch(e){u.current=e}o()}return i.onStateChange=e,i.trySubscribe(),e(),function(){return i.tryUnsubscribe()}}),[n,i]),a}(e,n,r.store,r.subscription);return(0,up.useDebugValue)(a),a}}var vp=pp();ip.useSelector=vp;var hp=Gc.exports.default;Xc.__esModule=!0;var mp=hp(Zc);Xc.Provider=mp.default;var gp=hp(hd);Xc.connectAdvanced=gp.default;var yp=id;Xc.ReactReduxContext=yp.ReactReduxContext;var xp=hp(Df);Xc.connect=xp.default;var bp=Vf;Xc.useDispatch=bp.useDispatch,Xc.createDispatchHook=bp.createDispatchHook;var wp=ip;Xc.useSelector=wp.useSelector,Xc.createSelectorHook=wp.createSelectorHook;var kp=Qf;Xc.useStore=kp.useStore,Xc.createStoreHook=kp.createStoreHook;var _p=hp(jf);Xc.shallowEqual=_p.default;var Op={__esModule:!0,unstable_batchedUpdates:void 0},Sp=B.exports;function Pp(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-js"),t=function(e){if(!e)return{path:e};var t=e.lastIndexOf("/"),n="";t>=0&&(n=e.substr(0,t));var r=new URL(e),a=r.hostname;a.endsWith("nitrocdn.com")&&(n="https://widget.xapp.ai");var o=new URLSearchParams(r.search),i=o.get("key");return{path:n,key:i}}(null==e?void 0:e.src);return t}Op.unstable_batchedUpdates=Sp.unstable_batchedUpdates,function(e){e.__esModule=!0;var t={batch:!0},n=Xc;Object.keys(n).forEach((function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(t,r)||r in e&&e[r]===n[r]||(e[r]=n[r]))}));var r=Op;e.batch=r.unstable_batchedUpdates,(0,sd.setBatch)(r.unstable_batchedUpdates)}(Jc);var Ep=process.env.SERVER_URL;process.env.ACCOUNT_KEY;var Mp="48",Tp="ScheduleButton";var Cp=u.exports.createContext(null);function Np(){var e=u.exports.useContext(Cp);return null==e?void 0:e.env}function Dp(e,t){var n=function(e){return(null==e?void 0:e.connection)?e.connection:{serverUrl:null==e?void 0:e.serverUrl,accountKey:null==e?void 0:e.accountKey,type:(null==e?void 0:e.direct)?"direct":"websocket"}}(e),r=n.accountKey,a=n.serverUrl,o=n.type;return u.exports.useMemo((function(){return{accountKey:r,serverUrl:a,type:o,nonce:t}}),[r,a,o,t])}var jp=function(e){var t=e.label,n=e.disable,r=e.type,a=e.addClass,o=e.onClick;return H.createElement("button",{disabled:n,type:r,className:"action-button ".concat(a),onClick:function(e){e.stopPropagation(),o&&o(t)}},t)},Ip=H.memo((function(e){var t=e.button,n=e.onClick,r=u.exports.useCallback((function(){n(t)}),[t,n]);return H.createElement(jp,{onClick:r,addClass:"button-card",label:t.label})})),Rp=H.memo((function(e){return H.createElement("div",{className:"buttons-container "+(e.className||"")},e.buttons.map((function(t,n){return H.createElement(Ip,{button:t,onClick:e.onClick,key:n})})))})),Lp=function(e){var t=e.imageUrl.replace(/'/g,"%27"),n=H.createElement("div",{className:"chat-card-img__content",style:{backgroundImage:"url(".concat(t,")")}});return e.imageActionUrl?H.createElement("a",{href:e.imageActionUrl,"aria-label":"read more",target:"_blank",rel:"noopener noreferrer",className:"chat-card-img"},n):H.createElement("div",{className:"chat-card-img"},n)},Up=function(e){var t,n,r,a,o=e.card;return o.imageUrl&&(r=H.createElement("div",{className:"chat-card-container__img"},H.createElement(Lp,{imageUrl:o.imageUrl,imageActionUrl:o.imageActionUrl}))),o.title&&(n=H.createElement("div",{className:"chat-card-title"},H.createElement("span",null,o.title))),o.content&&(a=H.createElement("div",{className:"chat-card-sub-title"},H.createElement("span",null,o.content))),H.createElement("div",{className:"chat-card-container"},r,n,a,!!(null===(t=o.buttons)||void 0===t?void 0:t.length)&&H.createElement(Rp,{buttons:o.buttons,onClick:e.onButtonClick}))};function Ap(e){return!!e&&e.startsWith("agent:")}var Fp=function(){this.retries=5,this.timeout=1e3,this.log=!1},zp=function(){function e(e){e&&(this.options=Object.assign(new Fp,e))}return e.prototype.fetch=function(e,t){return n(this,void 0,void 0,(function(){var n,a,o,i;return r(this,(function(r){switch(r.label){case 0:t||(t=this.options),r.label=1;case 1:return r.trys.push([1,3,,5]),n=new AbortController,a=setTimeout((function(){n.abort()}),t.timeout),[4,e(n.signal)];case 2:return o=r.sent(),clearTimeout(a),[2,o];case 3:if(i=r.sent(),1===t.retries||t.retries<1)throw i;return[4,this.fetch(e,{timeout:t.timeout,retries:t.retries-1})];case 4:return[2,r.sent()];case 5:return[2]}}))}))},e}();var Wp="^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$";function Yp(){return(new Date).toISOString()+" ::"}function Hp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"debug"===window.xaLogLevel&&console.log.apply(console,a([Yp()],e,!1))}function Bp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,a([Yp()],e,!1))}var qp=function(e){var t,n,r,a={},o=e.entity,i=u.exports.useContext(Cp),s=null==o?void 0:o.avatarPath;if(!s){var l=function(e){var t=(null==e?void 0:e.initials)||"?",n=(null==e?void 0:e.size)||40,r=(null==e?void 0:e.backgroundColor)||"#007bff",a=(null==e?void 0:e.textColor)||"#ffffff";return H.useMemo((function(){return function(e,t,n,r){var a=document.createElement("canvas");a.width=t,a.height=t;var o=a.getContext("2d");o.fillStyle=n,o.fillRect(0,0,t,t),o.fillStyle=r,o.font="".concat(t/2,"px Arial"),o.textAlign="center",o.textBaseline="middle",o.fillText(e,t/2,t/2);var i=new Image;return i.src=a.toDataURL(),i}(t,n,r,a)}),[t,n,r,a])}({initials:(null==o?void 0:o.displayName)?o.displayName.slice(0,2):"?",backgroundColor:null===(n=null===(t=null==i?void 0:i.env)||void 0===t?void 0:t.theme)||void 0===n?void 0:n.primaryColor,size:36});s=l.src}var c=o&&Ap(o.nick);c?(a.backgroundImage="url('".concat(s,"')"),a.backgroundColor="none"):r=H.createElement("svg",{width:"16",height:"19",viewBox:"0 0 16 19",style:{margin:"0 auto",display:"block"}},H.createElement("path",{d:"M11.5 5c0-1.933-1.567-3.5-3.5-3.5S4.5 3.067 4.5 5 6.067 8.5 8 8.5s3.5-1.567 3.5-3.5zM3 5c0-2.76 2.24-5 5-5s5 2.24 5 5-2.24 5-5 5-5-2.24-5-5zM1.955 17.294c.21-.642.504-1.285.898-1.88C3.963 13.74 5.615 12.75 8 12.75c2.385 0 4.038.99 5.147 2.664.394.595.69 1.238.898 1.88.124.382.19.672.214.822.063.41.447.69.856.625.41-.063.69-.447.625-.856-.034-.225-.118-.59-.27-1.053-.247-.763-.598-1.527-1.073-2.244C13.024 12.51 10.917 11.25 8 11.25c-2.916 0-5.024 1.26-6.397 3.336-.475.717-.826 1.48-1.074 2.245-.152.463-.236.83-.27 1.054-.065.41.215.793.624.857.41.065.793-.215.857-.624.025-.15.09-.44.215-.822z",fill:"#FFF",fillRule:"evenodd"}));var d=!!a.backgroundImage||!!r;return H.createElement("div",{className:"avatar ".concat(c?"avatar--agent":"avatar--visitor"," ").concat(d?"":"avatar--empty"),style:a,title:o?o.display_name:"Agent"},r)};var Vp=function(e){return H.createElement("div",{className:"xappw-chat-msg-part"},e.showAvatar&&(t=e.user,H.createElement("div",{className:"xappw-chat-msg-part__avatar"},H.createElement(qp,{entity:t}))),e.children);var t};function Qp(e,t){return{type:"synthetic",detail:{type:"write_msg",user:t,msg:e,timestamp:+new Date}}}function $p(e,n){return function(r){return function(a,o){var i=o().attributes;i=t(t({},i),{currentUrl:window.location.href}),r.sendChatMsg({text:e,token:n,attributes:i},(function(e){e&&Hp("Error sending message",e)}));var u=o().visitor;a(Qp({text:n?"".concat(e," (from the list)"):e},u))}}}function Kp(e){return function(t){return function(){t.sendTyping(e)}}}function Jp(e,t){return function(n){return function(){n.setVisitorInfo(e,t,(function(e){e&&Hp(e)}))}}}function Xp(e){return{type:"account_status",detail:{status:e,timestamp:+new Date}}}function Gp(e){return{type:"connection_update",detail:{status:e,timestamp:+new Date}}}function Zp(e){throw new Error("Unknown kind "+e)}function ev(){return Jc.useDispatch()}var tv=function(){function e(e){this.inner=e}return e.prototype.bargeOut=function(e){Hp("CLIENT: bargeOut"),this.inner.bargeOut(e)},e.prototype.bargeIn=function(e,t){Hp("CLIENT: bargeIn: ".concat(e)),this.inner.bargeIn(e,t)},e.prototype.init=function(e){this.inner.init(e)},e.prototype.sendOfflineMsg=function(e,t){Hp("CLIENT: sendOfflineMsg: ".concat(JSON.stringify(e))),this.inner.sendOfflineMsg(e,t)},e.prototype.sendChatMsg=function(e,t){Hp("CLIENT: sendChatMsg: ".concat(JSON.stringify(e))),this.inner.sendChatMsg(e,t)},e.prototype.sendChatMsgRequest=function(e,t){Hp("CLIENT: sendChatMsgRequest: ".concat(JSON.stringify(e))),this.inner.sendChatMsgRequest(e,t)},e.prototype.sendTyping=function(e){Hp("CLIENT: sendTyping: ".concat(JSON.stringify(e))),this.inner.sendTyping(e)},e.prototype.setVisitorInfo=function(e,t,n){Hp("CLIENT: setVisitorInfo: ".concat(JSON.stringify(e)," session id: ").concat(t)),this.inner.setVisitorInfo(e,t,n)},e.prototype.sendChatRating=function(e){Hp("CLIENT: sendChatRating: ".concat(JSON.stringify(e))),this.inner.sendChatRating(e)},e.prototype.sendFile=function(e,t){Hp("CLIENT: sendFile: ".concat(JSON.stringify(e))),this.inner.sendFile(e,t)},e.prototype.markAsRead=function(){Hp("CLIENT: markAsRead:"),this.inner.markAsRead()},e.prototype.flush=function(){Hp("CLIENT: flush:"),this.inner.flush()},e.prototype.dispose=function(){Hp("CLIENT: dispose:"),this.inner.dispose()},e.prototype.sleep=function(){Hp("CLIENT: sleep:"),this.inner.sleep()},e.prototype.wakeup=function(){Hp("CLIENT: wakeup:"),this.inner.wakeup()},e}(),nv={};Object.defineProperty(nv,"__esModule",{value:!0});var rv=u.exports;function av(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var ov=av(rv);var iv=function(e){var t=e.format,n=e.text;return ov.default.createElement("span",{"data-rich-text-type":"bold",className:"xapp-search-rich-text-bold-span"},n.substring(t.start,t.end))},uv=function(e){var t=e.format,n=e.text,r=e.readOnly,a=e.onClick,o=t.text||n.substring(t.start,t.end),i=rv.useState(o),u=i[0],s=i[1],l=rv.useCallback((function(e){s(e.target.value)}),[]),c=rv.useCallback((function(e){a&&(!1===a(t)&&(e.preventDefault(),e.stopPropagation()))}),[a,t]);return r?ov.default.createElement("span",{className:"xapp-search-rich-text-input-span xapp-search-rich-text-input-span--readonly",onClick:c},o):ov.default.createElement("input",{type:"text",value:u,className:"xapp-search-rich-text-input-span","data-rich-text-type":"inputText",onChange:l,onClick:c,readOnly:r})},sv=function(e){var t=e.format,n=e.text;return ov.default.createElement("span",{"data-rich-text-type":"normal",className:"xapp-search-rich-text-normal-span"},n.substring(t.start,t.end))},lv=function(e){var t=e.format,n=e.text,r=e.readOnly,a=e.onClick,o=t.type;switch(o){case"normal":return ov.default.createElement(sv,{text:n,format:t,readOnly:r});case"bold":return ov.default.createElement(iv,{text:n,format:t,readOnly:r});case"inputText":return ov.default.createElement(uv,{text:n,format:t,readOnly:r,onClick:a});default:!function(e){throw new Error("Unknown kind "+e)}(o)}};function cv(e,t){for(var n=[],r=0,a=0,o=e;a<o.length;a++){var i=o[a],u=i.start,s=i.end,l=i.type,c=i.text;r<u&&n.push({type:"normal",start:r,end:u}),n.push({type:l,start:u,end:s,text:c}),r=s}return r<t&&n.push({type:"normal",start:r,end:t}),n}function dv(e){var t=e.childNodes,n=[],r="";return t.forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e,a="INPUT"===t.tagName?t.value:t.innerText,o=t.dataset.richTextType;n.push({type:o,start:r.length,end:r.length+a.length}),r+=a}e.nodeType===Node.TEXT_NODE&&((a=e.nodeValue)&&(n.push({type:"normal",start:r.length,end:r.length+a.length}),r+=a))})),function(e){for(var t=e.text,n=[],r=0,a=e.formats;r<a.length;r++){var o=a[r],i=o.type;switch(i){case"normal":continue;case"inputText":n.push(o);break;case"bold":if(n.length>0){var u=n[n.length-1];u.type===i&&u.end===o.start&&(n.pop(),n.push({type:i,start:u.start,end:o.end}))}else n.push(o)}}return{text:t,formats:n}}({text:r,formats:n})}var fv=function(e){var t=e.value,n=e.className,r=e.readOnly,a=e.onInput,o=e.onChange,i=e.onSpanClick,u=t.formats,s=t.text,l=rv.useMemo((function(){return cv(u,s.length)}),[u,s.length]),c=rv.useCallback((function(e){var t=dv(e.currentTarget);a&&a(t)}),[a]),d=rv.useCallback((function(e){var t=e.currentTarget,n=dv(t);!function(e){for(var t,n=[],r=e.childNodes,a=0;a<r.length;a++)(null==(u=r.item(a))?void 0:u.nodeType)===Node.TEXT_NODE&&n.push(u);for(var o=0,i=n;o<i.length;o++){var u=i[o];try{null===(t=u.parentElement)||void 0===t||t.removeChild(u)}catch(e){}}}(t),o&&o(n)}),[o]);return ov.default.createElement("div",{id:e.id,className:"xapp-search-rich-text ".concat(n||""),contentEditable:!r,suppressContentEditableWarning:!0,onInput:c,onBlur:d,onKeyDown:e.onKeyDown},l.map((function(e,t){return ov.default.createElement(lv,{key:t,format:e,text:s,readOnly:r,onClick:i})})))},pv=function(e){return ov.default.createElement("div",{className:"xappw-suggestions-group-heading"},e.label)};var vv=function(e){var t=e.data,n=e.current,r=e.actions,a=e.onClick,o=e.onHover,i=e.onSpanClick,u=rv.useCallback((function(){a(t)}),[t,a]),s=rv.useCallback((function(){o&&o(t)}),[t,o]),l=rv.useCallback((function(e){if(i)return i(t,e)}),[i,t]),c=rv.useRef(null);return rv.useEffect((function(){var e=c.current;if(n&&e){var t=function(e){for(var t=e;t&&!t.classList.contains("xapp-search-result__suggestions");)t=t.parentElement;return t||void 0}(e);if(t){var r=t.getBoundingClientRect(),a=e.getBoundingClientRect(),o=Math.max(r.top,a.top);Math.min(r.bottom,a.bottom)-o<.99*a.height&&e.scrollIntoView({behavior:"smooth"})}}}),[n]),ov.default.createElement("div",{ref:c,className:"xappw-suggestions-item ".concat(n?"xappw-suggestions-item--current":""),onClick:u,onMouseEnter:s},ov.default.createElement(fv,{value:t,className:"xappw-suggestions-item__texts",readOnly:!0,onSpanClick:l}),r&&ov.default.createElement("div",{className:"xappw-suggestions-item__actions"},ov.default.createElement(r,{data:t,current:n})))},hv=function(e){var t=e.group,n=e.currentIndex,r=e.itemActions,a=t.heading,o=t.items;return ov.default.createElement("div",{className:"xappw-suggestions-group"},ov.default.createElement("div",{className:"xappw-suggestions-group__heading"},ov.default.createElement(pv,{label:a})),ov.default.createElement("div",{className:"xappw-suggestions-group__items"},o.map((function(t,a){return ov.default.createElement(vv,{key:a,data:t,current:n===a,actions:r,onClick:e.onItemClick,onHover:e.onItemHover,onSpanClick:e.onSpanClick})}))))};function mv(e){return e.reduce((function(e,t){return e+t.items.length}),0)}function gv(e){var t=Object.keys(e)[0],n=e[t];if(!n)throw new Error;return{type:t,start:n.start,end:n.end}}function yv(e){switch(e){case"FAQ":return"FAQs";case"INTENT":case"HISTORICAL":return"Suggestions";default:return e}}function xv(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,u)}s((r=r.apply(e,t||[])).next())}))}function bv(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}"function"==typeof SuppressedError&&SuppressedError;var wv=["FAQ","INTENT","HISTORICAL"].reduce((function(e,t,n){return e[t]=n,e}),{});function kv(e,t){return function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}([],e,!0).sort((function(e,n){return function(e,t,n){return n*(wv[t.type]-wv[e.type])}(e,n,t)}))}function _v(e,t){var n=new URL(e).searchParams;t.forEach((function(e,t){n.append(t,e)}));var r=new URL(e);return r.search=n.toString(),r}var Ov={};function Sv(){}function Pv(e,t){void 0===t&&(t=Ov);var n=rv.useState({state:"paused"}),r=n[0],a=n[1],o=t.pause;return rv.useEffect((function(){if(o)return a({state:"paused"}),Sv;var t=new AbortController,n=t.signal,r=!0;return function(){xv(this,void 0,void 0,(function(){var t,o,i;return bv(this,(function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),a({state:"fetching"}),[4,fetch(e,{signal:n})];case 1:return t=u.sent(),r?[4,t.json()]:[3,3];case 2:o=u.sent(),t.ok?a({state:"success",data:o}):a({state:"error",error:o}),u.label=3;case 3:return[3,5];case 4:if("AbortError"===(i=u.sent()).name)return a({state:"paused"}),[2];throw i;case 5:return[2]}}))}))}(),function(){r=!1,t.abort()}}),[e,o]),r}var Ev=nv.IconButton=function(e){var t=e.icon;return ov.default.createElement("div",{tabIndex:e.tabIndex?Number(e.tabIndex):0,className:"xapp-search-icon-button ".concat(e.className||""),onClick:e.onClick},ov.default.createElement("div",{className:"xapp-search-icon-button__content"},ov.default.createElement(t,null)))};nv.MessageBubble=function(e){return ov.default.createElement("div",{className:"xappw-message-bubble"},e.children)};var Mv=nv.RichInput=function(e){var t=e.id,n=e.value,r=e.type,a=e.autoFocus,o=e.spellCheck,i=e.tabIndex,u=e.onChange,s=e.onInput,l=e.onKeyDown,c=e.onSearch,d=n.formats.some((function(e){return"inputText"===e.type})),f=rv.useCallback((function(e){u({text:e.target.value,formats:[]})}),[u]),p=rv.useCallback((function(e){u(e)}),[u]),v=rv.useCallback((function(e){s&&s({text:e.target.value,formats:[]})}),[s]),h=rv.useCallback((function(e){s&&s(e)}),[s]),m=rv.useCallback((function(e){l&&l(e)}),[l]),g=rv.useRef(null),y=g.current;return rv.useEffect((function(){if(y&&c){var e=function(e){var t=e.target;t&&c({text:t.value,formats:[]})};return y.addEventListener("search",e),function(){y.removeEventListener("search",e)}}}),[y,c]),ov.default.createElement("div",{className:"xappw-rich-input ".concat(e.className)},d?ov.default.createElement(fv,{id:t,value:n,onChange:p,onInput:h,onKeyDown:m,className:"xappw-rich-input__input ".concat(e.className,"__input")}):ov.default.createElement("input",{id:t,ref:g,type:r,value:n.text,autoComplete:"off",autoFocus:a,placeholder:e.placeholder,spellCheck:o,tabIndex:i?Number(i):0,className:"xappw-rich-input__input ".concat(e.className,"__input"),onFocus:e.onFocus,onChange:f,onInput:v,onKeyDown:m}))};nv.RichText=fv,nv.SuggestionsGroup=hv,nv.SuggestionsGroupHeading=pv,nv.SuggestionsItem=vv;var Tv=nv.SuggestionsList=function(e){var t=e.suggestions,n=e.itemActions,r=e.className,a=rv.useMemo((function(){return t?mv(t):0}),[t])>=0?e.index:NaN,o=0;return ov.default.createElement("div",{className:"xappw-suggestions-list ".concat(r||"")},null==t?void 0:t.map((function(t,r){var i=ov.default.createElement(hv,{key:r,group:t,currentIndex:a-o,itemActions:n,onItemClick:e.onItemClick,onItemHover:e.onItemHover,onSpanClick:e.onSpanClick});return o+=t.items.length,i})))};nv.addQueryParametersToURL=_v,nv.extendFormat=cv;var Cv=nv.findItemByIndex=function(e,t){if(t>=0)for(var n=0,r=e;n<r.length;n++)for(var a=0,o=r[n].items;a<o.length;a++){var i=o[a];if(t<=0)return i;t--}},Nv=nv.getItemsLength=mv,Dv=nv.parseSuggestionsResponse=function(e,t){if(void 0===t&&(t=1),e)return kv(e.suggestions,t).reduce((function(e,t){var n,r,a={text:(n=t).suggestion,content:n.answer,formats:(r=n.format,r.map(gv)),type:n.type};if(e.length){var o=e[e.length-1];if(o.heading===yv(t.type))return o.items.push(a),e}return e.push({heading:yv(t.type),items:[a]}),e}),[])};nv.sortSuggestionItems=kv,nv.useJsonFetch=Pv;var jv=nv.useSuggestionsFetch=function(e){var t=e.url,n=e.context,r=e.query,a=rv.useMemo((function(){if(t){var e=new URLSearchParams;return e.append("size","5"),e.append("queryText",r),(null==n?void 0:n.length)&&e.append("activeContexts",n.join(",")),_v(t,e)}}),[r,n,t]);return Pv(a?"".concat(a.toString()):"",{pause:!r||!t})},Iv=nv.uuid=function(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-65xx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}));return t};function Rv(e){if(e)return"string"==typeof e?{displayText:e}:e}function Lv(e,n){var r,a,o,i,u,s,l,c,d;if(void 0===n&&(n=(new Date).getTime()),!e)return s;var f=Rv(e.outputSpeech),p=Rv(e.reprompt);return f&&(l=f.displayText,c=f.html),"TRANSFER_CALL"===e.system?s={type:"handOff",timestamp:n,handoffMessage:l,handoffTarget:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.transferPhoneNumber,endSession:!1,user:void 0}:(null===(a=e.system)||void 0===a?void 0:a.startsWith("PERMISSION_"))?s=function(e,t){var n,r=function(e){switch(e){case"PERMISSION_EMAIL":return"EMAIL";case"PERMISSION_LOCATION_PRECISE":return"LOCATION_PRECISE";default:throw new Error("Unsupported permission: ".concat(e))}}(e.system),a=Rv(e.outputSpeech),o=e.data.permissionPrimerAccepted,i=e.data.permissionDenied;return{type:"permissionRequest",timestamp:t,msg:{text:null!==(n=null==a?void 0:a.displayText)&&void 0!==n?n:"".concat(e.data.permissionRequestTTSContext),permissionRequest:{time:t,type:r,approve:"object"==typeof o?Lv({outputSpeech:o}).msg:void 0,deny:"object"==typeof i?Lv({outputSpeech:i}).msg:void 0}},endSession:!1,user:void 0}}(e,n):(d=!p||!(p.displayText||p.ssml),s={type:"msg",timestamp:n,msg:{displays:e.displays,context:null===(i=null===(o=e.context)||void 0===o?void 0:o.active)||void 0===i?void 0:i.map((function(e){return e.name}))},endSession:d,user:void 0},l&&!c&&(s.msg=t(t({},s.msg),{text:l})),c&&(s.msg=t(t({},s.msg),{html:c})),(null===(u=null==f?void 0:f.suggestions)||void 0===u?void 0:u.length)&&(s.msg.options=f.suggestions.map((function(e){return"string"==typeof e?e:{label:e.title,actionUrl:e.url}})))),s}function Uv(e){var t=e.items,n=[{retry:0,delay:10,text:""}];if(Array.isArray(t)&&t.length>0)for(var r=0;r<t.length;r++)n.push({retry:r+1,delay:t[r].delay,text:t[r].text});return n}function Av(e){return{type:"session_id",detail:{sessionId:e,timestamp:(new Date).getTime()}}}var Fv=function(){function e(e,t){this._userId="",this._sessionId="",this._accessToken="",this._attributes={},this.config=e,this.options=t,this.configurableMessages=t.configurableMessages,this.isNewSession=!1,this.hooks=t.hooks}return e.prototype.init=function(e){this.dispatch=e,Hp("got init auth: ".concat(this.config.key)),this.setConnectionStatus("online"),this.setAccountStatus("online")},e.prototype.setConnectionStatus=function(e){Hp("SERVER: connection_update: ".concat(JSON.stringify(e))),this.dispatch(Gp(e))},e.prototype.setAccountStatus=function(e){Hp("SERVER: account_status: ".concat(JSON.stringify(e))),this.dispatch(Xp(e))},e.prototype.sendNewMessage=function(e){Hp("SERVER: new message: ".concat(JSON.stringify(e))),this.dispatch({type:"chat",detail:{type:"chat.msg",user:t(t({},e.user),{nick:"agent:robot"}),msg:e.msg,timestamp:+new Date}})},e.prototype.userJoined=function(e){Hp("SERVER: user joined: ".concat(JSON.stringify(e))),this.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:t(t({},e.user),{nick:"agent:robot"}),timestamp:+new Date}})},e.prototype.typing=function(){this.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!0,timestamp:+new Date}})},e.prototype.stopTyping=function(){this.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!1,timestamp:+new Date}})},e.prototype.sendFailureMessage=function(e,t,n){this.stopTyping(),this.dispatch({type:"chat",detail:{type:"chat.failureMsg",user:{nick:"agent:robot"},failureMsg:{retry:e,delay:t,text:n},timestamp:+new Date}})},e.prototype.sendOfflineMsg=function(e,t){t()},e.prototype.sendChatMsg=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this.sendChatMsgRequest({msg:e,timestamp:(new Date).getTime(),agent:!1,user:void 0,type:"msg"},t)]}))}))},e.prototype.bargeOut=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeOut")}))}))},e.prototype.bargeIn=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeIn")}))}))},e.prototype.getBot=function(e){var n,r=null===(n=this.options)||void 0===n?void 0:n.bot;return e?e.displayName&&e.nick&&e.avatarPath?e:t(t({},e),{nick:e.nick||r.nick||"Bot",displayName:e.displayName||r.displayName||"Bot",avatarPath:e.avatarPath||r.avatarPath}):r},e.prototype.sendChatMsgRequest=function(e,a){return n(this,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,this.postMessage(e)];case 1:return n=r.sent(),(null===(o=n.user)||void 0===o?void 0:o.displayName)||(n=t(t({},n),{user:this.getBot(n.user)})),this.sendNewMessage(n),a(),[2]}}))}))},e.prototype.sendTyping=function(){},e.prototype.setVisitorInfo=function(e,n,r){this.visitorInfo=e,this._attributes=t({},this.visitorInfo.attributes);var a=new URL(window.location.href);(null==a?void 0:a.host.toLowerCase().startsWith("localhost"))?this._attributes.isLocal=!0:this._attributes.currentUrl=window.location.href,this._accessToken=this.visitorInfo.accessToken,this.userJoined({user:this.getBot(void 0),token:""}),this.startSession(n),r()},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(e,t){t()},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){},e.prototype.sleep=function(){},e.prototype.wakeup=function(){},e.prototype.postMessage=function(e){return n(this,void 0,void 0,(function(){var a,o,i,u,s,l,c,d,f,p,v,h,m,g,y,x,b,w,k,_,O,S,P,E,M,T=this;return r(this,(function(C){switch(C.label){case 0:o=this._userId,i=this._sessionId,u=this._accessToken,s=this._attributes||{},l=(new Date).getTime(),this.isNewSession&&!(null===(O=null==e?void 0:e.msg)||void 0===O?void 0:O.text)?a={type:"LAUNCH_REQUEST",rawQuery:null===(S=null==e?void 0:e.msg)||void 0===S?void 0:S.text,sessionId:i,userId:o,isNewSession:!0,intentId:"LaunchRequest",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}:(c=null===(P=e.msg)||void 0===P?void 0:P.permissionRequest)?(e=t(t({},e),{msg:t(t({},e.msg),{permissionRequest:void 0})}),d=l-c.time>3e5,f=null===(E=e.msg.text)||void 0===E?void 0:E.toLowerCase(),p=!d,v={id:this._userId},d||("EMAIL"===c.type&&(h=function(e){var t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(String(e).toLowerCase())}(f),p=h,v.email=this.visitorInfo.email,v.name=this.visitorInfo.displayName,this.visitorInfo.email=f),"LOCATION_PRECISE"===c.type&&(p=!!e.msg.location,v.preciseLocation=e.msg.location?{coordinates:{latitude:e.msg.location.latitude,longitude:e.msg.location.longitude}}:void 0)),a={type:"PERMISSION_GRANT",rawQuery:e.msg.text,sessionId:this._sessionId,userId:this._userId,isNewSession:!1,granted:p,userProfile:v,intentId:"PermissionGrant",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}):a="custom"===e.type?t(t({},JSON.parse(e.payload)),{sessionId:this._sessionId,userId:this._userId,isNewSession:!1,platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}):e.msg.token?{type:"OPTION_SELECT_REQUEST",token:e.msg.token,sessionId:this._sessionId,userId:this._userId,isNewSession:!1,intentId:"OptionSelect",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}:{type:"INTENT_REQUEST",rawQuery:e.msg.text,sessionId:this._sessionId,userId:this._userId,isNewSession:!1,intentId:"NLU_RESULT_PLACEHOLDER",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s},Hp("Visitor says: ".concat(JSON.stringify(a,void 0,2))),m=Uv(this.configurableMessages),y=!1,x=function(e){g=e,y=!0},b=function(e,t){return n(T,void 0,void 0,(function(){var n,a,o;return r(this,(function(r){return n=m[e].retry,a=m[e].delay,o=m[e].text,Bp("POST failed: ".concat(t)),this.sendFailureMessage(n,a,o),g={errorText:""},[2,new Promise((function(e){setTimeout(e,1e3*a)}))]}))}))},w=1,C.label=1;case 1:return w<m.length?(k=this.config.timeout||15e3,this.typing(),[4,new zp({retries:1,timeout:k}).fetch((function(e){return function(e,t,a,o){return n(this,void 0,void 0,(function(){var n,i;return r(this,(function(r){switch(r.label){case 0:return n=JSON.stringify(e),Hp("URL: ".concat(t)),Hp("BODY: ".concat(n)),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a),"User-Agent":"Stentor Chat Server"},body:n,mode:"cors",signal:o})];case 1:if(!(i=r.sent()).ok)throw new Error("Status ".concat(i.status,", Text: ").concat(i.statusText));return[2,i.json()]}}))}))}(a,T.config.url,T.config.key,e)})).then(x).catch(b.bind(this,w))]):[3,4];case 2:if(C.sent(),y)return[3,4];C.label=3;case 3:return w++,[3,1];case 4:return Hp("Bot says: ".concat(JSON.stringify(g,void 0,2))),this.isNewSession=!1,_=Lv(g),!(null==g?void 0:g.hasOwnProperty("errorText"))&&g||((_={type:"userLeft",timestamp:l,msg:{},user:void 0,endSession:!0}).msg={text:(null==g?void 0:g.hasOwnProperty("errorText"))?g.errorText:"The assistant is not responding right now. Please close the widget and open it again."}),"function"==typeof(null===(M=this.hooks)||void 0===M?void 0:M.onResponse)&&this.hooks.onResponse(g),this.stopTyping(),[2,_]}}))}))},e.prototype.startSession=function(e){this.visitorInfo.visitorId?this._userId="".concat(this.visitorInfo.visitorId):this.visitorInfo.email?this._userId="stentor-widget-user-".concat(this.visitorInfo.email):this._userId="stentor-widget-user-".concat(Iv()),e?(this._sessionId=e,Hp("Using persisted session id: ".concat(this._sessionId))):(this._sessionId="stentor-widget-session-".concat(Iv()),this.dispatch(Av(this._sessionId)),Hp("Using generated session id: ".concat(this._sessionId))),this.isNewSession=!0},Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionId",{get:function(){return this._sessionId},enumerable:!1,configurable:!0}),e}();var zv=function(){function e(){}return e.prototype.init=function(){},e.prototype.sendOfflineMsg=function(){},e.prototype.sendChatMsg=function(){},e.prototype.sendChatMsgRequest=function(){},e.prototype.sendTyping=function(){},e.prototype.setVisitorInfo=function(){},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(){},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){},e.prototype.bargeOut=function(){},e.prototype.bargeIn=function(){},e.prototype.sleep=function(){},e.prototype.wakeup=function(){},e}(),Wv=3e5;function Yv(e,n,r,a,o,i,u){var s,l,c,d,f,p,v=(new Date).getTime();if(r&&!(null===(s=null==e?void 0:e.msg)||void 0===s?void 0:s.text))p={type:"LAUNCH_REQUEST",rawQuery:null===(l=null==e?void 0:e.msg)||void 0===l?void 0:l.text,sessionId:a,userId:n,isNewSession:!0,intentId:"LaunchRequest",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i};else{var h=null===(c=e.msg)||void 0===c?void 0:c.permissionRequest;if(h){e=t(t({},e),{msg:t(t({},e.msg),{permissionRequest:void 0})});var m=v-h.time>Wv,g=null===(d=e.msg.text)||void 0===d?void 0:d.toLowerCase(),y=!m,x={id:n};if(!m){if("EMAIL"===h.type){var b=function(e){var t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(String(e).toLowerCase())}(g);y=b,x.email=u.email,x.name=u.displayName,this.visitorInfo.email=g}"LOCATION_PRECISE"===h.type&&(y=!!e.msg.location,x.preciseLocation=e.msg.location?{coordinates:{latitude:e.msg.location.latitude,longitude:e.msg.location.longitude}}:void 0)}p={type:"PERMISSION_GRANT",rawQuery:e.msg.text,sessionId:a,userId:n,isNewSession:!1,granted:y,userProfile:x,intentId:"PermissionGrant",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}}else p="custom"===e.type?t(t({},JSON.parse(e.payload)),{sessionId:a,userId:n,isNewSession:!1,platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}):e.msg.token?{type:"OPTION_SELECT_REQUEST",token:e.msg.token,sessionId:a,userId:n,isNewSession:!1,intentId:"OptionSelect",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}:{type:"INTENT_REQUEST",rawQuery:e.msg.text,sessionId:a,userId:n,isNewSession:!1,intentId:"NLU_RESULT_PLACEHOLDER",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}}return(null===(f=e.msg)||void 0===f?void 0:f.attributes)&&(p.attributes=t(t({},p.attributes),e.msg.attributes)),p}var Hv="router",Bv={deviceId:"Router",userId:Hv,isAdmin:!1,displayName:"XAPP Server",urlAttributes:{path:[],query:{}}},qv=function(){function e(e,t){var n,r;this.isDisposed=!1,this._userId="",this._sessionId="",this.accessToken="",this.attributes={},this.isAdmin=!1,this.urlAttributes={},this.handlers={},this.config=e,this.options=t;var a=new URL(this.config.url);this.appId=a.searchParams.get("appId");var o=new URL(window.location.href);if(this.isAdmin="true"===o.searchParams.get("isAdmin"),this.appId)this.serverUrl=this.config.url,this.urlAttributes.path=null===(n=a.pathname)||void 0===n?void 0:n.split("/");else{this.serverUrl="".concat(a.origin);var i=null===(r=a.pathname)||void 0===r?void 0:r.split("/");i&&i.length>1&&(this.serverUrl="".concat(this.serverUrl,"/").concat(i[1]),this.urlAttributes.path=i.slice(1))}Hp("WS url: ".concat(this.serverUrl," isAdmin: ").concat(this.isAdmin," attributes: ").concat(JSON.stringify(this.attributes)," appId: ").concat(this.appId)),this.configurableMessages=Uv(t.configurableMessages),this.noOfServerErrors=0}return e.prototype.init=function(e){var t,n,r=this;this.dispatch=e,this.setAccountStatus("offline"),this.handlers["connection update"]=function(e,t,n){Hp("Connection update received. Session created: ".concat(e.sessionCreated," Error: ").concat(e.errorMessage||"")),e.sessionCreated?(r.sessionCreated=!0,r.setConnectionStatus("online")):(Bp("SERVER: something is wrong. Going offline."),r.dispatch(Xp("offline")),r.dispatch(Gp("offline")))},this.handlers["account status"]=function(t,n,r){e({type:"account_status",detail:{status:"online",timestamp:r||(new Date).getTime()}})},this.handlers.failure=function(e,t,n){Bp("SERVER: something's failed: type: ".concat(e.type," tries: ").concat(e.tries," error: ").concat(e.error));var a=r.configurableMessages[e.tries],o=a.retry,i=a.delay,u=a.text;r.sendFailureMessage(o,e.delay||i,u,t)},this.handlers["new message"]=function(e,t,n){var a,o;"Bot"===t.deviceId?("function"==typeof(null===(a=r.options.hooks)||void 0===a?void 0:a.onResponse)&&r.options.hooks.onResponse(o),o=Lv(e)):"Widget"===t.deviceId?o=function(e,t){if(void 0===t&&(t=(new Date).getTime()),e)return{type:"msg",timestamp:t,msg:{text:e.rawQuery},endSession:!1,user:void 0}}(e):Bp("Unknown sender device Id: ".concat(t.deviceId)),r.dispatch({type:"chat",detail:{type:"chat.msg",user:{displayName:t.displayName||t.email||t.userId,nick:Vv(t),avatarPath:t.avatarPath},msg:o.msg,timestamp:n||(new Date).getTime()}})},this.handlers["user joined"]=function(e,t,n){var a,o;r.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:{avatarPath:null===(o=null===(a=r.options)||void 0===a?void 0:a.bot)||void 0===o?void 0:o.avatarPath,displayName:t.displayName,nick:Vv(t)},timestamp:n||(new Date).getTime()}})},this.handlers["user left"]=function(e,t,n){r.dispatch({type:"chat",detail:{type:"chat.memberleave",user:{displayName:t.displayName,nick:Vv(t)},timestamp:n||(new Date).getTime()}})},this.handlers.typing=function(e,t,n){r.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:Vv(t)},typing:!0,timestamp:n||(new Date).getTime()}})},this.handlers["stop typing"]=function(e,t,n){r.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:Vv(t)},typing:!1,timestamp:n||(new Date).getTime()}})},this.handlers.disconnect=function(){Bp("SERVER: requested disconnect"),r.dispatch(Xp("offline")),r.dispatch(Gp("offline"))},this.handlers.reconnect=function(){r.dispatch(Xp("online")),r.dispatch(Gp("online"))},this.handlers["reconnect failed"]=function(e){Bp("SERVER: says re-connect failed"),r.dispatch(Xp("offline")),r.dispatch(Gp("offline"))},this.handlers["reconnect error"]=function(e){Bp("SERVER: says there was an error while re-connecting"),r.dispatch(Xp("offline"))},this.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:{avatarPath:null===(n=null===(t=this.options)||void 0===t?void 0:t.bot)||void 0===n?void 0:n.avatarPath,displayName:Bv.displayName,nick:Vv(Bv)},timestamp:(new Date).getTime()}}),this.setAccountStatus("online"),this.setConnectionStatus("online")},e.prototype.autoReconnect=function(e){var t=this;0===this.noOfServerErrors&&this.setConnectionStatus("pending");var n=this.setAccountStatus.bind(this),r=this.setConnectionStatus.bind(this);function a(){var t=setInterval((function(){var o=e();o?(Hp("Re-created WS connection"),o.onopen=function(){Hp("Re-opened WS connection"),n("online"),r("online"),o.onclose=function(){Hp("Closed WS connection (onclosed was called)"),a()},clearInterval(t)}):clearInterval(t)}),5e3)}Hp("Creating WS connection");var o=e();o&&(o.onclose=function(){Hp("Closed WS connection (onclosed was called)"),a()},this.ws.onopen=function(){Hp("Opened WS connection (onopen was called)"),t.setAccountStatus("online"),t.setConnectionStatus("online")})},e.prototype.wsClose=function(){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.onopen=null,this.ws.onmessage=null,this.ws.close())},e.prototype.wsCreate=function(e){var t=this;if(!this.isDisposed){Hp('Trying to re-connect. Reason: "'.concat(e,'"'));var n=new URL(this.serverUrl);if(n.searchParams.set("userId",this._userId),n.searchParams.set("isAdmin","".concat(this.isAdmin)),n.searchParams.set("createWsReason",e),this.ws&&this.ws.readyState!==WebSocket.CLOSED&&this.ws.readyState!==WebSocket.CLOSING){var r=this.ws.readyState;Hp("Forced WS close. State: ".concat(r));try{this.wsClose()}catch(e){e("Failed to close WS (ready state: ".concat(r,"): ").concat(e))}}return this.ws=new WebSocket(n.toString()),this.ws.onerror=function(e){var r;Bp("Error in WS connection. Url: ".concat(n.toString()," Type: ").concat(e?e.type:"?"," Ready State: ").concat(null===(r=t.ws)||void 0===r?void 0:r.readyState))},this.ws.onmessage=function(e){Hp("ROUTER says: ".concat(e.data));var n=JSON.parse(e.data);t.handlers[n.event]?t.handlers[n.event](n.data,n.sender,n.timeMs):Bp("Unknown router message event: ".concat(n.event))},this.ws}Hp("Stopping reconnect for disposed router connector")},e.prototype.checkConnection=function(){var e;return(null===(e=this.ws)||void 0===e?void 0:e.readyState)===WebSocket.OPEN},e.prototype.emit=function(e,t){return n(this,void 0,void 0,(function(){var n,a=this;return r(this,(function(r){switch(r.label){case 0:return n=JSON.stringify({event:e,data:t,sender:this.visitorInfo,sessionId:this._sessionId,timeMs:(new Date).getTime()}),Hp("Widget says: ".concat(n)),this.ws||this.autoReconnect(this.wsCreate.bind(this,"emitNoWs")),[4,Qv(this.checkConnection.bind(this),1e3,1e4,"connection").then((function(e){e>0&&Hp("Connection is ready in ".concat(e," ms")),a.ws.send(n),a.noOfServerErrors=0})).catch((function(e){Bp("Connection wait timed out in ".concat(e," ms (show error)")),a.setConnectionStatus("online")}))];case 1:return r.sent(),[2]}}))}))},e.prototype.setAccountStatus=function(e){Hp("SERVER account_status: ".concat(JSON.stringify(e))),this.dispatch(Xp(e))},e.prototype.setConnectionStatus=function(e){Hp("SERVER: connection_update: ".concat(JSON.stringify(e))),this.dispatch(Gp(e))},e.prototype.sendOfflineMsg=function(e,t){t()},e.prototype.sendChatMsg=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this.sendChatMsgRequest({msg:e,timestamp:(new Date).getTime(),agent:!1,user:void 0,type:"msg"},t)]}))}))},e.prototype.sendFailureMessage=function(e,t,n,r){this.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:Vv(r)},typing:!1,timestamp:+new Date}}),this.dispatch({type:"chat",detail:{type:"chat.failureMsg",user:{nick:Vv(r)},failureMsg:{retry:e,delay:t,text:n},timestamp:+new Date}})},e.prototype.sendDisconnectMessage=function(){this.dispatch({type:"chat",detail:{type:"chat.msg",user:{displayName:"Server",nick:Vv(Bv),avatarPath:Bv.avatarPath},msg:{text:0===this.noOfServerErrors?"I cannot connect to the server. Please try later.":"Nope. Still no luck. I still cannot connect to the server. Please don't give up."},timestamp:(new Date).getTime()}}),this.noOfServerErrors++},e.prototype.checkSession=function(){return this.sessionCreated},e.prototype.sendChatMsgRequest=function(e,t){return n(this,void 0,void 0,(function(){var n=this;return r(this,(function(r){switch(r.label){case 0:return this.checkSession()||this.setConnectionStatus("pending"),[4,Qv(this.checkSession.bind(this),1e3,1e4,"session creation").then((function(t){t>0&&Hp("Session creation is ready in ".concat(t," ms")),n.postMessage(e)})).catch((function(e){Bp("Session creation wait timed out in ".concat(e," ms")),n.setConnectionStatus("online"),n.sendDisconnectMessage()}))];case 1:return r.sent(),this.setConnectionStatus("online"),t(),[2]}}))}))},e.prototype.sendTyping=function(e){},e.prototype.setVisitorInfo=function(e,n,r){Hp("Visitor Info Message = ".concat(JSON.stringify(e))),this.visitorInfo={deviceId:"Widget",userId:e.userId,displayName:e.displayName||e.name,email:e.email,isAdmin:this.isAdmin,urlAttributes:this.urlAttributes},this.attributes=t(t(t({},e.attributes),this.attributes),{currentUrl:window.location.href}),this.accessToken=e.accessToken,this.startSession(n),this.postVisitorInfo(),r()},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(e,t){t()},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){this.isDisposed=!0,this.ws&&this.wsClose(),Hp("Closed web socket (dispose)")},e.prototype.sleep=function(){this.isDisposed=!0,this.ws&&this.wsClose(),Hp("Closed web socket (sleep)")},e.prototype.wakeup=function(){this.isDisposed=!1,this._userId&&(this.autoReconnect(this.wsCreate.bind(this,"wakeup")),Hp("Waking up"))},e.prototype.bargeOut=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(e){return this.emit("barge out"),[2]}))}))},e.prototype.bargeIn=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(t){return this.visitorInfo.displayName=e,this.emit("barge in"),[2]}))}))},e.prototype.postVisitorInfo=function(){return n(this,void 0,void 0,(function(){return r(this,(function(e){return this.sessionCreated=!1,this.emit("user joined"),[2]}))}))},e.prototype.postMessage=function(e){return n(this,void 0,void 0,(function(){var t,n,a,o,i;return r(this,(function(r){return t=this._userId,n=this._sessionId,a=this.accessToken,o=this.attributes||{},i=Yv(e,t,this.isNewSession,n,a,o,this.visitorInfo),this.emit("new message",i),[2]}))}))},e.prototype.startSession=function(e){this.visitorInfo.userId?this._userId="".concat(this.visitorInfo.userId):this.visitorInfo.email?this._userId="stentor-widget-user-".concat(this.visitorInfo.email):this._userId="stentor-widget-user-".concat(Iv());var t=new URL(window.location.href).searchParams.get("sessionId");t?(this._sessionId=t,this.dispatch(Av(this._sessionId)),Hp("Using enforced session id: ".concat(this._sessionId))):e?(this._sessionId=e,Hp("Using persisted session id: ".concat(this._sessionId))):(this._sessionId="stentor-widget-session-".concat(Iv()),this.dispatch(Av(this._sessionId)),Hp("Using generated session id: ".concat(this._sessionId))),this.isNewSession=!0,Hp("Started session: ".concat(this._sessionId))},e}();function Vv(e){return"Bot"===e.deviceId?"agent:bot:".concat(e.userId):"agent:widget:".concat(e.userId)}function Qv(e,t,n,r){var a=0,o=function(i,u){a>=n?u(a):e()?i(a):(a+=t,r&&Hp("Still waiting for ".concat(r," (").concat(a," ms)")),setTimeout((function(e){return o(i,u)}),t))};return new Promise(o)}const $v=Object.create(null);$v.open="0",$v.close="1",$v.ping="2",$v.pong="3",$v.message="4",$v.upgrade="5",$v.noop="6";const Kv=Object.create(null);Object.keys($v).forEach((e=>{Kv[$v[e]]=e}));const Jv={type:"error",data:"parser error"},Xv="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Gv="function"==typeof ArrayBuffer,Zv=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,eh=({type:e,data:t},n,r)=>Xv&&t instanceof Blob?n?r(t):th(t,r):Gv&&(t instanceof ArrayBuffer||Zv(t))?n?r(t):th(new Blob([t]),r):r($v[e]+(t||"")),th=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function nh(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let rh;const ah="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oh="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<ah.length;e++)oh[ah.charCodeAt(e)]=e;const ih="function"==typeof ArrayBuffer,uh=(e,t)=>{if("string"!=typeof e)return{type:"message",data:lh(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:sh(e.substring(1),t)};return Kv[n]?e.length>1?{type:Kv[n],data:e.substring(1)}:{type:Kv[n]}:Jv},sh=(e,t)=>{if(ih){const n=(e=>{let t,n,r,a,o,i=.75*e.length,u=e.length,s=0;"="===e[e.length-1]&&(i--,"="===e[e.length-2]&&i--);const l=new ArrayBuffer(i),c=new Uint8Array(l);for(t=0;t<u;t+=4)n=oh[e.charCodeAt(t)],r=oh[e.charCodeAt(t+1)],a=oh[e.charCodeAt(t+2)],o=oh[e.charCodeAt(t+3)],c[s++]=n<<2|r>>4,c[s++]=(15&r)<<4|a>>2,c[s++]=(3&a)<<6|63&o;return l})(e);return lh(n,t)}return{base64:!0,data:e}},lh=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,ch=String.fromCharCode(30);function dh(){return new TransformStream({transform(e,t){!function(e,t){Xv&&e.data instanceof Blob?e.data.arrayBuffer().then(nh).then(t):Gv&&(e.data instanceof ArrayBuffer||Zv(e.data))?t(nh(e.data)):eh(e,!1,(e=>{rh||(rh=new TextEncoder),t(rh.encode(e))}))}(e,(n=>{const r=n.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const e=new DataView(a.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{a=new Uint8Array(9);const e=new DataView(a.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(a[0]|=128),t.enqueue(a),t.enqueue(n)}))}})}let fh;function ph(e){return e.reduce(((e,t)=>e+t.length),0)}function vh(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let a=0;a<t;a++)n[a]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}var hh=mh;function mh(e){if(e)return function(e){for(var t in mh.prototype)e[t]=mh.prototype[t];return e}(e)}mh.prototype.on=mh.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},mh.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},mh.prototype.off=mh.prototype.removeListener=mh.prototype.removeAllListeners=mh.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if((n=r[a])===t||n.fn===t){r.splice(a,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},mh.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var a=(n=n.slice(0)).length;r<a;++r)n[r].apply(this,t)}return this},mh.prototype.emitReserved=mh.prototype.emit,mh.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},mh.prototype.hasListeners=function(e){return!!this.listeners(e).length};const gh="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function yh(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const xh=gh.setTimeout,bh=gh.clearTimeout;function wh(e,t){t.useNativeTimers?(e.setTimeoutFn=xh.bind(gh),e.clearTimeoutFn=bh.bind(gh)):(e.setTimeoutFn=gh.setTimeout.bind(gh),e.clearTimeoutFn=gh.clearTimeout.bind(gh))}const kh=1.33;class _h extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Oh extends hh{constructor(e){super(),this.writable=!1,wh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new _h(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=uh(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}const Sh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ph=64,Eh={};let Mh,Th=0,Ch=0;function Nh(e){let t="";do{t=Sh[e%Ph]+t,e=Math.floor(e/Ph)}while(e>0);return t}function Dh(){const e=Nh(+new Date);return e!==Mh?(Th=0,Mh=e):e+"."+Nh(Th++)}for(;Ch<Ph;Ch++)Eh[Sh[Ch]]=Ch;let jh=!1;try{jh="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Bp){}const Ih=jh;function Rh(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Ih))return new XMLHttpRequest}catch(e){}if(!t)try{return new(gh[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function Lh(){}const Uh=null!=new Rh({xdomain:!1}).responseType;class Ah extends hh{constructor(e,t){super(),wh(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var e;const t=yh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const n=this.xhr=new Rh(t);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=Ah.requestsCount++,Ah.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Lh,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Ah.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ah.requestsCount=0,Ah.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Fh);else if("function"==typeof addEventListener){addEventListener("onpagehide"in gh?"pagehide":"unload",Fh,!1)}function Fh(){for(let e in Ah.requests)Ah.requests.hasOwnProperty(e)&&Ah.requests[e].abort()}const zh="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Wh=gh.WebSocket||gh.MozWebSocket,Yh="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const Hh={websocket:class extends Oh{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=Yh?{}:yh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=Yh?new Wh(e,t,n):t?new Wh(e,t):new Wh(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;eh(n,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}r&&zh((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Dh()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!Wh}},webtransport:class extends Oh{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){fh||(fh=new TextDecoder);const n=[];let r=0,a=-1,o=!1;return new TransformStream({transform(i,u){for(n.push(i);;){if(0===r){if(ph(n)<1)break;const e=vh(n,1);o=128==(128&e[0]),a=127&e[0],r=a<126?3:126===a?1:2}else if(1===r){if(ph(n)<2)break;const e=vh(n,2);a=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(ph(n)<8)break;const e=vh(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){u.enqueue(Jv);break}a=o*Math.pow(2,32)+t.getUint32(4),r=3}else{if(ph(n)<a)break;const e=vh(n,a);u.enqueue(uh(o?e:fh.decode(e),t)),r=0}if(0===a||a>e){u.enqueue(Jv);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=dh();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();const a=()=>{n.read().then((({done:e,value:t})=>{e||(this.onPacket(t),a())})).catch((e=>{}))};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this.writer.write(n).then((()=>{r&&zh((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends Oh{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}const t=e&&e.forceBase64;this.supportsBinary=Uh&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(ch),r=[];for(let e=0;e<n.length;e++){const a=uh(n[e],t);if(r.push(a),"error"===a.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let a=0;e.forEach(((e,o)=>{eh(e,!1,(e=>{r[o]=e,++a===n&&t(r.join(ch))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Dh()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ah(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},Bh=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,qh=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Vh(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let a=Bh.exec(e||""),o={},i=14;for(;i--;)o[qh[i]]=a[i]||"";return-1!=n&&-1!=r&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,o.query),o}class Qh extends hh{constructor(e,t={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=Vh(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Vh(t.host).host),wh(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Hh[e](n)}open(){let e;if(this.opts.rememberUpgrade&&Qh.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),n=!1;Qh.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Qh.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{n||"closed"!==this.readyState&&(l(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function a(){n||(n=!0,l(),t.close(),t=null)}const o=e=>{const n=new Error("probe error: "+e);n.transport=t.name,a(),this.emitReserved("upgradeError",n)};function i(){o("transport closed")}function u(){o("socket closed")}function s(e){t&&e.name!==t.name&&a()}const l=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",i),this.off("close",u),this.off("upgrading",s)};t.once("open",r),t.once("error",o),t.once("close",i),this.once("close",u),this.once("upgrading",s),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{n||t.open()}),200):t.open()}onOpen(){if(this.readyState="open",Qh.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(e){let t=0,n=0;for(let r=0,a=e.length;r<a;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil((t.byteLength||t.size)*kh)),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const a={type:e,data:t,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(e){Qh.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}Qh.protocol=4,Qh.protocol;const $h="function"==typeof ArrayBuffer,Kh=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Jh=Object.prototype.toString,Xh="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Jh.call(Blob),Gh="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Jh.call(File);function Zh(e){return $h&&(e instanceof ArrayBuffer||Kh(e))||Xh&&e instanceof Blob||Gh&&e instanceof File}function em(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(em(e[t]))return!0;return!1}if(Zh(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return em(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&em(e[t]))return!0;return!1}function tm(e){const t=[],n=e.data,r=e;return r.data=nm(n,t),r.attachments=t.length,{packet:r,buffers:t}}function nm(e,t){if(!e)return e;if(Zh(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=nm(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=nm(e[r],t));return n}return e}function rm(e,t){return e.data=am(e.data,t),delete e.attachments,e}function am(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=am(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=am(e[n],t));return e}const om=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var im;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(im||(im={}));function um(e){return"[object Object]"===Object.prototype.toString.call(e)}class sm extends hh{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===im.BINARY_EVENT;n||t.type===im.BINARY_ACK?(t.type=n?im.EVENT:im.ACK,this.reconstructor=new lm(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Zh(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===im[n.type])throw new Error("unknown packet type "+n.type);if(n.type===im.BINARY_EVENT||n.type===im.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const a=e.substring(r,t);if(a!=Number(a)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(a)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!sm.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case im.CONNECT:return um(t);case im.DISCONNECT:return void 0===t;case im.CONNECT_ERROR:return"string"==typeof t||um(t);case im.EVENT:case im.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===om.indexOf(t[0]));case im.ACK:case im.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lm{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=rm(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var cm=Object.freeze({__proto__:null,protocol:5,get PacketType(){return im},Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==im.EVENT&&e.type!==im.ACK||!em(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===im.EVENT?im.BINARY_EVENT:im.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==im.BINARY_EVENT&&e.type!==im.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=tm(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Decoder:sm});function dm(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fm=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class pm extends hh{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[dm(e,"open",this.onopen.bind(this)),dm(e,"packet",this.onpacket.bind(this)),dm(e,"error",this.onerror.bind(this)),dm(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(fm.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:im.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const a=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r),o=(...e)=>{this.io.clearTimeoutFn(a),t.apply(this,e)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise(((n,r)=>{const a=(e,t)=>e?r(e):n(t);a.withError=!0,t.push(a),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:im.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case im.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case im.EVENT:case im.BINARY_EVENT:this.onevent(e);break;case im.ACK:case im.BINARY_ACK:this.onack(e);break;case im.DISCONNECT:this.ondisconnect();break;case im.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:im.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:im.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function vm(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}vm.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},vm.prototype.reset=function(){this.attempts=0},vm.prototype.setMin=function(e){this.ms=e},vm.prototype.setMax=function(e){this.max=e},vm.prototype.setJitter=function(e){this.jitter=e};class hm extends hh{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,wh(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new vm({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||cm;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Qh(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=dm(t,"open",(function(){n.onopen(),e&&e()})),a=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=dm(t,"error",a);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn((()=>{r(),a(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(dm(e,"ping",this.onping.bind(this)),dm(e,"data",this.ondata.bind(this)),dm(e,"error",this.onerror.bind(this)),dm(e,"close",this.onclose.bind(this)),dm(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){zh((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new pm(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const mm={};function gm(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=Vh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,a=n.id,o=n.path,i=mm[a]&&o in mm[a].nsps;let u;return t.forceNew||t["force new connection"]||!1===t.multiplex||i?u=new hm(r,t):(mm[a]||(mm[a]=new hm(r,t)),u=mm[a]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(gm,{Manager:hm,Socket:pm,io:gm,connect:gm});var ym=function(){function e(e,t){this.config=e,this.token=t.token}return e.prototype.init=function(e){var t=this;this.socket=gm(this.config.url,{transports:["websocket"],reconnection:!0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,reconnectionAttempts:5}),this.dispatch=e,this.socket.on("account_status",(function(n){Hp("SERVER: account_status: ".concat(JSON.stringify(n))),t.token||(t.token=Iv(),e({type:"receiveToken",detail:{token:t.token,timestamp:+new Date,type:"receiveToken",user:void 0}}),Hp("CLIENT: created token: ".concat(t.token))),t.socket.emit("connection update",t.token),e({type:"account_status",detail:{status:"online",timestamp:+new Date}})})),this.socket.on("new message",(function(e){Hp("SERVER: new message: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.msg",user:{displayName:e.username,nick:"agent:robot"},msg:e.message,timestamp:+new Date}})})),this.socket.on("user joined",(function(e){Hp("SERVER: user joined: ".concat(JSON.stringify(e))),t.visitorInfo.token=e.token,t.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:{displayName:e.username,nick:"agent:robot",avatarPath:e.avatarPath},timestamp:+new Date}})})),this.socket.on("user left",(function(e){Hp("SERVER: user left: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.memberleave",user:{displayName:e.username,nick:"agent:robot"},timestamp:+new Date}})})),this.socket.on("typing",(function(e){Hp("SERVER: typing: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!0,timestamp:+new Date}})})),this.socket.on("stop typing",(function(e){Hp("SERVER: stop typing: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!1,timestamp:+new Date}})})),this.socket.on("disconnect",(function(){Hp("SERVER: disconnect"),t.dispatch(Xp("offline")),t.dispatch(Gp("offline"))})),this.socket.on("reconnect",(function(){Hp("SERVER: reconnect"),t.dispatch(Xp("online")),t.dispatch(Gp("online"))})),this.socket.on("reconnect_failed",(function(e){Hp("SERVER: reconnect_failed",e),t.dispatch(Xp("offline")),t.dispatch(Gp("offline"))})),this.socket.on("reconnect_error",(function(e){Hp("SERVER: reconnect_error",e),t.dispatch(Xp("offline"))})),this.dispatch(Gp("pending"))},e.prototype.sendOfflineMsg=function(e,t){t()},e.prototype.sendChatMsg=function(e,t){this.socket.emit("new message",e),t()},e.prototype.sendChatMsgRequest=function(e,t){this.socket.emit("new message",e),t()},e.prototype.sendTyping=function(e){this.socket.emit(e?"typing":"stop typing")},e.prototype.setVisitorInfo=function(e,t,n){this.visitorInfo=e,this.socket.emit("add user",e),n()},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(e,t){t()},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){var e;null===(e=this.socket)||void 0===e||e.disconnect()},e.prototype.sleep=function(){},e.prototype.wakeup=function(){},e.prototype.bargeOut=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeOut")}))}))},e.prototype.bargeIn=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeIn")}))}))},e}();function xm(e,t){return new tv(function(e,t){switch(e.type){case"direct":return new Fv({url:e.serverUrl,key:e.accountKey,timeout:e.timeout},t);case"websocket":return new ym({url:e.serverUrl},t);case"websocketraw":return new qv({url:e.serverUrl},t);case"local":return new zv;default:throw Zp(e.type)}}(e,t))}var bm=u.exports.createContext(null);function wm(){var e=ev(),t=u.exports.useContext(bm);return u.exports.useCallback((function(n){n?t&&e(n(t)):console.warn("react bug? Someone invokes with null")}),[e,t])}function km(){var e=wm();return u.exports.useCallback((function(t,n){e($p(t,n))}),[e])}var _m={type:"newWindow"};function Om(e){return{type:"visual_status",detail:{status:e,timestamp:(new Date).getTime()}}}function Sm(){var e=Np();return u.exports.useCallback((function(t,n,r,a){a||(a=(null==e?void 0:e.urls)?function(e,t){if(t.policies)for(var n=0,r=t.policies;n<r.length;n++){var a=r[n];try{if(new RegExp(a.pattern,"gi").test(e))return a.behavior}catch(e){}}return t.defaultBehavior||_m}(t,e.urls):_m),function(e,t,n,r){var a,o;if(!t||!n)throw new Error("OpenUrl: No dispatch and/or visual.");if(e!==Tp){try{var i=new URL(e),u=new URLSearchParams(i.search);u.has("utm_source")||u.append("utm_source","xapp"),i.search=u.toString(),e=i.toString()}catch(e){}var s=r.type;switch(s){case"newWindow":n.opened&&t(Om({opened:!1})),window.open(e,"callout-option","toolbar=0,status=0,width=".concat(r.width||1e3,",height=").concat(r.height||700));break;case"newTab":n.opened&&t(Om({opened:!1})),window.open(e,"_blank");break;case"sameWindow":n.opened||t(Om({opened:!0})),window.open(e,"_self");break;default:Zp(s)}}else{var l=null===(a=window.xafwControl)||void 0===a?void 0:a.openForm;if(!l)return void Bp("Cannot find toggleForm! Update form widget!");var c=!1,d=null===(o=window.xafwControl)||void 0===o?void 0:o.formStatus;d?c=d().active:Bp("Cannot find formStatus! Update form widget!"),c||(l(),n.opened&&t(Om({opened:!1})))}}(t,n,r,a)}),[e])}function Pm(){var e=Sm(),t=ev(),n=Jc.useSelector((function(e){return e.visuals})),r=km();return u.exports.useCallback((function(a){a.actionUrl?e(a.actionUrl,t,n):r(a.label)}),[t,r,e,n])}var Em=function(e){var t=e.msg,n=e.ctx,r=u.exports.useMemo((function(){return function(e){return{content:e.content,imageUrl:e.smallImageUrl,title:e.title,imageActionUrl:null==e?void 0:e.imageActionUrl,buttons:e.buttons?e.buttons.map((function(e){return{actionUrl:e.openUrlAction,label:e.title}})):void 0}}(t)}),[t]),a=n.user,o=Pm();return H.createElement(Vp,{showAvatar:!0,user:a},H.createElement("div",{className:"chat-msg"},H.createElement(Up,{card:r,onButtonClick:o})))};function Mm(e){return function(t){return e.reduceRight((function(e,t){return t(e)}),t)}}function Tm(e){var t,n=u.exports.useState(e.getArray()),r=n[0],a=n[1],o=(t=u.exports.useRef(!1),u.exports.useEffect((function(){return t.current=!0,function(){t.current=!1}}),[]),u.exports.useCallback((function(){return t.current}),[]));return u.exports.useEffect((function(){var t=e.subscribe((function(e){o()&&a(e)}));return function(){t.unsubscribe()}}),[o,e]),r}var Cm=[];function Nm(e){var t=e.get()||Cm,n=Array.isArray(t)?function(e){var t=e||[],n=[];function r(){for(var e=0,r=n;e<r.length;e++)(0,r[e])(t)}return{getArray:function(){return t},push:function(e){t=a(a([],t,!0),[e],!1),r()},unshift:function(e){t=a([e],t,!0),r()},subscribe:function(e){return n.push(e),{unsubscribe:function(){var t=n.indexOf(e);t>=0&&n.splice(t,1)}}}}}(t):t;return n!==t&&e.set(n),Tm(n)}var Dm=function(e,t){return{get:function(){return e[t]},set:function(n){return e[t]=n}}}(globalThis,"xappMsgMiddlewares");function jm(){return function(e){var t=Nm(e);return u.exports.useMemo((function(){return Mm(t)}),[t])}(Dm)}function Im(e){return e.hasOwnProperty("label")}function Rm(e){return e.url||e.imageActionUrl}var Lm=function(e){var t=ev(),n=Jc.useSelector((function(e){return e.visuals})),r=e.url,a=e.className,o=e.onOpen,i=u.exports.useCallback((function(){o&&o(r,t,n)}),[r,o]);return r?H.createElement("div",{onClick:i,className:a},e.children):H.createElement("div",{onClick:e.onClick,className:a},e.children)},Um=function(e){var t,n=e.item,r=e.onButtonClick,a=e.onExecute,o=1===(null===(t=n.buttons)||void 0===t?void 0:t.length),i=u.exports.useCallback((function(){var e;1===(null===(e=n.buttons)||void 0===e?void 0:e.length)?r(n.buttons[0]):a(n.title,n.token)}),[n,a,r]),s="xappw-chat-action-item ".concat(o?"xappw-chat-action-item--action":""," ").concat(e.className);return H.createElement(Lm,{className:s,url:Rm(n),onClick:i,onOpen:e.onOpenUrl},e.children)},Am=function(e){var t,n=e.item,r=1===(null===(t=n.buttons)||void 0===t?void 0:t.length),a=Rm(n);if(n.imageUrl){var o=r?null:n.imageActionUrl;return H.createElement("div",{className:e.className},H.createElement(Lp,{imageUrl:n.imageUrl,imageActionUrl:!a&&o}))}return e.emptyImageVisible?H.createElement("div",{className:e.className}):H.createElement(H.Fragment,null)},Fm=function(e){var t,n=e.item;return H.createElement(Um,{className:"chat-list-item-container",item:n,onButtonClick:e.onButtonClick,onExecute:e.onExecute,onOpenUrl:e.onOpenUrl},H.createElement("div",{className:"chat-list-item"},H.createElement(Am,{item:n,className:"chat-list-item__img",emptyImageVisible:e.emptyImageVisible}),n.title&&H.createElement("div",{className:"chat-list-item__title"},H.createElement("span",null,n.title)),n.subTitle&&H.createElement("div",{className:"chat-list-item__subtitle"},H.createElement("span",null,n.subTitle)),!!(null===(t=n.buttons)||void 0===t?void 0:t.length)&&H.createElement(Rp,{className:"chat-list-item__actions",buttons:n.buttons,onClick:e.onButtonClick})))};var zm=function(e){return H.createElement("button",{onClick:e.onClick,className:"xa-chevron"},H.createElement("svg",{viewBox:"-5 -18 10 36"},H.createElement("path",{d:"M 2.5 -15 L -2.5 0 L 2.5 15",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"4px",fill:"none"})))};var Wm=function(e){return H.createElement("button",{onClick:e.onClick,className:"xa-chevron"},H.createElement("svg",{viewBox:"-5 -18 10 36"},H.createElement("path",{d:"M -2.5 -15 L 2.5 0 L -2.5 15",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"4px",fill:"none"})))},Ym=function(e){var t=u.exports.useRef(null),n=u.exports.useState(0),r=n[0],a=n[1];function o(e){var n,o,i=t.current;if(i){var u=i.getElementsByClassName("xappw-carousel-items__item"),s=u.length,l=r;1===e?r<s-1&&l++:r>0&&l--;for(var c=0,d=0;d<u.length&&d!==l;d++)c+=null!==(o=null===(n=u.item(d))||void 0===n?void 0:n.clientWidth)&&void 0!==o?o:0;i.scrollLeft=c,a(l)}}var i=1===e.list.items.length,s=e.list.items.some((function(e){return e.imageUrl})),l=e.list.items.map((function(t,n){return H.createElement("div",{className:"xappw-carousel-items__item",key:"item-key-".concat(n)},H.createElement(Fm,{item:t,emptyImageVisible:s,onExecute:e.onExecute,onButtonClick:e.onButtonClick,onOpenUrl:e.onOpenUrl}))}));return H.createElement("div",{className:"xappw-carousel"},!i&&H.createElement("div",{className:"xappw-carousel__prev"},H.createElement(zm,{onClick:function(){return o(-1)}})),H.createElement("div",{ref:t,className:"xappw-carousel-items ".concat(i?"xappw-carousel-items--one-item":"")},l),!i&&H.createElement("div",{className:"xappw-carousel__next"},H.createElement(Wm,{onClick:function(){return o(1)}})))};var Hm=function(e){var t=e.url,n=u.exports.useCallback((function(e){e.preventDefault()}),[]);return H.createElement("a",{href:t,"aria-label":"read more",target:"_blank",rel:"noreferrer",className:e.className,onClick:n},H.createElement("svg",{viewBox:"0 0 20 20"},H.createElement("path",{d:"M17 17H3V3h5V1H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5h-2z"}),H.createElement("path",{d:"M19 1h-8l3.29 3.29-5.73 5.73 1.42 1.42 5.73-5.73L19 9V1z"})))};function Bm(e,t){for(var n=-1,r=0,a=t;r<a.length;r++){var o=a[r],i=e.indexOf(o);i>=0&&(n<0||n>=0&&i<n)&&(n=i)}return n}var qm=[":","/"],Vm=["/"],Qm=["?","#"],$m=["#"],Km=[function(e){var t=e.indexOf("://");return t<0?t:t+3},function(e){return Bm(e,qm)},function(e){return":"!==e.charAt(0)?-1:Bm(e,Vm)},function(e){var t=Bm(e,Qm);return t>=0?t:e.length},function(e){return Bm(e,$m)}];var Jm="/...";function Xm(e,t){if(e.length<t)return e;var n=function(e){for(var t=[],n=e,r=0,a=Km;r<a.length;r++){var o=a[r],i=Math.max(0,o(n,e)),u=n.substring(0,i);t.push(u),n=n.substring(i)}return n&&t.push(n),t}(e);function r(){return n.join("")}function a(){return r().length>t}function o(e){a()&&(n[e]="")}if(":80"===n[2]&&"http://"===n[0]&&o(2),":443"===n[2]&&"https://"===n[0]&&o(2),o(5),o(4),o(2),o(0),a()){var i=n[3],u=r().length-i.length,s=t-u;if(s<0)n[3]="";else if(s<i.length){var l=i.length-s+Jm.length;n[3]=Jm+i.substring(l)}}return r()}var Gm=function(e){var t=e.url,n=e.className,r=u.exports.useCallback((function(e){e.preventDefault()}),[]);return H.createElement("a",{href:t,"aria-label":"read more",target:"_blank",rel:"noreferrer",className:n,onClick:r},Xm(t,40))},Zm=function(e){var t,n=e.item,r=e.layout||"normal",a=n.url||n.imageActionUrl;return H.createElement(Um,{className:"xappw-vlist-item-container",item:n,onButtonClick:e.onButtonClick,onExecute:e.onExecute,onOpenUrl:e.onOpenUrl},H.createElement("div",{className:"xappw-vlist-item xappw-vlist-item--".concat(r)},H.createElement("div",{className:"xappw-vlist-item__description"},n.title&&H.createElement("div",{className:"xappw-vlist-item__title"},H.createElement("span",null,n.title)),a&&H.createElement(Gm,{url:a,className:"xappw-vlist-item__link"}),n.subTitle&&H.createElement("div",{className:"xappw-vlist-item__subtitle"},H.createElement("span",null,n.subTitle)),!!(null===(t=n.buttons)||void 0===t?void 0:t.length)&&H.createElement(Rp,{buttons:n.buttons,onClick:e.onButtonClick})),H.createElement("div",{className:"xappw-vlist-item__side"},a&&H.createElement(Hm,{url:"url",className:"xappw-vlist-item__external-link"}),H.createElement(Am,{item:n,className:"xappw-vlist-item__img",emptyImageVisible:e.emptyImageVisible}))))},eg=function(e){var t=e.list,n=u.exports.useRef(null),r=t.items.some((function(e){return e.imageUrl})),a=!t.items.some((function(e){var t;return e.subTitle||(null===(t=e.buttons)||void 0===t?void 0:t.length)})),o=t.items.map((function(t,n){return H.createElement("div",{className:"xappw-vlist-container__item",key:"item-key-".concat(n)},H.createElement(Zm,{item:t,layout:a?"titles":"normal",emptyImageVisible:r,onExecute:e.onExecute,onButtonClick:e.onButtonClick,onOpenUrl:e.onOpenUrl}))}));return H.createElement("div",{className:"xappw-vlist"},H.createElement("div",{ref:n,className:"xappw-vlist-container"},e.list.title&&H.createElement("div",{className:"xappw-vlist__header"},e.list.title),o))},tg=function(e){var t=e.msg,n=e.ctx;if(!n)throw new TypeError("ctx not provided to ".concat(tg.name));var r=u.exports.useMemo((function(){return function(e){return{type:e.type,title:e.title,items:e.items.map((function(e){var t,n,r={title:e.title,subTitle:e.description,token:e.token,url:e.url,imageUrl:null===(t=e.image)||void 0===t?void 0:t.url,imageActionUrl:null===(n=e.image)||void 0===n?void 0:n.imageActionUrl},a=e.buttons;return a&&a.length>0&&(r.buttons=a.map((function(e){return{actionUrl:e.openUrlAction,label:e.title}}))),r}))}}(t)}),[t]),a=km(),o=Pm(),i=n.user;return H.createElement(Vp,{showAvatar:!1,user:i},"CAROUSEL"===r.type&&H.createElement("div",{className:"chat-msg chat-msg--fullwidth chat-msg--no-ava"},H.createElement(Ym,{list:r,onExecute:a,onButtonClick:o,onOpenUrl:n.openUrl})),"LIST"===r.type&&H.createElement("div",{className:"chat-msg chat-msg--expand"},H.createElement(eg,{list:r,onExecute:a,onButtonClick:o,onOpenUrl:n.openUrl})))},ng=function(){},rg=function(){function e(e){this.cache={},this.template=e}return e.prototype.resolve=function(e){var t,n,r;if(e){var a=this.cache,o=e.nick,i=a[o];return i||(i={user:e,send:null!==(t=this.template.send)&&void 0!==t?t:ng,write:null!==(n=this.template.write)&&void 0!==n?n:ng,openUrl:null!==(r=this.template.openUrl)&&void 0!==r?r:ng},a[o]=i),i}},e}(),ag=function(){return H.createElement(H.Fragment,null)},og=function(e){var n=e.items,r=e.checked,a=e.onChange,o=u.exports.useCallback((function(e){var n,o=e.target.value;a(t(t({},r),((n={})[o]=!r[o],n)))}),[r,a]);return H.createElement("ul",{className:"xappw-multiselect"},null==n?void 0:n.map((function(e){return H.createElement("li",{key:e.id},H.createElement("label",null,H.createElement("input",{type:"checkbox",checked:r[e.id]||!1,onChange:o,value:e.id}),H.createElement("span",null,e.title)))})))};var ig=function(e){var t=e.msg,n=e.ctx,r=u.exports.useMemo((function(){return t.items}),[t]),a=n.user,o=u.exports.useState({}),i=o[0],s=o[1],l=u.exports.useCallback((function(){n.send({type:"custom",payload:JSON.stringify({type:"OPTION_SELECT_REQUEST",intentId:"OptionSelect",selected:Object.keys(i).map((function(e){return{id:e}}))})})}),[n,i]);return H.createElement(Vp,{showAvatar:!0,user:a},H.createElement("div",{className:"chat-msg"},H.createElement("div",null,H.createElement(og,{items:r,checked:i,onChange:s}),H.createElement(jp,{label:"Submit",onClick:l}))))},ug=Mm([function(e){return function(t){var n,r=t.msg,a=t.ctx;return!(n=r)||"LIST"!==n.type&&"CAROUSEL"!==n.type?e(t):H.createElement(tg,{msg:r,ctx:a})}},function(e){return function(t){var n,r=t.msg,a=t.ctx;return(n=r)&&"CARD"===n.type?H.createElement(Em,{msg:r,ctx:a}):e(t)}},function(e){return function(t){var n=t.msg,r=t.ctx;return"MultiSelect"===n.type?H.createElement(ig,{msg:n,ctx:r}):e(t)}}]);function sg(){var e,t=(e=jm(),u.exports.useMemo((function(){return Mm([e,ug])}),[e]));return u.exports.useMemo((function(){return t(ag)}),[t])}var lg=ug(ag),cg={},dg={exports:{}},fg={exports:{}},pg={exports:{}},vg={exports:{}};function hg(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}!function(e){var t=td.exports.default;e.exports=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,n||"default");if("object"!==t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(vg),function(e){var t=td.exports.default,n=vg.exports;e.exports=function(e){var r=n(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}(pg),function(e){var t=pg.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(fg),function(e){var t=fg.exports;function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?n(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports}(dg),Object.defineProperty(cg,"__esModule",{value:!0});var mg=hg(dg.exports);function gg(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 yg="function"==typeof Symbol&&Symbol.observable||"@@observable",xg=function(){return Math.random().toString(36).substring(7).split("").join(".")},bg={INIT:"@@redux/INIT"+xg(),REPLACE:"@@redux/REPLACE"+xg(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xg()}};function wg(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(gg(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(gg(1));return n(wg)(e,t)}if("function"!=typeof e)throw new Error(gg(2));var a=e,o=t,i=[],u=i,s=!1;function l(){u===i&&(u=i.slice())}function c(){if(s)throw new Error(gg(3));return o}function d(e){if("function"!=typeof e)throw new Error(gg(4));if(s)throw new Error(gg(5));var t=!0;return l(),u.push(e),function(){if(t){if(s)throw new Error(gg(6));t=!1,l();var n=u.indexOf(e);u.splice(n,1),i=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(gg(7));if(void 0===e.type)throw new Error(gg(8));if(s)throw new Error(gg(9));try{s=!0,o=a(o,e)}finally{s=!1}for(var t=i=u,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:bg.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(gg(10));a=e,f({type:bg.REPLACE})}})[yg]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(gg(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[yg]=function(){return this},e},r}var kg=wg;function _g(e,t){return function(){return t(e.apply(this,arguments))}}function Og(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}cg.__DO_NOT_USE__ActionTypes=bg;var Sg=cg.applyMiddleware=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(gg(15))},a={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(a)}));return r=Og.apply(void 0,o)(n.dispatch),mg.default(mg.default({},n),{},{dispatch:r})}}};cg.bindActionCreators=function(e,t){if("function"==typeof e)return _g(e,t);if("object"!=typeof e||null===e)throw new Error(gg(16));var n={};for(var r in e){var a=e[r];"function"==typeof a&&(n[r]=_g(a,t))}return n},cg.combineReducers=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var o,i=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:bg.INIT}))throw new Error(gg(12));if(void 0===n(void 0,{type:bg.PROBE_UNKNOWN_ACTION()}))throw new Error(gg(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,a={},u=0;u<i.length;u++){var s=i[u],l=n[s],c=e[s],d=l(c,t);if(void 0===d)throw t&&t.type,new Error(gg(14));a[s]=d,r=r||d!==c}return(r=r||i.length!==Object.keys(e).length)?a:e}};var Pg=cg.compose=Og,Eg=cg.createStore=wg;cg.legacy_createStore=kg;var Mg={};Object.defineProperty(Mg,"__esModule",{value:!0});var Tg=Mg.default=void 0;function Cg(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(a){return"function"==typeof a?a(n,r,e):t(a)}}}}var Ng=Cg();Ng.withExtraArgument=Cg;var Dg=Ng;Tg=Mg.default=Dg;var jg=function(){function e(e,t){this.innerStorage=e,this.key=t}return e.prototype.get=function(){return function(e){try{if(e)return JSON.parse(e)}catch(e){}}(this.innerStorage.getItem(this.key))},e.prototype.set=function(e){try{this.innerStorage.setItem(this.key,JSON.stringify(e))}catch(e){!function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={};r[e]||(r[e]=!0,Hp.apply(void 0,t))}("storage","Unable to store redux state")}},e}();function Ig(){return Iv()}var Rg={displayName:"Visitor",nick:"visitor:",typing:!1};function Lg(e){return e||(e={}),e.userId=e.userId?e.userId:Ig(),e.visitorId=e.userId,t({connection:{connectionStatus:"offline",token:null,greetingRequested:!1},accountStatus:"offline",departments:{},visitor:Rg,agents:{},chats:[],lastTimestamp:0,lastRatingRequestTimestamp:0,hasRating:!1,isChatting:!1,queuePosition:0,failureMsg:null,visitorId:Ig(),chips:[],sessionExpiration:"24h",visuals:{}},e)}var Ug=Lg(),Ag=function(){function e(){this.valuesMap=new Map}return e.prototype.getItem=function(e){var t=String(e);return this.valuesMap.has(e)?String(this.valuesMap.get(t)):null},e.prototype.setItem=function(e,t){this.valuesMap.set(String(e),String(t))},e.prototype.removeItem=function(e){this.valuesMap.delete(e)},e.prototype.clear=function(){this.valuesMap.clear()},e.prototype.key=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'key' on 'Storage': 1 argument required, but only 0 present.");return Array.from(this.valuesMap.keys())[e]},Object.defineProperty(e.prototype,"length",{get:function(){return this.valuesMap.size},enumerable:!1,configurable:!0}),e}();function Fg(e,t){
|
|
1
|
+
var XAppChatWidget=function(e){"use strict";!function(){const e="prod";try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,u)}s((r=r.apply(e,t||[])).next())}))}function r(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function a(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u={exports:{}},s={},l=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.iterator;var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,_={};function O(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||w}function S(){}function P(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||w}O.prototype.isReactComponent={},O.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=O.prototype;var E=P.prototype=new S;E.constructor=P,k(E,O.prototype),E.isPureReactComponent=!0;var M=Array.isArray,T=Object.prototype.hasOwnProperty,C={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,a={},o=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)T.call(t,r)&&!N.hasOwnProperty(r)&&(a[r]=t[r]);var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];a.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===a[r]&&(a[r]=u[r]);return{$$typeof:l,type:e,key:o,ref:i,props:a,_owner:C.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var I=/\/+/g;function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function L(e,t,n,r,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var i=!1;if(null===e)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case c:i=!0}}if(i)return a=a(i=e),e=""===r?"."+R(i,0):r,M(a)?(n="",null!=e&&(n=e.replace(I,"$&/")+"/"),L(a,t,n,"",(function(e){return e}))):null!=a&&(j(a)&&(a=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(I,"$&/")+"/")+e)),t.push(a)),1;if(i=0,r=""===r?".":r+":",M(e))for(var u=0;u<e.length;u++){var s=r+R(o=e[u],u);i+=L(o,t,n,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),u=0;!(o=e.next()).done;)i+=L(o=o.value,t,n,s=r+R(o,u++),a);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function U(e,t,n){if(null==e)return e;var r=[],a=0;return L(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var F={current:null},z={transition:null},W={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:z,ReactCurrentOwner:C};function Y(){throw Error("act(...) is not supported in production builds of React.")}s.Children={map:U,forEach:function(e,t,n){U(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return U(e,(function(){t++})),t},toArray:function(e){return U(e,(function(e){return e}))||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},s.Component=O,s.Fragment=d,s.Profiler=p,s.PureComponent=P,s.StrictMode=f,s.Suspense=g,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,s.act=Y,s.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=k({},e.props),a=e.key,o=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,i=C.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)T.call(t,s)&&!N.hasOwnProperty(s)&&(r[s]=void 0===t[s]&&void 0!==u?u[s]:t[s])}var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){u=Array(s);for(var c=0;c<s;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:l,type:e.type,key:a,ref:o,props:r,_owner:i}},s.createContext=function(e){return(e={$$typeof:h,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:v,_context:e},e.Consumer=e},s.createElement=D,s.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},s.createRef=function(){return{current:null}},s.forwardRef=function(e){return{$$typeof:m,render:e}},s.isValidElement=j,s.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:A}},s.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},s.startTransition=function(e){var t=z.transition;z.transition={};try{e()}finally{z.transition=t}},s.unstable_act=Y,s.useCallback=function(e,t){return F.current.useCallback(e,t)},s.useContext=function(e){return F.current.useContext(e)},s.useDebugValue=function(){},s.useDeferredValue=function(e){return F.current.useDeferredValue(e)},s.useEffect=function(e,t){return F.current.useEffect(e,t)},s.useId=function(){return F.current.useId()},s.useImperativeHandle=function(e,t,n){return F.current.useImperativeHandle(e,t,n)},s.useInsertionEffect=function(e,t){return F.current.useInsertionEffect(e,t)},s.useLayoutEffect=function(e,t){return F.current.useLayoutEffect(e,t)},s.useMemo=function(e,t){return F.current.useMemo(e,t)},s.useReducer=function(e,t,n){return F.current.useReducer(e,t,n)},s.useRef=function(e){return F.current.useRef(e)},s.useState=function(e){return F.current.useState(e)},s.useSyncExternalStore=function(e,t,n){return F.current.useSyncExternalStore(e,t,n)},s.useTransition=function(){return F.current.useTransition()},s.version="18.3.1",u.exports=s;var H=i(u.exports),B={exports:{}},q={},V={exports:{}},Q={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var u=2*(r+1)-1,s=e[u],l=u+1,c=e[l];if(0>a(s,n))l<o&&0>a(c,s)?(e[r]=c,e[l]=n,r=l):(e[r]=s,e[u]=n,r=u);else{if(!(l<o&&0>a(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],l=[],c=1,d=null,f=3,p=!1,v=!1,h=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function x(e){for(var a=n(l);null!==a;){if(null===a.callback)r(l);else{if(!(a.startTime<=e))break;r(l),a.sortIndex=a.expirationTime,t(s,a)}a=n(l)}}function b(e){if(h=!1,x(e),!v)if(null!==n(s))v=!0,D(w);else{var t=n(l);null!==t&&j(b,t.startTime-e)}}function w(t,a){v=!1,h&&(h=!1,g(S),S=-1),p=!0;var o=f;try{for(x(a),d=n(s);null!==d&&(!(d.expirationTime>a)||t&&!M());){var i=d.callback;if("function"==typeof i){d.callback=null,f=d.priorityLevel;var u=i(d.expirationTime<=a);a=e.unstable_now(),"function"==typeof u?d.callback=u:d===n(s)&&r(s),x(a)}else r(s);d=n(s)}if(null!==d)var c=!0;else{var m=n(l);null!==m&&j(b,m.startTime-a),c=!1}return c}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,_=!1,O=null,S=-1,P=5,E=-1;function M(){return!(e.unstable_now()-E<P)}function T(){if(null!==O){var t=e.unstable_now();E=t;var n=!0;try{n=O(!0,t)}finally{n?k():(_=!1,O=null)}}else _=!1}if("function"==typeof y)k=function(){y(T)};else if("undefined"!=typeof MessageChannel){var C=new MessageChannel,N=C.port2;C.port1.onmessage=T,k=function(){N.postMessage(null)}}else k=function(){m(T,0)};function D(e){O=e,_||(_=!0,k())}function j(t,n){S=m((function(){t(e.unstable_now())}),n)}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(e){e.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,D(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,a,o){var i=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?i+o:i:o=i,r){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return r={id:c++,callback:a,priorityLevel:r,startTime:o,expirationTime:u=o+u,sortIndex:-1},o>i?(r.sortIndex=o,t(l,r),null===n(s)&&r===n(l)&&(h?(g(S),S=-1):h=!0,j(b,o-i))):(r.sortIndex=u,t(s,r),v||p||(v=!0,D(w))),r},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Q),function(e){e.exports=Q}(V);var $=u.exports,K=V.exports;function J(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 X=new Set,G={};function Z(e,t){ee(e,t),ee(e+"Capture",t)}function ee(e,t){for(G[e]=t,e=0;e<t.length;e++)X.add(t[e])}var te=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ne=Object.prototype.hasOwnProperty,re=/^[: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]*$/,ae={},oe={};function ie(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ue[e]=new ie(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ue[t]=new ie(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ue[e]=new ie(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ue[e]=new ie(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){ue[e]=new ie(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ue[e]=new ie(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){ue[e]=new ie(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){ue[e]=new ie(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){ue[e]=new ie(e,5,!1,e.toLowerCase(),null,!1,!1)}));var se=/[\-:]([a-z])/g;function le(e){return e[1].toUpperCase()}function ce(e,t,n,r){var a=ue.hasOwnProperty(t)?ue[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!ne.call(oe,e)||!ne.call(ae,e)&&(re.test(e)?oe[e]=!0:(ae[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(se,le);ue[t]=new ie(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(se,le);ue[t]=new ie(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(se,le);ue[t]=new ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){ue[e]=new ie(e,1,!1,e.toLowerCase(),null,!1,!1)})),ue.xlinkHref=new ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){ue[e]=new ie(e,1,!1,e.toLowerCase(),null,!0,!0)}));var de=$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fe=Symbol.for("react.element"),pe=Symbol.for("react.portal"),ve=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),ge=Symbol.for("react.provider"),ye=Symbol.for("react.context"),xe=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),we=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),Oe=Symbol.for("react.offscreen"),Se=Symbol.iterator;function Pe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Se&&e[Se]||e["@@iterator"])?e:null}var Ee,Me=Object.assign;function Te(e){if(void 0===Ee)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||""}return"\n"+Ee+e}var Ce=!1;function Ne(e,t){if(!e||Ce)return"";Ce=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,u=o.length-1;1<=i&&0<=u&&a[i]!==o[u];)u--;for(;1<=i&&0<=u;i--,u--)if(a[i]!==o[u]){if(1!==i||1!==u)do{if(i--,0>--u||a[i]!==o[u]){var s="\n"+a[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=i&&0<=u);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Te(e):""}function De(e){switch(e.tag){case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return Te("Suspense");case 19:return Te("SuspenseList");case 0:case 2:case 15:return e=Ne(e.type,!1);case 11:return e=Ne(e.type.render,!1);case 1:return e=Ne(e.type,!0);default:return""}}function je(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ve:return"Fragment";case pe:return"Portal";case me:return"Profiler";case he:return"StrictMode";case be:return"Suspense";case we:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ye:return(e.displayName||"Context")+".Consumer";case ge:return(e._context.displayName||"Context")+".Provider";case xe:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return null!==(t=e.displayName||null)?t:je(e.type)||"Memo";case _e:t=e._payload,e=e._init;try{return je(e(t))}catch(e){}}return null}function Ie(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=(e=t.render).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 je(t);case 8:return t===he?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Le(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ue(e){e._valueTracker||(e._valueTracker=function(e){var t=Le(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ae(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Le(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Fe(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ze(e,t){var n=t.checked;return Me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function We(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Re(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ye(e,t){null!=(t=t.checked)&&ce(e,"checked",t,!1)}function He(e,t){Ye(e,t);var n=Re(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?qe(e,t.type,n):t.hasOwnProperty("defaultValue")&&qe(e,t.type,Re(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Be(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function qe(e,t,n){"number"===t&&Fe(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ve=Array.isArray;function Qe(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Re(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function $e(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(J(91));return Me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ke(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(J(92));if(Ve(n)){if(1<n.length)throw Error(J(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Re(n)}}function Je(e,t){var n=Re(t.value),r=Re(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Xe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ge(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 Ze(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ge(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var et,tt,nt=(tt=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((et=et||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=et.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return tt(e,t)}))}:tt);function rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var at={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},ot=["Webkit","ms","Moz","O"];function it(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||at.hasOwnProperty(e)&&at[e]?(""+t).trim():t+"px"}function ut(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=it(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(at).forEach((function(e){ot.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),at[t]=at[e]}))}));var st=Me({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lt(e,t){if(t){if(st[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(J(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(J(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(J(62))}}function ct(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 dt=null;function ft(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var pt=null,vt=null,ht=null;function mt(e){if(e=co(e)){if("function"!=typeof pt)throw Error(J(280));var t=e.stateNode;t&&(t=po(t),pt(e.stateNode,e.type,t))}}function gt(e){vt?ht?ht.push(e):ht=[e]:vt=e}function yt(){if(vt){var e=vt,t=ht;if(ht=vt=null,mt(e),t)for(e=0;e<t.length;e++)mt(t[e])}}function xt(e,t){return e(t)}function bt(){}var wt=!1;function kt(e,t,n){if(wt)return e(t,n);wt=!0;try{return xt(e,t,n)}finally{wt=!1,(null!==vt||null!==ht)&&(bt(),yt())}}function _t(e,t){var n=e.stateNode;if(null===n)return null;var r=po(n);if(null===r)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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(J(231,t,typeof n));return n}var Ot=!1;if(te)try{var St={};Object.defineProperty(St,"passive",{get:function(){Ot=!0}}),window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch(tt){Ot=!1}function Pt(e,t,n,r,a,o,i,u,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Et=!1,Mt=null,Tt=!1,Ct=null,Nt={onError:function(e){Et=!0,Mt=e}};function Dt(e,t,n,r,a,o,i,u,s){Et=!1,Mt=null,Pt.apply(Nt,arguments)}function jt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function It(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Rt(e){if(jt(e)!==e)throw Error(J(188))}function Lt(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=jt(e)))throw Error(J(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Rt(a),e;if(o===r)return Rt(a),t;o=o.sibling}throw Error(J(188))}if(n.return!==r.return)n=a,r=o;else{for(var i=!1,u=a.child;u;){if(u===n){i=!0,n=a,r=o;break}if(u===r){i=!0,r=a,n=o;break}u=u.sibling}if(!i){for(u=o.child;u;){if(u===n){i=!0,n=o,r=a;break}if(u===r){i=!0,r=o,n=a;break}u=u.sibling}if(!i)throw Error(J(189))}}if(n.alternate!==r)throw Error(J(190))}if(3!==n.tag)throw Error(J(188));return n.stateNode.current===n?e:t}(e),null!==e?Ut(e):null}function Ut(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ut(e);if(null!==t)return t;e=e.sibling}return null}var At=K.unstable_scheduleCallback,Ft=K.unstable_cancelCallback,zt=K.unstable_shouldYield,Wt=K.unstable_requestPaint,Yt=K.unstable_now,Ht=K.unstable_getCurrentPriorityLevel,Bt=K.unstable_ImmediatePriority,qt=K.unstable_UserBlockingPriority,Vt=K.unstable_NormalPriority,Qt=K.unstable_LowPriority,$t=K.unstable_IdlePriority,Kt=null,Jt=null;var Xt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Gt(e)/Zt|0)|0},Gt=Math.log,Zt=Math.LN2;var en=64,tn=4194304;function nn(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var u=i&~a;0!==u?r=nn(u):0!==(o&=i)&&(r=nn(o))}else 0!==(i=n&~a)?r=nn(i):0!==o&&(r=nn(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-Xt(t)),r|=e[n],t&=~a;return r}function an(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;default:return-1}}function on(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function un(){var e=en;return 0==(4194240&(en<<=1))&&(en=64),e}function sn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ln(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-Xt(t)]=n}function cn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xt(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var dn=0;function fn(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var pn,vn,hn,mn,gn,yn=!1,xn=[],bn=null,wn=null,kn=null,_n=new Map,On=new Map,Sn=[],Pn="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 En(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":_n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":On.delete(t.pointerId)}}function Mn(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&(null!==(t=co(t))&&vn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function Tn(e){var t=lo(e.target);if(null!==t){var n=jt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=It(n)))return e.blockedOn=t,void gn(e.priority,(function(){hn(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Cn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=co(n))&&vn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);dt=r,n.target.dispatchEvent(r),dt=null,t.shift()}return!0}function Nn(e,t,n){Cn(e)&&n.delete(t)}function Dn(){yn=!1,null!==bn&&Cn(bn)&&(bn=null),null!==wn&&Cn(wn)&&(wn=null),null!==kn&&Cn(kn)&&(kn=null),_n.forEach(Nn),On.forEach(Nn)}function jn(e,t){e.blockedOn===t&&(e.blockedOn=null,yn||(yn=!0,K.unstable_scheduleCallback(K.unstable_NormalPriority,Dn)))}function In(e){function t(t){return jn(t,e)}if(0<xn.length){jn(xn[0],e);for(var n=1;n<xn.length;n++){var r=xn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bn&&jn(bn,e),null!==wn&&jn(wn,e),null!==kn&&jn(kn,e),_n.forEach(t),On.forEach(t),n=0;n<Sn.length;n++)(r=Sn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Sn.length&&null===(n=Sn[0]).blockedOn;)Tn(n),null===n.blockedOn&&Sn.shift()}var Rn=de.ReactCurrentBatchConfig,Ln=!0;function Un(e,t,n,r){var a=dn,o=Rn.transition;Rn.transition=null;try{dn=1,Fn(e,t,n,r)}finally{dn=a,Rn.transition=o}}function An(e,t,n,r){var a=dn,o=Rn.transition;Rn.transition=null;try{dn=4,Fn(e,t,n,r)}finally{dn=a,Rn.transition=o}}function Fn(e,t,n,r){if(Ln){var a=Wn(e,t,n,r);if(null===a)Ra(e,t,r,zn,n),En(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return bn=Mn(bn,e,t,n,r,a),!0;case"dragenter":return wn=Mn(wn,e,t,n,r,a),!0;case"mouseover":return kn=Mn(kn,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return _n.set(o,Mn(_n.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,On.set(o,Mn(On.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(En(e,r),4&t&&-1<Pn.indexOf(e)){for(;null!==a;){var o=co(a);if(null!==o&&pn(o),null===(o=Wn(e,t,n,r))&&Ra(e,t,r,zn,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else Ra(e,t,r,null,n)}}var zn=null;function Wn(e,t,n,r){if(zn=null,null!==(e=lo(e=ft(r))))if(null===(t=jt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=It(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return zn=e,null}function Yn(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ht()){case Bt:return 1;case qt:return 4;case Vt:case Qt:return 16;case $t:return 536870912;default:return 16}default:return 16}}var Hn=null,Bn=null,qn=null;function Vn(){if(qn)return qn;var e,t,n=Bn,r=n.length,a="value"in Hn?Hn.value:Hn.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return qn=a.slice(e,1<t?1-t:void 0)}function Qn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function $n(){return!0}function Kn(){return!1}function Jn(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?$n:Kn,this.isPropagationStopped=Kn,this}return Me(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=$n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=$n)},persist:function(){},isPersistent:$n}),t}var Xn,Gn,Zn,er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tr=Jn(er),nr=Me({},er,{view:0,detail:0}),rr=Jn(nr),ar=Me({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zn&&(Zn&&"mousemove"===e.type?(Xn=e.screenX-Zn.screenX,Gn=e.screenY-Zn.screenY):Gn=Xn=0,Zn=e),Xn)},movementY:function(e){return"movementY"in e?e.movementY:Gn}}),or=Jn(ar),ir=Jn(Me({},ar,{dataTransfer:0})),ur=Jn(Me({},nr,{relatedTarget:0})),sr=Jn(Me({},er,{animationName:0,elapsedTime:0,pseudoElement:0})),lr=Me({},er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cr=Jn(lr),dr=Jn(Me({},er,{data:0})),fr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pr={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"},vr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=vr[e])&&!!t[e]}function mr(){return hr}var gr=Me({},nr,{key:function(e){if(e.key){var t=fr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mr,charCode:function(e){return"keypress"===e.type?Qn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),yr=Jn(gr),xr=Jn(Me({},ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),br=Jn(Me({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mr})),wr=Jn(Me({},er,{propertyName:0,elapsedTime:0,pseudoElement:0})),kr=Me({},ar,{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}),_r=Jn(kr),Or=[9,13,27,32],Sr=te&&"CompositionEvent"in window,Pr=null;te&&"documentMode"in document&&(Pr=document.documentMode);var Er=te&&"TextEvent"in window&&!Pr,Mr=te&&(!Sr||Pr&&8<Pr&&11>=Pr),Tr=String.fromCharCode(32),Cr=!1;function Nr(e,t){switch(e){case"keyup":return-1!==Or.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var jr=!1;var Ir={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 Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ir[e.type]:"textarea"===t}function Lr(e,t,n,r){gt(r),0<(t=Ua(t,"onChange")).length&&(n=new tr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ur=null,Ar=null;function Fr(e){Ta(e,0)}function zr(e){if(Ae(fo(e)))return e}function Wr(e,t){if("change"===e)return t}var Yr=!1;if(te){var Hr;if(te){var Br="oninput"in document;if(!Br){var qr=document.createElement("div");qr.setAttribute("oninput","return;"),Br="function"==typeof qr.oninput}Hr=Br}else Hr=!1;Yr=Hr&&(!document.documentMode||9<document.documentMode)}function Vr(){Ur&&(Ur.detachEvent("onpropertychange",Qr),Ar=Ur=null)}function Qr(e){if("value"===e.propertyName&&zr(Ar)){var t=[];Lr(t,Ar,e,ft(e)),kt(Fr,t)}}function $r(e,t,n){"focusin"===e?(Vr(),Ar=n,(Ur=t).attachEvent("onpropertychange",Qr)):"focusout"===e&&Vr()}function Kr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return zr(Ar)}function Jr(e,t){if("click"===e)return zr(t)}function Xr(e,t){if("input"===e||"change"===e)return zr(t)}var Gr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Zr(e,t){if(Gr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 a=n[r];if(!ne.call(t,a)||!Gr(e[a],t[a]))return!1}return!0}function ea(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ta(e,t){var n,r=ea(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ea(r)}}function na(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?na(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ra(){for(var e=window,t=Fe();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Fe((e=t.contentWindow).document)}return t}function aa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function oa(e){var t=ra(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&na(n.ownerDocument.documentElement,n)){if(null!==r&&aa(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=ta(n,o);var i=ta(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ia=te&&"documentMode"in document&&11>=document.documentMode,ua=null,sa=null,la=null,ca=!1;function da(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ca||null==ua||ua!==Fe(r)||("selectionStart"in(r=ua)&&aa(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},la&&Zr(la,r)||(la=r,0<(r=Ua(sa,"onSelect")).length&&(t=new tr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ua)))}function fa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pa={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionend:fa("Transition","TransitionEnd")},va={},ha={};function ma(e){if(va[e])return va[e];if(!pa[e])return e;var t,n=pa[e];for(t in n)if(n.hasOwnProperty(t)&&t in ha)return va[e]=n[t];return e}te&&(ha=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);var ga=ma("animationend"),ya=ma("animationiteration"),xa=ma("animationstart"),ba=ma("transitionend"),wa=new Map,ka="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 _a(e,t){wa.set(e,t),Z(t,[e])}for(var Oa=0;Oa<ka.length;Oa++){var Sa=ka[Oa];_a(Sa.toLowerCase(),"on"+(Sa[0].toUpperCase()+Sa.slice(1)))}_a(ga,"onAnimationEnd"),_a(ya,"onAnimationIteration"),_a(xa,"onAnimationStart"),_a("dblclick","onDoubleClick"),_a("focusin","onFocus"),_a("focusout","onBlur"),_a(ba,"onTransitionEnd"),ee("onMouseEnter",["mouseout","mouseover"]),ee("onMouseLeave",["mouseout","mouseover"]),ee("onPointerEnter",["pointerout","pointerover"]),ee("onPointerLeave",["pointerout","pointerover"]),Z("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Z("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Z("onBeforeInput",["compositionend","keypress","textInput","paste"]),Z("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),Ea=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pa));function Ma(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,i,u,s){if(Dt.apply(this,arguments),Et){if(!Et)throw Error(J(198));var l=Mt;Et=!1,Mt=null,Tt||(Tt=!0,Ct=l)}}(r,t,void 0,e),e.currentTarget=null}function Ta(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var u=r[i],s=u.instance,l=u.currentTarget;if(u=u.listener,s!==o&&a.isPropagationStopped())break e;Ma(a,u,l),o=s}else for(i=0;i<r.length;i++){if(s=(u=r[i]).instance,l=u.currentTarget,u=u.listener,s!==o&&a.isPropagationStopped())break e;Ma(a,u,l),o=s}}}if(Tt)throw e=Ct,Tt=!1,Ct=null,e}function Ca(e,t){var n=t[io];void 0===n&&(n=t[io]=new Set);var r=e+"__bubble";n.has(r)||(Ia(t,e,2,!1),n.add(r))}function Na(e,t,n){var r=0;t&&(r|=4),Ia(n,e,r,t)}var Da="_reactListening"+Math.random().toString(36).slice(2);function ja(e){if(!e[Da]){e[Da]=!0,X.forEach((function(t){"selectionchange"!==t&&(Ea.has(t)||Na(t,!1,e),Na(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Da]||(t[Da]=!0,Na("selectionchange",!1,t))}}function Ia(e,t,n,r){switch(Yn(t)){case 1:var a=Un;break;case 4:a=An;break;default:a=Fn}n=a.bind(null,t,n,e),a=void 0,!Ot||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Ra(e,t,n,r,a){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var u=r.stateNode.containerInfo;if(u===a||8===u.nodeType&&u.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;i=i.return}for(;null!==u;){if(null===(i=lo(u)))return;if(5===(s=i.tag)||6===s){r=o=i;continue e}u=u.parentNode}}r=r.return}kt((function(){var r=o,a=ft(n),i=[];e:{var u=wa.get(e);if(void 0!==u){var s=tr,l=e;switch(e){case"keypress":if(0===Qn(n))break e;case"keydown":case"keyup":s=yr;break;case"focusin":l="focus",s=ur;break;case"focusout":l="blur",s=ur;break;case"beforeblur":case"afterblur":s=ur;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=ir;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=br;break;case ga:case ya:case xa:s=sr;break;case ba:s=wr;break;case"scroll":s=rr;break;case"wheel":s=_r;break;case"copy":case"cut":case"paste":s=cr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=xr}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==u?u+"Capture":null:u;c=[];for(var p,v=r;null!==v;){var h=(p=v).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==f&&(null!=(h=_t(v,f))&&c.push(La(v,h,p)))),d)break;v=v.return}0<c.length&&(u=new s(u,l,null,n,a),i.push({event:u,listeners:c}))}}if(0==(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||n===dt||!(l=n.relatedTarget||n.fromElement)||!lo(l)&&!l[oo])&&(s||u)&&(u=a.window===a?a:(u=a.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(l=(l=n.relatedTarget||n.toElement)?lo(l):null)&&(l!==(d=jt(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(s=null,l=r),s!==l)){if(c=or,h="onMouseLeave",f="onMouseEnter",v="mouse","pointerout"!==e&&"pointerover"!==e||(c=xr,h="onPointerLeave",f="onPointerEnter",v="pointer"),d=null==s?u:fo(s),p=null==l?u:fo(l),(u=new c(h,v+"leave",s,n,a)).target=d,u.relatedTarget=p,h=null,lo(a)===r&&((c=new c(f,v+"enter",l,n,a)).target=p,c.relatedTarget=d,h=c),d=h,s&&l)e:{for(f=l,v=0,p=c=s;p;p=Aa(p))v++;for(p=0,h=f;h;h=Aa(h))p++;for(;0<v-p;)c=Aa(c),v--;for(;0<p-v;)f=Aa(f),p--;for(;v--;){if(c===f||null!==f&&c===f.alternate)break e;c=Aa(c),f=Aa(f)}c=null}else c=null;null!==s&&Fa(i,u,s,c,!1),null!==l&&null!==d&&Fa(i,d,l,c,!0)}if("select"===(s=(u=r?fo(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var m=Wr;else if(Rr(u))if(Yr)m=Xr;else{m=Kr;var g=$r}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(m=Jr);switch(m&&(m=m(e,r))?Lr(i,m,n,a):(g&&g(e,u,r),"focusout"===e&&(g=u._wrapperState)&&g.controlled&&"number"===u.type&&qe(u,"number",u.value)),g=r?fo(r):window,e){case"focusin":(Rr(g)||"true"===g.contentEditable)&&(ua=g,sa=r,la=null);break;case"focusout":la=sa=ua=null;break;case"mousedown":ca=!0;break;case"contextmenu":case"mouseup":case"dragend":ca=!1,da(i,n,a);break;case"selectionchange":if(ia)break;case"keydown":case"keyup":da(i,n,a)}var y;if(Sr)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else jr?Nr(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Mr&&"ko"!==n.locale&&(jr||"onCompositionStart"!==x?"onCompositionEnd"===x&&jr&&(y=Vn()):(Bn="value"in(Hn=a)?Hn.value:Hn.textContent,jr=!0)),0<(g=Ua(r,x)).length&&(x=new dr(x,e,null,n,a),i.push({event:x,listeners:g}),y?x.data=y:null!==(y=Dr(n))&&(x.data=y))),(y=Er?function(e,t){switch(e){case"compositionend":return Dr(t);case"keypress":return 32!==t.which?null:(Cr=!0,Tr);case"textInput":return(e=t.data)===Tr&&Cr?null:e;default:return null}}(e,n):function(e,t){if(jr)return"compositionend"===e||!Sr&&Nr(e,t)?(e=Vn(),qn=Bn=Hn=null,jr=!1,e):null;switch(e){case"paste":default: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 Mr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ua(r,"onBeforeInput")).length&&(a=new dr("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=y))}Ta(i,t)}))}function La(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ua(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=_t(e,n))&&r.unshift(La(e,o,a)),null!=(o=_t(e,t))&&r.push(La(e,o,a))),e=e.return}return r}function Aa(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Fa(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var u=n,s=u.alternate,l=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==l&&(u=l,a?null!=(s=_t(n,o))&&i.unshift(La(n,s,u)):a||null!=(s=_t(n,o))&&i.push(La(n,s,u))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var za=/\r\n?/g,Wa=/\u0000|\uFFFD/g;function Ya(e){return("string"==typeof e?e:""+e).replace(za,"\n").replace(Wa,"")}function Ha(e,t,n){if(t=Ya(t),Ya(e)!==t&&n)throw Error(J(425))}function Ba(){}var qa=null,Va=null;function Qa(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var $a="function"==typeof setTimeout?setTimeout:void 0,Ka="function"==typeof clearTimeout?clearTimeout:void 0,Ja="function"==typeof Promise?Promise:void 0,Xa="function"==typeof queueMicrotask?queueMicrotask:void 0!==Ja?function(e){return Ja.resolve(null).then(e).catch(Ga)}:$a;function Ga(e){setTimeout((function(){throw e}))}function Za(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)){if(0===r)return e.removeChild(a),void In(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=a}while(n);In(t)}function eo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function to(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var no=Math.random().toString(36).slice(2),ro="__reactFiber$"+no,ao="__reactProps$"+no,oo="__reactContainer$"+no,io="__reactEvents$"+no,uo="__reactListeners$"+no,so="__reactHandles$"+no;function lo(e){var t=e[ro];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oo]||n[ro]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=to(e);null!==e;){if(n=e[ro])return n;e=to(e)}return t}n=(e=n).parentNode}return null}function co(e){return!(e=e[ro]||e[oo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function fo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(J(33))}function po(e){return e[ao]||null}var vo=[],ho=-1;function mo(e){return{current:e}}function go(e){0>ho||(e.current=vo[ho],vo[ho]=null,ho--)}function yo(e,t){ho++,vo[ho]=e.current,e.current=t}var xo={},bo=mo(xo),wo=mo(!1),ko=xo;function _o(e,t){var n=e.type.contextTypes;if(!n)return xo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oo(e){return null!=(e=e.childContextTypes)}function So(){go(wo),go(bo)}function Po(e,t,n){if(bo.current!==xo)throw Error(J(168));yo(bo,t),yo(wo,n)}function Eo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(J(108,Ie(e)||"Unknown",a));return Me({},n,r)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xo,ko=bo.current,yo(bo,e),yo(wo,wo.current),!0}function To(e,t,n){var r=e.stateNode;if(!r)throw Error(J(169));n?(e=Eo(e,t,ko),r.__reactInternalMemoizedMergedChildContext=e,go(wo),go(bo),yo(bo,e)):go(wo),yo(wo,n)}var Co=null,No=!1,Do=!1;function jo(e){null===Co?Co=[e]:Co.push(e)}function Io(){if(!Do&&null!==Co){Do=!0;var e=0,t=dn;try{var n=Co;for(dn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Co=null,No=!1}catch(t){throw null!==Co&&(Co=Co.slice(e+1)),At(Bt,Io),t}finally{dn=t,Do=!1}}return null}var Ro=[],Lo=0,Uo=null,Ao=0,Fo=[],zo=0,Wo=null,Yo=1,Ho="";function Bo(e,t){Ro[Lo++]=Ao,Ro[Lo++]=Uo,Uo=e,Ao=t}function qo(e,t,n){Fo[zo++]=Yo,Fo[zo++]=Ho,Fo[zo++]=Wo,Wo=e;var r=Yo;e=Ho;var a=32-Xt(r)-1;r&=~(1<<a),n+=1;var o=32-Xt(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,Yo=1<<32-Xt(t)+a|n<<a|r,Ho=o+e}else Yo=1<<o|n<<a|r,Ho=e}function Vo(e){null!==e.return&&(Bo(e,1),qo(e,1,0))}function Qo(e){for(;e===Uo;)Uo=Ro[--Lo],Ro[Lo]=null,Ao=Ro[--Lo],Ro[Lo]=null;for(;e===Wo;)Wo=Fo[--zo],Fo[zo]=null,Ho=Fo[--zo],Fo[zo]=null,Yo=Fo[--zo],Fo[zo]=null}var $o=null,Ko=null,Jo=!1,Xo=null;function Go(e,t){var n=kc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Zo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,$o=e,Ko=eo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,$o=e,Ko=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Wo?{id:Yo,overflow:Ho}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=kc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,$o=e,Ko=null,!0);default:return!1}}function ei(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ti(e){if(Jo){var t=Ko;if(t){var n=t;if(!Zo(e,t)){if(ei(e))throw Error(J(418));t=eo(n.nextSibling);var r=$o;t&&Zo(e,t)?Go(r,n):(e.flags=-4097&e.flags|2,Jo=!1,$o=e)}}else{if(ei(e))throw Error(J(418));e.flags=-4097&e.flags|2,Jo=!1,$o=e}}}function ni(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;$o=e}function ri(e){if(e!==$o)return!1;if(!Jo)return ni(e),Jo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Qa(e.type,e.memoizedProps)),t&&(t=Ko)){if(ei(e))throw ai(),Error(J(418));for(;t;)Go(e,t),t=eo(t.nextSibling)}if(ni(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(J(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ko=eo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ko=null}}else Ko=$o?eo(e.stateNode.nextSibling):null;return!0}function ai(){for(var e=Ko;e;)e=eo(e.nextSibling)}function oi(){Ko=$o=null,Jo=!1}function ii(e){null===Xo?Xo=[e]:Xo.push(e)}var ui=de.ReactCurrentBatchConfig;function si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(J(309));var r=n.stateNode}if(!r)throw Error(J(147,e));var a=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(J(284));if(!n._owner)throw Error(J(290,e))}return e}function li(e,t){throw e=Object.prototype.toString.call(t),Error(J(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ci(e){return(0,e._init)(e._payload)}function di(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Oc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Mc(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){var o=n.type;return o===ve?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===_e&&ci(o)===t.type)?((r=a(t,n.props)).ref=si(e,t,n),r.return=e,r):((r=Sc(n.type,n.key,n.props,null,e.mode,r)).ref=si(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Tc(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Mc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case fe:return(n=Sc(t.type,t.key,t.props,null,e.mode,n)).ref=si(e,null,t),n.return=e,n;case pe:return(t=Tc(t,e.mode,n)).return=e,t;case _e:return d(e,(0,t._init)(t._payload),n)}if(Ve(t)||Pe(t))return(t=Pc(t,e.mode,n,null)).return=e,t;li(e,t)}return null}function f(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==a?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case fe:return n.key===a?s(e,t,n,r):null;case pe:return n.key===a?l(e,t,n,r):null;case _e:return f(e,t,(a=n._init)(n._payload),r)}if(Ve(n)||Pe(n))return null!==a?null:c(e,t,n,r,null);li(e,n)}return null}function p(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case fe:return s(t,e=e.get(null===r.key?n:r.key)||null,r,a);case pe:return l(t,e=e.get(null===r.key?n:r.key)||null,r,a);case _e:return p(e,t,n,(0,r._init)(r._payload),a)}if(Ve(r)||Pe(r))return c(t,e=e.get(n)||null,r,a,null);li(t,r)}return null}function v(a,i,u,s){for(var l=null,c=null,v=i,h=i=0,m=null;null!==v&&h<u.length;h++){v.index>h?(m=v,v=null):m=v.sibling;var g=f(a,v,u[h],s);if(null===g){null===v&&(v=m);break}e&&v&&null===g.alternate&&t(a,v),i=o(g,i,h),null===c?l=g:c.sibling=g,c=g,v=m}if(h===u.length)return n(a,v),Jo&&Bo(a,h),l;if(null===v){for(;h<u.length;h++)null!==(v=d(a,u[h],s))&&(i=o(v,i,h),null===c?l=v:c.sibling=v,c=v);return Jo&&Bo(a,h),l}for(v=r(a,v);h<u.length;h++)null!==(m=p(v,a,h,u[h],s))&&(e&&null!==m.alternate&&v.delete(null===m.key?h:m.key),i=o(m,i,h),null===c?l=m:c.sibling=m,c=m);return e&&v.forEach((function(e){return t(a,e)})),Jo&&Bo(a,h),l}function h(a,i,u,s){var l=Pe(u);if("function"!=typeof l)throw Error(J(150));if(null==(u=l.call(u)))throw Error(J(151));for(var c=l=null,v=i,h=i=0,m=null,g=u.next();null!==v&&!g.done;h++,g=u.next()){v.index>h?(m=v,v=null):m=v.sibling;var y=f(a,v,g.value,s);if(null===y){null===v&&(v=m);break}e&&v&&null===y.alternate&&t(a,v),i=o(y,i,h),null===c?l=y:c.sibling=y,c=y,v=m}if(g.done)return n(a,v),Jo&&Bo(a,h),l;if(null===v){for(;!g.done;h++,g=u.next())null!==(g=d(a,g.value,s))&&(i=o(g,i,h),null===c?l=g:c.sibling=g,c=g);return Jo&&Bo(a,h),l}for(v=r(a,v);!g.done;h++,g=u.next())null!==(g=p(v,a,h,g.value,s))&&(e&&null!==g.alternate&&v.delete(null===g.key?h:g.key),i=o(g,i,h),null===c?l=g:c.sibling=g,c=g);return e&&v.forEach((function(e){return t(a,e)})),Jo&&Bo(a,h),l}return function e(r,o,u,s){if("object"==typeof u&&null!==u&&u.type===ve&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case fe:e:{for(var l=u.key,c=o;null!==c;){if(c.key===l){if((l=u.type)===ve){if(7===c.tag){n(r,c.sibling),(o=a(c,u.props.children)).return=r,r=o;break e}}else if(c.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===_e&&ci(l)===c.type){n(r,c.sibling),(o=a(c,u.props)).ref=si(r,c,u),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}u.type===ve?((o=Pc(u.props.children,r.mode,s,u.key)).return=r,r=o):((s=Sc(u.type,u.key,u.props,null,r.mode,s)).ref=si(r,o,u),s.return=r,r=s)}return i(r);case pe:e:{for(c=u.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===u.containerInfo&&o.stateNode.implementation===u.implementation){n(r,o.sibling),(o=a(o,u.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Tc(u,r.mode,s)).return=r,r=o}return i(r);case _e:return e(r,o,(c=u._init)(u._payload),s)}if(Ve(u))return v(r,o,u,s);if(Pe(u))return h(r,o,u,s);li(r,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==o&&6===o.tag?(n(r,o.sibling),(o=a(o,u)).return=r,r=o):(n(r,o),(o=Mc(u,r.mode,s)).return=r,r=o),i(r)):n(r,o)}}var fi=di(!0),pi=di(!1),vi=mo(null),hi=null,mi=null,gi=null;function yi(){gi=mi=hi=null}function xi(e){var t=vi.current;go(vi),e._currentValue=t}function bi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wi(e,t){hi=e,gi=mi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(cs=!0),e.firstContext=null)}function ki(e){var t=e._currentValue;if(gi!==e)if(e={context:e,memoizedValue:t,next:null},null===mi){if(null===hi)throw Error(J(308));mi=e,hi.dependencies={lanes:0,firstContext:e}}else mi=mi.next=e;return t}var _i=null;function Oi(e){null===_i?_i=[e]:_i.push(e)}function Si(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,Oi(t)):(n.next=a.next,a.next=n),t.interleaved=n,Pi(e,r)}function Pi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ei=!1;function Mi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ti(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 Ci(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ni(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&xl)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Pi(e,n)}return null===(a=r.interleaved)?(t.next=t,Oi(r)):(t.next=a.next,a.next=t),r.interleaved=t,Pi(e,n)}function Di(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,cn(e,n)}}function ji(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ii(e,t,n,r){var a=e.updateQueue;Ei=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,u=a.shared.pending;if(null!==u){a.shared.pending=null;var s=u,l=s.next;s.next=null,null===i?o=l:i.next=l,i=s;var c=e.alternate;null!==c&&((u=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===u?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(i=0,c=l=s=null,u=o;;){var f=u.lane,p=u.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var v=e,h=u;switch(f=t,p=n,h.tag){case 1:if("function"==typeof(v=h.payload)){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=-65537&v.flags|128;case 0:if(null==(f="function"==typeof(v=h.payload)?v.call(p,d,f):v))break e;d=Me({},d,f);break e;case 2:Ei=!0}}null!==u.callback&&0!==u.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[u]:f.push(u))}else p={eventTime:p,lane:f,tag:u.tag,payload:u.payload,callback:u.callback,next:null},null===c?(l=c=p,s=d):c=c.next=p,i|=f;if(null===(u=u.next)){if(null===(u=a.shared.pending))break;u=(f=u).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=l,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);El|=i,e.lanes=i,e.memoizedState=d}}function Ri(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(J(191,a));a.call(r)}}}var Li={},Ui=mo(Li),Ai=mo(Li),Fi=mo(Li);function zi(e){if(e===Li)throw Error(J(174));return e}function Wi(e,t){switch(yo(Fi,t),yo(Ai,e),yo(Ui,Li),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ze(null,"");break;default:t=Ze(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}go(Ui),yo(Ui,t)}function Yi(){go(Ui),go(Ai),go(Fi)}function Hi(e){zi(Fi.current);var t=zi(Ui.current),n=Ze(t,e.type);t!==n&&(yo(Ai,e),yo(Ui,n))}function Bi(e){Ai.current===e&&(go(Ui),go(Ai))}var qi=mo(0);function Vi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Qi=[];function $i(){for(var e=0;e<Qi.length;e++)Qi[e]._workInProgressVersionPrimary=null;Qi.length=0}var Ki=de.ReactCurrentDispatcher,Ji=de.ReactCurrentBatchConfig,Xi=0,Gi=null,Zi=null,eu=null,tu=!1,nu=!1,ru=0,au=0;function ou(){throw Error(J(321))}function iu(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gr(e[n],t[n]))return!1;return!0}function uu(e,t,n,r,a,o){if(Xi=o,Gi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ki.current=null===e||null===e.memoizedState?Bu:qu,e=n(r,a),nu){o=0;do{if(nu=!1,ru=0,25<=o)throw Error(J(301));o+=1,eu=Zi=null,t.updateQueue=null,Ki.current=Vu,e=n(r,a)}while(nu)}if(Ki.current=Hu,t=null!==Zi&&null!==Zi.next,Xi=0,eu=Zi=Gi=null,tu=!1,t)throw Error(J(300));return e}function su(){var e=0!==ru;return ru=0,e}function lu(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===eu?Gi.memoizedState=eu=e:eu=eu.next=e,eu}function cu(){if(null===Zi){var e=Gi.alternate;e=null!==e?e.memoizedState:null}else e=Zi.next;var t=null===eu?Gi.memoizedState:eu.next;if(null!==t)eu=t,Zi=e;else{if(null===e)throw Error(J(310));e={memoizedState:(Zi=e).memoizedState,baseState:Zi.baseState,baseQueue:Zi.baseQueue,queue:Zi.queue,next:null},null===eu?Gi.memoizedState=eu=e:eu=eu.next=e}return eu}function du(e,t){return"function"==typeof t?t(e):t}function fu(e){var t=cu(),n=t.queue;if(null===n)throw Error(J(311));n.lastRenderedReducer=e;var r=Zi,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var i=a.next;a.next=o.next,o.next=i}r.baseQueue=a=o,n.pending=null}if(null!==a){o=a.next,r=r.baseState;var u=i=null,s=null,l=o;do{var c=l.lane;if((Xi&c)===c)null!==s&&(s=s.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===s?(u=s=d,i=r):s=s.next=d,Gi.lanes|=c,El|=c}l=l.next}while(null!==l&&l!==o);null===s?i=r:s.next=u,Gr(r,t.memoizedState)||(cs=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}if(null!==(e=n.interleaved)){a=e;do{o=a.lane,Gi.lanes|=o,El|=o,a=a.next}while(a!==e)}else null===a&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pu(e){var t=cu(),n=t.queue;if(null===n)throw Error(J(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{o=e(o,i.action),i=i.next}while(i!==a);Gr(o,t.memoizedState)||(cs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vu(){}function hu(e,t){var n=Gi,r=cu(),a=t(),o=!Gr(r.memoizedState,a);if(o&&(r.memoizedState=a,cs=!0),r=r.queue,Eu(yu.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==eu&&1&eu.memoizedState.tag){if(n.flags|=2048,ku(9,gu.bind(null,n,r,a,t),void 0,null),null===bl)throw Error(J(349));0!=(30&Xi)||mu(n,t,a)}return a}function mu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Gi.updateQueue)?(t={lastEffect:null,stores:null},Gi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function gu(e,t,n,r){t.value=n,t.getSnapshot=r,xu(t)&&bu(e)}function yu(e,t,n){return n((function(){xu(t)&&bu(e)}))}function xu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gr(e,n)}catch(e){return!0}}function bu(e){var t=Pi(e,1);null!==t&&Ql(t,e,1,-1)}function wu(e){var t=lu();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:du,lastRenderedState:e},t.queue=e,e=e.dispatch=Fu.bind(null,Gi,e),[t.memoizedState,e]}function ku(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Gi.updateQueue)?(t={lastEffect:null,stores:null},Gi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function _u(){return cu().memoizedState}function Ou(e,t,n,r){var a=lu();Gi.flags|=e,a.memoizedState=ku(1|t,n,void 0,void 0===r?null:r)}function Su(e,t,n,r){var a=cu();r=void 0===r?null:r;var o=void 0;if(null!==Zi){var i=Zi.memoizedState;if(o=i.destroy,null!==r&&iu(r,i.deps))return void(a.memoizedState=ku(t,n,o,r))}Gi.flags|=e,a.memoizedState=ku(1|t,n,o,r)}function Pu(e,t){return Ou(8390656,8,e,t)}function Eu(e,t){return Su(2048,8,e,t)}function Mu(e,t){return Su(4,2,e,t)}function Tu(e,t){return Su(4,4,e,t)}function Cu(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Nu(e,t,n){return n=null!=n?n.concat([e]):null,Su(4,4,Cu.bind(null,t,e),n)}function Du(){}function ju(e,t){var n=cu();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&iu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Iu(e,t){var n=cu();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&iu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ru(e,t,n){return 0==(21&Xi)?(e.baseState&&(e.baseState=!1,cs=!0),e.memoizedState=n):(Gr(n,t)||(n=un(),Gi.lanes|=n,El|=n,e.baseState=!0),t)}function Lu(e,t){var n=dn;dn=0!==n&&4>n?n:4,e(!0);var r=Ji.transition;Ji.transition={};try{e(!1),t()}finally{dn=n,Ji.transition=r}}function Uu(){return cu().memoizedState}function Au(e,t,n){var r=Vl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zu(e))Wu(t,n);else if(null!==(n=Si(e,t,n,r))){Ql(n,e,r,ql()),Yu(n,t,r)}}function Fu(e,t,n){var r=Vl(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zu(e))Wu(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,u=o(i,n);if(a.hasEagerState=!0,a.eagerState=u,Gr(u,i)){var s=t.interleaved;return null===s?(a.next=a,Oi(t)):(a.next=s.next,s.next=a),void(t.interleaved=a)}}catch(e){}null!==(n=Si(e,t,a,r))&&(Ql(n,e,r,a=ql()),Yu(n,t,r))}}function zu(e){var t=e.alternate;return e===Gi||null!==t&&t===Gi}function Wu(e,t){nu=tu=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yu(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,cn(e,n)}}var Hu={readContext:ki,useCallback:ou,useContext:ou,useEffect:ou,useImperativeHandle:ou,useInsertionEffect:ou,useLayoutEffect:ou,useMemo:ou,useReducer:ou,useRef:ou,useState:ou,useDebugValue:ou,useDeferredValue:ou,useTransition:ou,useMutableSource:ou,useSyncExternalStore:ou,useId:ou,unstable_isNewReconciler:!1},Bu={readContext:ki,useCallback:function(e,t){return lu().memoizedState=[e,void 0===t?null:t],e},useContext:ki,useEffect:Pu,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ou(4194308,4,Cu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ou(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ou(4,2,e,t)},useMemo:function(e,t){var n=lu();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lu();return t=void 0!==n?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=Au.bind(null,Gi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},lu().memoizedState=e},useState:wu,useDebugValue:Du,useDeferredValue:function(e){return lu().memoizedState=e},useTransition:function(){var e=wu(!1),t=e[0];return e=Lu.bind(null,e[1]),lu().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Gi,a=lu();if(Jo){if(void 0===n)throw Error(J(407));n=n()}else{if(n=t(),null===bl)throw Error(J(349));0!=(30&Xi)||mu(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Pu(yu.bind(null,r,o,e),[e]),r.flags|=2048,ku(9,gu.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lu(),t=bl.identifierPrefix;if(Jo){var n=Ho;t=":"+t+"R"+(n=(Yo&~(1<<32-Xt(Yo)-1)).toString(32)+n),0<(n=ru++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=au++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qu={readContext:ki,useCallback:ju,useContext:ki,useEffect:Eu,useImperativeHandle:Nu,useInsertionEffect:Mu,useLayoutEffect:Tu,useMemo:Iu,useReducer:fu,useRef:_u,useState:function(){return fu(du)},useDebugValue:Du,useDeferredValue:function(e){return Ru(cu(),Zi.memoizedState,e)},useTransition:function(){return[fu(du)[0],cu().memoizedState]},useMutableSource:vu,useSyncExternalStore:hu,useId:Uu,unstable_isNewReconciler:!1},Vu={readContext:ki,useCallback:ju,useContext:ki,useEffect:Eu,useImperativeHandle:Nu,useInsertionEffect:Mu,useLayoutEffect:Tu,useMemo:Iu,useReducer:pu,useRef:_u,useState:function(){return pu(du)},useDebugValue:Du,useDeferredValue:function(e){var t=cu();return null===Zi?t.memoizedState=e:Ru(t,Zi.memoizedState,e)},useTransition:function(){return[pu(du)[0],cu().memoizedState]},useMutableSource:vu,useSyncExternalStore:hu,useId:Uu,unstable_isNewReconciler:!1};function Qu(e,t){if(e&&e.defaultProps){for(var n in t=Me({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function $u(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Me({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ku={isMounted:function(e){return!!(e=e._reactInternals)&&jt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ql(),a=Vl(e),o=Ci(r,a);o.payload=t,null!=n&&(o.callback=n),null!==(t=Ni(e,o,a))&&(Ql(t,e,a,r),Di(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ql(),a=Vl(e),o=Ci(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Ni(e,o,a))&&(Ql(t,e,a,r),Di(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ql(),r=Vl(e),a=Ci(n,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Ni(e,a,r))&&(Ql(t,e,r,n),Di(t,e,r))}};function Ju(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!Zr(n,r)||!Zr(a,o))}function Xu(e,t,n){var r=!1,a=xo,o=t.contextType;return"object"==typeof o&&null!==o?o=ki(o):(a=Oo(t)?ko:bo.current,o=(r=null!=(r=t.contextTypes))?_o(e,a):xo),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ku,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function Gu(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ku.enqueueReplaceState(t,t.state,null)}function Zu(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Mi(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=ki(o):(o=Oo(t)?ko:bo.current,a.context=_o(e,o)),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&($u(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&Ku.enqueueReplaceState(a,a.state,null),Ii(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function es(e,t){try{var n="",r=t;do{n+=De(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a,digest:null}}function ts(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ns(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var rs="function"==typeof WeakMap?WeakMap:Map;function as(e,t,n){(n=Ci(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rl||(Rl=!0,Ll=r),ns(0,t)},n}function os(e,t,n){(n=Ci(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){ns(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ns(0,t),"function"!=typeof r&&(null===Ul?Ul=new Set([this]):Ul.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function is(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new rs;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=mc.bind(null,e,t,n),t.then(e,e))}function us(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ss(e,t,n,r,a){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ci(-1,1)).tag=2,Ni(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var ls=de.ReactCurrentOwner,cs=!1;function ds(e,t,n,r){t.child=null===e?pi(t,null,n,r):fi(t,e.child,n,r)}function fs(e,t,n,r,a){n=n.render;var o=t.ref;return wi(t,a),r=uu(e,t,n,r,o,a),n=su(),null===e||cs?(Jo&&n&&Vo(t),t.flags|=1,ds(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Rs(e,t,a))}function ps(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||_c(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Sc(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,vs(e,t,o,r,a))}if(o=e.child,0==(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:Zr)(i,r)&&e.ref===t.ref)return Rs(e,t,a)}return t.flags|=1,(e=Oc(o,r)).ref=t.ref,e.return=t,t.child=e}function vs(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(Zr(o,r)&&e.ref===t.ref){if(cs=!1,t.pendingProps=r=o,0==(e.lanes&a))return t.lanes=e.lanes,Rs(e,t,a);0!=(131072&e.flags)&&(cs=!0)}}return gs(e,t,n,r,a)}function hs(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yo(Ol,_l),_l|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yo(Ol,_l),_l|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,yo(Ol,_l),_l|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,yo(Ol,_l),_l|=r;return ds(e,t,a,n),t.child}function ms(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gs(e,t,n,r,a){var o=Oo(n)?ko:bo.current;return o=_o(t,o),wi(t,a),n=uu(e,t,n,r,o,a),r=su(),null===e||cs?(Jo&&r&&Vo(t),t.flags|=1,ds(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Rs(e,t,a))}function ys(e,t,n,r,a){if(Oo(n)){var o=!0;Mo(t)}else o=!1;if(wi(t,a),null===t.stateNode)Is(e,t),Xu(t,n,r),Zu(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,l=n.contextType;"object"==typeof l&&null!==l?l=ki(l):l=_o(t,l=Oo(n)?ko:bo.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(u!==r||s!==l)&&Gu(t,i,r,l),Ei=!1;var f=t.memoizedState;i.state=f,Ii(t,r,i,a),s=t.memoizedState,u!==r||f!==s||wo.current||Ei?("function"==typeof c&&($u(t,n,c,r),s=t.memoizedState),(u=Ei||Ju(t,n,u,r,f,s,l))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=l,r=u):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ti(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:Qu(t.type,u),i.props=l,d=t.pendingProps,f=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=ki(s):s=_o(t,s=Oo(n)?ko:bo.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(u!==d||f!==s)&&Gu(t,i,r,s),Ei=!1,f=t.memoizedState,i.state=f,Ii(t,r,i,a);var v=t.memoizedState;u!==d||f!==v||wo.current||Ei?("function"==typeof p&&($u(t,n,p,r),v=t.memoizedState),(l=Ei||Ju(t,n,l,r,f,v,s)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,v,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,v,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=s,r=l):("function"!=typeof i.componentDidUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||u===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return xs(e,t,n,r,o,a)}function xs(e,t,n,r,a,o){ms(e,t);var i=0!=(128&t.flags);if(!r&&!i)return a&&To(t,n,!1),Rs(e,t,o);r=t.stateNode,ls.current=t;var u=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=fi(t,e.child,null,o),t.child=fi(t,null,u,o)):ds(e,t,u,o),t.memoizedState=r.state,a&&To(t,n,!0),t.child}function bs(e){var t=e.stateNode;t.pendingContext?Po(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Po(0,t.context,!1),Wi(e,t.containerInfo)}function ws(e,t,n,r,a){return oi(),ii(a),t.flags|=256,ds(e,t,n,r),t.child}var ks,_s,Os,Ss,Ps={dehydrated:null,treeContext:null,retryLane:0};function Es(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ms(e,t,n){var r,a=t.pendingProps,o=qi.current,i=!1,u=0!=(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),yo(qi,1&o),null===e)return ti(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=a.children,e=a.fallback,i?(a=t.mode,i=t.child,u={mode:"hidden",children:u},0==(1&a)&&null!==i?(i.childLanes=0,i.pendingProps=u):i=Ec(u,a,0,null),e=Pc(e,a,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Es(n),t.memoizedState=Ps,e):Ts(t,u));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,a,o,i){if(n)return 256&t.flags?(t.flags&=-257,Cs(e,t,i,r=ts(Error(J(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,a=t.mode,r=Ec({mode:"visible",children:r.children},a,0,null),(o=Pc(o,a,i,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&fi(t,e.child,null,i),t.child.memoizedState=Es(i),t.memoizedState=Ps,o);if(0==(1&t.mode))return Cs(e,t,i,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var u=r.dgst;return r=u,Cs(e,t,i,r=ts(o=Error(J(419)),r,void 0))}if(u=0!=(i&e.childLanes),cs||u){if(null!==(r=bl)){switch(i&-i){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=0!=(a&(r.suspendedLanes|i))?0:a)&&a!==o.retryLane&&(o.retryLane=a,Pi(e,a),Ql(r,e,a,-1))}return ic(),Cs(e,t,i,r=ts(Error(J(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=yc.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ko=eo(a.nextSibling),$o=t,Jo=!0,Xo=null,null!==e&&(Fo[zo++]=Yo,Fo[zo++]=Ho,Fo[zo++]=Wo,Yo=e.id,Ho=e.overflow,Wo=t),t=Ts(t,r.children),t.flags|=4096,t)}(e,t,u,a,r,o,n);if(i){i=a.fallback,u=t.mode,r=(o=e.child).sibling;var s={mode:"hidden",children:a.children};return 0==(1&u)&&t.child!==o?((a=t.child).childLanes=0,a.pendingProps=s,t.deletions=null):(a=Oc(o,s)).subtreeFlags=14680064&o.subtreeFlags,null!==r?i=Oc(r,i):(i=Pc(i,u,n,null)).flags|=2,i.return=t,a.return=t,a.sibling=i,t.child=a,a=i,i=t.child,u=null===(u=e.child.memoizedState)?Es(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},i.memoizedState=u,i.childLanes=e.childLanes&~n,t.memoizedState=Ps,a}return e=(i=e.child).sibling,a=Oc(i,{mode:"visible",children:a.children}),0==(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function Ts(e,t){return(t=Ec({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Cs(e,t,n,r){return null!==r&&ii(r),fi(t,e.child,null,n),(e=Ts(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ns(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),bi(e.return,t,n)}function Ds(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function js(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ds(e,t,r.children,n),0!=(2&(r=qi.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ns(e,n,t);else if(19===e.tag)Ns(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(yo(qi,r),0==(1&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Vi(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ds(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Vi(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ds(t,!0,n,null,o);break;case"together":Ds(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Is(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),El|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(J(153));if(null!==t.child){for(n=Oc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Oc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ls(e,t){if(!Jo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Us(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function As(e,t,n){var r=t.pendingProps;switch(Qo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Us(t),null;case 1:case 17:return Oo(t.type)&&So(),Us(t),null;case 3:return r=t.stateNode,Yi(),go(wo),go(bo),$i(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ri(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Xo&&(Xl(Xo),Xo=null))),_s(e,t),Us(t),null;case 5:Bi(t);var a=zi(Fi.current);if(n=t.type,null!==e&&null!=t.stateNode)Os(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(J(166));return Us(t),null}if(e=zi(Ui.current),ri(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ro]=t,r[ao]=o,e=0!=(1&t.mode),n){case"dialog":Ca("cancel",r),Ca("close",r);break;case"iframe":case"object":case"embed":Ca("load",r);break;case"video":case"audio":for(a=0;a<Pa.length;a++)Ca(Pa[a],r);break;case"source":Ca("error",r);break;case"img":case"image":case"link":Ca("error",r),Ca("load",r);break;case"details":Ca("toggle",r);break;case"input":We(r,o),Ca("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ca("invalid",r);break;case"textarea":Ke(r,o),Ca("invalid",r)}for(var i in lt(n,o),a=null,o)if(o.hasOwnProperty(i)){var u=o[i];"children"===i?"string"==typeof u?r.textContent!==u&&(!0!==o.suppressHydrationWarning&&Ha(r.textContent,u,e),a=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==o.suppressHydrationWarning&&Ha(r.textContent,u,e),a=["children",""+u]):G.hasOwnProperty(i)&&null!=u&&"onScroll"===i&&Ca("scroll",r)}switch(n){case"input":Ue(r),Be(r,o,!0);break;case"textarea":Ue(r),Xe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Ba)}r=a,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Ge(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ro]=t,e[ao]=r,ks(e,t,!1,!1),t.stateNode=e;e:{switch(i=ct(n,r),n){case"dialog":Ca("cancel",e),Ca("close",e),a=r;break;case"iframe":case"object":case"embed":Ca("load",e),a=r;break;case"video":case"audio":for(a=0;a<Pa.length;a++)Ca(Pa[a],e);a=r;break;case"source":Ca("error",e),a=r;break;case"img":case"image":case"link":Ca("error",e),Ca("load",e),a=r;break;case"details":Ca("toggle",e),a=r;break;case"input":We(e,r),a=ze(e,r),Ca("invalid",e);break;case"option":default:a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Me({},r,{value:void 0}),Ca("invalid",e);break;case"textarea":Ke(e,r),a=$e(e,r),Ca("invalid",e)}for(o in lt(n,a),u=a)if(u.hasOwnProperty(o)){var s=u[o];"style"===o?ut(e,s):"dangerouslySetInnerHTML"===o?null!=(s=s?s.__html:void 0)&&nt(e,s):"children"===o?"string"==typeof s?("textarea"!==n||""!==s)&&rt(e,s):"number"==typeof s&&rt(e,""+s):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(G.hasOwnProperty(o)?null!=s&&"onScroll"===o&&Ca("scroll",e):null!=s&&ce(e,o,s,i))}switch(n){case"input":Ue(e),Be(e,r,!1);break;case"textarea":Ue(e),Xe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Re(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?Qe(e,!!r.multiple,o,!1):null!=r.defaultValue&&Qe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Ba)}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)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Us(t),null;case 6:if(e&&null!=t.stateNode)Ss(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(J(166));if(n=zi(Fi.current),zi(Ui.current),ri(t)){if(r=t.stateNode,n=t.memoizedProps,r[ro]=t,(o=r.nodeValue!==n)&&null!==(e=$o))switch(e.tag){case 3:Ha(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ha(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ro]=t,t.stateNode=r}return Us(t),null;case 13:if(go(qi),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Jo&&null!==Ko&&0!=(1&t.mode)&&0==(128&t.flags))ai(),oi(),t.flags|=98560,o=!1;else if(o=ri(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(J(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(J(317));o[ro]=t}else oi(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Us(t),o=!1}else null!==Xo&&(Xl(Xo),Xo=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&qi.current)?0===Sl&&(Sl=3):ic())),null!==t.updateQueue&&(t.flags|=4),Us(t),null);case 4:return Yi(),_s(e,t),null===e&&ja(t.stateNode.containerInfo),Us(t),null;case 10:return xi(t.type._context),Us(t),null;case 19:if(go(qi),null===(o=t.memoizedState))return Us(t),null;if(r=0!=(128&t.flags),null===(i=o.rendering))if(r)Ls(o,!1);else{if(0!==Sl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=Vi(e))){for(t.flags|=128,Ls(o,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(i=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return yo(qi,1&qi.current|2),t.child}e=e.sibling}null!==o.tail&&Yt()>jl&&(t.flags|=128,r=!0,Ls(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Vi(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ls(o,!0),null===o.tail&&"hidden"===o.tailMode&&!i.alternate&&!Jo)return Us(t),null}else 2*Yt()-o.renderingStartTime>jl&&1073741824!==n&&(t.flags|=128,r=!0,Ls(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=o.last)?n.sibling=i:t.child=i,o.last=i)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Yt(),t.sibling=null,n=qi.current,yo(qi,r?1&n|2:1&n),t):(Us(t),null);case 22:case 23:return nc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&_l)&&(Us(t),6&t.subtreeFlags&&(t.flags|=8192)):Us(t),null;case 24:case 25:return null}throw Error(J(156,t.tag))}function Fs(e,t){switch(Qo(t),t.tag){case 1:return Oo(t.type)&&So(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yi(),go(wo),go(bo),$i(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Bi(t),null;case 13:if(go(qi),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(J(340));oi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return go(qi),null;case 4:return Yi(),null;case 10:return xi(t.type._context),null;case 22:case 23:return nc(),null;default:return null}}ks=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_s=function(){},Os=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,zi(Ui.current);var o,i=null;switch(n){case"input":a=ze(e,a),r=ze(e,r),i=[];break;case"select":a=Me({},a,{value:void 0}),r=Me({},r,{value:void 0}),i=[];break;case"textarea":a=$e(e,a),r=$e(e,r),i=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=Ba)}for(l in lt(n,r),n=null,a)if(!r.hasOwnProperty(l)&&a.hasOwnProperty(l)&&null!=a[l])if("style"===l){var u=a[l];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(G.hasOwnProperty(l)?i||(i=[]):(i=i||[]).push(l,null));for(l in r){var s=r[l];if(u=null!=a?a[l]:void 0,r.hasOwnProperty(l)&&s!==u&&(null!=s||null!=u))if("style"===l)if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(i||(i=[]),i.push(l,n)),n=s;else"dangerouslySetInnerHTML"===l?(s=s?s.__html:void 0,u=u?u.__html:void 0,null!=s&&u!==s&&(i=i||[]).push(l,s)):"children"===l?"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(l,""+s):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(G.hasOwnProperty(l)?(null!=s&&"onScroll"===l&&Ca("scroll",e),i||u===s||(i=[])):(i=i||[]).push(l,s))}n&&(i=i||[]).push("style",n);var l=i;(t.updateQueue=l)&&(t.flags|=4)}},Ss=function(e,t,n,r){n!==r&&(t.flags|=4)};var zs=!1,Ws=!1,Ys="function"==typeof WeakSet?WeakSet:Set,Hs=null;function Bs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){hc(e,t,n)}else n.current=null}function qs(e,t,n){try{n()}catch(n){hc(e,t,n)}}var Vs=!1;function Qs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&qs(t,n,o)}a=a.next}while(a!==r)}}function $s(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 Ks(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Js(e){var t=e.alternate;null!==t&&(e.alternate=null,Js(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ro],delete t[ao],delete t[io],delete t[uo],delete t[so])),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 Xs(e){return 5===e.tag||3===e.tag||4===e.tag}function Gs(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Xs(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Zs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Ba));else if(4!==r&&null!==(e=e.child))for(Zs(e,t,n),e=e.sibling;null!==e;)Zs(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(el(e,t,n),e=e.sibling;null!==e;)el(e,t,n),e=e.sibling}var tl=null,nl=!1;function rl(e,t,n){for(n=n.child;null!==n;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Jt&&"function"==typeof Jt.onCommitFiberUnmount)try{Jt.onCommitFiberUnmount(Kt,n)}catch(e){}switch(n.tag){case 5:Ws||Bs(n,t);case 6:var r=tl,a=nl;tl=null,rl(e,t,n),nl=a,null!==(tl=r)&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):tl.removeChild(n.stateNode));break;case 18:null!==tl&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?Za(e.parentNode,n):1===e.nodeType&&Za(e,n),In(e)):Za(tl,n.stateNode));break;case 4:r=tl,a=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=a;break;case 0:case 11:case 14:case 15:if(!Ws&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(0!=(2&o)||0!=(4&o))&&qs(n,t,i),a=a.next}while(a!==r)}rl(e,t,n);break;case 1:if(!Ws&&(Bs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){hc(n,t,e)}rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:1&n.mode?(Ws=(r=Ws)||null!==n.memoizedState,rl(e,t,n),Ws=r):rl(e,t,n);break;default:rl(e,t,n)}}function ol(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ys),t.forEach((function(t){var r=xc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function il(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r];try{var o=e,i=t,u=i;e:for(;null!==u;){switch(u.tag){case 5:tl=u.stateNode,nl=!1;break e;case 3:case 4:tl=u.stateNode.containerInfo,nl=!0;break e}u=u.return}if(null===tl)throw Error(J(160));al(o,i,a),tl=null,nl=!1;var s=a.alternate;null!==s&&(s.return=null),a.return=null}catch(e){hc(a,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ul(t,e),t=t.sibling}function ul(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(il(t,e),sl(e),4&r){try{Qs(3,e,e.return),$s(3,e)}catch(t){hc(e,e.return,t)}try{Qs(5,e,e.return)}catch(t){hc(e,e.return,t)}}break;case 1:il(t,e),sl(e),512&r&&null!==n&&Bs(n,n.return);break;case 5:if(il(t,e),sl(e),512&r&&null!==n&&Bs(n,n.return),32&e.flags){var a=e.stateNode;try{rt(a,"")}catch(t){hc(e,e.return,t)}}if(4&r&&null!=(a=e.stateNode)){var o=e.memoizedProps,i=null!==n?n.memoizedProps:o,u=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===u&&"radio"===o.type&&null!=o.name&&Ye(a,o),ct(u,i);var l=ct(u,o);for(i=0;i<s.length;i+=2){var c=s[i],d=s[i+1];"style"===c?ut(a,d):"dangerouslySetInnerHTML"===c?nt(a,d):"children"===c?rt(a,d):ce(a,c,d,l)}switch(u){case"input":He(a,o);break;case"textarea":Je(a,o);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?Qe(a,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?Qe(a,!!o.multiple,o.defaultValue,!0):Qe(a,!!o.multiple,o.multiple?[]:"",!1))}a[ao]=o}catch(t){hc(e,e.return,t)}}break;case 6:if(il(t,e),sl(e),4&r){if(null===e.stateNode)throw Error(J(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){hc(e,e.return,t)}}break;case 3:if(il(t,e),sl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{In(t.containerInfo)}catch(t){hc(e,e.return,t)}break;case 4:default:il(t,e),sl(e);break;case 13:il(t,e),sl(e),8192&(a=e.child).flags&&(o=null!==a.memoizedState,a.stateNode.isHidden=o,!o||null!==a.alternate&&null!==a.alternate.memoizedState||(Dl=Yt())),4&r&&ol(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(Ws=(l=Ws)||c,il(t,e),Ws=l):il(t,e),sl(e),8192&r){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!c&&0!=(1&e.mode))for(Hs=e,c=e.child;null!==c;){for(d=Hs=c;null!==Hs;){switch(p=(f=Hs).child,f.tag){case 0:case 11:case 14:case 15:Qs(4,f,f.return);break;case 1:Bs(f,f.return);var v=f.stateNode;if("function"==typeof v.componentWillUnmount){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(e){hc(r,n,e)}}break;case 5:Bs(f,f.return);break;case 22:if(null!==f.memoizedState){fl(d);continue}}null!==p?(p.return=f,Hs=p):fl(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{a=d.stateNode,l?"function"==typeof(o=a.style).setProperty?o.setProperty("display","none","important"):o.display="none":(u=d.stateNode,i=null!=(s=d.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,u.style.display=it("display",i))}catch(t){hc(e,e.return,t)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(t){hc(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:il(t,e),sl(e),4&r&&ol(e);case 21:}}function sl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Xs(n)){var r=n;break e}n=n.return}throw Error(J(160))}switch(r.tag){case 5:var a=r.stateNode;32&r.flags&&(rt(a,""),r.flags&=-33),el(e,Gs(e),a);break;case 3:case 4:var o=r.stateNode.containerInfo;Zs(e,Gs(e),o);break;default:throw Error(J(161))}}catch(t){hc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ll(e,t,n){Hs=e,cl(e)}function cl(e,t,n){for(var r=0!=(1&e.mode);null!==Hs;){var a=Hs,o=a.child;if(22===a.tag&&r){var i=null!==a.memoizedState||zs;if(!i){var u=a.alternate,s=null!==u&&null!==u.memoizedState||Ws;u=zs;var l=Ws;if(zs=i,(Ws=s)&&!l)for(Hs=a;null!==Hs;)s=(i=Hs).child,22===i.tag&&null!==i.memoizedState?pl(a):null!==s?(s.return=i,Hs=s):pl(a);for(;null!==o;)Hs=o,cl(o),o=o.sibling;Hs=a,zs=u,Ws=l}dl(e)}else 0!=(8772&a.subtreeFlags)&&null!==o?(o.return=a,Hs=o):dl(e)}}function dl(e){for(;null!==Hs;){var t=Hs;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ws||$s(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ws)if(null===n)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Qu(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ri(t,o,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ri(t,i,n)}break;case 5:var u=t.stateNode;if(null===n&&4&t.flags){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var c=l.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&In(d)}}}break;default:throw Error(J(163))}Ws||512&t.flags&&Ks(t)}catch(e){hc(t,t.return,e)}}if(t===e){Hs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Hs=n;break}Hs=t.return}}function fl(e){for(;null!==Hs;){var t=Hs;if(t===e){Hs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Hs=n;break}Hs=t.return}}function pl(e){for(;null!==Hs;){var t=Hs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{$s(4,t)}catch(e){hc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(e){hc(t,a,e)}}var o=t.return;try{Ks(t)}catch(e){hc(t,o,e)}break;case 5:var i=t.return;try{Ks(t)}catch(e){hc(t,i,e)}}}catch(e){hc(t,t.return,e)}if(t===e){Hs=null;break}var u=t.sibling;if(null!==u){u.return=t.return,Hs=u;break}Hs=t.return}}var vl,hl=Math.ceil,ml=de.ReactCurrentDispatcher,gl=de.ReactCurrentOwner,yl=de.ReactCurrentBatchConfig,xl=0,bl=null,wl=null,kl=0,_l=0,Ol=mo(0),Sl=0,Pl=null,El=0,Ml=0,Tl=0,Cl=null,Nl=null,Dl=0,jl=1/0,Il=null,Rl=!1,Ll=null,Ul=null,Al=!1,Fl=null,zl=0,Wl=0,Yl=null,Hl=-1,Bl=0;function ql(){return 0!=(6&xl)?Yt():-1!==Hl?Hl:Hl=Yt()}function Vl(e){return 0==(1&e.mode)?1:0!=(2&xl)&&0!==kl?kl&-kl:null!==ui.transition?(0===Bl&&(Bl=un()),Bl):0!==(e=dn)?e:e=void 0===(e=window.event)?16:Yn(e.type)}function Ql(e,t,n,r){if(50<Wl)throw Wl=0,Yl=null,Error(J(185));ln(e,n,r),0!=(2&xl)&&e===bl||(e===bl&&(0==(2&xl)&&(Ml|=n),4===Sl&&Gl(e,kl)),$l(e,r),1===n&&0===xl&&0==(1&t.mode)&&(jl=Yt()+500,No&&Io()))}function $l(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Xt(o),u=1<<i,s=a[i];-1===s?0!=(u&n)&&0==(u&r)||(a[i]=an(u,t)):s<=t&&(e.expiredLanes|=u),o&=~u}}(e,t);var r=rn(e,e===bl?kl:0);if(0===r)null!==n&&Ft(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ft(n),1===t)0===e.tag?function(e){No=!0,jo(e)}(Zl.bind(null,e)):jo(Zl.bind(null,e)),Xa((function(){0==(6&xl)&&Io()})),n=null;else{switch(fn(r)){case 1:n=Bt;break;case 4:n=qt;break;case 16:default:n=Vt;break;case 536870912:n=$t}n=bc(n,Kl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Kl(e,t){if(Hl=-1,Bl=0,0!=(6&xl))throw Error(J(327));var n=e.callbackNode;if(pc()&&e.callbackNode!==n)return null;var r=rn(e,e===bl?kl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=uc(e,r);else{t=r;var a=xl;xl|=2;var o=oc();for(bl===e&&kl===t||(Il=null,jl=Yt()+500,rc(e,t));;)try{lc();break}catch(t){ac(e,t)}yi(),ml.current=o,xl=a,null!==wl?t=0:(bl=null,kl=0,t=Sl)}if(0!==t){if(2===t&&(0!==(a=on(e))&&(r=a,t=Jl(e,a))),1===t)throw n=Pl,rc(e,0),Gl(e,r),$l(e,Yt()),n;if(6===t)Gl(e,r);else{if(a=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!Gr(o(),a))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(a)&&(2===(t=uc(e,r))&&(0!==(o=on(e))&&(r=o,t=Jl(e,o))),1===t))throw n=Pl,rc(e,0),Gl(e,r),$l(e,Yt()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(J(345));case 2:case 5:fc(e,Nl,Il);break;case 3:if(Gl(e,r),(130023424&r)===r&&10<(t=Dl+500-Yt())){if(0!==rn(e,0))break;if(((a=e.suspendedLanes)&r)!==r){ql(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=$a(fc.bind(null,e,Nl,Il),t);break}fc(e,Nl,Il);break;case 4:if(Gl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,a=-1;0<r;){var i=31-Xt(r);o=1<<i,(i=t[i])>a&&(a=i),r&=~o}if(r=a,10<(r=(120>(r=Yt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hl(r/1960))-r)){e.timeoutHandle=$a(fc.bind(null,e,Nl,Il),r);break}fc(e,Nl,Il);break;default:throw Error(J(329))}}}return $l(e,Yt()),e.callbackNode===n?Kl.bind(null,e):null}function Jl(e,t){var n=Cl;return e.current.memoizedState.isDehydrated&&(rc(e,t).flags|=256),2!==(e=uc(e,t))&&(t=Nl,Nl=n,null!==t&&Xl(t)),e}function Xl(e){null===Nl?Nl=e:Nl.push.apply(Nl,e)}function Gl(e,t){for(t&=~Tl,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xt(t),r=1<<n;e[n]=-1,t&=~r}}function Zl(e){if(0!=(6&xl))throw Error(J(327));pc();var t=rn(e,0);if(0==(1&t))return $l(e,Yt()),null;var n=uc(e,t);if(0!==e.tag&&2===n){var r=on(e);0!==r&&(t=r,n=Jl(e,r))}if(1===n)throw n=Pl,rc(e,0),Gl(e,t),$l(e,Yt()),n;if(6===n)throw Error(J(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fc(e,Nl,Il),$l(e,Yt()),null}function ec(e,t){var n=xl;xl|=1;try{return e(t)}finally{0===(xl=n)&&(jl=Yt()+500,No&&Io())}}function tc(e){null!==Fl&&0===Fl.tag&&0==(6&xl)&&pc();var t=xl;xl|=1;var n=yl.transition,r=dn;try{if(yl.transition=null,dn=1,e)return e()}finally{dn=r,yl.transition=n,0==(6&(xl=t))&&Io()}}function nc(){_l=Ol.current,go(Ol)}function rc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ka(n)),null!==wl)for(n=wl.return;null!==n;){var r=n;switch(Qo(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&So();break;case 3:Yi(),go(wo),go(bo),$i();break;case 5:Bi(r);break;case 4:Yi();break;case 13:case 19:go(qi);break;case 10:xi(r.type._context);break;case 22:case 23:nc()}n=n.return}if(bl=e,wl=e=Oc(e.current,null),kl=_l=t,Sl=0,Pl=null,Tl=Ml=El=0,Nl=Cl=null,null!==_i){for(t=0;t<_i.length;t++)if(null!==(r=(n=_i[t]).interleaved)){n.interleaved=null;var a=r.next,o=n.pending;if(null!==o){var i=o.next;o.next=a,r.next=i}n.pending=r}_i=null}return e}function ac(e,t){for(;;){var n=wl;try{if(yi(),Ki.current=Hu,tu){for(var r=Gi.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}tu=!1}if(Xi=0,eu=Zi=Gi=null,nu=!1,ru=0,gl.current=null,null===n||null===n.return){Sl=1,Pl=t,wl=null;break}e:{var o=e,i=n.return,u=n,s=t;if(t=kl,u.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s,c=u,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=us(i);if(null!==p){p.flags&=-257,ss(p,i,u,0,t),1&p.mode&&is(o,l,t),s=l;var v=(t=p).updateQueue;if(null===v){var h=new Set;h.add(s),t.updateQueue=h}else v.add(s);break e}if(0==(1&t)){is(o,l,t),ic();break e}s=Error(J(426))}else if(Jo&&1&u.mode){var m=us(i);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),ss(m,i,u,0,t),ii(es(s,u));break e}}o=s=es(s,u),4!==Sl&&(Sl=2),null===Cl?Cl=[o]:Cl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ji(o,as(0,s,t));break e;case 1:u=s;var g=o.type,y=o.stateNode;if(0==(128&o.flags)&&("function"==typeof g.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Ul||!Ul.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t,ji(o,os(o,u,t));break e}}o=o.return}while(null!==o)}dc(n)}catch(e){t=e,wl===n&&null!==n&&(wl=n=n.return);continue}break}}function oc(){var e=ml.current;return ml.current=Hu,null===e?Hu:e}function ic(){0!==Sl&&3!==Sl&&2!==Sl||(Sl=4),null===bl||0==(268435455&El)&&0==(268435455&Ml)||Gl(bl,kl)}function uc(e,t){var n=xl;xl|=2;var r=oc();for(bl===e&&kl===t||(Il=null,rc(e,t));;)try{sc();break}catch(t){ac(e,t)}if(yi(),xl=n,ml.current=r,null!==wl)throw Error(J(261));return bl=null,kl=0,Sl}function sc(){for(;null!==wl;)cc(wl)}function lc(){for(;null!==wl&&!zt();)cc(wl)}function cc(e){var t=vl(e.alternate,e,_l);e.memoizedProps=e.pendingProps,null===t?dc(e):wl=t,gl.current=null}function dc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=As(n,t,_l)))return void(wl=n)}else{if(null!==(n=Fs(n,t)))return n.flags&=32767,void(wl=n);if(null===e)return Sl=6,void(wl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(wl=t);wl=t=e}while(null!==t);0===Sl&&(Sl=5)}function fc(e,t,n){var r=dn,a=yl.transition;try{yl.transition=null,dn=1,function(e,t,n,r){do{pc()}while(null!==Fl);if(0!=(6&xl))throw Error(J(327));n=e.finishedWork;var a=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(J(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(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 a=31-Xt(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}(e,o),e===bl&&(wl=bl=null,kl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Al||(Al=!0,bc(Vt,(function(){return pc(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=yl.transition,yl.transition=null;var i=dn;dn=1;var u=xl;xl|=4,gl.current=null,function(e,t){if(qa=Ln,aa(e=ra())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var i=0,u=-1,s=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==a&&3!==d.nodeType||(u=i+a),d!==o||0!==r&&3!==d.nodeType||(s=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===a&&(u=i),f===o&&++c===r&&(s=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===u||-1===s?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Va={focusedElem:e,selectionRange:n},Ln=!1,Hs=t;null!==Hs;)if(e=(t=Hs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Hs=e;else for(;null!==Hs;){t=Hs;try{var v=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var h=v.memoizedProps,m=v.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?h:Qu(t.type,h),m);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(J(163))}}catch(e){hc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Hs=e;break}Hs=t.return}v=Vs,Vs=!1}(e,n),ul(n,e),oa(Va),Ln=!!qa,Va=qa=null,e.current=n,ll(n),Wt(),xl=u,dn=i,yl.transition=o}else e.current=n;if(Al&&(Al=!1,Fl=e,zl=a),o=e.pendingLanes,0===o&&(Ul=null),function(e){if(Jt&&"function"==typeof Jt.onCommitFiberRoot)try{Jt.onCommitFiberRoot(Kt,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),$l(e,Yt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(Rl)throw Rl=!1,e=Ll,Ll=null,e;0!=(1&zl)&&0!==e.tag&&pc(),o=e.pendingLanes,0!=(1&o)?e===Yl?Wl++:(Wl=0,Yl=e):Wl=0,Io()}(e,t,n,r)}finally{yl.transition=a,dn=r}return null}function pc(){if(null!==Fl){var e=fn(zl),t=yl.transition,n=dn;try{if(yl.transition=null,dn=16>e?16:e,null===Fl)var r=!1;else{if(e=Fl,Fl=null,zl=0,0!=(6&xl))throw Error(J(331));var a=xl;for(xl|=4,Hs=e.current;null!==Hs;){var o=Hs,i=o.child;if(0!=(16&Hs.flags)){var u=o.deletions;if(null!==u){for(var s=0;s<u.length;s++){var l=u[s];for(Hs=l;null!==Hs;){var c=Hs;switch(c.tag){case 0:case 11:case 15:Qs(8,c,o)}var d=c.child;if(null!==d)d.return=c,Hs=d;else for(;null!==Hs;){var f=(c=Hs).sibling,p=c.return;if(Js(c),c===l){Hs=null;break}if(null!==f){f.return=p,Hs=f;break}Hs=p}}}var v=o.alternate;if(null!==v){var h=v.child;if(null!==h){v.child=null;do{var m=h.sibling;h.sibling=null,h=m}while(null!==h)}}Hs=o}}if(0!=(2064&o.subtreeFlags)&&null!==i)i.return=o,Hs=i;else e:for(;null!==Hs;){if(0!=(2048&(o=Hs).flags))switch(o.tag){case 0:case 11:case 15:Qs(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,Hs=g;break e}Hs=o.return}}var y=e.current;for(Hs=y;null!==Hs;){var x=(i=Hs).child;if(0!=(2064&i.subtreeFlags)&&null!==x)x.return=i,Hs=x;else e:for(i=y;null!==Hs;){if(0!=(2048&(u=Hs).flags))try{switch(u.tag){case 0:case 11:case 15:$s(9,u)}}catch(e){hc(u,u.return,e)}if(u===i){Hs=null;break e}var b=u.sibling;if(null!==b){b.return=u.return,Hs=b;break e}Hs=u.return}}if(xl=a,Io(),Jt&&"function"==typeof Jt.onPostCommitFiberRoot)try{Jt.onPostCommitFiberRoot(Kt,e)}catch(e){}r=!0}return r}finally{dn=n,yl.transition=t}}return!1}function vc(e,t,n){e=Ni(e,t=as(0,t=es(n,t),1),1),t=ql(),null!==e&&(ln(e,1,t),$l(e,t))}function hc(e,t,n){if(3===e.tag)vc(e,e,n);else for(;null!==t;){if(3===t.tag){vc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ul||!Ul.has(r))){t=Ni(t,e=os(t,e=es(n,e),1),1),e=ql(),null!==t&&(ln(t,1,e),$l(t,e));break}}t=t.return}}function mc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ql(),e.pingedLanes|=e.suspendedLanes&n,bl===e&&(kl&n)===n&&(4===Sl||3===Sl&&(130023424&kl)===kl&&500>Yt()-Dl?rc(e,0):Tl|=n),$l(e,t)}function gc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=tn,0==(130023424&(tn<<=1))&&(tn=4194304)));var n=ql();null!==(e=Pi(e,t))&&(ln(e,t,n),$l(e,n))}function yc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),gc(e,n)}function xc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(J(314))}null!==r&&r.delete(t),gc(e,n)}function bc(e,t){return At(e,t)}function wc(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 kc(e,t,n,r){return new wc(e,t,n,r)}function _c(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var n=e.alternate;return null===n?((n=kc(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Sc(e,t,n,r,a,o){var i=2;if(r=e,"function"==typeof e)_c(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case ve:return Pc(n.children,a,o,t);case he:i=8,a|=8;break;case me:return(e=kc(12,n,t,2|a)).elementType=me,e.lanes=o,e;case be:return(e=kc(13,n,t,a)).elementType=be,e.lanes=o,e;case we:return(e=kc(19,n,t,a)).elementType=we,e.lanes=o,e;case Oe:return Ec(n,a,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ge:i=10;break e;case ye:i=9;break e;case xe:i=11;break e;case ke:i=14;break e;case _e:i=16,r=null;break e}throw Error(J(130,null==e?e:typeof e,""))}return(t=kc(i,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Pc(e,t,n,r){return(e=kc(7,e,r,t)).lanes=n,e}function Ec(e,t,n,r){return(e=kc(22,e,r,t)).elementType=Oe,e.lanes=n,e.stateNode={isHidden:!1},e}function Mc(e,t,n){return(e=kc(6,e,null,t)).lanes=n,e}function Tc(e,t,n){return(t=kc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cc(e,t,n,r,a){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=sn(0),this.expirationTimes=sn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sn(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Nc(e,t,n,r,a,o,i,u,s){return e=new Cc(e,t,n,u,s),1===t?(t=1,!0===o&&(t|=8)):t=0,o=kc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mi(o),e}function Dc(e){if(!e)return xo;e:{if(jt(e=e._reactInternals)!==e||1!==e.tag)throw Error(J(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(J(171))}if(1===e.tag){var n=e.type;if(Oo(n))return Eo(e,n,t)}return t}function jc(e,t,n,r,a,o,i,u,s){return(e=Nc(n,r,!0,e,0,o,0,u,s)).context=Dc(null),n=e.current,(o=Ci(r=ql(),a=Vl(n))).callback=null!=t?t:null,Ni(n,o,a),e.current.lanes=a,ln(e,a,r),$l(e,r),e}function Ic(e,t,n,r){var a=t.current,o=ql(),i=Vl(a);return n=Dc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ci(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ni(a,t,i))&&(Ql(e,a,i,o),Di(e,a,i)),i}function Rc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Lc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Uc(e,t){Lc(e,t),(e=e.alternate)&&Lc(e,t)}vl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||wo.current)cs=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return cs=!1,function(e,t,n){switch(t.tag){case 3:bs(t),oi();break;case 5:Hi(t);break;case 1:Oo(t.type)&&Mo(t);break;case 4:Wi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;yo(vi,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(yo(qi,1&qi.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ms(e,t,n):(yo(qi,1&qi.current),null!==(e=Rs(e,t,n))?e.sibling:null);yo(qi,1&qi.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return js(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),yo(qi,qi.current),r)break;return null;case 22:case 23:return t.lanes=0,hs(e,t,n)}return Rs(e,t,n)}(e,t,n);cs=0!=(131072&e.flags)}else cs=!1,Jo&&0!=(1048576&t.flags)&&qo(t,Ao,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Is(e,t),e=t.pendingProps;var a=_o(t,bo.current);wi(t,n),a=uu(null,t,r,e,a,n);var o=su();return t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(r)?(o=!0,Mo(t)):o=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,Mi(t),a.updater=Ku,t.stateNode=a,a._reactInternals=t,Zu(t,r,e,n),t=xs(null,t,r,!0,o,n)):(t.tag=0,Jo&&o&&Vo(t),ds(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Is(e,t),e=t.pendingProps,r=(a=r._init)(r._payload),t.type=r,a=t.tag=function(e){if("function"==typeof e)return _c(e)?1:0;if(null!=e){if((e=e.$$typeof)===xe)return 11;if(e===ke)return 14}return 2}(r),e=Qu(r,e),a){case 0:t=gs(null,t,r,e,n);break e;case 1:t=ys(null,t,r,e,n);break e;case 11:t=fs(null,t,r,e,n);break e;case 14:t=ps(null,t,r,Qu(r.type,e),n);break e}throw Error(J(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,gs(e,t,r,a=t.elementType===r?a:Qu(r,a),n);case 1:return r=t.type,a=t.pendingProps,ys(e,t,r,a=t.elementType===r?a:Qu(r,a),n);case 3:e:{if(bs(t),null===e)throw Error(J(387));r=t.pendingProps,a=(o=t.memoizedState).element,Ti(e,t),Ii(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=ws(e,t,r,n,a=es(Error(J(423)),t));break e}if(r!==a){t=ws(e,t,r,n,a=es(Error(J(424)),t));break e}for(Ko=eo(t.stateNode.containerInfo.firstChild),$o=t,Jo=!0,Xo=null,n=pi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(oi(),r===a){t=Rs(e,t,n);break e}ds(e,t,r,n)}t=t.child}return t;case 5:return Hi(t),null===e&&ti(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,i=a.children,Qa(r,a)?i=null:null!==o&&Qa(r,o)&&(t.flags|=32),ms(e,t),ds(e,t,i,n),t.child;case 6:return null===e&&ti(t),null;case 13:return Ms(e,t,n);case 4:return Wi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=fi(t,null,r,n):ds(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,fs(e,t,r,a=t.elementType===r?a:Qu(r,a),n);case 7:return ds(e,t,t.pendingProps,n),t.child;case 8:case 12:return ds(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,yo(vi,r._currentValue),r._currentValue=i,null!==o)if(Gr(o.value,i)){if(o.children===a.children&&!wo.current){t=Rs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){i=o.child;for(var s=u.firstContext;null!==s;){if(s.context===r){if(1===o.tag){(s=Ci(-1,n&-n)).tag=2;var l=o.updateQueue;if(null!==l){var c=(l=l.shared).pending;null===c?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),bi(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(10===o.tag)i=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(i=o.return))throw Error(J(341));i.lanes|=n,null!==(u=i.alternate)&&(u.lanes|=n),bi(i,n,t),i=o.sibling}else i=o.child;if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===t){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}ds(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,wi(t,n),r=r(a=ki(a)),t.flags|=1,ds(e,t,r,n),t.child;case 14:return a=Qu(r=t.type,t.pendingProps),ps(e,t,r,a=Qu(r.type,a),n);case 15:return vs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Qu(r,a),Is(e,t),t.tag=1,Oo(r)?(e=!0,Mo(t)):e=!1,wi(t,n),Xu(t,r,a),Zu(t,r,a,n),xs(null,t,r,!0,e,n);case 19:return js(e,t,n);case 22:return hs(e,t,n)}throw Error(J(156,t.tag))};var Ac="function"==typeof reportError?reportError:function(e){console.error(e)};function Fc(e){this._internalRoot=e}function zc(e){this._internalRoot=e}function Wc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hc(){}function Bc(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o;if("function"==typeof a){var u=a;a=function(){var e=Rc(i);u.call(e)}}Ic(t,i,e,a)}else i=function(e,t,n,r,a){if(a){if("function"==typeof r){var o=r;r=function(){var e=Rc(i);o.call(e)}}var i=jc(t,r,e,0,null,!1,0,"",Hc);return e._reactRootContainer=i,e[oo]=i.current,ja(8===e.nodeType?e.parentNode:e),tc(),i}for(;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var u=r;r=function(){var e=Rc(s);u.call(e)}}var s=Nc(e,0,!1,null,0,!1,0,"",Hc);return e._reactRootContainer=s,e[oo]=s.current,ja(8===e.nodeType?e.parentNode:e),tc((function(){Ic(t,s,n,r)})),s}(n,t,e,a,r);return Rc(i)}zc.prototype.render=Fc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(J(409));Ic(e,t,null,null)},zc.prototype.unmount=Fc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;tc((function(){Ic(null,e,null,null)})),t[oo]=null}},zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=mn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sn.length&&0!==t&&t<Sn[n].priority;n++);Sn.splice(n,0,e),0===n&&Tn(e)}},pn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=nn(t.pendingLanes);0!==n&&(cn(t,1|n),$l(t,Yt()),0==(6&xl)&&(jl=Yt()+500,Io()))}break;case 13:tc((function(){var t=Pi(e,1);if(null!==t){var n=ql();Ql(t,e,1,n)}})),Uc(e,1)}},vn=function(e){if(13===e.tag){var t=Pi(e,134217728);if(null!==t)Ql(t,e,134217728,ql());Uc(e,134217728)}},hn=function(e){if(13===e.tag){var t=Vl(e),n=Pi(e,t);if(null!==n)Ql(n,e,t,ql());Uc(e,t)}},mn=function(){return dn},gn=function(e,t){var n=dn;try{return dn=e,t()}finally{dn=n}},pt=function(e,t,n){switch(t){case"input":if(He(e,n),t=n.name,"radio"===n.type&&null!=t){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 a=po(r);if(!a)throw Error(J(90));Ae(r),He(r,a)}}}break;case"textarea":Je(e,n);break;case"select":null!=(t=n.value)&&Qe(e,!!n.multiple,t,!1)}},xt=ec,bt=tc;var qc={usingClientEntryPoint:!1,Events:[co,fo,po,gt,yt,ec]},Vc={findFiberByHostInstance:lo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qc={bundleType:Vc.bundleType,version:Vc.version,rendererPackageName:Vc.rendererPackageName,rendererConfig:Vc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:de.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Lt(e))?null:e.stateNode},findFiberByHostInstance:Vc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var $c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$c.isDisabled&&$c.supportsFiber)try{Kt=$c.inject(Qc),Jt=$c}catch(tt){}}q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qc,q.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Wc(t))throw Error(J(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:pe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},q.createRoot=function(e,t){if(!Wc(e))throw Error(J(299));var n=!1,r="",a=Ac;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(a=t.onRecoverableError)),t=Nc(e,1,!1,null,0,n,0,r,a),e[oo]=t.current,ja(8===e.nodeType?e.parentNode:e),new Fc(t)},q.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(J(188));throw e=Object.keys(e).join(","),Error(J(268,e))}return e=null===(e=Lt(t))?null:e.stateNode},q.flushSync=function(e){return tc(e)},q.hydrate=function(e,t,n){if(!Yc(t))throw Error(J(200));return Bc(null,e,t,!0,n)},q.hydrateRoot=function(e,t,n){if(!Wc(e))throw Error(J(405));var r=null!=n&&n.hydratedSources||null,a=!1,o="",i=Ac;if(null!=n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=jc(t,null,e,1,null!=n?n:null,a,0,o,i),e[oo]=t.current,ja(e),r)for(e=0;e<r.length;e++)a=(a=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new zc(t)},q.render=function(e,t,n){if(!Yc(t))throw Error(J(200));return Bc(null,e,t,!1,n)},q.unmountComponentAtNode=function(e){if(!Yc(e))throw Error(J(40));return!!e._reactRootContainer&&(tc((function(){Bc(null,null,e,!1,(function(){e._reactRootContainer=null,e[oo]=null}))})),!0)},q.unstable_batchedUpdates=ec,q.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yc(n))throw Error(J(200));if(null==e||void 0===e._reactInternals)throw Error(J(38));return Bc(e,t,n,!1,r)},q.version="18.3.1-next-f1338f8080-20240426",function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=q}(B);var Kc=i(B.exports),Jc={},Xc={},Gc={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Gc);var Zc={},ed={exports:{}},td={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(td),function(e){var t=td.exports.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var a=n(r);if(a&&a.has(e))return a.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(o,u,s):o[u]=e[u]}return o.default=e,a&&a.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports}(ed);var nd={exports:{}},rd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function ad(){}function od(){}od.resetWarningCache=ad;nd.exports=function(){function e(e,t,n,r,a,o){if(o!==rd){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:od,resetWarningCache:ad};return n.PropTypes=n,n}();var id={};!function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=e.ReactReduxContext=void 0;var n=t(u.exports).default.createContext(null);e.ReactReduxContext=n;var r=n;e.default=r}(id);var ud={},sd={};sd.__esModule=!0,sd.setBatch=sd.getBatch=void 0;var ld=function(e){e()};sd.setBatch=function(e){return ld=e};sd.getBatch=function(){return ld},ud.__esModule=!0,ud.createSubscription=function(e,t){var n,r=dd;function a(){i.onStateChange&&i.onStateChange()}function o(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){var e=(0,cd.getBatch)(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,a=n={callback:e,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){r&&null!==t&&(r=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}())}var i={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=dd)},getListeners:function(){return r}};return i};var cd=sd;var dd={notify:function(){},get:function(){return[]}};var fd={__esModule:!0,useIsomorphicLayoutEffect:void 0},pd=u.exports,vd="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?pd.useLayoutEffect:pd.useEffect;fd.useIsomorphicLayoutEffect=vd,function(e){var t=Gc.exports.default,n=ed.exports.default;e.__esModule=!0,e.default=void 0;var r=n(u.exports);t(nd.exports);var a=id,o=ud,i=fd;var s=function(e){var t=e.store,n=e.context,u=e.children,s=(0,r.useMemo)((function(){var e=(0,o.createSubscription)(t);return{store:t,subscription:e}}),[t]),l=(0,r.useMemo)((function(){return t.getState()}),[t]);(0,i.useIsomorphicLayoutEffect)((function(){var e=s.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,l]);var c=n||a.ReactReduxContext;return r.default.createElement(c.Provider,{value:s},u)};e.default=s}(Zc);var hd={},md={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(md);var gd={exports:{}};!function(e){e.exports=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports}(gd);var yd={exports:{}},xd={},bd="function"==typeof Symbol&&Symbol.for,wd=bd?Symbol.for("react.element"):60103,kd=bd?Symbol.for("react.portal"):60106,_d=bd?Symbol.for("react.fragment"):60107,Od=bd?Symbol.for("react.strict_mode"):60108,Sd=bd?Symbol.for("react.profiler"):60114,Pd=bd?Symbol.for("react.provider"):60109,Ed=bd?Symbol.for("react.context"):60110,Md=bd?Symbol.for("react.async_mode"):60111,Td=bd?Symbol.for("react.concurrent_mode"):60111,Cd=bd?Symbol.for("react.forward_ref"):60112,Nd=bd?Symbol.for("react.suspense"):60113,Dd=bd?Symbol.for("react.suspense_list"):60120,jd=bd?Symbol.for("react.memo"):60115,Id=bd?Symbol.for("react.lazy"):60116,Rd=bd?Symbol.for("react.block"):60121,Ld=bd?Symbol.for("react.fundamental"):60117,Ud=bd?Symbol.for("react.responder"):60118,Ad=bd?Symbol.for("react.scope"):60119;function Fd(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case wd:switch(e=e.type){case Md:case Td:case _d:case Sd:case Od:case Nd:return e;default:switch(e=e&&e.$$typeof){case Ed:case Cd:case Id:case jd:case Pd:return e;default:return t}}case kd:return t}}}function zd(e){return Fd(e)===Td}xd.AsyncMode=Md,xd.ConcurrentMode=Td,xd.ContextConsumer=Ed,xd.ContextProvider=Pd,xd.Element=wd,xd.ForwardRef=Cd,xd.Fragment=_d,xd.Lazy=Id,xd.Memo=jd,xd.Portal=kd,xd.Profiler=Sd,xd.StrictMode=Od,xd.Suspense=Nd,xd.isAsyncMode=function(e){return zd(e)||Fd(e)===Md},xd.isConcurrentMode=zd,xd.isContextConsumer=function(e){return Fd(e)===Ed},xd.isContextProvider=function(e){return Fd(e)===Pd},xd.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===wd},xd.isForwardRef=function(e){return Fd(e)===Cd},xd.isFragment=function(e){return Fd(e)===_d},xd.isLazy=function(e){return Fd(e)===Id},xd.isMemo=function(e){return Fd(e)===jd},xd.isPortal=function(e){return Fd(e)===kd},xd.isProfiler=function(e){return Fd(e)===Sd},xd.isStrictMode=function(e){return Fd(e)===Od},xd.isSuspense=function(e){return Fd(e)===Nd},xd.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===_d||e===Td||e===Sd||e===Od||e===Nd||e===Dd||"object"==typeof e&&null!==e&&(e.$$typeof===Id||e.$$typeof===jd||e.$$typeof===Pd||e.$$typeof===Ed||e.$$typeof===Cd||e.$$typeof===Ld||e.$$typeof===Ud||e.$$typeof===Ad||e.$$typeof===Rd)},xd.typeOf=Fd,function(e){e.exports=xd}(yd);var Wd=yd.exports,Yd={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Hd={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Bd={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qd={};function Vd(e){return Wd.isMemo(e)?Bd:qd[e.$$typeof]||Yd}qd[Wd.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qd[Wd.Memo]=Bd;var Qd=Object.defineProperty,$d=Object.getOwnPropertyNames,Kd=Object.getOwnPropertySymbols,Jd=Object.getOwnPropertyDescriptor,Xd=Object.getPrototypeOf,Gd=Object.prototype;var Zd=function e(t,n,r){if("string"!=typeof n){if(Gd){var a=Xd(n);a&&a!==Gd&&e(t,a,r)}var o=$d(n);Kd&&(o=o.concat(Kd(n)));for(var i=Vd(t),u=Vd(n),s=0;s<o.length;++s){var l=o[s];if(!(Hd[l]||r&&r[l]||u&&u[l]||i&&i[l])){var c=Jd(n,l);try{Qd(t,l,c)}catch(e){}}}}return t},ef={exports:{}},tf={},nf=60103,rf=60106,af=60107,of=60108,uf=60114,sf=60109,lf=60110,cf=60112,df=60113,ff=60120,pf=60115,vf=60116,hf=60121,mf=60122,gf=60117,yf=60129,xf=60131;if("function"==typeof Symbol&&Symbol.for){var bf=Symbol.for;nf=bf("react.element"),rf=bf("react.portal"),af=bf("react.fragment"),of=bf("react.strict_mode"),uf=bf("react.profiler"),sf=bf("react.provider"),lf=bf("react.context"),cf=bf("react.forward_ref"),df=bf("react.suspense"),ff=bf("react.suspense_list"),pf=bf("react.memo"),vf=bf("react.lazy"),hf=bf("react.block"),mf=bf("react.server.block"),gf=bf("react.fundamental"),yf=bf("react.debug_trace_mode"),xf=bf("react.legacy_hidden")}function wf(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case nf:switch(e=e.type){case af:case uf:case of:case df:case ff:return e;default:switch(e=e&&e.$$typeof){case lf:case cf:case vf:case pf:case sf:return e;default:return t}}case rf:return t}}}var kf=sf,_f=nf,Of=cf,Sf=af,Pf=vf,Ef=pf,Mf=rf,Tf=uf,Cf=of,Nf=df;tf.ContextConsumer=lf,tf.ContextProvider=kf,tf.Element=_f,tf.ForwardRef=Of,tf.Fragment=Sf,tf.Lazy=Pf,tf.Memo=Ef,tf.Portal=Mf,tf.Profiler=Tf,tf.StrictMode=Cf,tf.Suspense=Nf,tf.isAsyncMode=function(){return!1},tf.isConcurrentMode=function(){return!1},tf.isContextConsumer=function(e){return wf(e)===lf},tf.isContextProvider=function(e){return wf(e)===sf},tf.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===nf},tf.isForwardRef=function(e){return wf(e)===cf},tf.isFragment=function(e){return wf(e)===af},tf.isLazy=function(e){return wf(e)===vf},tf.isMemo=function(e){return wf(e)===pf},tf.isPortal=function(e){return wf(e)===rf},tf.isProfiler=function(e){return wf(e)===uf},tf.isStrictMode=function(e){return wf(e)===of},tf.isSuspense=function(e){return wf(e)===df},tf.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===af||e===uf||e===yf||e===of||e===df||e===ff||e===xf||"object"==typeof e&&null!==e&&(e.$$typeof===vf||e.$$typeof===pf||e.$$typeof===sf||e.$$typeof===lf||e.$$typeof===cf||e.$$typeof===gf||e.$$typeof===hf||e[0]===mf)},tf.typeOf=wf,function(e){e.exports=tf}(ef),function(e){var t=Gc.exports.default,n=ed.exports.default;e.__esModule=!0,e.default=function(e,t){void 0===t&&(t={});var n=t,u=n.getDisplayName,c=void 0===u?function(e){return"ConnectAdvanced("+e+")"}:u,w=n.methodName,k=void 0===w?"connectAdvanced":w,_=n.renderCountProp,O=void 0===_?void 0:_,S=n.shouldHandleStateChanges,P=void 0===S||S,E=n.storeKey,M=void 0===E?"store":E;n.withRef;var T=n.forwardRef,C=void 0!==T&&T,N=n.context,D=void 0===N?d.ReactReduxContext:N,j=(0,a.default)(n,f),I=D;return function(t){var n=t.displayName||t.name||"Component",u=c(n),d=(0,r.default)({},j,{getDisplayName:c,methodName:k,renderCountProp:O,shouldHandleStateChanges:P,storeKey:M,displayName:u,wrappedComponentName:n,WrappedComponent:t}),f=j.pure;var w=f?i.useMemo:function(e){return e()};function _(n){var o=(0,i.useMemo)((function(){var e=n.reactReduxForwardedRef,t=(0,a.default)(n,p);return[n.context,e,t]}),[n]),u=o[0],c=o[1],f=o[2],k=(0,i.useMemo)((function(){return u&&u.Consumer&&(0,s.isContextConsumer)(i.default.createElement(u.Consumer,null))?u:I}),[u,I]),_=(0,i.useContext)(k),O=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(_)&&Boolean(_.store);var S=O?n.store:_.store,E=(0,i.useMemo)((function(){return function(t){return e(t.dispatch,d)}(S)}),[S]),M=(0,i.useMemo)((function(){if(!P)return h;var e=(0,l.createSubscription)(S,O?null:_.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[S,O,_]),T=M[0],C=M[1],N=(0,i.useMemo)((function(){return O?_:(0,r.default)({},_,{subscription:T})}),[O,_,T]),D=(0,i.useReducer)(m,v,b),j=D[0][0],R=D[1];if(j&&j.error)throw j.error;var L=(0,i.useRef)(),U=(0,i.useRef)(f),A=(0,i.useRef)(),F=(0,i.useRef)(!1),z=w((function(){return A.current&&f===U.current?A.current:E(S.getState(),f)}),[S,j,f]);g(y,[U,L,F,f,z,A,C]),g(x,[P,S,T,E,U,L,F,A,C,R],[S,T,E]);var W=(0,i.useMemo)((function(){return i.default.createElement(t,(0,r.default)({},z,{ref:c}))}),[c,t,z]);return(0,i.useMemo)((function(){return P?i.default.createElement(k.Provider,{value:N},W):W}),[k,W,N])}var S=f?i.default.memo(_):_;if(S.WrappedComponent=t,S.displayName=_.displayName=u,C){var E=i.default.forwardRef((function(e,t){return i.default.createElement(S,(0,r.default)({},e,{reactReduxForwardedRef:t}))}));return E.displayName=u,E.WrappedComponent=t,(0,o.default)(E,t)}return(0,o.default)(S,t)}};var r=t(md.exports),a=t(gd.exports),o=t(Zd),i=n(u.exports),s=ef.exports,l=ud,c=fd,d=id,f=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],p=["reactReduxForwardedRef"],v=[],h=[null,null];function m(e,t){var n=e[1];return[t.payload,n+1]}function g(e,t,n){(0,c.useIsomorphicLayoutEffect)((function(){return e.apply(void 0,t)}),n)}function y(e,t,n,r,a,o,i){e.current=r,t.current=a,n.current=!1,o.current&&(o.current=null,i())}function x(e,t,n,r,a,o,i,u,s,l){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,a.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?i.current||s():(o.current=e,u.current=e,i.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var b=function(){return[null,0]}}(hd);var Df={},jf={};!function(e){function t(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.__esModule=!0,e.default=function(e,n){if(t(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var r=Object.keys(e),a=Object.keys(n);if(r.length!==a.length)return!1;for(var o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(n,r[o])||!t(e[r[o]],n[r[o]]))return!1;return!0}}(jf);var If={},Rf={};!function(e){e.__esModule=!0,e.default=function(e,t){var n={},r=function(r){var a=e[r];"function"==typeof a&&(n[r]=function(){return t(a.apply(void 0,arguments))})};for(var a in e)r(a);return n}}(Rf);var Lf={},Uf={},Af={};!function(e){e.__esModule=!0,e.default=function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}}(Af);var Ff={};!function(e){e.__esModule=!0,e.default=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}}(Ff),function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=function(e,t,a){(0,n.default)(e)||(0,r.default)(a+"() in "+t+" must return a plain object. Instead received "+e+".")};var n=t(Af),r=t(Ff)}(Uf);var zf=Gc.exports.default;function Wf(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}Lf.__esModule=!0,Lf.getDependsOnOwnProps=Wf,Lf.wrapMapToPropsConstant=function(e){return function(t,n){var r=e(t,n);function a(){return r}return a.dependsOnOwnProps=!1,a}},Lf.wrapMapToPropsFunc=function(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Wf(e);var a=r(t,n);return"function"==typeof a&&(r.mapToProps=a,r.dependsOnOwnProps=Wf(a),a=r(t,n)),a},r}},zf(Uf),function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=void 0,e.whenMapDispatchToPropsIsFunction=a,e.whenMapDispatchToPropsIsMissing=o,e.whenMapDispatchToPropsIsObject=i;var n=t(Rf),r=Lf;function a(e){return"function"==typeof e?(0,r.wrapMapToPropsFunc)(e,"mapDispatchToProps"):void 0}function o(e){return e?void 0:(0,r.wrapMapToPropsConstant)((function(e){return{dispatch:e}}))}function i(e){return e&&"object"==typeof e?(0,r.wrapMapToPropsConstant)((function(t){return(0,n.default)(e,t)})):void 0}var u=[a,o,i];e.default=u}(If);var Yf={};!function(e){e.__esModule=!0,e.default=void 0,e.whenMapStateToPropsIsFunction=n,e.whenMapStateToPropsIsMissing=r;var t=Lf;function n(e){return"function"==typeof e?(0,t.wrapMapToPropsFunc)(e,"mapStateToProps"):void 0}function r(e){return e?void 0:(0,t.wrapMapToPropsConstant)((function(){return{}}))}var a=[n,r];e.default=a}(Yf);var Hf={};!function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=void 0,e.defaultMergeProps=r,e.whenMergePropsIsFunction=o,e.whenMergePropsIsOmitted=i,e.wrapMergePropsFunc=a;var n=t(md.exports);function r(e,t,r){return(0,n.default)({},r,e,t)}function a(e){return function(t,n){n.displayName;var r,a=n.pure,o=n.areMergedPropsEqual,i=!1;return function(t,n,u){var s=e(t,n,u);return i?a&&o(s,r)||(r=s):(i=!0,r=s),r}}}function o(e){return"function"==typeof e?a(e):void 0}function i(e){return e?void 0:function(){return r}}t(Uf);var u=[o,i];e.default=u}(Hf);var Bf={},qf={};!function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=function(e,t,n,a){r(e,"mapStateToProps",a),r(t,"mapDispatchToProps",a),r(n,"mergeProps",a)};var n=t(Ff);function r(e,t,r){if(!e)throw new Error("Unexpected value for "+t+" in "+r+".");"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||(0,n.default)("The selector for "+t+" of "+r+" did not specify a value for dependsOnOwnProps.")}}(qf),function(e){var t=Gc.exports.default;e.__esModule=!0,e.default=function(e,t){var i=t.initMapStateToProps,u=t.initMapDispatchToProps,s=t.initMergeProps,l=(0,n.default)(t,r),c=i(e,l),d=u(e,l),f=s(e,l),p=l.pure?o:a;return p(c,d,f,e,l)},e.impureFinalPropsSelectorFactory=a,e.pureFinalPropsSelectorFactory=o;var n=t(gd.exports);t(qf);var r=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function a(e,t,n,r){return function(a,o){return n(e(a,o),t(r,o),o)}}function o(e,t,n,r,a){var o,i,u,s,l,c=a.areStatesEqual,d=a.areOwnPropsEqual,f=a.areStatePropsEqual,p=!1;function v(a,p){var v,h,m=!d(p,i),g=!c(a,o,p,i);return o=a,i=p,m&&g?(u=e(o,i),t.dependsOnOwnProps&&(s=t(r,i)),l=n(u,s,i)):m?(e.dependsOnOwnProps&&(u=e(o,i)),t.dependsOnOwnProps&&(s=t(r,i)),l=n(u,s,i)):g?(v=e(o,i),h=!f(v,u),u=v,h&&(l=n(u,s,i)),l):l}return function(a,c){return p?v(a,c):(u=e(o=a,i=c),s=t(r,i),l=n(u,s,i),p=!0,l)}}}(Bf),function(e){var t=Gc.exports.default;e.__esModule=!0,e.createConnect=p,e.default=void 0;var n=t(md.exports),r=t(gd.exports),a=t(hd),o=t(jf),i=t(If),u=t(Yf),s=t(Hf),l=t(Bf),c=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function d(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function f(e,t){return e===t}function p(e){var t=void 0===e?{}:e,p=t.connectHOC,v=void 0===p?a.default:p,h=t.mapStateToPropsFactories,m=void 0===h?u.default:h,g=t.mapDispatchToPropsFactories,y=void 0===g?i.default:g,x=t.mergePropsFactories,b=void 0===x?s.default:x,w=t.selectorFactory,k=void 0===w?l.default:w;return function(e,t,a,i){void 0===i&&(i={});var u=i,s=u.pure,l=void 0===s||s,p=u.areStatesEqual,h=void 0===p?f:p,g=u.areOwnPropsEqual,x=void 0===g?o.default:g,w=u.areStatePropsEqual,_=void 0===w?o.default:w,O=u.areMergedPropsEqual,S=void 0===O?o.default:O,P=(0,r.default)(u,c),E=d(e,m,"mapStateToProps"),M=d(t,y,"mapDispatchToProps"),T=d(a,b,"mergeProps");return v(k,(0,n.default)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:M,initMergeProps:T,pure:l,areStatesEqual:h,areOwnPropsEqual:x,areStatePropsEqual:_,areMergedPropsEqual:S},P))}}var v=p();e.default=v}(Df);var Vf={},Qf={},$f={__esModule:!0,useReduxContext:function(){return(0,Kf.useContext)(Jf.ReactReduxContext)}},Kf=u.exports,Jf=id;Qf.__esModule=!0,Qf.createStoreHook=ep,Qf.useStore=void 0;var Xf=u.exports,Gf=id,Zf=$f;function ep(e){void 0===e&&(e=Gf.ReactReduxContext);var t=e===Gf.ReactReduxContext?Zf.useReduxContext:function(){return(0,Xf.useContext)(e)};return function(){return t().store}}var tp=ep();Qf.useStore=tp,Vf.__esModule=!0,Vf.createDispatchHook=ap,Vf.useDispatch=void 0;var np=id,rp=Qf;function ap(e){void 0===e&&(e=np.ReactReduxContext);var t=e===np.ReactReduxContext?rp.useStore:(0,rp.createStoreHook)(e);return function(){return t().dispatch}}var op=ap();Vf.useDispatch=op;var ip={__esModule:!0};ip.createSelectorHook=pp,ip.useSelector=void 0;var up=u.exports,sp=$f,lp=ud,cp=fd,dp=id,fp=function(e,t){return e===t};function pp(e){void 0===e&&(e=dp.ReactReduxContext);var t=e===dp.ReactReduxContext?sp.useReduxContext:function(){return(0,up.useContext)(e)};return function(e,n){void 0===n&&(n=fp);var r=t(),a=function(e,t,n,r){var a,o=(0,up.useReducer)((function(e){return e+1}),0)[1],i=(0,up.useMemo)((function(){return(0,lp.createSubscription)(n,r)}),[n,r]),u=(0,up.useRef)(),s=(0,up.useRef)(),l=(0,up.useRef)(),c=(0,up.useRef)(),d=n.getState();try{if(e!==s.current||d!==l.current||u.current){var f=e(d);a=void 0!==c.current&&t(f,c.current)?c.current:f}else a=c.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return(0,cp.useIsomorphicLayoutEffect)((function(){s.current=e,l.current=d,c.current=a,u.current=void 0})),(0,cp.useIsomorphicLayoutEffect)((function(){function e(){try{var e=n.getState();if(e===l.current)return;var r=s.current(e);if(t(r,c.current))return;c.current=r,l.current=e}catch(e){u.current=e}o()}return i.onStateChange=e,i.trySubscribe(),e(),function(){return i.tryUnsubscribe()}}),[n,i]),a}(e,n,r.store,r.subscription);return(0,up.useDebugValue)(a),a}}var vp=pp();ip.useSelector=vp;var hp=Gc.exports.default;Xc.__esModule=!0;var mp=hp(Zc);Xc.Provider=mp.default;var gp=hp(hd);Xc.connectAdvanced=gp.default;var yp=id;Xc.ReactReduxContext=yp.ReactReduxContext;var xp=hp(Df);Xc.connect=xp.default;var bp=Vf;Xc.useDispatch=bp.useDispatch,Xc.createDispatchHook=bp.createDispatchHook;var wp=ip;Xc.useSelector=wp.useSelector,Xc.createSelectorHook=wp.createSelectorHook;var kp=Qf;Xc.useStore=kp.useStore,Xc.createStoreHook=kp.createStoreHook;var _p=hp(jf);Xc.shallowEqual=_p.default;var Op={__esModule:!0,unstable_batchedUpdates:void 0},Sp=B.exports;function Pp(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-js"),t=function(e){if(!e)return{path:e};var t=e.lastIndexOf("/"),n="";t>=0&&(n=e.substr(0,t));var r=new URL(e),a=r.hostname;a.endsWith("nitrocdn.com")&&(n="https://widget.xapp.ai");var o=new URLSearchParams(r.search),i=o.get("key");return{path:n,key:i}}(null==e?void 0:e.src);return t}Op.unstable_batchedUpdates=Sp.unstable_batchedUpdates,function(e){e.__esModule=!0;var t={batch:!0},n=Xc;Object.keys(n).forEach((function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(t,r)||r in e&&e[r]===n[r]||(e[r]=n[r]))}));var r=Op;e.batch=r.unstable_batchedUpdates,(0,sd.setBatch)(r.unstable_batchedUpdates)}(Jc);var Ep=process.env.SERVER_URL;process.env.ACCOUNT_KEY;var Mp="48",Tp="ScheduleButton";var Cp=u.exports.createContext(null);function Np(){var e=u.exports.useContext(Cp);return null==e?void 0:e.env}function Dp(e,t){var n=function(e){return(null==e?void 0:e.connection)?e.connection:{serverUrl:null==e?void 0:e.serverUrl,accountKey:null==e?void 0:e.accountKey,type:(null==e?void 0:e.direct)?"direct":"websocket"}}(e),r=n.accountKey,a=n.serverUrl,o=n.type;return u.exports.useMemo((function(){return{accountKey:r,serverUrl:a,type:o,nonce:t}}),[r,a,o,t])}var jp=function(e){var t=e.label,n=e.disable,r=e.type,a=e.addClass,o=e.onClick;return H.createElement("button",{disabled:n,type:r,className:"action-button ".concat(a),onClick:function(e){e.stopPropagation(),o&&o(t)}},t)},Ip=H.memo((function(e){var t=e.button,n=e.onClick,r=u.exports.useCallback((function(){n(t)}),[t,n]);return H.createElement(jp,{onClick:r,addClass:"button-card",label:t.label})})),Rp=H.memo((function(e){return H.createElement("div",{className:"buttons-container "+(e.className||"")},e.buttons.map((function(t,n){return H.createElement(Ip,{button:t,onClick:e.onClick,key:n})})))})),Lp=function(e){var t=e.imageUrl.replace(/'/g,"%27"),n=H.createElement("div",{className:"chat-card-img__content",style:{backgroundImage:"url(".concat(t,")")}});return e.imageActionUrl?H.createElement("a",{href:e.imageActionUrl,"aria-label":"read more",target:"_blank",rel:"noopener noreferrer",className:"chat-card-img"},n):H.createElement("div",{className:"chat-card-img"},n)},Up=function(e){var t,n,r,a,o=e.card;return o.imageUrl&&(r=H.createElement("div",{className:"chat-card-container__img"},H.createElement(Lp,{imageUrl:o.imageUrl,imageActionUrl:o.imageActionUrl}))),o.title&&(n=H.createElement("div",{className:"chat-card-title"},H.createElement("span",null,o.title))),o.content&&(a=H.createElement("div",{className:"chat-card-sub-title"},H.createElement("span",null,o.content))),H.createElement("div",{className:"chat-card-container"},r,n,a,!!(null===(t=o.buttons)||void 0===t?void 0:t.length)&&H.createElement(Rp,{buttons:o.buttons,onClick:e.onButtonClick}))};function Ap(e){return!!e&&e.startsWith("agent:")}var Fp=function(){this.retries=5,this.timeout=1e3,this.log=!1},zp=function(){function e(e){e&&(this.options=Object.assign(new Fp,e))}return e.prototype.fetch=function(e,t){return n(this,void 0,void 0,(function(){var n,a,o,i;return r(this,(function(r){switch(r.label){case 0:t||(t=this.options),r.label=1;case 1:return r.trys.push([1,3,,5]),n=new AbortController,a=setTimeout((function(){n.abort()}),t.timeout),[4,e(n.signal)];case 2:return o=r.sent(),clearTimeout(a),[2,o];case 3:if(i=r.sent(),1===t.retries||t.retries<1)throw i;return[4,this.fetch(e,{timeout:t.timeout,retries:t.retries-1})];case 4:return[2,r.sent()];case 5:return[2]}}))}))},e}();var Wp="^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$";function Yp(){return(new Date).toISOString()+" ::"}function Hp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"debug"===window.xaLogLevel&&console.log.apply(console,a([Yp()],e,!1))}function Bp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,a([Yp()],e,!1))}var qp=function(e){var t,n,r,a={},o=e.entity,i=u.exports.useContext(Cp),s=null==o?void 0:o.avatarPath;if(!s){var l=function(e){var t=(null==e?void 0:e.initials)||"?",n=(null==e?void 0:e.size)||40,r=(null==e?void 0:e.backgroundColor)||"#007bff",a=(null==e?void 0:e.textColor)||"#ffffff";return H.useMemo((function(){return function(e,t,n,r){var a=document.createElement("canvas");a.width=t,a.height=t;var o=a.getContext("2d");o.fillStyle=n,o.fillRect(0,0,t,t),o.fillStyle=r,o.font="".concat(t/2,"px Arial"),o.textAlign="center",o.textBaseline="middle",o.fillText(e,t/2,t/2);var i=new Image;return i.src=a.toDataURL(),i}(t,n,r,a)}),[t,n,r,a])}({initials:(null==o?void 0:o.displayName)?o.displayName.slice(0,2):"?",backgroundColor:null===(n=null===(t=null==i?void 0:i.env)||void 0===t?void 0:t.theme)||void 0===n?void 0:n.primaryColor,size:36});s=l.src}var c=o&&Ap(o.nick);c?(a.backgroundImage="url('".concat(s,"')"),a.backgroundColor="none"):r=H.createElement("svg",{width:"16",height:"19",viewBox:"0 0 16 19",style:{margin:"0 auto",display:"block"}},H.createElement("path",{d:"M11.5 5c0-1.933-1.567-3.5-3.5-3.5S4.5 3.067 4.5 5 6.067 8.5 8 8.5s3.5-1.567 3.5-3.5zM3 5c0-2.76 2.24-5 5-5s5 2.24 5 5-2.24 5-5 5-5-2.24-5-5zM1.955 17.294c.21-.642.504-1.285.898-1.88C3.963 13.74 5.615 12.75 8 12.75c2.385 0 4.038.99 5.147 2.664.394.595.69 1.238.898 1.88.124.382.19.672.214.822.063.41.447.69.856.625.41-.063.69-.447.625-.856-.034-.225-.118-.59-.27-1.053-.247-.763-.598-1.527-1.073-2.244C13.024 12.51 10.917 11.25 8 11.25c-2.916 0-5.024 1.26-6.397 3.336-.475.717-.826 1.48-1.074 2.245-.152.463-.236.83-.27 1.054-.065.41.215.793.624.857.41.065.793-.215.857-.624.025-.15.09-.44.215-.822z",fill:"#FFF",fillRule:"evenodd"}));var d=!!a.backgroundImage||!!r;return H.createElement("div",{className:"avatar ".concat(c?"avatar--agent":"avatar--visitor"," ").concat(d?"":"avatar--empty"),style:a,title:o?o.display_name:"Agent"},r)};var Vp=function(e){return H.createElement("div",{className:"xappw-chat-msg-part"},e.showAvatar&&(t=e.user,H.createElement("div",{className:"xappw-chat-msg-part__avatar"},H.createElement(qp,{entity:t}))),e.children);var t};function Qp(e,t){return{type:"synthetic",detail:{type:"write_msg",user:t,msg:e,timestamp:+new Date}}}function $p(e,n){return function(r){return function(a,o){var i=o().attributes;i=t(t({},i),{currentUrl:window.location.href}),r.sendChatMsg({text:e,token:n,attributes:i},(function(e){e&&Hp("Error sending message",e)}));var u=o().visitor;a(Qp({text:n?"".concat(e," (from the list)"):e},u))}}}function Kp(e){return function(t){return function(){t.sendTyping(e)}}}function Jp(e,t){return function(n){return function(){n.setVisitorInfo(e,t,(function(e){e&&Hp(e)}))}}}function Xp(e){return{type:"account_status",detail:{status:e,timestamp:+new Date}}}function Gp(e){return{type:"connection_update",detail:{status:e,timestamp:+new Date}}}function Zp(e){throw new Error("Unknown kind "+e)}function ev(){return Jc.useDispatch()}var tv=function(){function e(e){this.inner=e}return e.prototype.bargeOut=function(e){Hp("CLIENT: bargeOut"),this.inner.bargeOut(e)},e.prototype.bargeIn=function(e,t){Hp("CLIENT: bargeIn: ".concat(e)),this.inner.bargeIn(e,t)},e.prototype.init=function(e){this.inner.init(e)},e.prototype.sendOfflineMsg=function(e,t){Hp("CLIENT: sendOfflineMsg: ".concat(JSON.stringify(e))),this.inner.sendOfflineMsg(e,t)},e.prototype.sendChatMsg=function(e,t){Hp("CLIENT: sendChatMsg: ".concat(JSON.stringify(e))),this.inner.sendChatMsg(e,t)},e.prototype.sendChatMsgRequest=function(e,t){Hp("CLIENT: sendChatMsgRequest: ".concat(JSON.stringify(e))),this.inner.sendChatMsgRequest(e,t)},e.prototype.sendTyping=function(e){Hp("CLIENT: sendTyping: ".concat(JSON.stringify(e))),this.inner.sendTyping(e)},e.prototype.setVisitorInfo=function(e,t,n){Hp("CLIENT: setVisitorInfo: ".concat(JSON.stringify(e)," session id: ").concat(t)),this.inner.setVisitorInfo(e,t,n)},e.prototype.sendChatRating=function(e){Hp("CLIENT: sendChatRating: ".concat(JSON.stringify(e))),this.inner.sendChatRating(e)},e.prototype.sendFile=function(e,t){Hp("CLIENT: sendFile: ".concat(JSON.stringify(e))),this.inner.sendFile(e,t)},e.prototype.markAsRead=function(){Hp("CLIENT: markAsRead:"),this.inner.markAsRead()},e.prototype.flush=function(){Hp("CLIENT: flush:"),this.inner.flush()},e.prototype.dispose=function(){Hp("CLIENT: dispose:"),this.inner.dispose()},e.prototype.sleep=function(){Hp("CLIENT: sleep:"),this.inner.sleep()},e.prototype.wakeup=function(){Hp("CLIENT: wakeup:"),this.inner.wakeup()},e}(),nv={};Object.defineProperty(nv,"__esModule",{value:!0});var rv=u.exports;function av(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var ov=av(rv);var iv=function(e){var t=e.format,n=e.text;return ov.default.createElement("span",{"data-rich-text-type":"bold",className:"xapp-search-rich-text-bold-span"},n.substring(t.start,t.end))},uv=function(e){var t=e.format,n=e.text,r=e.readOnly,a=e.onClick,o=t.text||n.substring(t.start,t.end),i=rv.useState(o),u=i[0],s=i[1],l=rv.useCallback((function(e){s(e.target.value)}),[]),c=rv.useCallback((function(e){a&&(!1===a(t)&&(e.preventDefault(),e.stopPropagation()))}),[a,t]);return r?ov.default.createElement("span",{className:"xapp-search-rich-text-input-span xapp-search-rich-text-input-span--readonly",onClick:c},o):ov.default.createElement("input",{type:"text",value:u,className:"xapp-search-rich-text-input-span","data-rich-text-type":"inputText",onChange:l,onClick:c,readOnly:r})},sv=function(e){var t=e.format,n=e.text;return ov.default.createElement("span",{"data-rich-text-type":"normal",className:"xapp-search-rich-text-normal-span"},n.substring(t.start,t.end))},lv=function(e){var t=e.format,n=e.text,r=e.readOnly,a=e.onClick,o=t.type;switch(o){case"normal":return ov.default.createElement(sv,{text:n,format:t,readOnly:r});case"bold":return ov.default.createElement(iv,{text:n,format:t,readOnly:r});case"inputText":return ov.default.createElement(uv,{text:n,format:t,readOnly:r,onClick:a});default:!function(e){throw new Error("Unknown kind "+e)}(o)}};function cv(e,t){for(var n=[],r=0,a=0,o=e;a<o.length;a++){var i=o[a],u=i.start,s=i.end,l=i.type,c=i.text;r<u&&n.push({type:"normal",start:r,end:u}),n.push({type:l,start:u,end:s,text:c}),r=s}return r<t&&n.push({type:"normal",start:r,end:t}),n}function dv(e){var t=e.childNodes,n=[],r="";return t.forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e,a="INPUT"===t.tagName?t.value:t.innerText,o=t.dataset.richTextType;n.push({type:o,start:r.length,end:r.length+a.length}),r+=a}e.nodeType===Node.TEXT_NODE&&((a=e.nodeValue)&&(n.push({type:"normal",start:r.length,end:r.length+a.length}),r+=a))})),function(e){for(var t=e.text,n=[],r=0,a=e.formats;r<a.length;r++){var o=a[r],i=o.type;switch(i){case"normal":continue;case"inputText":n.push(o);break;case"bold":if(n.length>0){var u=n[n.length-1];u.type===i&&u.end===o.start&&(n.pop(),n.push({type:i,start:u.start,end:o.end}))}else n.push(o)}}return{text:t,formats:n}}({text:r,formats:n})}var fv=function(e){var t=e.value,n=e.className,r=e.readOnly,a=e.onInput,o=e.onChange,i=e.onSpanClick,u=t.formats,s=t.text,l=rv.useMemo((function(){return cv(u,s.length)}),[u,s.length]),c=rv.useCallback((function(e){var t=dv(e.currentTarget);a&&a(t)}),[a]),d=rv.useCallback((function(e){var t=e.currentTarget,n=dv(t);!function(e){for(var t,n=[],r=e.childNodes,a=0;a<r.length;a++)(null==(u=r.item(a))?void 0:u.nodeType)===Node.TEXT_NODE&&n.push(u);for(var o=0,i=n;o<i.length;o++){var u=i[o];try{null===(t=u.parentElement)||void 0===t||t.removeChild(u)}catch(e){}}}(t),o&&o(n)}),[o]);return ov.default.createElement("div",{id:e.id,className:"xapp-search-rich-text ".concat(n||""),contentEditable:!r,suppressContentEditableWarning:!0,onInput:c,onBlur:d,onKeyDown:e.onKeyDown},l.map((function(e,t){return ov.default.createElement(lv,{key:t,format:e,text:s,readOnly:r,onClick:i})})))},pv=function(e){return ov.default.createElement("div",{className:"xappw-suggestions-group-heading"},e.label)};var vv=function(e){var t=e.data,n=e.current,r=e.actions,a=e.onClick,o=e.onHover,i=e.onSpanClick,u=rv.useCallback((function(){a(t)}),[t,a]),s=rv.useCallback((function(){o&&o(t)}),[t,o]),l=rv.useCallback((function(e){if(i)return i(t,e)}),[i,t]),c=rv.useRef(null);return rv.useEffect((function(){var e=c.current;if(n&&e){var t=function(e){for(var t=e;t&&!t.classList.contains("xapp-search-result__suggestions");)t=t.parentElement;return t||void 0}(e);if(t){var r=t.getBoundingClientRect(),a=e.getBoundingClientRect(),o=Math.max(r.top,a.top);Math.min(r.bottom,a.bottom)-o<.99*a.height&&e.scrollIntoView({behavior:"smooth"})}}}),[n]),ov.default.createElement("div",{ref:c,className:"xappw-suggestions-item ".concat(n?"xappw-suggestions-item--current":""),onClick:u,onMouseEnter:s},ov.default.createElement(fv,{value:t,className:"xappw-suggestions-item__texts",readOnly:!0,onSpanClick:l}),r&&ov.default.createElement("div",{className:"xappw-suggestions-item__actions"},ov.default.createElement(r,{data:t,current:n})))},hv=function(e){var t=e.group,n=e.currentIndex,r=e.itemActions,a=t.heading,o=t.items;return ov.default.createElement("div",{className:"xappw-suggestions-group"},ov.default.createElement("div",{className:"xappw-suggestions-group__heading"},ov.default.createElement(pv,{label:a})),ov.default.createElement("div",{className:"xappw-suggestions-group__items"},o.map((function(t,a){return ov.default.createElement(vv,{key:a,data:t,current:n===a,actions:r,onClick:e.onItemClick,onHover:e.onItemHover,onSpanClick:e.onSpanClick})}))))};function mv(e){return e.reduce((function(e,t){return e+t.items.length}),0)}function gv(e){var t=Object.keys(e)[0],n=e[t];if(!n)throw new Error;return{type:t,start:n.start,end:n.end}}function yv(e){switch(e){case"FAQ":return"FAQs";case"INTENT":case"HISTORICAL":return"Suggestions";default:return e}}function xv(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,u)}s((r=r.apply(e,t||[])).next())}))}function bv(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}"function"==typeof SuppressedError&&SuppressedError;var wv=["FAQ","INTENT","HISTORICAL"].reduce((function(e,t,n){return e[t]=n,e}),{});function kv(e,t){return function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}([],e,!0).sort((function(e,n){return function(e,t,n){return n*(wv[t.type]-wv[e.type])}(e,n,t)}))}function _v(e,t){var n=new URL(e).searchParams;t.forEach((function(e,t){n.append(t,e)}));var r=new URL(e);return r.search=n.toString(),r}var Ov={};function Sv(){}function Pv(e,t){void 0===t&&(t=Ov);var n=rv.useState({state:"paused"}),r=n[0],a=n[1],o=t.pause;return rv.useEffect((function(){if(o)return a({state:"paused"}),Sv;var t=new AbortController,n=t.signal,r=!0;return function(){xv(this,void 0,void 0,(function(){var t,o,i;return bv(this,(function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),a({state:"fetching"}),[4,fetch(e,{signal:n})];case 1:return t=u.sent(),r?[4,t.json()]:[3,3];case 2:o=u.sent(),t.ok?a({state:"success",data:o}):a({state:"error",error:o}),u.label=3;case 3:return[3,5];case 4:if("AbortError"===(i=u.sent()).name)return a({state:"paused"}),[2];throw i;case 5:return[2]}}))}))}(),function(){r=!1,t.abort()}}),[e,o]),r}var Ev=nv.IconButton=function(e){var t=e.icon;return ov.default.createElement("div",{tabIndex:e.tabIndex?Number(e.tabIndex):0,className:"xapp-search-icon-button ".concat(e.className||""),onClick:e.onClick},ov.default.createElement("div",{className:"xapp-search-icon-button__content"},ov.default.createElement(t,null)))};nv.MessageBubble=function(e){return ov.default.createElement("div",{className:"xappw-message-bubble"},e.children)};var Mv=nv.RichInput=function(e){var t=e.id,n=e.value,r=e.type,a=e.autoFocus,o=e.spellCheck,i=e.tabIndex,u=e.onChange,s=e.onInput,l=e.onKeyDown,c=e.onSearch,d=n.formats.some((function(e){return"inputText"===e.type})),f=rv.useCallback((function(e){u({text:e.target.value,formats:[]})}),[u]),p=rv.useCallback((function(e){u(e)}),[u]),v=rv.useCallback((function(e){s&&s({text:e.target.value,formats:[]})}),[s]),h=rv.useCallback((function(e){s&&s(e)}),[s]),m=rv.useCallback((function(e){l&&l(e)}),[l]),g=rv.useRef(null),y=g.current;return rv.useEffect((function(){if(y&&c){var e=function(e){var t=e.target;t&&c({text:t.value,formats:[]})};return y.addEventListener("search",e),function(){y.removeEventListener("search",e)}}}),[y,c]),ov.default.createElement("div",{className:"xappw-rich-input ".concat(e.className)},d?ov.default.createElement(fv,{id:t,value:n,onChange:p,onInput:h,onKeyDown:m,className:"xappw-rich-input__input ".concat(e.className,"__input")}):ov.default.createElement("input",{id:t,ref:g,type:r,value:n.text,autoComplete:"off",autoFocus:a,placeholder:e.placeholder,spellCheck:o,tabIndex:i?Number(i):0,className:"xappw-rich-input__input ".concat(e.className,"__input"),onFocus:e.onFocus,onChange:f,onInput:v,onKeyDown:m}))};nv.RichText=fv,nv.SuggestionsGroup=hv,nv.SuggestionsGroupHeading=pv,nv.SuggestionsItem=vv;var Tv=nv.SuggestionsList=function(e){var t=e.suggestions,n=e.itemActions,r=e.className,a=rv.useMemo((function(){return t?mv(t):0}),[t])>=0?e.index:NaN,o=0;return ov.default.createElement("div",{className:"xappw-suggestions-list ".concat(r||"")},null==t?void 0:t.map((function(t,r){var i=ov.default.createElement(hv,{key:r,group:t,currentIndex:a-o,itemActions:n,onItemClick:e.onItemClick,onItemHover:e.onItemHover,onSpanClick:e.onSpanClick});return o+=t.items.length,i})))};nv.addQueryParametersToURL=_v,nv.extendFormat=cv;var Cv=nv.findItemByIndex=function(e,t){if(t>=0)for(var n=0,r=e;n<r.length;n++)for(var a=0,o=r[n].items;a<o.length;a++){var i=o[a];if(t<=0)return i;t--}},Nv=nv.getItemsLength=mv,Dv=nv.parseSuggestionsResponse=function(e,t){if(void 0===t&&(t=1),e)return kv(e.suggestions,t).reduce((function(e,t){var n,r,a={text:(n=t).suggestion,content:n.answer,formats:(r=n.format,r.map(gv)),type:n.type};if(e.length){var o=e[e.length-1];if(o.heading===yv(t.type))return o.items.push(a),e}return e.push({heading:yv(t.type),items:[a]}),e}),[])};nv.sortSuggestionItems=kv,nv.useJsonFetch=Pv;var jv=nv.useSuggestionsFetch=function(e){var t=e.url,n=e.context,r=e.query,a=rv.useMemo((function(){if(t){var e=new URLSearchParams;return e.append("size","5"),e.append("queryText",r),(null==n?void 0:n.length)&&e.append("activeContexts",n.join(",")),_v(t,e)}}),[r,n,t]);return Pv(a?"".concat(a.toString()):"",{pause:!r||!t})},Iv=nv.uuid=function(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-65xx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}));return t};function Rv(e){if(e)return"string"==typeof e?{displayText:e}:e}function Lv(e,n){var r,a,o,i,u,s,l,c,d;if(void 0===n&&(n=(new Date).getTime()),!e)return s;var f=Rv(e.outputSpeech),p=Rv(e.reprompt);return f&&(l=f.displayText,c=f.html),"TRANSFER_CALL"===e.system?s={type:"handOff",timestamp:n,handoffMessage:l,handoffTarget:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.transferPhoneNumber,endSession:!1,user:void 0}:(null===(a=e.system)||void 0===a?void 0:a.startsWith("PERMISSION_"))?s=function(e,t){var n,r=function(e){switch(e){case"PERMISSION_EMAIL":return"EMAIL";case"PERMISSION_LOCATION_PRECISE":return"LOCATION_PRECISE";default:throw new Error("Unsupported permission: ".concat(e))}}(e.system),a=Rv(e.outputSpeech),o=e.data.permissionPrimerAccepted,i=e.data.permissionDenied;return{type:"permissionRequest",timestamp:t,msg:{text:null!==(n=null==a?void 0:a.displayText)&&void 0!==n?n:"".concat(e.data.permissionRequestTTSContext),permissionRequest:{time:t,type:r,approve:"object"==typeof o?Lv({outputSpeech:o}).msg:void 0,deny:"object"==typeof i?Lv({outputSpeech:i}).msg:void 0}},endSession:!1,user:void 0}}(e,n):(d=!p||!(p.displayText||p.ssml),s={type:"msg",timestamp:n,msg:{displays:e.displays,context:null===(i=null===(o=e.context)||void 0===o?void 0:o.active)||void 0===i?void 0:i.map((function(e){return e.name}))},endSession:d,user:void 0},l&&!c&&(s.msg=t(t({},s.msg),{text:l})),c&&(s.msg=t(t({},s.msg),{html:c})),(null===(u=null==f?void 0:f.suggestions)||void 0===u?void 0:u.length)&&(s.msg.options=f.suggestions.map((function(e){return"string"==typeof e?e:{label:e.title,actionUrl:e.url}})))),s}function Uv(e){var t=e.items,n=[{retry:0,delay:10,text:""}];if(Array.isArray(t)&&t.length>0)for(var r=0;r<t.length;r++)n.push({retry:r+1,delay:t[r].delay,text:t[r].text});return n}function Av(e){return{type:"session_id",detail:{sessionId:e,timestamp:(new Date).getTime()}}}var Fv=function(){function e(e,t){this._userId="",this._sessionId="",this._accessToken="",this._attributes={},this.config=e,this.options=t,this.configurableMessages=t.configurableMessages,this.isNewSession=!1,this.hooks=t.hooks}return e.prototype.init=function(e){this.dispatch=e,Hp("got init auth: ".concat(this.config.key)),this.setConnectionStatus("online"),this.setAccountStatus("online")},e.prototype.setConnectionStatus=function(e){Hp("SERVER: connection_update: ".concat(JSON.stringify(e))),this.dispatch(Gp(e))},e.prototype.setAccountStatus=function(e){Hp("SERVER: account_status: ".concat(JSON.stringify(e))),this.dispatch(Xp(e))},e.prototype.sendNewMessage=function(e){Hp("SERVER: new message: ".concat(JSON.stringify(e))),this.dispatch({type:"chat",detail:{type:"chat.msg",user:t(t({},e.user),{nick:"agent:robot"}),msg:e.msg,timestamp:+new Date}})},e.prototype.userJoined=function(e){Hp("SERVER: user joined: ".concat(JSON.stringify(e))),this.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:t(t({},e.user),{nick:"agent:robot"}),timestamp:+new Date}})},e.prototype.typing=function(){this.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!0,timestamp:+new Date}})},e.prototype.stopTyping=function(){this.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!1,timestamp:+new Date}})},e.prototype.sendFailureMessage=function(e,t,n){this.stopTyping(),this.dispatch({type:"chat",detail:{type:"chat.failureMsg",user:{nick:"agent:robot"},failureMsg:{retry:e,delay:t,text:n},timestamp:+new Date}})},e.prototype.sendOfflineMsg=function(e,t){t()},e.prototype.sendChatMsg=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this.sendChatMsgRequest({msg:e,timestamp:(new Date).getTime(),agent:!1,user:void 0,type:"msg"},t)]}))}))},e.prototype.bargeOut=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeOut")}))}))},e.prototype.bargeIn=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeIn")}))}))},e.prototype.getBot=function(e){var n,r=null===(n=this.options)||void 0===n?void 0:n.bot;return e?e.displayName&&e.nick&&e.avatarPath?e:t(t({},e),{nick:e.nick||r.nick||"Bot",displayName:e.displayName||r.displayName||"Bot",avatarPath:e.avatarPath||r.avatarPath}):r},e.prototype.sendChatMsgRequest=function(e,a){return n(this,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,this.postMessage(e)];case 1:return n=r.sent(),(null===(o=n.user)||void 0===o?void 0:o.displayName)||(n=t(t({},n),{user:this.getBot(n.user)})),this.sendNewMessage(n),a(),[2]}}))}))},e.prototype.sendTyping=function(){},e.prototype.setVisitorInfo=function(e,n,r){this.visitorInfo=e,this._attributes=t({},this.visitorInfo.attributes);var a=new URL(window.location.href);(null==a?void 0:a.host.toLowerCase().startsWith("localhost"))?this._attributes.isLocal=!0:this._attributes.currentUrl=window.location.href,this._accessToken=this.visitorInfo.accessToken,this.userJoined({user:this.getBot(void 0),token:""}),this.startSession(n),r()},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(e,t){t()},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){},e.prototype.sleep=function(){},e.prototype.wakeup=function(){},e.prototype.postMessage=function(e){return n(this,void 0,void 0,(function(){var a,o,i,u,s,l,c,d,f,p,v,h,m,g,y,x,b,w,k,_,O,S,P,E,M,T,C,N,D=this;return r(this,(function(j){switch(j.label){case 0:o=this._userId,i=this._sessionId,u=this._accessToken,s=this._attributes||{},(l=localStorage.getItem("xa_rwg_token"))&&(s.rwg_token=l),(c=localStorage.getItem("xa_merchant_id"))&&(s.merchant_id=c),(d=localStorage.getItem("xa_environment"))&&(s.environment=d),f=(new Date).getTime(),this.isNewSession&&!(null===(E=null==e?void 0:e.msg)||void 0===E?void 0:E.text)?a={type:"LAUNCH_REQUEST",rawQuery:null===(M=null==e?void 0:e.msg)||void 0===M?void 0:M.text,sessionId:i,userId:o,isNewSession:!0,intentId:"LaunchRequest",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}:(p=null===(T=e.msg)||void 0===T?void 0:T.permissionRequest)?(e=t(t({},e),{msg:t(t({},e.msg),{permissionRequest:void 0})}),v=f-p.time>3e5,h=null===(C=e.msg.text)||void 0===C?void 0:C.toLowerCase(),m=!v,g={id:this._userId},v||("EMAIL"===p.type&&(y=function(e){var t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(String(e).toLowerCase())}(h),m=y,g.email=this.visitorInfo.email,g.name=this.visitorInfo.displayName,this.visitorInfo.email=h),"LOCATION_PRECISE"===p.type&&(m=!!e.msg.location,g.preciseLocation=e.msg.location?{coordinates:{latitude:e.msg.location.latitude,longitude:e.msg.location.longitude}}:void 0)),a={type:"PERMISSION_GRANT",rawQuery:e.msg.text,sessionId:this._sessionId,userId:this._userId,isNewSession:!1,granted:m,userProfile:g,intentId:"PermissionGrant",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}):a="custom"===e.type?t(t({},JSON.parse(e.payload)),{sessionId:this._sessionId,userId:this._userId,isNewSession:!1,platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}):e.msg.token?{type:"OPTION_SELECT_REQUEST",token:e.msg.token,sessionId:this._sessionId,userId:this._userId,isNewSession:!1,intentId:"OptionSelect",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s}:{type:"INTENT_REQUEST",rawQuery:e.msg.text,sessionId:this._sessionId,userId:this._userId,isNewSession:!1,intentId:"NLU_RESULT_PLACEHOLDER",platform:"stentor-platform",channel:"widget",accessToken:u,attributes:s},Hp("Visitor says: ".concat(JSON.stringify(a,void 0,2))),x=Uv(this.configurableMessages),w=!1,k=function(e){b=e,w=!0},_=function(e,t){return n(D,void 0,void 0,(function(){var n,a,o;return r(this,(function(r){return n=x[e].retry,a=x[e].delay,o=x[e].text,Bp("POST failed: ".concat(t)),this.sendFailureMessage(n,a,o),b={errorText:""},[2,new Promise((function(e){setTimeout(e,1e3*a)}))]}))}))},O=1,j.label=1;case 1:return O<x.length?(S=this.config.timeout||15e3,this.typing(),[4,new zp({retries:1,timeout:S}).fetch((function(e){return function(e,t,a,o){return n(this,void 0,void 0,(function(){var n,i;return r(this,(function(r){switch(r.label){case 0:return n=JSON.stringify(e),Hp("URL: ".concat(t)),Hp("BODY: ".concat(n)),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a),"User-Agent":"Stentor Chat Server"},body:n,mode:"cors",signal:o})];case 1:if(!(i=r.sent()).ok)throw new Error("Status ".concat(i.status,", Text: ").concat(i.statusText));return[2,i.json()]}}))}))}(a,D.config.url,D.config.key,e)})).then(k).catch(_.bind(this,O))]):[3,4];case 2:if(j.sent(),w)return[3,4];j.label=3;case 3:return O++,[3,1];case 4:return Hp("Bot says: ".concat(JSON.stringify(b,void 0,2))),this.isNewSession=!1,P=Lv(b),!(null==b?void 0:b.hasOwnProperty("errorText"))&&b||((P={type:"userLeft",timestamp:f,msg:{},user:void 0,endSession:!0}).msg={text:(null==b?void 0:b.hasOwnProperty("errorText"))?b.errorText:"The assistant is not responding right now. Please close the widget and open it again."}),"function"==typeof(null===(N=this.hooks)||void 0===N?void 0:N.onResponse)&&this.hooks.onResponse(b),this.stopTyping(),[2,P]}}))}))},e.prototype.startSession=function(e){this.visitorInfo.visitorId?this._userId="".concat(this.visitorInfo.visitorId):this.visitorInfo.email?this._userId="stentor-widget-user-".concat(this.visitorInfo.email):this._userId="stentor-widget-user-".concat(Iv()),e?(this._sessionId=e,Hp("Using persisted session id: ".concat(this._sessionId))):(this._sessionId="stentor-widget-session-".concat(Iv()),this.dispatch(Av(this._sessionId)),Hp("Using generated session id: ".concat(this._sessionId))),this.isNewSession=!0},Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionId",{get:function(){return this._sessionId},enumerable:!1,configurable:!0}),e}();var zv=function(){function e(){}return e.prototype.init=function(){},e.prototype.sendOfflineMsg=function(){},e.prototype.sendChatMsg=function(){},e.prototype.sendChatMsgRequest=function(){},e.prototype.sendTyping=function(){},e.prototype.setVisitorInfo=function(){},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(){},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){},e.prototype.bargeOut=function(){},e.prototype.bargeIn=function(){},e.prototype.sleep=function(){},e.prototype.wakeup=function(){},e}(),Wv=3e5;function Yv(e,n,r,a,o,i,u){var s,l,c,d,f,p,v=(new Date).getTime();if(r&&!(null===(s=null==e?void 0:e.msg)||void 0===s?void 0:s.text))p={type:"LAUNCH_REQUEST",rawQuery:null===(l=null==e?void 0:e.msg)||void 0===l?void 0:l.text,sessionId:a,userId:n,isNewSession:!0,intentId:"LaunchRequest",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i};else{var h=null===(c=e.msg)||void 0===c?void 0:c.permissionRequest;if(h){e=t(t({},e),{msg:t(t({},e.msg),{permissionRequest:void 0})});var m=v-h.time>Wv,g=null===(d=e.msg.text)||void 0===d?void 0:d.toLowerCase(),y=!m,x={id:n};if(!m){if("EMAIL"===h.type){var b=function(e){var t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(String(e).toLowerCase())}(g);y=b,x.email=u.email,x.name=u.displayName,this.visitorInfo.email=g}"LOCATION_PRECISE"===h.type&&(y=!!e.msg.location,x.preciseLocation=e.msg.location?{coordinates:{latitude:e.msg.location.latitude,longitude:e.msg.location.longitude}}:void 0)}p={type:"PERMISSION_GRANT",rawQuery:e.msg.text,sessionId:a,userId:n,isNewSession:!1,granted:y,userProfile:x,intentId:"PermissionGrant",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}}else p="custom"===e.type?t(t({},JSON.parse(e.payload)),{sessionId:a,userId:n,isNewSession:!1,platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}):e.msg.token?{type:"OPTION_SELECT_REQUEST",token:e.msg.token,sessionId:a,userId:n,isNewSession:!1,intentId:"OptionSelect",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}:{type:"INTENT_REQUEST",rawQuery:e.msg.text,sessionId:a,userId:n,isNewSession:!1,intentId:"NLU_RESULT_PLACEHOLDER",platform:"stentor-platform",channel:"widget",accessToken:o,attributes:i}}return(null===(f=e.msg)||void 0===f?void 0:f.attributes)&&(p.attributes=t(t({},p.attributes),e.msg.attributes)),p}var Hv="router",Bv={deviceId:"Router",userId:Hv,isAdmin:!1,displayName:"XAPP Server",urlAttributes:{path:[],query:{}}},qv=function(){function e(e,t){var n,r;this.isDisposed=!1,this._userId="",this._sessionId="",this.accessToken="",this.attributes={},this.isAdmin=!1,this.urlAttributes={},this.handlers={},this.config=e,this.options=t;var a=new URL(this.config.url);this.appId=a.searchParams.get("appId");var o=new URL(window.location.href);if(this.isAdmin="true"===o.searchParams.get("isAdmin"),this.appId)this.serverUrl=this.config.url,this.urlAttributes.path=null===(n=a.pathname)||void 0===n?void 0:n.split("/");else{this.serverUrl="".concat(a.origin);var i=null===(r=a.pathname)||void 0===r?void 0:r.split("/");i&&i.length>1&&(this.serverUrl="".concat(this.serverUrl,"/").concat(i[1]),this.urlAttributes.path=i.slice(1))}Hp("WS url: ".concat(this.serverUrl," isAdmin: ").concat(this.isAdmin," attributes: ").concat(JSON.stringify(this.attributes)," appId: ").concat(this.appId)),this.configurableMessages=Uv(t.configurableMessages),this.noOfServerErrors=0}return e.prototype.init=function(e){var t,n,r=this;this.dispatch=e,this.setAccountStatus("offline"),this.handlers["connection update"]=function(e,t,n){Hp("Connection update received. Session created: ".concat(e.sessionCreated," Error: ").concat(e.errorMessage||"")),e.sessionCreated?(r.sessionCreated=!0,r.setConnectionStatus("online")):(Bp("SERVER: something is wrong. Going offline."),r.dispatch(Xp("offline")),r.dispatch(Gp("offline")))},this.handlers["account status"]=function(t,n,r){e({type:"account_status",detail:{status:"online",timestamp:r||(new Date).getTime()}})},this.handlers.failure=function(e,t,n){Bp("SERVER: something's failed: type: ".concat(e.type," tries: ").concat(e.tries," error: ").concat(e.error));var a=r.configurableMessages[e.tries],o=a.retry,i=a.delay,u=a.text;r.sendFailureMessage(o,e.delay||i,u,t)},this.handlers["new message"]=function(e,t,n){var a,o;"Bot"===t.deviceId?("function"==typeof(null===(a=r.options.hooks)||void 0===a?void 0:a.onResponse)&&r.options.hooks.onResponse(o),o=Lv(e)):"Widget"===t.deviceId?o=function(e,t){if(void 0===t&&(t=(new Date).getTime()),e)return{type:"msg",timestamp:t,msg:{text:e.rawQuery},endSession:!1,user:void 0}}(e):Bp("Unknown sender device Id: ".concat(t.deviceId)),r.dispatch({type:"chat",detail:{type:"chat.msg",user:{displayName:t.displayName||t.email||t.userId,nick:Vv(t),avatarPath:t.avatarPath},msg:o.msg,timestamp:n||(new Date).getTime()}})},this.handlers["user joined"]=function(e,t,n){var a,o;r.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:{avatarPath:null===(o=null===(a=r.options)||void 0===a?void 0:a.bot)||void 0===o?void 0:o.avatarPath,displayName:t.displayName,nick:Vv(t)},timestamp:n||(new Date).getTime()}})},this.handlers["user left"]=function(e,t,n){r.dispatch({type:"chat",detail:{type:"chat.memberleave",user:{displayName:t.displayName,nick:Vv(t)},timestamp:n||(new Date).getTime()}})},this.handlers.typing=function(e,t,n){r.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:Vv(t)},typing:!0,timestamp:n||(new Date).getTime()}})},this.handlers["stop typing"]=function(e,t,n){r.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:Vv(t)},typing:!1,timestamp:n||(new Date).getTime()}})},this.handlers.disconnect=function(){Bp("SERVER: requested disconnect"),r.dispatch(Xp("offline")),r.dispatch(Gp("offline"))},this.handlers.reconnect=function(){r.dispatch(Xp("online")),r.dispatch(Gp("online"))},this.handlers["reconnect failed"]=function(e){Bp("SERVER: says re-connect failed"),r.dispatch(Xp("offline")),r.dispatch(Gp("offline"))},this.handlers["reconnect error"]=function(e){Bp("SERVER: says there was an error while re-connecting"),r.dispatch(Xp("offline"))},this.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:{avatarPath:null===(n=null===(t=this.options)||void 0===t?void 0:t.bot)||void 0===n?void 0:n.avatarPath,displayName:Bv.displayName,nick:Vv(Bv)},timestamp:(new Date).getTime()}}),this.setAccountStatus("online"),this.setConnectionStatus("online")},e.prototype.autoReconnect=function(e){var t=this;0===this.noOfServerErrors&&this.setConnectionStatus("pending");var n=this.setAccountStatus.bind(this),r=this.setConnectionStatus.bind(this);function a(){var t=setInterval((function(){var o=e();o?(Hp("Re-created WS connection"),o.onopen=function(){Hp("Re-opened WS connection"),n("online"),r("online"),o.onclose=function(){Hp("Closed WS connection (onclosed was called)"),a()},clearInterval(t)}):clearInterval(t)}),5e3)}Hp("Creating WS connection");var o=e();o&&(o.onclose=function(){Hp("Closed WS connection (onclosed was called)"),a()},this.ws.onopen=function(){Hp("Opened WS connection (onopen was called)"),t.setAccountStatus("online"),t.setConnectionStatus("online")})},e.prototype.wsClose=function(){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.onopen=null,this.ws.onmessage=null,this.ws.close())},e.prototype.wsCreate=function(e){var t=this;if(!this.isDisposed){Hp('Trying to re-connect. Reason: "'.concat(e,'"'));var n=new URL(this.serverUrl);if(n.searchParams.set("userId",this._userId),n.searchParams.set("isAdmin","".concat(this.isAdmin)),n.searchParams.set("createWsReason",e),this.ws&&this.ws.readyState!==WebSocket.CLOSED&&this.ws.readyState!==WebSocket.CLOSING){var r=this.ws.readyState;Hp("Forced WS close. State: ".concat(r));try{this.wsClose()}catch(e){e("Failed to close WS (ready state: ".concat(r,"): ").concat(e))}}return this.ws=new WebSocket(n.toString()),this.ws.onerror=function(e){var r;Bp("Error in WS connection. Url: ".concat(n.toString()," Type: ").concat(e?e.type:"?"," Ready State: ").concat(null===(r=t.ws)||void 0===r?void 0:r.readyState))},this.ws.onmessage=function(e){Hp("ROUTER says: ".concat(e.data));var n=JSON.parse(e.data);t.handlers[n.event]?t.handlers[n.event](n.data,n.sender,n.timeMs):Bp("Unknown router message event: ".concat(n.event))},this.ws}Hp("Stopping reconnect for disposed router connector")},e.prototype.checkConnection=function(){var e;return(null===(e=this.ws)||void 0===e?void 0:e.readyState)===WebSocket.OPEN},e.prototype.emit=function(e,t){return n(this,void 0,void 0,(function(){var n,a=this;return r(this,(function(r){switch(r.label){case 0:return n=JSON.stringify({event:e,data:t,sender:this.visitorInfo,sessionId:this._sessionId,timeMs:(new Date).getTime()}),Hp("Widget says: ".concat(n)),this.ws||this.autoReconnect(this.wsCreate.bind(this,"emitNoWs")),[4,Qv(this.checkConnection.bind(this),1e3,1e4,"connection").then((function(e){e>0&&Hp("Connection is ready in ".concat(e," ms")),a.ws.send(n),a.noOfServerErrors=0})).catch((function(e){Bp("Connection wait timed out in ".concat(e," ms (show error)")),a.setConnectionStatus("online")}))];case 1:return r.sent(),[2]}}))}))},e.prototype.setAccountStatus=function(e){Hp("SERVER account_status: ".concat(JSON.stringify(e))),this.dispatch(Xp(e))},e.prototype.setConnectionStatus=function(e){Hp("SERVER: connection_update: ".concat(JSON.stringify(e))),this.dispatch(Gp(e))},e.prototype.sendOfflineMsg=function(e,t){t()},e.prototype.sendChatMsg=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this.sendChatMsgRequest({msg:e,timestamp:(new Date).getTime(),agent:!1,user:void 0,type:"msg"},t)]}))}))},e.prototype.sendFailureMessage=function(e,t,n,r){this.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:Vv(r)},typing:!1,timestamp:+new Date}}),this.dispatch({type:"chat",detail:{type:"chat.failureMsg",user:{nick:Vv(r)},failureMsg:{retry:e,delay:t,text:n},timestamp:+new Date}})},e.prototype.sendDisconnectMessage=function(){this.dispatch({type:"chat",detail:{type:"chat.msg",user:{displayName:"Server",nick:Vv(Bv),avatarPath:Bv.avatarPath},msg:{text:0===this.noOfServerErrors?"I cannot connect to the server. Please try later.":"Nope. Still no luck. I still cannot connect to the server. Please don't give up."},timestamp:(new Date).getTime()}}),this.noOfServerErrors++},e.prototype.checkSession=function(){return this.sessionCreated},e.prototype.sendChatMsgRequest=function(e,t){return n(this,void 0,void 0,(function(){var n=this;return r(this,(function(r){switch(r.label){case 0:return this.checkSession()||this.setConnectionStatus("pending"),[4,Qv(this.checkSession.bind(this),1e3,1e4,"session creation").then((function(t){t>0&&Hp("Session creation is ready in ".concat(t," ms")),n.postMessage(e)})).catch((function(e){Bp("Session creation wait timed out in ".concat(e," ms")),n.setConnectionStatus("online"),n.sendDisconnectMessage()}))];case 1:return r.sent(),this.setConnectionStatus("online"),t(),[2]}}))}))},e.prototype.sendTyping=function(e){},e.prototype.setVisitorInfo=function(e,n,r){Hp("Visitor Info Message = ".concat(JSON.stringify(e))),this.visitorInfo={deviceId:"Widget",userId:e.userId,displayName:e.displayName||e.name,email:e.email,isAdmin:this.isAdmin,urlAttributes:this.urlAttributes},this.attributes=t(t(t({},e.attributes),this.attributes),{currentUrl:window.location.href}),this.accessToken=e.accessToken,this.startSession(n),this.postVisitorInfo(),r()},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(e,t){t()},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){this.isDisposed=!0,this.ws&&this.wsClose(),Hp("Closed web socket (dispose)")},e.prototype.sleep=function(){this.isDisposed=!0,this.ws&&this.wsClose(),Hp("Closed web socket (sleep)")},e.prototype.wakeup=function(){this.isDisposed=!1,this._userId&&(this.autoReconnect(this.wsCreate.bind(this,"wakeup")),Hp("Waking up"))},e.prototype.bargeOut=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(e){return this.emit("barge out"),[2]}))}))},e.prototype.bargeIn=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(t){return this.visitorInfo.displayName=e,this.emit("barge in"),[2]}))}))},e.prototype.postVisitorInfo=function(){return n(this,void 0,void 0,(function(){return r(this,(function(e){return this.sessionCreated=!1,this.emit("user joined"),[2]}))}))},e.prototype.postMessage=function(e){return n(this,void 0,void 0,(function(){var t,n,a,o,i,u,s,l;return r(this,(function(r){return t=this._userId,n=this._sessionId,a=this.accessToken,o=this.attributes||{},(i=localStorage.getItem("xa_rwg_token"))&&(o.rwg_token=i),(u=localStorage.getItem("xa_merchant_id"))&&(o.merchant_id=u),(s=localStorage.getItem("xa_environment"))&&(o.environment=s),l=Yv(e,t,this.isNewSession,n,a,o,this.visitorInfo),this.emit("new message",l),[2]}))}))},e.prototype.startSession=function(e){this.visitorInfo.userId?this._userId="".concat(this.visitorInfo.userId):this.visitorInfo.email?this._userId="stentor-widget-user-".concat(this.visitorInfo.email):this._userId="stentor-widget-user-".concat(Iv());var t=new URL(window.location.href).searchParams.get("sessionId");t?(this._sessionId=t,this.dispatch(Av(this._sessionId)),Hp("Using enforced session id: ".concat(this._sessionId))):e?(this._sessionId=e,Hp("Using persisted session id: ".concat(this._sessionId))):(this._sessionId="stentor-widget-session-".concat(Iv()),this.dispatch(Av(this._sessionId)),Hp("Using generated session id: ".concat(this._sessionId))),this.isNewSession=!0,Hp("Started session: ".concat(this._sessionId))},e}();function Vv(e){return"Bot"===e.deviceId?"agent:bot:".concat(e.userId):"agent:widget:".concat(e.userId)}function Qv(e,t,n,r){var a=0,o=function(i,u){a>=n?u(a):e()?i(a):(a+=t,r&&Hp("Still waiting for ".concat(r," (").concat(a," ms)")),setTimeout((function(e){return o(i,u)}),t))};return new Promise(o)}const $v=Object.create(null);$v.open="0",$v.close="1",$v.ping="2",$v.pong="3",$v.message="4",$v.upgrade="5",$v.noop="6";const Kv=Object.create(null);Object.keys($v).forEach((e=>{Kv[$v[e]]=e}));const Jv={type:"error",data:"parser error"},Xv="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Gv="function"==typeof ArrayBuffer,Zv=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,eh=({type:e,data:t},n,r)=>Xv&&t instanceof Blob?n?r(t):th(t,r):Gv&&(t instanceof ArrayBuffer||Zv(t))?n?r(t):th(new Blob([t]),r):r($v[e]+(t||"")),th=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function nh(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let rh;const ah="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oh="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<ah.length;e++)oh[ah.charCodeAt(e)]=e;const ih="function"==typeof ArrayBuffer,uh=(e,t)=>{if("string"!=typeof e)return{type:"message",data:lh(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:sh(e.substring(1),t)};return Kv[n]?e.length>1?{type:Kv[n],data:e.substring(1)}:{type:Kv[n]}:Jv},sh=(e,t)=>{if(ih){const n=(e=>{let t,n,r,a,o,i=.75*e.length,u=e.length,s=0;"="===e[e.length-1]&&(i--,"="===e[e.length-2]&&i--);const l=new ArrayBuffer(i),c=new Uint8Array(l);for(t=0;t<u;t+=4)n=oh[e.charCodeAt(t)],r=oh[e.charCodeAt(t+1)],a=oh[e.charCodeAt(t+2)],o=oh[e.charCodeAt(t+3)],c[s++]=n<<2|r>>4,c[s++]=(15&r)<<4|a>>2,c[s++]=(3&a)<<6|63&o;return l})(e);return lh(n,t)}return{base64:!0,data:e}},lh=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,ch=String.fromCharCode(30);function dh(){return new TransformStream({transform(e,t){!function(e,t){Xv&&e.data instanceof Blob?e.data.arrayBuffer().then(nh).then(t):Gv&&(e.data instanceof ArrayBuffer||Zv(e.data))?t(nh(e.data)):eh(e,!1,(e=>{rh||(rh=new TextEncoder),t(rh.encode(e))}))}(e,(n=>{const r=n.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const e=new DataView(a.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{a=new Uint8Array(9);const e=new DataView(a.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(a[0]|=128),t.enqueue(a),t.enqueue(n)}))}})}let fh;function ph(e){return e.reduce(((e,t)=>e+t.length),0)}function vh(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let a=0;a<t;a++)n[a]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}var hh=mh;function mh(e){if(e)return function(e){for(var t in mh.prototype)e[t]=mh.prototype[t];return e}(e)}mh.prototype.on=mh.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},mh.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},mh.prototype.off=mh.prototype.removeListener=mh.prototype.removeAllListeners=mh.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if((n=r[a])===t||n.fn===t){r.splice(a,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},mh.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var a=(n=n.slice(0)).length;r<a;++r)n[r].apply(this,t)}return this},mh.prototype.emitReserved=mh.prototype.emit,mh.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},mh.prototype.hasListeners=function(e){return!!this.listeners(e).length};const gh="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function yh(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const xh=gh.setTimeout,bh=gh.clearTimeout;function wh(e,t){t.useNativeTimers?(e.setTimeoutFn=xh.bind(gh),e.clearTimeoutFn=bh.bind(gh)):(e.setTimeoutFn=gh.setTimeout.bind(gh),e.clearTimeoutFn=gh.clearTimeout.bind(gh))}const kh=1.33;class _h extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Oh extends hh{constructor(e){super(),this.writable=!1,wh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new _h(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=uh(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}const Sh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ph=64,Eh={};let Mh,Th=0,Ch=0;function Nh(e){let t="";do{t=Sh[e%Ph]+t,e=Math.floor(e/Ph)}while(e>0);return t}function Dh(){const e=Nh(+new Date);return e!==Mh?(Th=0,Mh=e):e+"."+Nh(Th++)}for(;Ch<Ph;Ch++)Eh[Sh[Ch]]=Ch;let jh=!1;try{jh="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Bp){}const Ih=jh;function Rh(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Ih))return new XMLHttpRequest}catch(e){}if(!t)try{return new(gh[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function Lh(){}const Uh=null!=new Rh({xdomain:!1}).responseType;class Ah extends hh{constructor(e,t){super(),wh(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var e;const t=yh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const n=this.xhr=new Rh(t);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=Ah.requestsCount++,Ah.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Lh,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Ah.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ah.requestsCount=0,Ah.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Fh);else if("function"==typeof addEventListener){addEventListener("onpagehide"in gh?"pagehide":"unload",Fh,!1)}function Fh(){for(let e in Ah.requests)Ah.requests.hasOwnProperty(e)&&Ah.requests[e].abort()}const zh="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Wh=gh.WebSocket||gh.MozWebSocket,Yh="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const Hh={websocket:class extends Oh{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=Yh?{}:yh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=Yh?new Wh(e,t,n):t?new Wh(e,t):new Wh(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;eh(n,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}r&&zh((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Dh()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!Wh}},webtransport:class extends Oh{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){fh||(fh=new TextDecoder);const n=[];let r=0,a=-1,o=!1;return new TransformStream({transform(i,u){for(n.push(i);;){if(0===r){if(ph(n)<1)break;const e=vh(n,1);o=128==(128&e[0]),a=127&e[0],r=a<126?3:126===a?1:2}else if(1===r){if(ph(n)<2)break;const e=vh(n,2);a=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(ph(n)<8)break;const e=vh(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){u.enqueue(Jv);break}a=o*Math.pow(2,32)+t.getUint32(4),r=3}else{if(ph(n)<a)break;const e=vh(n,a);u.enqueue(uh(o?e:fh.decode(e),t)),r=0}if(0===a||a>e){u.enqueue(Jv);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=dh();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();const a=()=>{n.read().then((({done:e,value:t})=>{e||(this.onPacket(t),a())})).catch((e=>{}))};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this.writer.write(n).then((()=>{r&&zh((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends Oh{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}const t=e&&e.forceBase64;this.supportsBinary=Uh&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(ch),r=[];for(let e=0;e<n.length;e++){const a=uh(n[e],t);if(r.push(a),"error"===a.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let a=0;e.forEach(((e,o)=>{eh(e,!1,(e=>{r[o]=e,++a===n&&t(r.join(ch))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Dh()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ah(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},Bh=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,qh=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Vh(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let a=Bh.exec(e||""),o={},i=14;for(;i--;)o[qh[i]]=a[i]||"";return-1!=n&&-1!=r&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,o.query),o}class Qh extends hh{constructor(e,t={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=Vh(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Vh(t.host).host),wh(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Hh[e](n)}open(){let e;if(this.opts.rememberUpgrade&&Qh.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),n=!1;Qh.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Qh.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{n||"closed"!==this.readyState&&(l(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function a(){n||(n=!0,l(),t.close(),t=null)}const o=e=>{const n=new Error("probe error: "+e);n.transport=t.name,a(),this.emitReserved("upgradeError",n)};function i(){o("transport closed")}function u(){o("socket closed")}function s(e){t&&e.name!==t.name&&a()}const l=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",i),this.off("close",u),this.off("upgrading",s)};t.once("open",r),t.once("error",o),t.once("close",i),this.once("close",u),this.once("upgrading",s),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{n||t.open()}),200):t.open()}onOpen(){if(this.readyState="open",Qh.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(e){let t=0,n=0;for(let r=0,a=e.length;r<a;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil((t.byteLength||t.size)*kh)),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const a={type:e,data:t,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(e){Qh.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}Qh.protocol=4,Qh.protocol;const $h="function"==typeof ArrayBuffer,Kh=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Jh=Object.prototype.toString,Xh="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Jh.call(Blob),Gh="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Jh.call(File);function Zh(e){return $h&&(e instanceof ArrayBuffer||Kh(e))||Xh&&e instanceof Blob||Gh&&e instanceof File}function em(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(em(e[t]))return!0;return!1}if(Zh(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return em(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&em(e[t]))return!0;return!1}function tm(e){const t=[],n=e.data,r=e;return r.data=nm(n,t),r.attachments=t.length,{packet:r,buffers:t}}function nm(e,t){if(!e)return e;if(Zh(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=nm(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=nm(e[r],t));return n}return e}function rm(e,t){return e.data=am(e.data,t),delete e.attachments,e}function am(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=am(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=am(e[n],t));return e}const om=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var im;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(im||(im={}));function um(e){return"[object Object]"===Object.prototype.toString.call(e)}class sm extends hh{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===im.BINARY_EVENT;n||t.type===im.BINARY_ACK?(t.type=n?im.EVENT:im.ACK,this.reconstructor=new lm(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Zh(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===im[n.type])throw new Error("unknown packet type "+n.type);if(n.type===im.BINARY_EVENT||n.type===im.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const a=e.substring(r,t);if(a!=Number(a)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(a)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!sm.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case im.CONNECT:return um(t);case im.DISCONNECT:return void 0===t;case im.CONNECT_ERROR:return"string"==typeof t||um(t);case im.EVENT:case im.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===om.indexOf(t[0]));case im.ACK:case im.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lm{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=rm(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var cm=Object.freeze({__proto__:null,protocol:5,get PacketType(){return im},Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==im.EVENT&&e.type!==im.ACK||!em(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===im.EVENT?im.BINARY_EVENT:im.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==im.BINARY_EVENT&&e.type!==im.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=tm(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Decoder:sm});function dm(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fm=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class pm extends hh{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[dm(e,"open",this.onopen.bind(this)),dm(e,"packet",this.onpacket.bind(this)),dm(e,"error",this.onerror.bind(this)),dm(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(fm.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:im.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const a=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r),o=(...e)=>{this.io.clearTimeoutFn(a),t.apply(this,e)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise(((n,r)=>{const a=(e,t)=>e?r(e):n(t);a.withError=!0,t.push(a),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:im.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case im.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case im.EVENT:case im.BINARY_EVENT:this.onevent(e);break;case im.ACK:case im.BINARY_ACK:this.onack(e);break;case im.DISCONNECT:this.ondisconnect();break;case im.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:im.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:im.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function vm(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}vm.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},vm.prototype.reset=function(){this.attempts=0},vm.prototype.setMin=function(e){this.ms=e},vm.prototype.setMax=function(e){this.max=e},vm.prototype.setJitter=function(e){this.jitter=e};class hm extends hh{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,wh(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new vm({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||cm;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Qh(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=dm(t,"open",(function(){n.onopen(),e&&e()})),a=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=dm(t,"error",a);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn((()=>{r(),a(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(dm(e,"ping",this.onping.bind(this)),dm(e,"data",this.ondata.bind(this)),dm(e,"error",this.onerror.bind(this)),dm(e,"close",this.onclose.bind(this)),dm(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){zh((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new pm(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const mm={};function gm(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=Vh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,a=n.id,o=n.path,i=mm[a]&&o in mm[a].nsps;let u;return t.forceNew||t["force new connection"]||!1===t.multiplex||i?u=new hm(r,t):(mm[a]||(mm[a]=new hm(r,t)),u=mm[a]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(gm,{Manager:hm,Socket:pm,io:gm,connect:gm});var ym=function(){function e(e,t){this.config=e,this.token=t.token}return e.prototype.init=function(e){var t=this;this.socket=gm(this.config.url,{transports:["websocket"],reconnection:!0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,reconnectionAttempts:5}),this.dispatch=e,this.socket.on("account_status",(function(n){Hp("SERVER: account_status: ".concat(JSON.stringify(n))),t.token||(t.token=Iv(),e({type:"receiveToken",detail:{token:t.token,timestamp:+new Date,type:"receiveToken",user:void 0}}),Hp("CLIENT: created token: ".concat(t.token))),t.socket.emit("connection update",t.token),e({type:"account_status",detail:{status:"online",timestamp:+new Date}})})),this.socket.on("new message",(function(e){Hp("SERVER: new message: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.msg",user:{displayName:e.username,nick:"agent:robot"},msg:e.message,timestamp:+new Date}})})),this.socket.on("user joined",(function(e){Hp("SERVER: user joined: ".concat(JSON.stringify(e))),t.visitorInfo.token=e.token,t.dispatch({type:"chat",detail:{type:"chat.memberjoin",user:{displayName:e.username,nick:"agent:robot",avatarPath:e.avatarPath},timestamp:+new Date}})})),this.socket.on("user left",(function(e){Hp("SERVER: user left: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.memberleave",user:{displayName:e.username,nick:"agent:robot"},timestamp:+new Date}})})),this.socket.on("typing",(function(e){Hp("SERVER: typing: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!0,timestamp:+new Date}})})),this.socket.on("stop typing",(function(e){Hp("SERVER: stop typing: ".concat(JSON.stringify(e))),t.dispatch({type:"chat",detail:{type:"chat.typing",user:{nick:"agent:robot"},typing:!1,timestamp:+new Date}})})),this.socket.on("disconnect",(function(){Hp("SERVER: disconnect"),t.dispatch(Xp("offline")),t.dispatch(Gp("offline"))})),this.socket.on("reconnect",(function(){Hp("SERVER: reconnect"),t.dispatch(Xp("online")),t.dispatch(Gp("online"))})),this.socket.on("reconnect_failed",(function(e){Hp("SERVER: reconnect_failed",e),t.dispatch(Xp("offline")),t.dispatch(Gp("offline"))})),this.socket.on("reconnect_error",(function(e){Hp("SERVER: reconnect_error",e),t.dispatch(Xp("offline"))})),this.dispatch(Gp("pending"))},e.prototype.sendOfflineMsg=function(e,t){t()},e.prototype.sendChatMsg=function(e,t){this.socket.emit("new message",e),t()},e.prototype.sendChatMsgRequest=function(e,t){this.socket.emit("new message",e),t()},e.prototype.sendTyping=function(e){this.socket.emit(e?"typing":"stop typing")},e.prototype.setVisitorInfo=function(e,t,n){this.visitorInfo=e,this.socket.emit("add user",e),n()},e.prototype.sendChatRating=function(){},e.prototype.sendFile=function(e,t){t()},e.prototype.markAsRead=function(){},e.prototype.flush=function(){},e.prototype.dispose=function(){var e;null===(e=this.socket)||void 0===e||e.disconnect()},e.prototype.sleep=function(){},e.prototype.wakeup=function(){},e.prototype.bargeOut=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeOut")}))}))},e.prototype.bargeIn=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Method not implemented: bargeIn")}))}))},e}();function xm(e,t){return new tv(function(e,t){switch(e.type){case"direct":return new Fv({url:e.serverUrl,key:e.accountKey,timeout:e.timeout},t);case"websocket":return new ym({url:e.serverUrl},t);case"websocketraw":return new qv({url:e.serverUrl},t);case"local":return new zv;default:throw Zp(e.type)}}(e,t))}var bm=u.exports.createContext(null);function wm(){var e=ev(),t=u.exports.useContext(bm);return u.exports.useCallback((function(n){n?t&&e(n(t)):console.warn("react bug? Someone invokes with null")}),[e,t])}function km(){var e=wm();return u.exports.useCallback((function(t,n){e($p(t,n))}),[e])}var _m={type:"newWindow"};function Om(e){return{type:"visual_status",detail:{status:e,timestamp:(new Date).getTime()}}}function Sm(){var e=Np();return u.exports.useCallback((function(t,n,r,a){a||(a=(null==e?void 0:e.urls)?function(e,t){if(t.policies)for(var n=0,r=t.policies;n<r.length;n++){var a=r[n];try{if(new RegExp(a.pattern,"gi").test(e))return a.behavior}catch(e){}}return t.defaultBehavior||_m}(t,e.urls):_m),function(e,t,n,r){var a,o;if(!t||!n)throw new Error("OpenUrl: No dispatch and/or visual.");if(e!==Tp){try{var i=new URL(e),u=new URLSearchParams(i.search);u.has("utm_source")||u.append("utm_source","xapp"),i.search=u.toString(),e=i.toString()}catch(e){}var s=r.type;switch(s){case"newWindow":n.opened&&t(Om({opened:!1})),window.open(e,"callout-option","toolbar=0,status=0,width=".concat(r.width||1e3,",height=").concat(r.height||700));break;case"newTab":n.opened&&t(Om({opened:!1})),window.open(e,"_blank");break;case"sameWindow":n.opened||t(Om({opened:!0})),window.open(e,"_self");break;default:Zp(s)}}else{var l=null===(a=window.xafwControl)||void 0===a?void 0:a.openForm;if(!l)return void Bp("Cannot find toggleForm! Update form widget!");var c=!1,d=null===(o=window.xafwControl)||void 0===o?void 0:o.formStatus;d?c=d().active:Bp("Cannot find formStatus! Update form widget!"),c||(l(),n.opened&&t(Om({opened:!1})))}}(t,n,r,a)}),[e])}function Pm(){var e=Sm(),t=ev(),n=Jc.useSelector((function(e){return e.visuals})),r=km();return u.exports.useCallback((function(a){a.actionUrl?e(a.actionUrl,t,n):r(a.label)}),[t,r,e,n])}var Em=function(e){var t=e.msg,n=e.ctx,r=u.exports.useMemo((function(){return function(e){return{content:e.content,imageUrl:e.smallImageUrl,title:e.title,imageActionUrl:null==e?void 0:e.imageActionUrl,buttons:e.buttons?e.buttons.map((function(e){return{actionUrl:e.openUrlAction,label:e.title}})):void 0}}(t)}),[t]),a=n.user,o=Pm();return H.createElement(Vp,{showAvatar:!0,user:a},H.createElement("div",{className:"chat-msg"},H.createElement(Up,{card:r,onButtonClick:o})))};function Mm(e){return function(t){return e.reduceRight((function(e,t){return t(e)}),t)}}function Tm(e){var t,n=u.exports.useState(e.getArray()),r=n[0],a=n[1],o=(t=u.exports.useRef(!1),u.exports.useEffect((function(){return t.current=!0,function(){t.current=!1}}),[]),u.exports.useCallback((function(){return t.current}),[]));return u.exports.useEffect((function(){var t=e.subscribe((function(e){o()&&a(e)}));return function(){t.unsubscribe()}}),[o,e]),r}var Cm=[];function Nm(e){var t=e.get()||Cm,n=Array.isArray(t)?function(e){var t=e||[],n=[];function r(){for(var e=0,r=n;e<r.length;e++)(0,r[e])(t)}return{getArray:function(){return t},push:function(e){t=a(a([],t,!0),[e],!1),r()},unshift:function(e){t=a([e],t,!0),r()},subscribe:function(e){return n.push(e),{unsubscribe:function(){var t=n.indexOf(e);t>=0&&n.splice(t,1)}}}}}(t):t;return n!==t&&e.set(n),Tm(n)}var Dm=function(e,t){return{get:function(){return e[t]},set:function(n){return e[t]=n}}}(globalThis,"xappMsgMiddlewares");function jm(){return function(e){var t=Nm(e);return u.exports.useMemo((function(){return Mm(t)}),[t])}(Dm)}function Im(e){return e.hasOwnProperty("label")}function Rm(e){return e.url||e.imageActionUrl}var Lm=function(e){var t=ev(),n=Jc.useSelector((function(e){return e.visuals})),r=e.url,a=e.className,o=e.onOpen,i=u.exports.useCallback((function(){o&&o(r,t,n)}),[r,o]);return r?H.createElement("div",{onClick:i,className:a},e.children):H.createElement("div",{onClick:e.onClick,className:a},e.children)},Um=function(e){var t,n=e.item,r=e.onButtonClick,a=e.onExecute,o=1===(null===(t=n.buttons)||void 0===t?void 0:t.length),i=u.exports.useCallback((function(){var e;1===(null===(e=n.buttons)||void 0===e?void 0:e.length)?r(n.buttons[0]):a(n.title,n.token)}),[n,a,r]),s="xappw-chat-action-item ".concat(o?"xappw-chat-action-item--action":""," ").concat(e.className);return H.createElement(Lm,{className:s,url:Rm(n),onClick:i,onOpen:e.onOpenUrl},e.children)},Am=function(e){var t,n=e.item,r=1===(null===(t=n.buttons)||void 0===t?void 0:t.length),a=Rm(n);if(n.imageUrl){var o=r?null:n.imageActionUrl;return H.createElement("div",{className:e.className},H.createElement(Lp,{imageUrl:n.imageUrl,imageActionUrl:!a&&o}))}return e.emptyImageVisible?H.createElement("div",{className:e.className}):H.createElement(H.Fragment,null)},Fm=function(e){var t,n=e.item;return H.createElement(Um,{className:"chat-list-item-container",item:n,onButtonClick:e.onButtonClick,onExecute:e.onExecute,onOpenUrl:e.onOpenUrl},H.createElement("div",{className:"chat-list-item"},H.createElement(Am,{item:n,className:"chat-list-item__img",emptyImageVisible:e.emptyImageVisible}),n.title&&H.createElement("div",{className:"chat-list-item__title"},H.createElement("span",null,n.title)),n.subTitle&&H.createElement("div",{className:"chat-list-item__subtitle"},H.createElement("span",null,n.subTitle)),!!(null===(t=n.buttons)||void 0===t?void 0:t.length)&&H.createElement(Rp,{className:"chat-list-item__actions",buttons:n.buttons,onClick:e.onButtonClick})))};var zm=function(e){return H.createElement("button",{onClick:e.onClick,className:"xa-chevron"},H.createElement("svg",{viewBox:"-5 -18 10 36"},H.createElement("path",{d:"M 2.5 -15 L -2.5 0 L 2.5 15",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"4px",fill:"none"})))};var Wm=function(e){return H.createElement("button",{onClick:e.onClick,className:"xa-chevron"},H.createElement("svg",{viewBox:"-5 -18 10 36"},H.createElement("path",{d:"M -2.5 -15 L 2.5 0 L -2.5 15",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"4px",fill:"none"})))},Ym=function(e){var t=u.exports.useRef(null),n=u.exports.useState(0),r=n[0],a=n[1];function o(e){var n,o,i=t.current;if(i){var u=i.getElementsByClassName("xappw-carousel-items__item"),s=u.length,l=r;1===e?r<s-1&&l++:r>0&&l--;for(var c=0,d=0;d<u.length&&d!==l;d++)c+=null!==(o=null===(n=u.item(d))||void 0===n?void 0:n.clientWidth)&&void 0!==o?o:0;i.scrollLeft=c,a(l)}}var i=1===e.list.items.length,s=e.list.items.some((function(e){return e.imageUrl})),l=e.list.items.map((function(t,n){return H.createElement("div",{className:"xappw-carousel-items__item",key:"item-key-".concat(n)},H.createElement(Fm,{item:t,emptyImageVisible:s,onExecute:e.onExecute,onButtonClick:e.onButtonClick,onOpenUrl:e.onOpenUrl}))}));return H.createElement("div",{className:"xappw-carousel"},!i&&H.createElement("div",{className:"xappw-carousel__prev"},H.createElement(zm,{onClick:function(){return o(-1)}})),H.createElement("div",{ref:t,className:"xappw-carousel-items ".concat(i?"xappw-carousel-items--one-item":"")},l),!i&&H.createElement("div",{className:"xappw-carousel__next"},H.createElement(Wm,{onClick:function(){return o(1)}})))};var Hm=function(e){var t=e.url,n=u.exports.useCallback((function(e){e.preventDefault()}),[]);return H.createElement("a",{href:t,"aria-label":"read more",target:"_blank",rel:"noreferrer",className:e.className,onClick:n},H.createElement("svg",{viewBox:"0 0 20 20"},H.createElement("path",{d:"M17 17H3V3h5V1H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5h-2z"}),H.createElement("path",{d:"M19 1h-8l3.29 3.29-5.73 5.73 1.42 1.42 5.73-5.73L19 9V1z"})))};function Bm(e,t){for(var n=-1,r=0,a=t;r<a.length;r++){var o=a[r],i=e.indexOf(o);i>=0&&(n<0||n>=0&&i<n)&&(n=i)}return n}var qm=[":","/"],Vm=["/"],Qm=["?","#"],$m=["#"],Km=[function(e){var t=e.indexOf("://");return t<0?t:t+3},function(e){return Bm(e,qm)},function(e){return":"!==e.charAt(0)?-1:Bm(e,Vm)},function(e){var t=Bm(e,Qm);return t>=0?t:e.length},function(e){return Bm(e,$m)}];var Jm="/...";function Xm(e,t){if(e.length<t)return e;var n=function(e){for(var t=[],n=e,r=0,a=Km;r<a.length;r++){var o=a[r],i=Math.max(0,o(n,e)),u=n.substring(0,i);t.push(u),n=n.substring(i)}return n&&t.push(n),t}(e);function r(){return n.join("")}function a(){return r().length>t}function o(e){a()&&(n[e]="")}if(":80"===n[2]&&"http://"===n[0]&&o(2),":443"===n[2]&&"https://"===n[0]&&o(2),o(5),o(4),o(2),o(0),a()){var i=n[3],u=r().length-i.length,s=t-u;if(s<0)n[3]="";else if(s<i.length){var l=i.length-s+Jm.length;n[3]=Jm+i.substring(l)}}return r()}var Gm=function(e){var t=e.url,n=e.className,r=u.exports.useCallback((function(e){e.preventDefault()}),[]);return H.createElement("a",{href:t,"aria-label":"read more",target:"_blank",rel:"noreferrer",className:n,onClick:r},Xm(t,40))},Zm=function(e){var t,n=e.item,r=e.layout||"normal",a=n.url||n.imageActionUrl;return H.createElement(Um,{className:"xappw-vlist-item-container",item:n,onButtonClick:e.onButtonClick,onExecute:e.onExecute,onOpenUrl:e.onOpenUrl},H.createElement("div",{className:"xappw-vlist-item xappw-vlist-item--".concat(r)},H.createElement("div",{className:"xappw-vlist-item__description"},n.title&&H.createElement("div",{className:"xappw-vlist-item__title"},H.createElement("span",null,n.title)),a&&H.createElement(Gm,{url:a,className:"xappw-vlist-item__link"}),n.subTitle&&H.createElement("div",{className:"xappw-vlist-item__subtitle"},H.createElement("span",null,n.subTitle)),!!(null===(t=n.buttons)||void 0===t?void 0:t.length)&&H.createElement(Rp,{buttons:n.buttons,onClick:e.onButtonClick})),H.createElement("div",{className:"xappw-vlist-item__side"},a&&H.createElement(Hm,{url:"url",className:"xappw-vlist-item__external-link"}),H.createElement(Am,{item:n,className:"xappw-vlist-item__img",emptyImageVisible:e.emptyImageVisible}))))},eg=function(e){var t=e.list,n=u.exports.useRef(null),r=t.items.some((function(e){return e.imageUrl})),a=!t.items.some((function(e){var t;return e.subTitle||(null===(t=e.buttons)||void 0===t?void 0:t.length)})),o=t.items.map((function(t,n){return H.createElement("div",{className:"xappw-vlist-container__item",key:"item-key-".concat(n)},H.createElement(Zm,{item:t,layout:a?"titles":"normal",emptyImageVisible:r,onExecute:e.onExecute,onButtonClick:e.onButtonClick,onOpenUrl:e.onOpenUrl}))}));return H.createElement("div",{className:"xappw-vlist"},H.createElement("div",{ref:n,className:"xappw-vlist-container"},e.list.title&&H.createElement("div",{className:"xappw-vlist__header"},e.list.title),o))},tg=function(e){var t=e.msg,n=e.ctx;if(!n)throw new TypeError("ctx not provided to ".concat(tg.name));var r=u.exports.useMemo((function(){return function(e){return{type:e.type,title:e.title,items:e.items.map((function(e){var t,n,r={title:e.title,subTitle:e.description,token:e.token,url:e.url,imageUrl:null===(t=e.image)||void 0===t?void 0:t.url,imageActionUrl:null===(n=e.image)||void 0===n?void 0:n.imageActionUrl},a=e.buttons;return a&&a.length>0&&(r.buttons=a.map((function(e){return{actionUrl:e.openUrlAction,label:e.title}}))),r}))}}(t)}),[t]),a=km(),o=Pm(),i=n.user;return H.createElement(Vp,{showAvatar:!1,user:i},"CAROUSEL"===r.type&&H.createElement("div",{className:"chat-msg chat-msg--fullwidth chat-msg--no-ava"},H.createElement(Ym,{list:r,onExecute:a,onButtonClick:o,onOpenUrl:n.openUrl})),"LIST"===r.type&&H.createElement("div",{className:"chat-msg chat-msg--expand"},H.createElement(eg,{list:r,onExecute:a,onButtonClick:o,onOpenUrl:n.openUrl})))},ng=function(){},rg=function(){function e(e){this.cache={},this.template=e}return e.prototype.resolve=function(e){var t,n,r;if(e){var a=this.cache,o=e.nick,i=a[o];return i||(i={user:e,send:null!==(t=this.template.send)&&void 0!==t?t:ng,write:null!==(n=this.template.write)&&void 0!==n?n:ng,openUrl:null!==(r=this.template.openUrl)&&void 0!==r?r:ng},a[o]=i),i}},e}(),ag=function(){return H.createElement(H.Fragment,null)},og=function(e){var n=e.items,r=e.checked,a=e.onChange,o=u.exports.useCallback((function(e){var n,o=e.target.value;a(t(t({},r),((n={})[o]=!r[o],n)))}),[r,a]);return H.createElement("ul",{className:"xappw-multiselect"},null==n?void 0:n.map((function(e){return H.createElement("li",{key:e.id},H.createElement("label",null,H.createElement("input",{type:"checkbox",checked:r[e.id]||!1,onChange:o,value:e.id}),H.createElement("span",null,e.title)))})))};var ig=function(e){var t=e.msg,n=e.ctx,r=u.exports.useMemo((function(){return t.items}),[t]),a=n.user,o=u.exports.useState({}),i=o[0],s=o[1],l=u.exports.useCallback((function(){n.send({type:"custom",payload:JSON.stringify({type:"OPTION_SELECT_REQUEST",intentId:"OptionSelect",selected:Object.keys(i).map((function(e){return{id:e}}))})})}),[n,i]);return H.createElement(Vp,{showAvatar:!0,user:a},H.createElement("div",{className:"chat-msg"},H.createElement("div",null,H.createElement(og,{items:r,checked:i,onChange:s}),H.createElement(jp,{label:"Submit",onClick:l}))))},ug=Mm([function(e){return function(t){var n,r=t.msg,a=t.ctx;return!(n=r)||"LIST"!==n.type&&"CAROUSEL"!==n.type?e(t):H.createElement(tg,{msg:r,ctx:a})}},function(e){return function(t){var n,r=t.msg,a=t.ctx;return(n=r)&&"CARD"===n.type?H.createElement(Em,{msg:r,ctx:a}):e(t)}},function(e){return function(t){var n=t.msg,r=t.ctx;return"MultiSelect"===n.type?H.createElement(ig,{msg:n,ctx:r}):e(t)}}]);function sg(){var e,t=(e=jm(),u.exports.useMemo((function(){return Mm([e,ug])}),[e]));return u.exports.useMemo((function(){return t(ag)}),[t])}var lg=ug(ag),cg={},dg={exports:{}},fg={exports:{}},pg={exports:{}},vg={exports:{}};function hg(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}!function(e){var t=td.exports.default;e.exports=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,n||"default");if("object"!==t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(vg),function(e){var t=td.exports.default,n=vg.exports;e.exports=function(e){var r=n(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}(pg),function(e){var t=pg.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(fg),function(e){var t=fg.exports;function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?n(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports}(dg),Object.defineProperty(cg,"__esModule",{value:!0});var mg=hg(dg.exports);function gg(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 yg="function"==typeof Symbol&&Symbol.observable||"@@observable",xg=function(){return Math.random().toString(36).substring(7).split("").join(".")},bg={INIT:"@@redux/INIT"+xg(),REPLACE:"@@redux/REPLACE"+xg(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xg()}};function wg(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(gg(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(gg(1));return n(wg)(e,t)}if("function"!=typeof e)throw new Error(gg(2));var a=e,o=t,i=[],u=i,s=!1;function l(){u===i&&(u=i.slice())}function c(){if(s)throw new Error(gg(3));return o}function d(e){if("function"!=typeof e)throw new Error(gg(4));if(s)throw new Error(gg(5));var t=!0;return l(),u.push(e),function(){if(t){if(s)throw new Error(gg(6));t=!1,l();var n=u.indexOf(e);u.splice(n,1),i=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(gg(7));if(void 0===e.type)throw new Error(gg(8));if(s)throw new Error(gg(9));try{s=!0,o=a(o,e)}finally{s=!1}for(var t=i=u,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:bg.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(gg(10));a=e,f({type:bg.REPLACE})}})[yg]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(gg(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[yg]=function(){return this},e},r}var kg=wg;function _g(e,t){return function(){return t(e.apply(this,arguments))}}function Og(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}cg.__DO_NOT_USE__ActionTypes=bg;var Sg=cg.applyMiddleware=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(gg(15))},a={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(a)}));return r=Og.apply(void 0,o)(n.dispatch),mg.default(mg.default({},n),{},{dispatch:r})}}};cg.bindActionCreators=function(e,t){if("function"==typeof e)return _g(e,t);if("object"!=typeof e||null===e)throw new Error(gg(16));var n={};for(var r in e){var a=e[r];"function"==typeof a&&(n[r]=_g(a,t))}return n},cg.combineReducers=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var o,i=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:bg.INIT}))throw new Error(gg(12));if(void 0===n(void 0,{type:bg.PROBE_UNKNOWN_ACTION()}))throw new Error(gg(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,a={},u=0;u<i.length;u++){var s=i[u],l=n[s],c=e[s],d=l(c,t);if(void 0===d)throw t&&t.type,new Error(gg(14));a[s]=d,r=r||d!==c}return(r=r||i.length!==Object.keys(e).length)?a:e}};var Pg=cg.compose=Og,Eg=cg.createStore=wg;cg.legacy_createStore=kg;var Mg={};Object.defineProperty(Mg,"__esModule",{value:!0});var Tg=Mg.default=void 0;function Cg(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(a){return"function"==typeof a?a(n,r,e):t(a)}}}}var Ng=Cg();Ng.withExtraArgument=Cg;var Dg=Ng;Tg=Mg.default=Dg;var jg=function(){function e(e,t){this.innerStorage=e,this.key=t}return e.prototype.get=function(){return function(e){try{if(e)return JSON.parse(e)}catch(e){}}(this.innerStorage.getItem(this.key))},e.prototype.set=function(e){try{this.innerStorage.setItem(this.key,JSON.stringify(e))}catch(e){!function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={};r[e]||(r[e]=!0,Hp.apply(void 0,t))}("storage","Unable to store redux state")}},e}();function Ig(){return Iv()}var Rg={displayName:"Visitor",nick:"visitor:",typing:!1};function Lg(e){return e||(e={}),e.userId=e.userId?e.userId:Ig(),e.visitorId=e.userId,t({connection:{connectionStatus:"offline",token:null,greetingRequested:!1},accountStatus:"offline",departments:{},visitor:Rg,agents:{},chats:[],lastTimestamp:0,lastRatingRequestTimestamp:0,hasRating:!1,isChatting:!1,queuePosition:0,failureMsg:null,visitorId:Ig(),chips:[],sessionExpiration:"24h",visuals:{}},e)}var Ug=Lg(),Ag=function(){function e(){this.valuesMap=new Map}return e.prototype.getItem=function(e){var t=String(e);return this.valuesMap.has(e)?String(this.valuesMap.get(t)):null},e.prototype.setItem=function(e,t){this.valuesMap.set(String(e),String(t))},e.prototype.removeItem=function(e){this.valuesMap.delete(e)},e.prototype.clear=function(){this.valuesMap.clear()},e.prototype.key=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'key' on 'Storage': 1 argument required, but only 0 present.");return Array.from(this.valuesMap.keys())[e]},Object.defineProperty(e.prototype,"length",{get:function(){return this.valuesMap.size},enumerable:!1,configurable:!0}),e}();function Fg(e,t){
|
|
2
2
|
/*! Copyright (c) 2021, XAPPmedia */
|
|
3
3
|
return function(e,t,n){if(!e.length)return e.push(t),e;for(var r=0,a=e.length-1;a-r>0;){var o=e[r],i=e[a],u=n(t,o);if(0===u)return e;if(u<0)return e.splice(r,0,t),e;var s=n(t,i);if(0===s)return e;if(s>0)return e.splice(a+1,0,t),e;if(a-r<=1)break;var l=Math.floor((r+a)/2),c=n(e[l],t);c<=0?r=l:c>=0&&(a=l)}return e.splice(r+1,0,t),e}(a([],e,!0),t,(function(e,t){return e.timestamp-t.timestamp}))}function zg(e,t){e.chats=Fg(e.chats,t),"chat.msg"===t.type&&(e.activeContexts=t.msg.context)}function Wg(e,n){var r,a,o,i,u;if(void 0===e&&(e=Ug),Hp("action",n),"reset"===n.type)return function(e){return void 0===e&&(e=Ug),t(t({},Lg({accessToken:e.accessToken,userId:e.userId,attributes:e.attributes,sessionExpiration:e.sessionExpiration})),{connection:t(t({},e.connection),{greetingRequested:!1,nonce:Iv()}),visitor:e.visitor,visitorId:e.visitorId})}(e);switch(n.detail&&(e.lastTimestamp=n.detail.timestamp),n.type){case"connection_update":case"receiveToken":case"sendGreeting":var s=function(e,n){switch(n.type){case"connection_update":return t(t({},e),{connectionStatus:n.detail.status});case"receiveToken":return t(t({},e),{token:n.detail.token});case"sendGreeting":return t(t({},e),{greetingRequested:!0})}return e}(e.connection,n);return e.connection!==s&&(e=t(t({},e),{connection:s})),e;case"account_status":return t(t({},e),{accountStatus:n.detail.status});case"session_id":return t(t({},e),{sessionId:n.detail.sessionId});case"visual_status":var l=t({},e);return l.visuals||(l.visuals={}),void 0!==n.detail.status.drawer&&(l.visuals.drawer=n.detail.status.drawer),void 0!==n.detail.status.opened&&(l.visuals.opened=n.detail.status.opened),void 0!==n.detail.status.visible&&(l.visuals.visible=n.detail.status.visible),l;case"department_update":return t(t({},e),{departments:t(t({},e.departments),(r={},r[n.detail.id]=t({},n.detail),r))});case"visitor_update":return t(t({},e),{visitor:t(t({},e.visitor),n.detail)});case"agent_update":var c=e.agents[n.detail.nick];return t(t({},e),{agents:t(t({},e.agents),(a={},a[n.detail.nick]=t(t({},c),{user:t(t({},c.user),n.detail),typing:(c||{typing:!1}).typing}),a))});case"chat":var d=t({},e);switch(n.detail.type){case"chat.memberjoin":return function(e,n){var r=t({},e.agents),a=e.agents[n.user.nick];return r[n.user.nick]=t(t({},a),{user:t(t({},n.user),{displayName:n.user.displayName||"Agent"}),joined:!0,typing:!1}),Ap(n.user.nick)?t(t({},e),{isChatting:!0,chats:(null==a?void 0:a.joined)?e.chats:Fg(e.chats,n),agents:r}):t(t({},e),{isChatting:!0,chats:Fg(e.chats,n),agents:r})}(e,n.detail);case"chat.memberleave":return function(e,n){var r=t({},e.agents),a=e.agents[n.user.nick];r[n.user.nick]=t(t({},a),{joined:!1,typing:!1});var o=Object.values(r).filter((function(e){return e.joined})).length>0;return Ap(n.user.nick)?t(t({},e),{isChatting:o,chats:(null==a?void 0:a.joined)?Fg(e.chats,n):e.chats,agents:r}):t(t({},e),{isChatting:o,chats:Fg(e.chats,n),agents:r})}(e,n.detail);case"chat.queue.position":return d.queuePosition=n.detail.queuePosition,d;case"chat.request.rating":return zg(d,n.detail),t(t({},d),{lastRatingRequestTimestamp:n.detail.timestamp});case"chat.rating":return zg(d,n.detail),t(t({},d),{hasRating:!!n.detail.newRating});case"chat.file":case"chat.msg":zg(d,n.detail);var f=n.detail,p="chat.msg"===f.type?f.msg:null;return d.chips=(null===(u=null==p?void 0:p.options)||void 0===u?void 0:u.length)?p.options:[],d;case"chat.failureMsg":var v,h=d.agents[n.detail.user.nick],m=n.detail.failureMsg.retry,g=d;if(1!==m){v=d.chats.filter((function(e){return"chat.failureMsg"===e.type&&e.failureMsg.retry<m}))[0];var y=d.chats.filter((function(e){return e!==v}));g=t(t({},d),{chats:y})}return zg(g,n.detail),t(t({},g),{agents:t(t({},g.agents),(o={},o[n.detail.user.nick]=t(t({},h),{typing:!1,requestFailed:!0}),o)),failureMsg:n.detail.failureMsg});case"chat.typing":var x=e.agents[n.detail.user.nick];return t(t({},e),{agents:t(t({},e.agents),(i={},i[n.detail.user.nick]=t(t({},x),{typing:n.detail.typing}),i))});default:return e}default:return Hp("Unhandled redux action: ",n.type),e}}function Yg(e,t){if(void 0===e&&(e=Ug),"synthetic"===t.type){Hp("synthetic action",t);var n=function(e,t){var n;void 0===e&&(e=Ug);var r=((null===(n=t.detail)||void 0===n?void 0:n.timestamp)||+new Date)+1;switch(t.detail.type){case"write_msg":return{type:"chat",detail:{type:"chat.msg",user:t.detail.user,timestamp:r,msg:t.detail.msg}};case"visitor.send.file":return{type:"chat",detail:{type:"chat.file",user:{displayName:e.visitor.displayName,nick:"visitor:"},timestamp:r,attachment:t.detail.attachment}};default:throw new Error("Unknown synthetic action. Detail type: ".concat(t.detail.type))}}(e,t);return Wg(e,n)}return Wg(e,t)}var Hg="AdminAccessTimes",Bg=20;function qg(e,t){var n;t||(t="undefined"!=typeof window?localStorage:new Ag);var r,a=e.connection,o=null===(n=new URL(window.location.href).searchParams)||void 0===n?void 0:n.get("sessionId"),i=(new Date).getTime();if(o){var u=t.getItem(Hg),s=u?JSON.parse(u):{};if(s[o])Hp("ChatStore: reusing session: ".concat(o)),s[o].lastAccessMs=i,r=s[o].dataStorageKey;else{if(Object.keys(s).length>=Bg){var l=function(e){for(var t,n=Number.MAX_VALUE,r=0,a=Object.keys(e);r<a.length;r++){var o=a[r];e[o].lastAccessMs<n&&(t=o,n=e[o].lastAccessMs)}return t}(s);Hp("ChatStore: evicting session: ".concat(l)),t.removeItem(s[l].dataStorageKey),s[l]=void 0}r=Vg(a,o),s[o]={lastAccessMs:i,dataStorageKey:r}}t.setItem(Hg,JSON.stringify(s))}else r=Vg(a);var c=function(e,t,n){var r,a=null!==(r=e.get())&&void 0!==r?r:t;return function(t,r){void 0===t&&(t=a);var o=n(t,r);return e.set(o),o}}(new jg(t,r),Lg({accessToken:e.accessToken,userId:e.userId,attributes:e.attributes,sessionExpiration:e.sessionExpiration}),Yg),d=[Tg],f=globalThis.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Pg;return Eg(c,f(Sg.apply(void 0,d)))}function Vg(e,t){var n="xappchat.".concat(e.serverUrl);return t?e.accountKey?"".concat(n,".").concat(e.accountKey,".").concat(t):"".concat(n,".").concat(t):e.accountKey?"".concat(n,".").concat(e.accountKey):n}function Qg(e,t,n){var r=1e3*function(e){if(!e)return 0;var t=e.match(/(\d+)([dhms]?)/);if(!t)return Bp("Invalid time string: ".concat(e)),0;var n=parseInt(t[1]);switch(t[2]){case"d":return 24*n*60*60;case"h":return 60*n*60;case"m":return 60*n;default:return n}}(e);return!!e&&+new Date-t>r}function $g(e){u.exports.useEffect((function(){if(e){var t=function(e){for(var t="es-",n=0;n<e.length;n++)t+=Kg(e.charAt(n));return t}(e);if(!document.getElementById(t)){var n=document.createElement("script");n.id=t,n.src=e,n.crossOrigin="anonymous",document.head.appendChild(n)}}}),[e])}function Kg(e){return e>="0"&&e<="9"||e>="a"&&e<="z"||e>="A"&&e<="Z"?e:"_".concat(e.charCodeAt(0),"_")}function Jg(e){var n,r,a,o,i=(n=wm(),r=Jc.useSelector((function(e){return e.visitorId||e.userId})),a=Jc.useSelector((function(e){return e.accessToken})),o=Jc.useSelector((function(e){return e.attributes})),u.exports.useMemo((function(){return{dispatch:n,visitorId:r,accessToken:a,userId:r,attributes:o}}),[n,r,a,o])),s=u.exports.useRef(null),l=u.exports.useContext(Cp).env.isAdmin,c=Jc.useSelector((function(e){return e.sessionId}));u.exports.useEffect((function(){if(e&&s.current!==i&&(s.current=i,i.visitorId)){if(i.dispatch(Jp({name:"Visitor",visitorId:i.visitorId,userId:i.userId,accessToken:i.accessToken,attributes:t(t({},i.attributes),{currentUrl:window.location.href})},c)),!l){var n=setTimeout((function(){var e,t=(void 0===e&&(e=!1),function(t){return function(n,r){e||r().connection.greetingRequested||(Hp("sending greeting"),t.sendChatMsg({text:void 0,attributes:{isGreeting:!0}},(function(e){e&&Hp("Error sending message"),n({type:"sendGreeting",detail:void 0})})))}});i.dispatch(t)}),1e3);return function(){clearTimeout(n)}}Hp("Admin widget. Not sending greeting.")}}),[i,e,l])}function Xg(){var e=u.exports.useRef(null),t=u.exports.useState(),n=t[0],r=t[1];return u.exports.useLayoutEffect((function(){var t,n;r(null===(n=null===(t=e.current)||void 0===t?void 0:t.getBoundingClientRect())||void 0===n?void 0:n.toJSON())}),[]),[e,n]}function Gg(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Zg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ey(e,t){return{x:e.x*t,y:e.y*t}}function ty(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function ny(e,t){var n=t*Math.PI/180,r=Math.cos(n),a=Math.sin(n);return{x:e.x*r+e.y*a,y:e.y*r-e.x*a}}function ry(e,t){var n=Zg(t.start,e.center),r=n.x,a=n.y,o=t.direction.x,i=t.direction.y,u=e.radius.x,s=e.radius.y,l=u*u,c=s*s,d=o*o/l+i*i/c,f=2*o*r/l+2*i*a/c,p=f*f-4*d*(r*r/l+a*a/c-1);if(p>=0){var v=Math.sqrt(p),h=(-f-v)/(2*d),m=(-f+v)/(2*d);if(h>0&&m>0)return Gg(t.start,ey(t.direction,Math.min(h,m)));if(h>0)return Gg(t.start,ey(t.direction,h));if(m>0)return Gg(t.start,ey(t.direction,m))}return t.start}function ay(e,t){var n=e.direction*Math.PI/180,r={x:e.width/2,y:e.height/2},a={x:t.x/2,y:t.y/2},o={x:r.x*Math.cos(n),y:r.y*Math.sin(n)},i=function(e,t){var n=ty(e);return n?ey(e,t/n):e}(o,ty(o)+e.length),u=Gg(i,a),s=Zg(o,i),l=e.angle,c=ny(s,l/2),d=ny(s,-l/2),f={center:a,radius:r},p=ry(f,{start:u,direction:c}),v=ry(f,{start:u,direction:d});return"m ".concat(u.x," ").concat(u.y," L ").concat(p.x," ").concat(p.y," L ").concat(v.x," ").concat(v.y," z")}var oy=function(e){var t,n,r=Xg(),a=r[0],o=r[1],i={x:null!==(t=null==o?void 0:o.width)&&void 0!==t?t:0,y:null!==(n=null==o?void 0:o.height)&&void 0!==n?n:0};return H.createElement("div",{ref:a,className:"cta-bubble__tail"},H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(i.x," ").concat(i.y)},H.createElement("path",{d:ay(e,i),fill:"currentColor"})))},iy=function(e){var t,n,r,a,o=Xg(),i=o[0],u=o[1],s=(e.animate||!1)&&"bounce"===e.buttonAnimation?"bounce":"none";return H.createElement("div",{ref:i,style:{border:e.borderStyle?"solid":"none",borderWidth:(null===(t=e.borderStyle)||void 0===t?void 0:t.width)||"0px",borderColor:(null===(n=e.borderStyle)||void 0===n?void 0:n.color)||"transparent",animation:"".concat(s," 1s infinite")},className:"cta-bubble",onClick:e.onClick},H.createElement(oy,{width:null!==(r=null==u?void 0:u.width)&&void 0!==r?r:0,height:null!==(a=null==u?void 0:u.height)&&void 0!==a?a:0,direction:60,angle:45,length:16}),H.createElement("div",{className:"cta-bubble__content"},e.children))},uy=function(e){var t=e.visible,n=e.timeout,r=e.delay,a=e.animate,o=e.buttonAnimation,i=e.onClick,s=e.children,l=u.exports.useMemo((function(){return t?(new Date).valueOf():void 0}),[t]),c=u.exports.useState(!1),d=c[0],f=c[1],p=u.exports.useRef(!0);return u.exports.useEffect((function(){var e=null;if(l){var t=setTimeout((function(){p.current&&f(!0),"number"==typeof n&&(e=setTimeout((function(){p.current&&f(!1)}),n))}),r);return function(){e&&clearTimeout(e),clearTimeout(t),p.current=!1}}return function(){e&&clearTimeout(e),p.current=!1}}),[l,n,r]),H.createElement(H.Fragment,null,t&&d&&H.createElement(iy,{onClick:i,animate:a,buttonAnimation:o},s))},sy=function(e){var t,n=e.onClick,r=e.addClass,a=e.config,o=e.visible,i=e.borderStyle,s=e.imageUrl,l=u.exports.useState(Mp),c=l[0],d=l[1],f=u.exports.useState(!1),p=f[0],v=f[1],h=(null===(t=null==a?void 0:a.mobile)||void 0===t?void 0:t.applyAtLessThanWidth)||"400",m=window.innerWidth<=parseInt(h,10)&&(null==a?void 0:a.mobile)?a.mobile:a;u.exports.useEffect((function(){var e,t;return(null==m?void 0:m.delay)?e=setTimeout((function(){v(!0),m.animationTimeout&&(t=setTimeout((function(){v(!1)}),m.animationTimeout))}),m.delay):(null==m?void 0:m.animationTimeout)?(v(!0),t=setTimeout((function(){v(!1)}),m.animationTimeout)):(null==m?void 0:m.animation)&&v(!0),function(){e&&clearTimeout(e),t&&clearTimeout(t)}}),[m,v]);var g=p?(null==m?void 0:m.animation)||"wiggle":"none";u.exports.useEffect((function(){var e=function(){var e=window.innerWidth<parseInt(h,10)?"30":Mp;d(e)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[h]);var y=Math.min(22,+c/48*22);return H.createElement("button",{"aria-label":"open chat",className:"xapp-chat-button ".concat(r||"").trim(),onClick:n},H.createElement("div",{id:"xapp-widget-button",className:"xapp-chat-button__btn",style:{width:"".concat(c,"px"),height:"".concat(c,"px"),borderRadius:"".concat(+c/2,"px"),border:i&&i.width?"solid":"none",borderWidth:(null==i?void 0:i.width)||"0px",borderColor:(null==i?void 0:i.color)||"transparent",animation:"".concat(g," 1s infinite")}},s?H.createElement("img",{src:s,alt:"Chat Icon",width:"22",height:"22"}):H.createElement("svg",{width:y,height:y,viewBox:"0 0 22 22"},H.createElement("path",{d:"M13 22l-4-6H2c-1.11-.043-2-.935-2-2V2C0 .89.89 0 2 0h18c1.11 0 2 .892 2 2v12c0 1.067-.89 1.957-2 2h-3l-4 6zm3-8h4c-.005.3-.01-12 0-12-.01.004-18 .006-18 0 .005.006 0 12 0 12h8l3 5 3-5z",fill:"#FFF",fillRule:"evenodd"}))),m&&m.message&&H.createElement("div",{className:"xapp-chat-button__cta"},H.createElement(uy,{timeout:null==m?void 0:m.timeout,delay:null==m?void 0:m.delay,animate:p,buttonAnimation:g,visible:!o},null==m?void 0:m.message)))};function ly(e,t){var n=u.exports.useState(),r=n[0],a=n[1],o=u.exports.useState(-1),i=o[0],s=o[1],l=u.exports.useState(e),c=l[0],d=l[1],f=u.exports.useState(t),p=f[0],v=f[1];u.exports.useEffect((function(){d(e)}),[e]),u.exports.useEffect((function(){v(t)}),[t]);var h=u.exports.useMemo((function(){return r?Cv(r,i):void 0}),[r,i]),m=u.exports.useCallback((function(e){if(r){var t=Nv(r);s((function(n){return function(e,t){return(e+t)%t}(n+e+(n<0&&e<=0?1:0),t)}))}else s(-1)}),[r]),g=u.exports.useCallback((function(e){switch(e){case"prev":m(-1);break;case"next":m(1);break;case"cancel":s(-1),d(void 0),v(void 0)}}),[m]),y=function(e,t){var n=Np(),r=null==n?void 0:n.autocompleteSuggestionsUrl;return jv({url:r,query:e,context:t})}(c||"",p),x="success"===y.state?y.data:void 0,b=u.exports.useMemo((function(){return x?Dv(x,-1).map((function(e){return{heading:e.heading,items:e.items.slice().reverse()}})):void 0}),[x]);return u.exports.useEffect((function(){var e=h;a(b),e&&b||s(-1)}),[b,h]),u.exports.useMemo((function(){return{suggestions:r,index:i,execute:g,item:h}}),[r,i,g,h])}var cy=function(e){var t=e.onAdminJoin,n=u.exports.useRef(null),r=u.exports.useState(!1),a=r[0],o=r[1],i=u.exports.useState(""),s=i[0],l=i[1];function c(e){l(e.target.value)}var d=""===s||void 0===s,f=wm();function p(e){var r,i;e.preventDefault(),a?(f((function(e){return function(){e.bargeOut((function(e){e&&Hp(e)}))}})),o(!1),t(!1),l("")):(f((i=null===(r=n.current)||void 0===r?void 0:r.value,function(e){return function(){e.bargeIn(i,(function(e){e&&Hp(e)}))}})),o(!0),t(!0))}return H.createElement("div",{className:"xappw-admin-input-container visible"},a?H.createElement("form",{className:"xappw-admin-input-form",onSubmit:p},H.createElement("div",{className:"xappw-admin-input-form__buttons"},H.createElement(jp,{addClass:"xappw-admin-input-form__btn",type:"submit",label:"Leave"}))):H.createElement("form",{className:"xappw-admin-input-form",onSubmit:p},H.createElement("div",{className:"xappw-admin-input-form__buttons"},H.createElement(jp,{addClass:"xappw-admin-input-form__btn",type:"submit",label:"Join",disable:d})),H.createElement("div",{className:"xappw-admin-input"},H.createElement("input",{ref:n,id:"adminBarInput",placeholder:"Type your name here...",className:"xappw-admin-input__input",onChange:c}))))},dy={exports:{}};!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=a(r,o));return r}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(dy);var fy=dy.exports,py=function(e){var t=e.text,n=e.applyBrandingClass,r=e.linkColor,a=fy({"chat-footer__branding":n}),o=t.replace(/\[(.*?)\]\((.*?)\)/g,(function(e,t,n){return'<a style="color: '.concat(r||"",'; text-decoration: underline;" href="').concat(n,'" target="_blank" rel="noopener noreferrer">').concat(t,"</a>")})).replace(/\*\*(.*?)\*\*/g,(function(e,t){return"<b>".concat(t,"</b>")})).replace(/^(#{1,6}) (.*?)(?=\n|$)/gm,(function(e,t,n){var r=t.length;return"<h".concat(r,">").concat(n,"</h").concat(r,">")}));return H.createElement("div",{className:a,dangerouslySetInnerHTML:{__html:o}})},vy=function(e){var t=e.text;return(null==t?void 0:t.match(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/))?H.createElement(py,{text:t,applyBrandingClass:!0,linkColor:"white"}):H.createElement("div",{className:"chat-footer__branding",style:{color:"white"}},t)},hy={},my={};Object.defineProperty(my,"__esModule",{value:!0});var gy={};Object.defineProperty(gy,"__esModule",{value:!0}),gy.CHAT_WIDGET_CHANNEL=void 0,gy.CHAT_WIDGET_CHANNEL="chat-widget";var yy={};
|
|
4
4
|
/*! Copyright (c) 2021, XAPPmedia */Object.defineProperty(yy,"__esModule",{value:!0});var xy={};Object.defineProperty(xy,"__esModule",{value:!0});var by={};Object.defineProperty(by,"__esModule",{value:!0});var wy={};Object.defineProperty(wy,"__esModule",{value:!0});var ky={};Object.defineProperty(ky,"__esModule",{value:!0}),ky.isOpenURLMenuItem=ky.isStandardMenuItem=ky.isStaticTextMenuItem=ky.isStaticImageMenuItem=void 0,ky.isStaticImageMenuItem=function(e){return!!e&&!!e.imageUrl},ky.isStaticTextMenuItem=function(e){return!!e&&!!e.body},ky.isStandardMenuItem=function(e){return!!e&&!!e.label},ky.isOpenURLMenuItem=function(e){return!!e&&!!e.url},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),
|