@alfatech/livechat 2025.10.2-2.4 → 2025.10.2-2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +2 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -37,7 +37,7 @@ var Tg=e=>{throw TypeError(e)};var QC=(e,t)=>()=>(t||e((t={exports:{}}).exports,
37
37
  `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{td=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bo(e):""}function kT(e){switch(e.tag){case 5:return Bo(e.type);case 16:return Bo("Lazy");case 13:return Bo("Suspense");case 19:return Bo("SuspenseList");case 0:case 2:case 15:return e=nd(e.type,!1),e;case 11:return e=nd(e.type.render,!1),e;case 1:return e=nd(e.type,!0),e;default:return""}}function cf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xs:return"Fragment";case ys:return"Portal";case af:return"Profiler";case gh:return"StrictMode";case lf:return"Suspense";case uf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n1:return(e.displayName||"Context")+".Consumer";case t1:return(e._context.displayName||"Context")+".Provider";case vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yh:return t=e.displayName||null,t!==null?t:cf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return cf(e(t))}catch{}}return null}function CT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cf(t);case 8:return t===gh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function i1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function TT(e){var t=i1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pl(e){e._valueTracker||(e._valueTracker=TT(e))}function s1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=i1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function df(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Og(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ei(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function o1(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function ff(e,t){o1(e,t);var n=ei(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pf(e,t.type,n):t.hasOwnProperty("defaultValue")&&pf(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Dg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pf(e,t,n){(t!=="number"||fu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zo=Array.isArray;function Ns(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ei(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(zo(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function a1(e,t){var n=ei(t.value),r=ei(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Mg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function l1(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 mf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?l1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hl,u1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hl=hl||document.createElement("div"),hl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function da(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ET=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){ET.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function c1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function d1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=c1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var _T=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gf(e,t){if(t){if(_T[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yf=null;function xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xf=null,Ls=null,Is=null;function Ng(e){if(e=Ya(e)){if(typeof xf!="function")throw Error(L(280));var t=e.stateNode;t&&(t=oc(t),xf(e.stateNode,e.type,t))}}function f1(e){Ls?Is?Is.push(e):Is=[e]:Ls=e}function p1(){if(Ls){var e=Ls,t=Is;if(Is=Ls=null,Ng(e),t)for(e=0;e<t.length;e++)Ng(t[e])}}function h1(e,t){return e(t)}function m1(){}var rd=!1;function g1(e,t,n){if(rd)return e(t,n);rd=!0;try{return h1(e,t,n)}finally{rd=!1,(Ls!==null||Is!==null)&&(m1(),p1())}}function fa(e,t){var n=e.stateNode;if(n===null)return null;var r=oc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var wf=!1;if(ur)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){wf=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{wf=!1}function PT(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Yo=!1,pu=null,hu=!1,bf=null,jT={onError:function(e){Yo=!0,pu=e}};function RT(e,t,n,r,i,s,o,a,l){Yo=!1,pu=null,PT.apply(jT,arguments)}function AT(e,t,n,r,i,s,o,a,l){if(RT.apply(this,arguments),Yo){if(Yo){var c=pu;Yo=!1,pu=null}else throw Error(L(198));hu||(hu=!0,bf=c)}}function Ji(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function v1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lg(e){if(Ji(e)!==e)throw Error(L(188))}function OT(e){var t=e.alternate;if(!t){if(t=Ji(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Lg(i),e;if(s===r)return Lg(i),t;s=s.sibling}throw Error(L(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function y1(e){return e=OT(e),e!==null?x1(e):null}function x1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=x1(e);if(t!==null)return t;e=e.sibling}return null}var w1=Ht.unstable_scheduleCallback,Ig=Ht.unstable_cancelCallback,DT=Ht.unstable_shouldYield,FT=Ht.unstable_requestPaint,$e=Ht.unstable_now,MT=Ht.unstable_getCurrentPriorityLevel,wh=Ht.unstable_ImmediatePriority,b1=Ht.unstable_UserBlockingPriority,mu=Ht.unstable_NormalPriority,NT=Ht.unstable_LowPriority,S1=Ht.unstable_IdlePriority,nc=null,Bn=null;function LT(e){if(Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(nc,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:BT,IT=Math.log,$T=Math.LN2;function BT(e){return e>>>=0,e===0?32:31-(IT(e)/$T|0)|0}var ml=64,gl=4194304;function Vo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Vo(a):(s&=o,s!==0&&(r=Vo(s)))}else o=n&~i,o!==0?r=Vo(o):s!==0&&(r=Vo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-kn(t),i=1<<n,r|=e[n],t&=~i;return r}function zT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function VT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-kn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=zT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Sf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k1(){var e=ml;return ml<<=1,!(ml&4194240)&&(ml=64),e}function id(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ga(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kn(t),e[t]=n}function UT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-kn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function bh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var he=0;function C1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var T1,Sh,E1,_1,P1,kf=!1,vl=[],zr=null,Vr=null,Ur=null,pa=new Map,ha=new Map,Er=[],HT="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 $g(e,t){switch(e){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":pa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ha.delete(t.pointerId)}}function Ao(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ya(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function WT(e,t,n,r,i){switch(t){case"focusin":return zr=Ao(zr,e,t,n,r,i),!0;case"dragenter":return Vr=Ao(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=Ao(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return pa.set(s,Ao(pa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ha.set(s,Ao(ha.get(s)||null,e,t,n,r,i)),!0}return!1}function j1(e){var t=Ci(e.target);if(t!==null){var n=Ji(t);if(n!==null){if(t=n.tag,t===13){if(t=v1(n),t!==null){e.blockedOn=t,P1(e.priority,function(){E1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ul(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yf=r,n.target.dispatchEvent(r),yf=null}else return t=Ya(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function Bg(e,t,n){Ul(e)&&n.delete(t)}function qT(){kf=!1,zr!==null&&Ul(zr)&&(zr=null),Vr!==null&&Ul(Vr)&&(Vr=null),Ur!==null&&Ul(Ur)&&(Ur=null),pa.forEach(Bg),ha.forEach(Bg)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,kf||(kf=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,qT)))}function ma(e){function t(i){return Oo(i,e)}if(0<vl.length){Oo(vl[0],e);for(var n=1;n<vl.length;n++){var r=vl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zr!==null&&Oo(zr,e),Vr!==null&&Oo(Vr,e),Ur!==null&&Oo(Ur,e),pa.forEach(t),ha.forEach(t),n=0;n<Er.length;n++)r=Er[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Er.length&&(n=Er[0],n.blockedOn===null);)j1(n),n.blockedOn===null&&Er.shift()}var $s=hr.ReactCurrentBatchConfig,vu=!0;function GT(e,t,n,r){var i=he,s=$s.transition;$s.transition=null;try{he=1,kh(e,t,n,r)}finally{he=i,$s.transition=s}}function QT(e,t,n,r){var i=he,s=$s.transition;$s.transition=null;try{he=4,kh(e,t,n,r)}finally{he=i,$s.transition=s}}function kh(e,t,n,r){if(vu){var i=Cf(e,t,n,r);if(i===null)hd(e,t,r,yu,n),$g(e,r);else if(WT(i,e,t,n,r))r.stopPropagation();else if($g(e,r),t&4&&-1<HT.indexOf(e)){for(;i!==null;){var s=Ya(i);if(s!==null&&T1(s),s=Cf(e,t,n,r),s===null&&hd(e,t,r,yu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else hd(e,t,r,null,n)}}var yu=null;function Cf(e,t,n,r){if(yu=null,e=xh(r),e=Ci(e),e!==null)if(t=Ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=v1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yu=e,null}function R1(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(MT()){case wh:return 1;case b1:return 4;case mu:case NT:return 16;case S1:return 536870912;default:return 16}default:return 16}}var Lr=null,Ch=null,Hl=null;function A1(){if(Hl)return Hl;var e,t=Ch,n=t.length,r,i="value"in Lr?Lr.value:Lr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Hl=i.slice(e,1<r?1-r:void 0)}function Wl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yl(){return!0}function zg(){return!1}function qt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yl:zg,this.isPropagationStopped=zg,this}return Ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),t}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=qt(xo),Qa=Ae({},xo,{view:0,detail:0}),YT=qt(Qa),sd,od,Do,rc=Ae({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Do&&(Do&&e.type==="mousemove"?(sd=e.screenX-Do.screenX,od=e.screenY-Do.screenY):od=sd=0,Do=e),sd)},movementY:function(e){return"movementY"in e?e.movementY:od}}),Vg=qt(rc),KT=Ae({},rc,{dataTransfer:0}),XT=qt(KT),ZT=Ae({},Qa,{relatedTarget:0}),ad=qt(ZT),JT=Ae({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),eE=qt(JT),tE=Ae({},xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nE=qt(tE),rE=Ae({},xo,{data:0}),Ug=qt(rE),iE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sE={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"},oE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oE[e])?!!t[e]:!1}function Eh(){return aE}var lE=Ae({},Qa,{key:function(e){if(e.key){var t=iE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(e){return e.type==="keypress"?Wl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uE=qt(lE),cE=Ae({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=qt(cE),dE=Ae({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),fE=qt(dE),pE=Ae({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),hE=qt(pE),mE=Ae({},rc,{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}),gE=qt(mE),vE=[9,13,27,32],_h=ur&&"CompositionEvent"in window,Ko=null;ur&&"documentMode"in document&&(Ko=document.documentMode);var yE=ur&&"TextEvent"in window&&!Ko,O1=ur&&(!_h||Ko&&8<Ko&&11>=Ko),Wg=" ",qg=!1;function D1(e,t){switch(e){case"keyup":return vE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function xE(e,t){switch(e){case"compositionend":return F1(t);case"keypress":return t.which!==32?null:(qg=!0,Wg);case"textInput":return e=t.data,e===Wg&&qg?null:e;default:return null}}function wE(e,t){if(ws)return e==="compositionend"||!_h&&D1(e,t)?(e=A1(),Hl=Ch=Lr=null,ws=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return O1&&t.locale!=="ko"?null:t.data;default:return null}}var bE={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 Gg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bE[e.type]:t==="textarea"}function M1(e,t,n,r){f1(r),t=xu(t,"onChange"),0<t.length&&(n=new Th("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xo=null,ga=null;function SE(e){q1(e,0)}function ic(e){var t=ks(e);if(s1(t))return e}function kE(e,t){if(e==="change")return t}var N1=!1;if(ur){var ld;if(ur){var ud="oninput"in document;if(!ud){var Qg=document.createElement("div");Qg.setAttribute("oninput","return;"),ud=typeof Qg.oninput=="function"}ld=ud}else ld=!1;N1=ld&&(!document.documentMode||9<document.documentMode)}function Yg(){Xo&&(Xo.detachEvent("onpropertychange",L1),ga=Xo=null)}function L1(e){if(e.propertyName==="value"&&ic(ga)){var t=[];M1(t,ga,e,xh(e)),g1(SE,t)}}function CE(e,t,n){e==="focusin"?(Yg(),Xo=t,ga=n,Xo.attachEvent("onpropertychange",L1)):e==="focusout"&&Yg()}function TE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic(ga)}function EE(e,t){if(e==="click")return ic(t)}function _E(e,t){if(e==="input"||e==="change")return ic(t)}function PE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:PE;function va(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!of.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Kg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xg(e,t){var n=Kg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Kg(n)}}function I1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $1(){for(var e=window,t=fu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fu(e.document)}return t}function Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jE(e){var t=$1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&I1(n.ownerDocument.documentElement,n)){if(r!==null&&Ph(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Xg(n,s);var o=Xg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var RE=ur&&"documentMode"in document&&11>=document.documentMode,bs=null,Tf=null,Zo=null,Ef=!1;function Zg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ef||bs==null||bs!==fu(r)||(r=bs,"selectionStart"in r&&Ph(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zo&&va(Zo,r)||(Zo=r,r=xu(Tf,"onSelect"),0<r.length&&(t=new Th("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bs)))}function xl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ss={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},cd={},B1={};ur&&(B1=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function sc(e){if(cd[e])return cd[e];if(!Ss[e])return e;var t=Ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in B1)return cd[e]=t[n];return e}var z1=sc("animationend"),V1=sc("animationiteration"),U1=sc("animationstart"),H1=sc("transitionend"),W1=new Map,Jg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function si(e,t){W1.set(e,t),Zi(t,[e])}for(var dd=0;dd<Jg.length;dd++){var fd=Jg[dd],AE=fd.toLowerCase(),OE=fd[0].toUpperCase()+fd.slice(1);si(AE,"on"+OE)}si(z1,"onAnimationEnd");si(V1,"onAnimationIteration");si(U1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(H1,"onTransitionEnd");ro("onMouseEnter",["mouseout","mouseover"]);ro("onMouseLeave",["mouseout","mouseover"]);ro("onPointerEnter",["pointerout","pointerover"]);ro("onPointerLeave",["pointerout","pointerover"]);Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),DE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,AT(r,t,void 0,e),e.currentTarget=null}function q1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;ev(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;ev(i,a,c),s=l}}}if(hu)throw e=bf,hu=!1,bf=null,e}function ke(e,t){var n=t[Af];n===void 0&&(n=t[Af]=new Set);var r=e+"__bubble";n.has(r)||(G1(t,e,2,!1),n.add(r))}function pd(e,t,n){var r=0;t&&(r|=4),G1(n,e,r,t)}var wl="_reactListening"+Math.random().toString(36).slice(2);function ya(e){if(!e[wl]){e[wl]=!0,e1.forEach(function(n){n!=="selectionchange"&&(DE.has(n)||pd(n,!1,e),pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wl]||(t[wl]=!0,pd("selectionchange",!1,t))}}function G1(e,t,n,r){switch(R1(t)){case 1:var i=GT;break;case 4:i=QT;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!wf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function hd(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Ci(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}g1(function(){var c=s,d=xh(n),u=[];e:{var f=W1.get(e);if(f!==void 0){var p=Th,h=e;switch(e){case"keypress":if(Wl(n)===0)break e;case"keydown":case"keyup":p=uE;break;case"focusin":h="focus",p=ad;break;case"focusout":h="blur",p=ad;break;case"beforeblur":case"afterblur":p=ad;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=XT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=fE;break;case z1:case V1:case U1:p=eE;break;case H1:p=hE;break;case"scroll":p=YT;break;case"wheel":p=gE;break;case"copy":case"cut":case"paste":p=nE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Hg}var m=(t&4)!==0,x=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var w=c,b;w!==null;){b=w;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,g!==null&&(k=fa(w,g),k!=null&&m.push(xa(w,k,b)))),x)break;w=w.return}0<m.length&&(f=new p(f,h,null,n,d),u.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==yf&&(h=n.relatedTarget||n.fromElement)&&(Ci(h)||h[cr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=c,h=h?Ci(h):null,h!==null&&(x=Ji(h),h!==x||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=c),p!==h)){if(m=Vg,k="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=Hg,k="onPointerLeave",g="onPointerEnter",w="pointer"),x=p==null?f:ks(p),b=h==null?f:ks(h),f=new m(k,w+"leave",p,n,d),f.target=x,f.relatedTarget=b,k=null,Ci(d)===c&&(m=new m(g,w+"enter",h,n,d),m.target=b,m.relatedTarget=x,k=m),x=k,p&&h)t:{for(m=p,g=h,w=0,b=m;b;b=ms(b))w++;for(b=0,k=g;k;k=ms(k))b++;for(;0<w-b;)m=ms(m),w--;for(;0<b-w;)g=ms(g),b--;for(;w--;){if(m===g||g!==null&&m===g.alternate)break t;m=ms(m),g=ms(g)}m=null}else m=null;p!==null&&tv(u,f,p,m,!1),h!==null&&x!==null&&tv(u,x,h,m,!0)}}e:{if(f=c?ks(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=kE;else if(Gg(f))if(N1)T=_E;else{T=TE;var E=CE}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=EE);if(T&&(T=T(e,c))){M1(u,T,n,d);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&pf(f,"number",f.value)}switch(E=c?ks(c):window,e){case"focusin":(Gg(E)||E.contentEditable==="true")&&(bs=E,Tf=c,Zo=null);break;case"focusout":Zo=Tf=bs=null;break;case"mousedown":Ef=!0;break;case"contextmenu":case"mouseup":case"dragend":Ef=!1,Zg(u,n,d);break;case"selectionchange":if(RE)break;case"keydown":case"keyup":Zg(u,n,d)}var _;if(_h)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else ws?D1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(O1&&n.locale!=="ko"&&(ws||j!=="onCompositionStart"?j==="onCompositionEnd"&&ws&&(_=A1()):(Lr=d,Ch="value"in Lr?Lr.value:Lr.textContent,ws=!0)),E=xu(c,j),0<E.length&&(j=new Ug(j,e,null,n,d),u.push({event:j,listeners:E}),_?j.data=_:(_=F1(n),_!==null&&(j.data=_)))),(_=yE?xE(e,n):wE(e,n))&&(c=xu(c,"onBeforeInput"),0<c.length&&(d=new Ug("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=_))}q1(u,t)})}function xa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=fa(e,n),s!=null&&r.unshift(xa(e,s,i)),s=fa(e,t),s!=null&&r.push(xa(e,s,i))),e=e.return}return r}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tv(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=fa(n,s),l!=null&&o.unshift(xa(n,l,a))):i||(l=fa(n,s),l!=null&&o.push(xa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var FE=/\r\n?/g,ME=/\u0000|\uFFFD/g;function nv(e){return(typeof e=="string"?e:""+e).replace(FE,`
38
38
  `).replace(ME,"")}function bl(e,t,n){if(t=nv(t),nv(e)!==t&&n)throw Error(L(425))}function wu(){}var _f=null,Pf=null;function jf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rf=typeof setTimeout=="function"?setTimeout:void 0,NE=typeof clearTimeout=="function"?clearTimeout:void 0,rv=typeof Promise=="function"?Promise:void 0,LE=typeof queueMicrotask=="function"?queueMicrotask:typeof rv<"u"?function(e){return rv.resolve(null).then(e).catch(IE)}:Rf;function IE(e){setTimeout(function(){throw e})}function md(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ma(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ma(t)}function Hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function iv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var wo=Math.random().toString(36).slice(2),$n="__reactFiber$"+wo,wa="__reactProps$"+wo,cr="__reactContainer$"+wo,Af="__reactEvents$"+wo,$E="__reactListeners$"+wo,BE="__reactHandles$"+wo;function Ci(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iv(e);e!==null;){if(n=e[$n])return n;e=iv(e)}return t}e=n,n=e.parentNode}return null}function Ya(e){return e=e[$n]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ks(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function oc(e){return e[wa]||null}var Of=[],Cs=-1;function oi(e){return{current:e}}function Te(e){0>Cs||(e.current=Of[Cs],Of[Cs]=null,Cs--)}function we(e,t){Cs++,Of[Cs]=e.current,e.current=t}var ti={},mt=oi(ti),Ot=oi(!1),Ui=ti;function io(e,t){var n=e.type.contextTypes;if(!n)return ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Dt(e){return e=e.childContextTypes,e!=null}function bu(){Te(Ot),Te(mt)}function sv(e,t,n){if(mt.current!==ti)throw Error(L(168));we(mt,t),we(Ot,n)}function Q1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,CT(e)||"Unknown",i));return Ae({},n,r)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Ui=mt.current,we(mt,e),we(Ot,Ot.current),!0}function ov(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Q1(e,t,Ui),r.__reactInternalMemoizedMergedChildContext=e,Te(Ot),Te(mt),we(mt,e)):Te(Ot),we(Ot,n)}var tr=null,ac=!1,gd=!1;function Y1(e){tr===null?tr=[e]:tr.push(e)}function zE(e){ac=!0,Y1(e)}function ai(){if(!gd&&tr!==null){gd=!0;var e=0,t=he;try{var n=tr;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tr=null,ac=!1}catch(i){throw tr!==null&&(tr=tr.slice(e+1)),w1(wh,ai),i}finally{he=t,gd=!1}}return null}var Ts=[],Es=0,ku=null,Cu=0,tn=[],nn=0,Hi=null,ir=1,sr="";function vi(e,t){Ts[Es++]=Cu,Ts[Es++]=ku,ku=e,Cu=t}function K1(e,t,n){tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,Hi=e;var r=ir;e=sr;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var s=32-kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ir=1<<32-kn(t)+i|n<<i|r,sr=s+e}else ir=1<<s|n<<i|r,sr=e}function jh(e){e.return!==null&&(vi(e,1),K1(e,1,0))}function Rh(e){for(;e===ku;)ku=Ts[--Es],Ts[Es]=null,Cu=Ts[--Es],Ts[Es]=null;for(;e===Hi;)Hi=tn[--nn],tn[nn]=null,sr=tn[--nn],tn[nn]=null,ir=tn[--nn],tn[nn]=null}var Ut=null,Bt=null,Ee=!1,bn=null;function X1(e,t){var n=sn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function av(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hi!==null?{id:ir,overflow:sr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,Bt=null,!0):!1;default:return!1}}function Df(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ff(e){if(Ee){var t=Bt;if(t){var n=t;if(!av(e,t)){if(Df(e))throw Error(L(418));t=Hr(n.nextSibling);var r=Ut;t&&av(e,t)?X1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Ut=e)}}else{if(Df(e))throw Error(L(418));e.flags=e.flags&-4097|2,Ee=!1,Ut=e}}}function lv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function Sl(e){if(e!==Ut)return!1;if(!Ee)return lv(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jf(e.type,e.memoizedProps)),t&&(t=Bt)){if(Df(e))throw Z1(),Error(L(418));for(;t;)X1(e,t),t=Hr(t.nextSibling)}if(lv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Bt=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Bt=null}}else Bt=Ut?Hr(e.stateNode.nextSibling):null;return!0}function Z1(){for(var e=Bt;e;)e=Hr(e.nextSibling)}function so(){Bt=Ut=null,Ee=!1}function Ah(e){bn===null?bn=[e]:bn.push(e)}var VE=hr.ReactCurrentBatchConfig;function Fo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function kl(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uv(e){var t=e._init;return t(e._payload)}function J1(e){function t(g,w){if(e){var b=g.deletions;b===null?(g.deletions=[w],g.flags|=16):b.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function r(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function i(g,w){return g=Qr(g,w),g.index=0,g.sibling=null,g}function s(g,w,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<w?(g.flags|=2,w):b):(g.flags|=2,w)):(g.flags|=1048576,w)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,w,b,k){return w===null||w.tag!==6?(w=kd(b,g.mode,k),w.return=g,w):(w=i(w,b),w.return=g,w)}function l(g,w,b,k){var T=b.type;return T===xs?d(g,w,b.props.children,k,b.key):w!==null&&(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&uv(T)===w.type)?(k=i(w,b.props),k.ref=Fo(g,w,b),k.return=g,k):(k=Zl(b.type,b.key,b.props,null,g.mode,k),k.ref=Fo(g,w,b),k.return=g,k)}function c(g,w,b,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=Cd(b,g.mode,k),w.return=g,w):(w=i(w,b.children||[]),w.return=g,w)}function d(g,w,b,k,T){return w===null||w.tag!==7?(w=$i(b,g.mode,k,T),w.return=g,w):(w=i(w,b),w.return=g,w)}function u(g,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=kd(""+w,g.mode,b),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:return b=Zl(w.type,w.key,w.props,null,g.mode,b),b.ref=Fo(g,null,w),b.return=g,b;case ys:return w=Cd(w,g.mode,b),w.return=g,w;case kr:var k=w._init;return u(g,k(w._payload),b)}if(zo(w)||jo(w))return w=$i(w,g.mode,b,null),w.return=g,w;kl(g,w)}return null}function f(g,w,b,k){var T=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:a(g,w,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fl:return b.key===T?l(g,w,b,k):null;case ys:return b.key===T?c(g,w,b,k):null;case kr:return T=b._init,f(g,w,T(b._payload),k)}if(zo(b)||jo(b))return T!==null?null:d(g,w,b,k,null);kl(g,b)}return null}function p(g,w,b,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return g=g.get(b)||null,a(w,g,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case fl:return g=g.get(k.key===null?b:k.key)||null,l(w,g,k,T);case ys:return g=g.get(k.key===null?b:k.key)||null,c(w,g,k,T);case kr:var E=k._init;return p(g,w,b,E(k._payload),T)}if(zo(k)||jo(k))return g=g.get(b)||null,d(w,g,k,T,null);kl(w,k)}return null}function h(g,w,b,k){for(var T=null,E=null,_=w,j=w=0,F=null;_!==null&&j<b.length;j++){_.index>j?(F=_,_=null):F=_.sibling;var P=f(g,_,b[j],k);if(P===null){_===null&&(_=F);break}e&&_&&P.alternate===null&&t(g,_),w=s(P,w,j),E===null?T=P:E.sibling=P,E=P,_=F}if(j===b.length)return n(g,_),Ee&&vi(g,j),T;if(_===null){for(;j<b.length;j++)_=u(g,b[j],k),_!==null&&(w=s(_,w,j),E===null?T=_:E.sibling=_,E=_);return Ee&&vi(g,j),T}for(_=r(g,_);j<b.length;j++)F=p(_,g,j,b[j],k),F!==null&&(e&&F.alternate!==null&&_.delete(F.key===null?j:F.key),w=s(F,w,j),E===null?T=F:E.sibling=F,E=F);return e&&_.forEach(function(I){return t(g,I)}),Ee&&vi(g,j),T}function m(g,w,b,k){var T=jo(b);if(typeof T!="function")throw Error(L(150));if(b=T.call(b),b==null)throw Error(L(151));for(var E=T=null,_=w,j=w=0,F=null,P=b.next();_!==null&&!P.done;j++,P=b.next()){_.index>j?(F=_,_=null):F=_.sibling;var I=f(g,_,P.value,k);if(I===null){_===null&&(_=F);break}e&&_&&I.alternate===null&&t(g,_),w=s(I,w,j),E===null?T=I:E.sibling=I,E=I,_=F}if(P.done)return n(g,_),Ee&&vi(g,j),T;if(_===null){for(;!P.done;j++,P=b.next())P=u(g,P.value,k),P!==null&&(w=s(P,w,j),E===null?T=P:E.sibling=P,E=P);return Ee&&vi(g,j),T}for(_=r(g,_);!P.done;j++,P=b.next())P=p(_,g,j,P.value,k),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?j:P.key),w=s(P,w,j),E===null?T=P:E.sibling=P,E=P);return e&&_.forEach(function(M){return t(g,M)}),Ee&&vi(g,j),T}function x(g,w,b,k){if(typeof b=="object"&&b!==null&&b.type===xs&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fl:e:{for(var T=b.key,E=w;E!==null;){if(E.key===T){if(T=b.type,T===xs){if(E.tag===7){n(g,E.sibling),w=i(E,b.props.children),w.return=g,g=w;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&uv(T)===E.type){n(g,E.sibling),w=i(E,b.props),w.ref=Fo(g,E,b),w.return=g,g=w;break e}n(g,E);break}else t(g,E);E=E.sibling}b.type===xs?(w=$i(b.props.children,g.mode,k,b.key),w.return=g,g=w):(k=Zl(b.type,b.key,b.props,null,g.mode,k),k.ref=Fo(g,w,b),k.return=g,g=k)}return o(g);case ys:e:{for(E=b.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){n(g,w.sibling),w=i(w,b.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=Cd(b,g.mode,k),w.return=g,g=w}return o(g);case kr:return E=b._init,x(g,w,E(b._payload),k)}if(zo(b))return h(g,w,b,k);if(jo(b))return m(g,w,b,k);kl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(n(g,w.sibling),w=i(w,b),w.return=g,g=w):(n(g,w),w=kd(b,g.mode,k),w.return=g,g=w),o(g)):n(g,w)}return x}var oo=J1(!0),ew=J1(!1),Tu=oi(null),Eu=null,_s=null,Oh=null;function Dh(){Oh=_s=Eu=null}function Fh(e){var t=Tu.current;Te(Tu),e._currentValue=t}function Mf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bs(e,t){Eu=e,Oh=_s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},_s===null){if(Eu===null)throw Error(L(308));_s=e,Eu.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return t}var Ti=null;function Mh(e){Ti===null?Ti=[e]:Ti.push(e)}function tw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Mh(t)):(n.next=i.next,i.next=n),t.interleaved=n,dr(e,r)}function dr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Cr=!1;function Nh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nw(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 ar(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dr(e,n)}return i=r.interleaved,i===null?(t.next=t,Mh(r)):(t.next=i.next,i.next=t),r.interleaved=t,dr(e,n)}function ql(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}function cv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _u(e,t,n,r){var i=e.updateQueue;Cr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,d=c=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){u=h.call(p,u,f);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,u,f):h,f==null)break e;u=Ae({},u,f);break e;case 2:Cr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=p,l=u):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);qi|=o,e.lanes=o,e.memoizedState=u}}function dv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(L(191,i));i.call(r)}}}var Ka={},zn=oi(Ka),ba=oi(Ka),Sa=oi(Ka);function Ei(e){if(e===Ka)throw Error(L(174));return e}function Lh(e,t){switch(we(Sa,t),we(ba,e),we(zn,Ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mf(t,e)}Te(zn),we(zn,t)}function ao(){Te(zn),Te(ba),Te(Sa)}function rw(e){Ei(Sa.current);var t=Ei(zn.current),n=mf(t,e.type);t!==n&&(we(ba,e),we(zn,n))}function Ih(e){ba.current===e&&(Te(zn),Te(ba))}var Pe=oi(0);function Pu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vd=[];function $h(){for(var e=0;e<vd.length;e++)vd[e]._workInProgressVersionPrimary=null;vd.length=0}var Gl=hr.ReactCurrentDispatcher,yd=hr.ReactCurrentBatchConfig,Wi=0,Re=null,Ue=null,Ke=null,ju=!1,Jo=!1,ka=0,UE=0;function ut(){throw Error(L(321))}function Bh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function zh(e,t,n,r,i,s){if(Wi=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gl.current=e===null||e.memoizedState===null?GE:QE,e=n(r,i),Jo){s=0;do{if(Jo=!1,ka=0,25<=s)throw Error(L(301));s+=1,Ke=Ue=null,t.updateQueue=null,Gl.current=YE,e=n(r,i)}while(Jo)}if(Gl.current=Ru,t=Ue!==null&&Ue.next!==null,Wi=0,Ke=Ue=Re=null,ju=!1,t)throw Error(L(300));return e}function Vh(){var e=ka!==0;return ka=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function cn(){if(Ue===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Re.memoizedState:Ke.next;if(t!==null)Ke=t,Ue=e;else{if(e===null)throw Error(L(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Ca(e,t){return typeof t=="function"?t(e):t}function xd(e){var t=cn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Ue,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((Wi&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Re.lanes|=d,qi|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(At=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Re.lanes|=s,qi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wd(e){var t=cn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Tn(s,t.memoizedState)||(At=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function iw(){}function sw(e,t){var n=Re,r=cn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,At=!0),r=r.queue,Uh(lw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Ta(9,aw.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(L(349));Wi&30||ow(n,t,i)}return i}function ow(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function aw(e,t,n,r){t.value=n,t.getSnapshot=r,uw(t)&&cw(e)}function lw(e,t,n){return n(function(){uw(t)&&cw(e)})}function uw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function cw(e){var t=dr(e,1);t!==null&&Cn(t,e,1,-1)}function fv(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t.queue=e,e=e.dispatch=qE.bind(null,Re,e),[t.memoizedState,e]}function Ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function dw(){return cn().memoizedState}function Ql(e,t,n,r){var i=Dn();Re.flags|=e,i.memoizedState=Ta(1|t,n,void 0,r===void 0?null:r)}function lc(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(Ue!==null){var o=Ue.memoizedState;if(s=o.destroy,r!==null&&Bh(r,o.deps)){i.memoizedState=Ta(t,n,s,r);return}}Re.flags|=e,i.memoizedState=Ta(1|t,n,s,r)}function pv(e,t){return Ql(8390656,8,e,t)}function Uh(e,t){return lc(2048,8,e,t)}function fw(e,t){return lc(4,2,e,t)}function pw(e,t){return lc(4,4,e,t)}function hw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mw(e,t,n){return n=n!=null?n.concat([e]):null,lc(4,4,hw.bind(null,t,e),n)}function Hh(){}function gw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yw(e,t,n){return Wi&21?(Tn(n,t)||(n=k1(),Re.lanes|=n,qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=n)}function HE(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=yd.transition;yd.transition={};try{e(!1),t()}finally{he=n,yd.transition=r}}function xw(){return cn().memoizedState}function WE(e,t,n){var r=Gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ww(e))bw(t,n);else if(n=tw(e,t,n,r),n!==null){var i=wt();Cn(n,e,r,i),Sw(n,t,r)}}function qE(e,t,n){var r=Gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ww(e))bw(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Tn(a,o)){var l=t.interleaved;l===null?(i.next=i,Mh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=tw(e,t,i,r),n!==null&&(i=wt(),Cn(n,e,r,i),Sw(n,t,r))}}function ww(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function bw(e,t){Jo=ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}var Ru={readContext:un,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},GE={readContext:un,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:pv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ql(4194308,4,hw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ql(4,2,e,t)},useMemo:function(e,t){var n=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=WE.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:fv,useDebugValue:Hh,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=fv(!1),t=e[0];return e=HE.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,i=Dn();if(Ee){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Xe===null)throw Error(L(349));Wi&30||ow(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,pv(lw.bind(null,r,s,e),[e]),r.flags|=2048,Ta(9,aw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Dn(),t=Xe.identifierPrefix;if(Ee){var n=sr,r=ir;n=(r&~(1<<32-kn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ka++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=UE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},QE={readContext:un,useCallback:gw,useContext:un,useEffect:Uh,useImperativeHandle:mw,useInsertionEffect:fw,useLayoutEffect:pw,useMemo:vw,useReducer:xd,useRef:dw,useState:function(){return xd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return yw(t,Ue.memoizedState,e)},useTransition:function(){var e=xd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:iw,useSyncExternalStore:sw,useId:xw,unstable_isNewReconciler:!1},YE={readContext:un,useCallback:gw,useContext:un,useEffect:Uh,useImperativeHandle:mw,useInsertionEffect:fw,useLayoutEffect:pw,useMemo:vw,useReducer:wd,useRef:dw,useState:function(){return wd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return Ue===null?t.memoizedState=e:yw(t,Ue.memoizedState,e)},useTransition:function(){var e=wd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:iw,useSyncExternalStore:sw,useId:xw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Nf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uc={isMounted:function(e){return(e=e._reactInternals)?Ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Gr(e),s=ar(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(Cn(t,e,i,r),ql(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Gr(e),s=ar(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(Cn(t,e,i,r),ql(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=Gr(e),i=ar(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(Cn(t,e,r,n),ql(t,e,r))}};function hv(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!va(n,r)||!va(i,s):!0}function kw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=Dt(t)?Ui:mt.current,r=t.contextTypes,s=(r=r!=null)?io(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function mv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Lf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Nh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=Dt(t)?Ui:mt.current,i.context=io(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Nf(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&uc.enqueueReplaceState(i,i.state,null),_u(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do n+=kT(r),r=r.return;while(r);var i=n}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function bd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function If(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var KE=typeof WeakMap=="function"?WeakMap:Map;function Cw(e,t,n){n=ar(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ou||(Ou=!0,Qf=r),If(e,t)},n}function Tw(e,t,n){n=ar(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){If(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){If(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function gv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new KE;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=c_.bind(null,e,t,n),t.then(e,e))}function vv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ar(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var XE=hr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?ew(t,null,n,r):oo(t,e.child,n,r)}function xv(e,t,n,r,i){n=n.render;var s=t.ref;return Bs(t,i),r=zh(e,t,n,r,s,i),n=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&n&&jh(t),t.flags|=1,yt(e,t,r,i),t.child)}function wv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ew(e,t,s,r,i)):(e=Zl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:va,n(o,r)&&e.ref===t.ref)return fr(e,t,i)}return t.flags|=1,e=Qr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ew(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(va(s,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,fr(e,t,i)}return $f(e,t,n,r,i)}function _w(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(js,$t),$t|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(js,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(js,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(js,$t),$t|=r;return yt(e,t,i,n),t.child}function Pw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $f(e,t,n,r,i){var s=Dt(n)?Ui:mt.current;return s=io(t,s),Bs(t,i),n=zh(e,t,n,r,s,i),r=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&r&&jh(t),t.flags|=1,yt(e,t,n,i),t.child)}function bv(e,t,n,r,i){if(Dt(n)){var s=!0;Su(t)}else s=!1;if(Bs(t,i),t.stateNode===null)Yl(e,t),kw(t,n,r),Lf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=un(c):(c=Dt(n)?Ui:mt.current,c=io(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&mv(t,o,r,c),Cr=!1;var f=t.memoizedState;o.state=f,_u(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ot.current||Cr?(typeof d=="function"&&(Nf(t,n,d,r),l=t.memoizedState),(a=Cr||hv(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vn(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=Dt(n)?Ui:mt.current,l=io(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&mv(t,o,r,l),Cr=!1,f=t.memoizedState,o.state=f,_u(t,r,o,i);var h=t.memoizedState;a!==u||f!==h||Ot.current||Cr?(typeof p=="function"&&(Nf(t,n,p,r),h=t.memoizedState),(c=Cr||hv(t,n,c,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Bf(e,t,n,r,s,i)}function Bf(e,t,n,r,i,s){Pw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&ov(t,n,!1),fr(e,t,s);r=t.stateNode,XE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&ov(t,n,!0),t.child}function jw(e){var t=e.stateNode;t.pendingContext?sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sv(e,t.context,!1),Lh(e,t.containerInfo)}function Sv(e,t,n,r,i){return so(),Ah(i),t.flags|=256,yt(e,t,n,r),t.child}var zf={dehydrated:null,treeContext:null,retryLane:0};function Vf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rw(e,t,n){var r=t.pendingProps,i=Pe.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),we(Pe,i&1),e===null)return Ff(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=fc(o,r,0,null),e=$i(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Vf(n),t.memoizedState=zf,e):Wh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return ZE(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Qr(a,s):(s=$i(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Vf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=zf,r}return s=e.child,e=s.sibling,r=Qr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wh(e,t){return t=fc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cl(e,t,n,r){return r!==null&&Ah(r),oo(t,e.child,null,n),e=Wh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=bd(Error(L(422))),Cl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=fc({mode:"visible",children:r.children},i,0,null),s=$i(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&oo(t,e.child,null,o),t.child.memoizedState=Vf(o),t.memoizedState=zf,s);if(!(t.mode&1))return Cl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(L(419)),r=bd(s,r,void 0),Cl(e,t,o,r)}if(a=(o&e.childLanes)!==0,At||a){if(r=Xe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,dr(e,i),Cn(r,e,i,-1))}return Xh(),r=bd(Error(L(421))),Cl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=d_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Bt=Hr(i.nextSibling),Ut=t,Ee=!0,bn=null,e!==null&&(tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,ir=e.id,sr=e.overflow,Hi=t),t=Wh(t,r.children),t.flags|=4096,t)}function kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mf(e.return,t,n)}function Sd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Aw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kv(e,n,t);else if(e.tag===19)kv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Pu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Pu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sd(t,!0,n,null,s);break;case"together":Sd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JE(e,t,n){switch(t.tag){case 3:jw(t),so();break;case 5:rw(t);break;case 1:Dt(t.type)&&Su(t);break;case 4:Lh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;we(Tu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?Rw(e,t,n):(we(Pe,Pe.current&1),e=fr(e,t,n),e!==null?e.sibling:null);we(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Aw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),we(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,_w(e,t,n)}return fr(e,t,n)}var Ow,Uf,Dw,Fw;Ow=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uf=function(){};Dw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ei(zn.current);var s=null;switch(n){case"input":i=df(e,i),r=df(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=hf(e,i),r=hf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wu)}gf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ca.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ca.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ke("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Fw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function e_(e,t,n){var r=t.pendingProps;switch(Rh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return Dt(t.type)&&bu(),ct(t),null;case 3:return r=t.stateNode,ao(),Te(Ot),Te(mt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(Xf(bn),bn=null))),Uf(e,t),ct(t),null;case 5:Ih(t);var i=Ei(Sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Dw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ct(t),null}if(e=Ei(zn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$n]=t,r[wa]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":Og(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Fg(r,s),ke("invalid",r)}gf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",""+a]):ca.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":pl(r),Dg(r,s,!0);break;case"textarea":pl(r),Mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=wu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=l1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$n]=t,e[wa]=r,Ow(e,t,!1,!1),t.stateNode=e;e:{switch(o=vf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],e);i=r;break;case"source":ke("error",e),i=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),i=r;break;case"details":ke("toggle",e),i=r;break;case"input":Og(e,r),i=df(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Fg(e,r),i=hf(e,r),ke("invalid",e);break;default:i=r}gf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?d1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&u1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&da(e,l):typeof l=="number"&&da(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ca.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ke("scroll",e):l!=null&&mh(e,s,l,o))}switch(n){case"input":pl(e),Dg(e,r,!1);break;case"textarea":pl(e),Mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=wu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ct(t),null;case 6:if(e&&t.stateNode!=null)Fw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Ei(Sa.current),Ei(zn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:bl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return ct(t),null;case 13:if(Te(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&Bt!==null&&t.mode&1&&!(t.flags&128))Z1(),so(),t.flags|=98560,s=!1;else if(s=Sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(L(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(L(317));s[$n]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),s=!1}else bn!==null&&(Xf(bn),bn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pe.current&1?We===0&&(We=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ao(),Uf(e,t),e===null&&ya(t.stateNode.containerInfo),ct(t),null;case 10:return Fh(t.type._context),ct(t),null;case 17:return Dt(t.type)&&bu(),ct(t),null;case 19:if(Te(Pe),s=t.memoizedState,s===null)return ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Mo(s,!1);else{if(We!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Pu(e),o!==null){for(t.flags|=128,Mo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>uo&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return ct(t),null}else 2*$e()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Pe.current,we(Pe,r?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$t&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function t_(e,t){switch(Rh(t),t.tag){case 1:return Dt(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Te(Ot),Te(mt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ih(t),null;case 13:if(Te(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return ao(),null;case 10:return Fh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Tl=!1,pt=!1,n_=typeof WeakSet=="function"?WeakSet:Set,W=null;function Ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Hf(e,t,n){try{n()}catch(r){Me(e,t,r)}}var Cv=!1;function r_(e,t){if(_f=vu,e=$1(),Ph(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var p;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(p=u.firstChild)!==null;)f=u,u=p;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(p=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pf={focusedElem:e,selectionRange:n},vu=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:vn(t.type,m),x);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(k){Me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return h=Cv,Cv=!1,h}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Hf(t,n,s)}i=i.next}while(i!==r)}}function cc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mw(e){var t=e.alternate;t!==null&&(e.alternate=null,Mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[wa],delete t[Af],delete t[$E],delete t[BE])),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 Nw(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wu));else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}function Gf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}var rt=null,xn=!1;function wr(e,t,n){for(n=n.child;n!==null;)Lw(e,t,n),n=n.sibling}function Lw(e,t,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(nc,n)}catch{}switch(n.tag){case 5:pt||Ps(n,t);case 6:var r=rt,i=xn;rt=null,wr(e,t,n),rt=r,xn=i,rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?md(e.parentNode,n):e.nodeType===1&&md(e,n),ma(e)):md(rt,n.stateNode));break;case 4:r=rt,i=xn,rt=n.stateNode.containerInfo,xn=!0,wr(e,t,n),rt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hf(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!pt&&(Ps(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Me(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,wr(e,t,n),pt=r):wr(e,t,n);break;default:wr(e,t,n)}}function Ev(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n_),t.forEach(function(r){var i=f_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:rt=a.stateNode,xn=!1;break e;case 3:rt=a.stateNode.containerInfo,xn=!0;break e;case 4:rt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(rt===null)throw Error(L(160));Lw(s,o,i),rt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Me(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Iw(t,e),t=t.sibling}function Iw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),Rn(e),r&4){try{ea(3,e,e.return),cc(3,e)}catch(m){Me(e,e.return,m)}try{ea(5,e,e.return)}catch(m){Me(e,e.return,m)}}break;case 1:hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return);break;case 5:if(hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return),e.flags&32){var i=e.stateNode;try{da(i,"")}catch(m){Me(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&o1(i,s),vf(a,o);var c=vf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?d1(i,u):d==="dangerouslySetInnerHTML"?u1(i,u):d==="children"?da(i,u):mh(i,d,u,c)}switch(a){case"input":ff(i,s);break;case"textarea":a1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[wa]=s}catch(m){Me(e,e.return,m)}}break;case 6:if(hn(t,e),Rn(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Me(e,e.return,m)}}break;case 3:if(hn(t,e),Rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(m){Me(e,e.return,m)}break;case 4:hn(t,e),Rn(e);break;case 13:hn(t,e),Rn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=$e())),r&4&&Ev(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(c=pt)||d,hn(t,e),pt=c):hn(t,e),Rn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(W=e,d=e.child;d!==null;){for(u=W=d;W!==null;){switch(f=W,p=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:Ps(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Me(r,n,m)}}break;case 5:Ps(f,f.return);break;case 22:if(f.memoizedState!==null){Pv(u);continue}}p!==null?(p.return=f,W=p):Pv(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=c1("display",o))}catch(m){Me(e,e.return,m)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(m){Me(e,e.return,m)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:hn(t,e),Rn(e),r&4&&Ev(e);break;case 21:break;default:hn(t,e),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Nw(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(da(i,""),r.flags&=-33);var s=Tv(e);Gf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Tv(e);qf(e,a,o);break;default:throw Error(L(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i_(e,t,n){W=e,$w(e)}function $w(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var i=W,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Tl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=Tl;var c=pt;if(Tl=o,(pt=l)&&!c)for(W=i;W!==null;)o=W,l=o.child,o.tag===22&&o.memoizedState!==null?jv(i):l!==null?(l.return=o,W=l):jv(i);for(;s!==null;)W=s,$w(s),s=s.sibling;W=i,Tl=a,pt=c}_v(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,W=s):_v(e)}}function _v(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||cc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&dv(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}dv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&ma(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}pt||t.flags&512&&Wf(t)}catch(f){Me(t,t.return,f)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Pv(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function jv(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{cc(4,t)}catch(l){Me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Me(t,i,l)}}var s=t.return;try{Wf(t)}catch(l){Me(t,s,l)}break;case 5:var o=t.return;try{Wf(t)}catch(l){Me(t,o,l)}}}catch(l){Me(t,t.return,l)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var s_=Math.ceil,Au=hr.ReactCurrentDispatcher,qh=hr.ReactCurrentOwner,an=hr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,js=oi(0),We=0,Ea=null,qi=0,dc=0,Gh=0,ta=null,jt=null,Qh=0,uo=1/0,er=null,Ou=!1,Qf=null,qr=null,El=!1,Ir=null,Du=0,na=0,Yf=null,Kl=-1,Xl=0;function wt(){return de&6?$e():Kl!==-1?Kl:Kl=$e()}function Gr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:VE.transition!==null?(Xl===0&&(Xl=k1()),Xl):(e=he,e!==0||(e=window.event,e=e===void 0?16:R1(e.type)),e):1}function Cn(e,t,n,r){if(50<na)throw na=0,Yf=null,Error(L(185));Ga(e,n,r),(!(de&2)||e!==Xe)&&(e===Xe&&(!(de&2)&&(dc|=n),We===4&&_r(e,ot)),Ft(e,r),n===1&&de===0&&!(t.mode&1)&&(uo=$e()+500,ac&&ai()))}function Ft(e,t){var n=e.callbackNode;VT(e,t);var r=gu(e,e===Xe?ot:0);if(r===0)n!==null&&Ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ig(n),t===1)e.tag===0?zE(Rv.bind(null,e)):Y1(Rv.bind(null,e)),LE(function(){!(de&6)&&ai()}),n=null;else{switch(C1(r)){case 1:n=wh;break;case 4:n=b1;break;case 16:n=mu;break;case 536870912:n=S1;break;default:n=mu}n=Gw(n,Bw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bw(e,t){if(Kl=-1,Xl=0,de&6)throw Error(L(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=gu(e,e===Xe?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fu(e,r);else{t=r;var i=de;de|=2;var s=Vw();(Xe!==e||ot!==t)&&(er=null,uo=$e()+500,Ii(e,t));do try{l_();break}catch(a){zw(e,a)}while(!0);Dh(),Au.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=We)}if(t!==0){if(t===2&&(i=Sf(e),i!==0&&(r=i,t=Kf(e,i))),t===1)throw n=Ea,Ii(e,0),_r(e,r),Ft(e,$e()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!o_(i)&&(t=Fu(e,r),t===2&&(s=Sf(e),s!==0&&(r=s,t=Kf(e,s))),t===1))throw n=Ea,Ii(e,0),_r(e,r),Ft(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:yi(e,jt,er);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Qh+500-$e(),10<t)){if(gu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rf(yi.bind(null,e,jt,er),t);break}yi(e,jt,er);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s_(r/1960))-r,10<r){e.timeoutHandle=Rf(yi.bind(null,e,jt,er),r);break}yi(e,jt,er);break;case 5:yi(e,jt,er);break;default:throw Error(L(329))}}}return Ft(e,$e()),e.callbackNode===n?Bw.bind(null,e):null}function Kf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Ii(e,t).flags|=256),e=Fu(e,t),e!==2&&(t=jt,jt=n,t!==null&&Xf(t)),e}function Xf(e){jt===null?jt=e:jt.push.apply(jt,e)}function o_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Tn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _r(e,t){for(t&=~Gh,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function Rv(e){if(de&6)throw Error(L(327));zs();var t=gu(e,0);if(!(t&1))return Ft(e,$e()),null;var n=Fu(e,t);if(e.tag!==0&&n===2){var r=Sf(e);r!==0&&(t=r,n=Kf(e,r))}if(n===1)throw n=Ea,Ii(e,0),_r(e,t),Ft(e,$e()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yi(e,jt,er),Ft(e,$e()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(uo=$e()+500,ac&&ai())}}function Gi(e){Ir!==null&&Ir.tag===0&&!(de&6)&&zs();var t=de;de|=1;var n=an.transition,r=he;try{if(an.transition=null,he=1,e)return e()}finally{he=r,an.transition=n,de=t,!(de&6)&&ai()}}function Kh(){$t=js.current,Te(js)}function Ii(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,NE(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Rh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:ao(),Te(Ot),Te(mt),$h();break;case 5:Ih(r);break;case 4:ao();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Fh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Qr(e.current,null),ot=$t=t,We=0,Ea=null,Gh=dc=qi=0,jt=ta=null,Ti!==null){for(t=0;t<Ti.length;t++)if(n=Ti[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ti=null}return e}function zw(e,t){do{var n=Be;try{if(Dh(),Gl.current=Ru,ju){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ju=!1}if(Wi=0,Ke=Ue=Re=null,Jo=!1,ka=0,qh.current=null,n===null||n.return===null){We=1,Ea=t,Be=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vv(o);if(p!==null){p.flags&=-257,yv(p,o,a,s,t),p.mode&1&&gv(s,c,t),t=p,l=c;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){gv(s,c,t),Xh();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var x=vv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),yv(x,o,a,s,t),Ah(lo(l,a));break e}}s=l=lo(l,a),We!==4&&(We=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Cw(s,l,t);cv(s,g);break e;case 1:a=l;var w=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(qr===null||!qr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=Tw(s,a,t);cv(s,k);break e}}s=s.return}while(s!==null)}Hw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function Vw(){var e=Au.current;return Au.current=Ru,e===null?Ru:e}function Xh(){(We===0||We===3||We===2)&&(We=4),Xe===null||!(qi&268435455)&&!(dc&268435455)||_r(Xe,ot)}function Fu(e,t){var n=de;de|=2;var r=Vw();(Xe!==e||ot!==t)&&(er=null,Ii(e,t));do try{a_();break}catch(i){zw(e,i)}while(!0);if(Dh(),de=n,Au.current=r,Be!==null)throw Error(L(261));return Xe=null,ot=0,We}function a_(){for(;Be!==null;)Uw(Be)}function l_(){for(;Be!==null&&!DT();)Uw(Be)}function Uw(e){var t=qw(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Hw(e):Be=t,qh.current=null}function Hw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=t_(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,Be=null;return}}else if(n=e_(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);We===0&&(We=5)}function yi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,u_(e,t,n,r)}finally{an.transition=i,he=r}return null}function u_(e,t,n,r){do zs();while(Ir!==null);if(de&6)throw Error(L(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(UT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,Gw(mu,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=an.transition,an.transition=null;var o=he;he=1;var a=de;de|=4,qh.current=null,r_(e,n),Iw(n,e),jE(Pf),vu=!!_f,Pf=_f=null,e.current=n,i_(n),FT(),de=a,he=o,an.transition=s}else e.current=n;if(El&&(El=!1,Ir=e,Du=i),s=e.pendingLanes,s===0&&(qr=null),LT(n.stateNode),Ft(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ou)throw Ou=!1,e=Qf,Qf=null,e;return Du&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Yf?na++:(na=0,Yf=e):na=0,ai(),null}function zs(){if(Ir!==null){var e=C1(Du),t=an.transition,n=he;try{if(an.transition=null,he=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,Du=0,de&6)throw Error(L(331));var i=de;for(de|=4,W=e.current;W!==null;){var s=W,o=s.child;if(W.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var d=W;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,W=u;else for(;W!==null;){d=W;var f=d.sibling,p=d.return;if(Mw(d),d===c){W=null;break}if(f!==null){f.return=p,W=f;break}W=p}}}var h=s.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}W=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,W=o;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,W=g;break e}W=s.return}}var w=e.current;for(W=w;W!==null;){o=W;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,W=b;else e:for(o=w;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:cc(9,a)}}catch(T){Me(a,a.return,T)}if(a===o){W=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,W=k;break e}W=a.return}}if(de=i,ai(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(nc,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Av(e,t,n){t=lo(n,t),t=Cw(e,t,1),e=Wr(e,t,1),t=wt(),e!==null&&(Ga(e,1,t),Ft(e,t))}function Me(e,t,n){if(e.tag===3)Av(e,e,n);else for(;t!==null;){if(t.tag===3){Av(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=lo(n,e),e=Tw(t,e,1),t=Wr(t,e,1),e=wt(),t!==null&&(Ga(t,1,e),Ft(t,e));break}}t=t.return}}function c_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(We===4||We===3&&(ot&130023424)===ot&&500>$e()-Qh?Ii(e,0):Gh|=n),Ft(e,t)}function Ww(e,t){t===0&&(e.mode&1?(t=gl,gl<<=1,!(gl&130023424)&&(gl=4194304)):t=1);var n=wt();e=dr(e,t),e!==null&&(Ga(e,t,n),Ft(e,n))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ww(e,n)}function f_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Ww(e,n)}var qw;qw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ot.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,JE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&K1(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var i=io(t,mt.current);Bs(t,n),i=zh(null,t,r,e,i,n);var s=Vh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(r)?(s=!0,Su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nh(t),i.updater=uc,t.stateNode=i,i._reactInternals=t,Lf(t,r,e,n),t=Bf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&jh(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=h_(r),e=vn(r,e),i){case 0:t=$f(null,t,r,e,n);break e;case 1:t=bv(null,t,r,e,n);break e;case 11:t=xv(null,t,r,e,n);break e;case 14:t=wv(null,t,r,vn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),$f(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),bv(e,t,r,i,n);case 3:e:{if(jw(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,nw(e,t),_u(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=lo(Error(L(423)),t),t=Sv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error(L(424)),t),t=Sv(e,t,r,n,i);break e}else for(Bt=Hr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=fr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return rw(t),e===null&&Ff(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,jf(r,i)?o=null:s!==null&&jf(r,s)&&(t.flags|=32),Pw(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return Rw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),xv(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,we(Tu,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!Ot.current){t=fr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=ar(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Mf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Mf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bs(t,n),i=un(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),wv(e,t,r,i,n);case 15:return Ew(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Yl(e,t),t.tag=1,Dt(r)?(e=!0,Su(t)):e=!1,Bs(t,n),kw(t,r,i),Lf(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return Aw(e,t,n);case 22:return _w(e,t,n)}throw Error(L(156,t.tag))};function Gw(e,t){return w1(e,t)}function p_(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 sn(e,t,n,r){return new p_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function h_(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===yh)return 14}return 2}function Qr(e,t){var n=e.alternate;return n===null?(n=sn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xs:return $i(n.children,i,s,t);case gh:o=8,i|=8;break;case af:return e=sn(12,n,t,i|2),e.elementType=af,e.lanes=s,e;case lf:return e=sn(13,n,t,i),e.elementType=lf,e.lanes=s,e;case uf:return e=sn(19,n,t,i),e.elementType=uf,e.lanes=s,e;case r1:return fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case t1:o=10;break e;case n1:o=9;break e;case vh:o=11;break e;case yh:o=14;break e;case kr:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=sn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function $i(e,t,n,r){return e=sn(7,e,r,t),e.lanes=n,e}function fc(e,t,n,r){return e=sn(22,e,r,t),e.elementType=r1,e.lanes=n,e.stateNode={isHidden:!1},e}function kd(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function Cd(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=id(0),this.expirationTimes=id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jh(e,t,n,r,i,s,o,a,l){return e=new m_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(s),e}function g_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ys,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qw(e){if(!e)return ti;e=e._reactInternals;e:{if(Ji(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(Dt(n))return Q1(e,n,t)}return t}function Yw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Qw(null),n=e.current,r=wt(),i=Gr(n),s=ar(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Ga(e,i,r),Ft(e,r),e}function pc(e,t,n,r){var i=t.current,s=wt(),o=Gr(i);return n=Qw(n),t.context===null?t.context=n:t.pendingContext=n,t=ar(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(Cn(e,i,o,s),ql(e,i,o)),o}function Mu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ov(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Ov(e,t),(e=e.alternate)&&Ov(e,t)}function v_(){return null}var Kw=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}hc.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));pc(e,t,null,null)};hc.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){pc(null,e,null,null)}),t[cr]=null}};function hc(e){this._internalRoot=e}hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Er.length&&t!==0&&t<Er[n].priority;n++);Er.splice(n,0,e),n===0&&j1(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function mc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dv(){}function y_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Mu(o);s.call(c)}}var o=Yw(t,r,e,0,null,!1,!1,"",Dv);return e._reactRootContainer=o,e[cr]=o.current,ya(e.nodeType===8?e.parentNode:e),Gi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Mu(l);a.call(c)}}var l=Jh(e,0,!1,null,null,!1,!1,"",Dv);return e._reactRootContainer=l,e[cr]=l.current,ya(e.nodeType===8?e.parentNode:e),Gi(function(){pc(t,l,n,r)}),l}function gc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Mu(o);a.call(l)}}pc(t,o,e,i)}else o=y_(n,t,e,i,r);return Mu(o)}T1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(bh(t,n|1),Ft(t,$e()),!(de&6)&&(uo=$e()+500,ai()))}break;case 13:Gi(function(){var r=dr(e,1);if(r!==null){var i=wt();Cn(r,e,1,i)}}),em(e,1)}};Sh=function(e){if(e.tag===13){var t=dr(e,134217728);if(t!==null){var n=wt();Cn(t,e,134217728,n)}em(e,134217728)}};E1=function(e){if(e.tag===13){var t=Gr(e),n=dr(e,t);if(n!==null){var r=wt();Cn(n,e,t,r)}em(e,t)}};_1=function(){return he};P1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};xf=function(e,t,n){switch(t){case"input":if(ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=oc(r);if(!i)throw Error(L(90));s1(r),ff(r,i)}}}break;case"textarea":a1(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};h1=Yh;m1=Gi;var x_={usingClientEntryPoint:!1,Events:[Ya,ks,oc,f1,p1,Yh]},No={findFiberByHostInstance:Ci,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w_={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||v_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{nc=_l.inject(w_),Bn=_l}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x_;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return g_(e,t,null,n)};Wt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",i=Kw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,!1,r,i),e[cr]=t.current,ya(e.nodeType===8?e.parentNode:e),new tm(t)};Wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=y1(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Gi(e)};Wt.hydrate=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Kw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Yw(t,null,e,1,n??null,i,!1,s,o),e[cr]=t.current,ya(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new hc(t)};Wt.render=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!mc(e))throw Error(L(40));return e._reactRootContainer?(Gi(function(){gc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};Wt.unstable_batchedUpdates=Yh;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!mc(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return gc(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function Xw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xw)}catch(e){console.error(e)}}Xw(),Xx.exports=Wt;var Zw=Xx.exports;const b_=Xi(Zw);var Jw,Fv=Zw;Jw=Fv.createRoot,Fv.hydrateRoot;const S_="@alfatech/livechat",k_="v2025.10.22.4",C_="module",T_="https://api-live.alfatek.dev",E_="wss://api-live.alfatek.dev",__=["dist","README.md","component/chatier.js"],P_="dist/widget.js",j_={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},R_={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},A_={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},eb={name:S_,private:!1,version:k_,type:C_,apiURL:T_,wsURL:E_,files:__,main:P_,scripts:j_,dependencies:R_,devDependencies:A_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},O_=eb.apiURL,D_=eb.wsURL,F_=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],M_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],N_={429:F_,404:M_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${O_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=N_[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const vc=e=>[200,201,204].includes(e),L_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qi=typeof window>"u"||"Deno"in globalThis;function en(){}function I_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function tb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Mv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==rm(o,t.options))return!1}else if(!_a(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Nv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(s))return!1}else if(!_a(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>Jf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function _a(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!_a(e[n],t[n])):!1}function nb(e,t){if(e===t)return e;const n=Lv(e)&&Lv(t);if(n||Jf(e)&&Jf(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=nb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Nu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Lv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jf(e){if(!Iv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Iv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Iv(e){return Object.prototype.toString.call(e)==="[object Object]"}function $_(e){return new Promise(t=>{setTimeout(t,e)})}function ep(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nb(e,t):t}function B_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function z_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function rb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Hs,Rx,V_=(Rx=class extends So{constructor(){super();K(this,Ai);K(this,Pr);K(this,Hs);U(this,Hs,t=>{if(!Qi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),U(this,Pr,void 0))}setEventListener(t){var n;U(this,Hs,t),(n=S(this,Pr))==null||n.call(this),U(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&(U(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Hs=new WeakMap,Rx),sm=new V_,Ws,jr,qs,Ax,U_=(Ax=class extends So{constructor(){super();K(this,Ws,!0);K(this,jr);K(this,qs);U(this,qs,t=>{if(!Qi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),U(this,jr,void 0))}setEventListener(t){var n;U(this,qs,t),(n=S(this,jr))==null||n.call(this),U(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Ws)!==t&&(U(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Ws)}},Ws=new WeakMap,jr=new WeakMap,qs=new WeakMap,Ax),Lu=new U_;function tp(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function H_(e){return Math.min(1e3*2**e,3e4)}function ib(e){return(e??"online")==="online"?Lu.isOnline():!0}var sb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Td(e){return e instanceof sb}function ob(e){let t=!1,n=0,r=!1,i;const s=tp(),o=m=>{var x;r||(f(new sb(m)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||Lu.isOnline())&&e.canRun(),d=()=>ib(e.networkMode)&&e.canRun(),u=m=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,m),i==null||i(),s.reject(m))},p=()=>new Promise(m=>{var x;i=g=>{(r||c())&&m(g)},(x=e.onPause)==null||x.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const x=n===0?e.initialPromise:void 0;try{m=x??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(u).catch(g=>{var E;if(r)return;const w=e.retry??(Qi?0:3),b=e.retryDelay??H_,k=typeof b=="function"?b(n,g):b,T=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),$_(k).then(()=>c()?void 0:p()).then(()=>{t?f(g):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function W_(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var He=W_(),Oi,Ox,ab=(Ox=class{constructor(){K(this,Oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&U(this,Oi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Oi)&&(clearTimeout(S(this,Oi)),U(this,Oi,void 0))}},Oi=new WeakMap,Ox),Gs,Qs,Jt,dt,Va,Di,yn,Jn,Dx,q_=(Dx=class extends ab{constructor(t){super();K(this,yn);K(this,Gs);K(this,Qs);K(this,Jt);K(this,dt);K(this,Va);K(this,Di);U(this,Di,!1),U(this,Va,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,Gs,G_(this.options)),this.state=t.state??S(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,dt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,Va),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Jt).remove(this)}setData(t,n){const r=ep(this.state.data,t,this.options);return se(this,yn,Jn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,yn,Jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,dt))==null?void 0:r.promise;return(i=S(this,dt))==null||i.cancel(t),n?n.then(en).catch(en):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Gs))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!tb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,dt)&&(S(this,Di)?S(this,dt).cancel({revert:!0}):S(this,dt).cancelRetry()),this.scheduleGc()),S(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,yn,Jn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,dt))return S(this,dt).continueRetry(),S(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(U(this,Di,!0),r.signal)})},s=()=>{const u=rb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),U(this,Di,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),U(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&se(this,yn,Jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,p,h,m;Td(u)&&u.silent||se(this,yn,Jn).call(this,{type:"error",error:u}),Td(u)||((p=(f=S(this,Jt).config).onError)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,this.state.data,u,this)),this.scheduleGc()};return U(this,dt,ob({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,p,h,m;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(x){a(x);return}(p=(f=S(this,Jt).config).onSuccess)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{se(this,yn,Jn).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{se(this,yn,Jn).call(this,{type:"pause"})},onContinue:()=>{se(this,yn,Jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,dt).start()}},Gs=new WeakMap,Qs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Va=new WeakMap,Di=new WeakMap,yn=new WeakSet,Jn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...lb(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Td(i)&&i.revert&&S(this,Qs)?{...S(this,Qs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Jt).notify({query:this,type:"updated",action:t})})},Dx);function lb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ib(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function G_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Mn,Fx,Q_=(Fx=class extends So{constructor(t={}){super();K(this,Mn);this.config=t,U(this,Mn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??rm(i,n);let o=this.get(s);return o||(o=new q_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Mn).has(t.queryHash)||(S(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Mn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Mn).get(t)}getAll(){return[...S(this,Mn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Mv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Mv(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,Fx),Nn,gt,Fi,Ln,br,Mx,Y_=(Mx=class extends ab{constructor(t){super();K(this,Ln);K(this,Nn);K(this,gt);K(this,Fi);this.mutationId=t.mutationId,U(this,gt,t.mutationCache),U(this,Nn,[]),this.state=t.state||ub(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Fi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,p,h,m,x,g,w,b,k,T,E,_;U(this,Fi,ob({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,F)=>{se(this,Ln,br).call(this,{type:"failed",failureCount:j,error:F})},onPause:()=>{se(this,Ln,br).call(this,{type:"pause"})},onContinue:()=>{se(this,Ln,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Fi).canStart();try{if(!n){se(this,Ln,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,gt).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&se(this,Ln,br).call(this,{type:"pending",context:F,variables:t,isPaused:r})}const j=await S(this,Fi).start();return await((c=(l=S(this,gt).config).onSuccess)==null?void 0:c.call(l,j,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,j,t,this.state.context)),await((p=(f=S(this,gt).config).onSettled)==null?void 0:p.call(f,j,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,j,null,t,this.state.context)),se(this,Ln,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(x=S(this,gt).config).onError)==null?void 0:g.call(x,j,t,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,j,t,this.state.context)),await((T=(k=S(this,gt).config).onSettled)==null?void 0:T.call(k,void 0,j,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,j,t,this.state.context)),j}finally{se(this,Ln,br).call(this,{type:"error",error:j})}}finally{S(this,gt).runNext(this)}}},Nn=new WeakMap,gt=new WeakMap,Fi=new WeakMap,Ln=new WeakSet,br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Mx);function ub(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It,Ua,Nx,K_=(Nx=class extends So{constructor(t={}){super();K(this,It);K(this,Ua);this.config=t,U(this,It,new Map),U(this,Ua,Date.now())}build(t,n,r){const i=new Y_({mutationCache:this,mutationId:++cl(this,Ua)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Pl(t),r=S(this,It).get(n)??[];r.push(t),S(this,It).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Pl(t);if(S(this,It).has(n)){const i=(r=S(this,It).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,It).delete(n):S(this,It).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,It).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nv(n,r))}findAll(t={}){return this.getAll().filter(n=>Nv(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(en))))}},It=new WeakMap,Ua=new WeakMap,Nx);function Pl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function $v(e){return{onFetch:(t,n)=>{var d,u,f,p,h;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=rb(t.options,t.fetchOptions),w=async(b,k,T)=>{if(m)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};x(E);const _=await g(E),{maxPages:j}=t.options,F=T?z_:B_;return{pages:F(b.pages,_,j),pageParams:F(b.pageParams,k,j)}};if(i&&s.length){const b=i==="backward",k=b?X_:Bv,T={pages:s,pageParams:o},E=k(r,T);a=await w(T,E,b)}else{const b=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:Bv(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var m,x;return(x=(m=t.options).persister)==null?void 0:x.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Bv(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function X_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var De,Rr,Ar,Ys,Ks,Or,Xs,Zs,Lx,Z_=(Lx=class{constructor(e={}){K(this,De);K(this,Rr);K(this,Ar);K(this,Ys);K(this,Ks);K(this,Or);K(this,Xs);K(this,Zs);U(this,De,e.queryCache||new Q_),U(this,Rr,e.mutationCache||new K_),U(this,Ar,e.defaultOptions||{}),U(this,Ys,new Map),U(this,Ks,new Map),U(this,Or,0)}mount(){cl(this,Or)._++,S(this,Or)===1&&(U(this,Xs,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),U(this,Zs,Lu.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onOnline())})))}unmount(){var e,t;cl(this,Or)._--,S(this,Or)===0&&((e=S(this,Xs))==null||e.call(this),U(this,Xs,void 0),(t=S(this,Zs))==null||t.call(this),U(this,Zs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Rr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=S(this,De).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Vs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,De).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=S(this,De).get(r.queryHash),s=i==null?void 0:i.state.data,o=I_(t,s);if(o!==void 0)return S(this,De).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>S(this,De).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,De);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,De),r={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>S(this,De).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(en).catch(en)}invalidateQueries(e,t={}){return He.batch(()=>{if(S(this,De).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=He.batch(()=>S(this,De).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(en)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(en)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,De).build(this,t);return n.isStaleByTime(Vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(en).catch(en)}fetchInfiniteQuery(e){return e.behavior=$v(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=$v(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lu.isOnline()?S(this,Rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Rr)}getDefaultOptions(){return S(this,Ar)}setDefaultOptions(e){U(this,Ar,e)}setQueryDefaults(e,t){S(this,Ys).set(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ys).values()],n={};return t.forEach(r=>{_a(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ks).set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ks).values()];let n={};return t.forEach(r=>{_a(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Ar).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=rm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Ar).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Rr).clear()}},De=new WeakMap,Rr=new WeakMap,Ar=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Or=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Lx),Et,le,Ha,vt,Mi,Js,Dr,In,Wa,eo,to,Ni,Li,Fr,no,pe,Ho,np,rp,ip,sp,op,ap,lp,cb,Ix,J_=(Ix=class extends So{constructor(t,n){super();K(this,pe);K(this,Et);K(this,le);K(this,Ha);K(this,vt);K(this,Mi);K(this,Js);K(this,Dr);K(this,In);K(this,Wa);K(this,eo);K(this,to);K(this,Ni);K(this,Li);K(this,Fr);K(this,no,new Set);this.options=n,U(this,Et,t),U(this,In,null),U(this,Dr,tp()),this.options.experimental_prefetchInRender||S(this,Dr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,le).addObserver(this),zv(S(this,le),this.options)?se(this,pe,Ho).call(this):this.updateResult(),se(this,pe,sp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return up(S(this,le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return up(S(this,le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,pe,op).call(this),se(this,pe,ap).call(this),S(this,le).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,le);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,pe,lp).call(this),S(this,le).setOptions(this.options),r._defaulted&&!Nu(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&Vv(S(this,le),i,this.options,r)&&se(this,pe,Ho).call(this),this.updateResult(n),s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||Vs(this.options.staleTime,S(this,le))!==Vs(r.staleTime,S(this,le)))&&se(this,pe,np).call(this);const o=se(this,pe,rp).call(this);s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||o!==S(this,Fr))&&se(this,pe,ip).call(this,o)}getOptimisticResult(t){const n=S(this,Et).getQueryCache().build(S(this,Et),t),r=this.createResult(n,t);return t2(this,r)&&(U(this,vt,r),U(this,Js,this.options),U(this,Mi,S(this,le).state)),r}getCurrentResult(){return S(this,vt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){S(this,no).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Et).defaultQueryOptions(t),r=S(this,Et).getQueryCache().build(S(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,pe,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,vt)))}createResult(t,n){var j;const r=S(this,le),i=this.options,s=S(this,vt),o=S(this,Mi),a=S(this,Js),c=t!==r?t.state:S(this,Ha),{state:d}=t;let u={...d},f=!1,p;if(n._optimisticResults){const F=this.hasListeners(),P=!F&&zv(t,n),I=F&&Vv(t,r,n,i);(P||I)&&(u={...u,...lb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:x}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,Wa))p=S(this,eo);else try{U(this,Wa,n.select),p=n.select(u.data),p=ep(s==null?void 0:s.data,p,n),U(this,eo,p),U(this,In,null)}catch(F){U(this,In,F)}else p=u.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let F;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))F=s.data;else if(F=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,to))==null?void 0:j.state.data,S(this,to)):n.placeholderData,n.select&&F!==void 0)try{F=n.select(F),U(this,In,null)}catch(P){U(this,In,P)}F!==void 0&&(x="success",p=ep(s==null?void 0:s.data,F,n),f=!0)}S(this,In)&&(h=S(this,In),p=S(this,eo),m=Date.now(),x="error");const g=u.fetchStatus==="fetching",w=x==="pending",b=x==="error",k=w&&g,T=p!==void 0,_={status:x,fetchStatus:u.fetchStatus,isPending:w,isSuccess:x==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:b&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const F=M=>{_.status==="error"?M.reject(_.error):_.data!==void 0&&M.resolve(_.data)},P=()=>{const M=U(this,Dr,_.promise=tp());F(M)},I=S(this,Dr);switch(I.status){case"pending":t.queryHash===r.queryHash&&F(I);break;case"fulfilled":(_.status==="error"||_.data!==I.value)&&P();break;case"rejected":(_.status!=="error"||_.error!==I.reason)&&P();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(U(this,Mi,S(this,le).state),U(this,Js,this.options),S(this,Mi).data!==void 0&&U(this,to,S(this,le)),Nu(r,n))return;U(this,vt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,no).size)return!0;const l=new Set(a??S(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,vt)).some(c=>{const d=c;return S(this,vt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,pe,cb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,sp).call(this)}},Et=new WeakMap,le=new WeakMap,Ha=new WeakMap,vt=new WeakMap,Mi=new WeakMap,Js=new WeakMap,Dr=new WeakMap,In=new WeakMap,Wa=new WeakMap,eo=new WeakMap,to=new WeakMap,Ni=new WeakMap,Li=new WeakMap,Fr=new WeakMap,no=new WeakMap,pe=new WeakSet,Ho=function(t){se(this,pe,lp).call(this);let n=S(this,le).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(en)),n},np=function(){se(this,pe,op).call(this);const t=Vs(this.options.staleTime,S(this,le));if(Qi||S(this,vt).isStale||!Zf(t))return;const r=tb(S(this,vt).dataUpdatedAt,t)+1;U(this,Ni,setTimeout(()=>{S(this,vt).isStale||this.updateResult()},r))},rp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,le)):this.options.refetchInterval)??!1},ip=function(t){se(this,pe,ap).call(this),U(this,Fr,t),!(Qi||Sn(this.options.enabled,S(this,le))===!1||!Zf(S(this,Fr))||S(this,Fr)===0)&&U(this,Li,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Fr)))},sp=function(){se(this,pe,np).call(this),se(this,pe,ip).call(this,se(this,pe,rp).call(this))},op=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),U(this,Ni,void 0))},ap=function(){S(this,Li)&&(clearInterval(S(this,Li)),U(this,Li,void 0))},lp=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,le))return;const n=S(this,le);U(this,le,t),U(this,Ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cb=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Et).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Ix);function e2(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zv(e,t){return e2(e,t)||e.state.data!==void 0&&up(e,t,t.refetchOnMount)}function up(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&om(e,t)}return!1}function Vv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&om(e,n)}function om(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Vs(t.staleTime,e))}function t2(e,t){return!Nu(e.getCurrentResult(),t)}var Mr,Nr,_t,rr,lr,Jl,cp,$x,n2=($x=class extends So{constructor(t,n){super();K(this,lr);K(this,Mr);K(this,Nr);K(this,_t);K(this,rr);U(this,Mr,t),this.setOptions(n),this.bindMethods(),se(this,lr,Jl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=S(this,Mr).defaultMutationOptions(t),Nu(this.options,n)||S(this,Mr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,_t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(this.options.mutationKey)?this.reset():((r=S(this,_t))==null?void 0:r.state.status)==="pending"&&S(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,lr,Jl).call(this),se(this,lr,cp).call(this,t)}getCurrentResult(){return S(this,Nr)}reset(){var t;(t=S(this,_t))==null||t.removeObserver(this),U(this,_t,void 0),se(this,lr,Jl).call(this),se(this,lr,cp).call(this)}mutate(t,n){var r;return U(this,rr,n),(r=S(this,_t))==null||r.removeObserver(this),U(this,_t,S(this,Mr).getMutationCache().build(S(this,Mr),this.options)),S(this,_t).addObserver(this),S(this,_t).execute(t)}},Mr=new WeakMap,Nr=new WeakMap,_t=new WeakMap,rr=new WeakMap,lr=new WeakSet,Jl=function(){var n;const t=((n=S(this,_t))==null?void 0:n.state)??ub();U(this,Nr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},cp=function(t){He.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,rr)&&this.hasListeners()){const d=S(this,Nr).variables,u=S(this,Nr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,rr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=S(this,rr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,rr)).onError)==null||a.call(o,t.error,d,u),(c=(l=S(this,rr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(S(this,Nr))})})},$x),db=v.createContext(void 0),fb=e=>{const t=v.useContext(db);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},r2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(db.Provider,{value:e,children:t})),pb=v.createContext(!1),i2=()=>v.useContext(pb);pb.Provider;function s2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var o2=v.createContext(s2()),a2=()=>v.useContext(o2);function hb(e,t){return typeof e=="function"?e(...t):!!e}function dp(){}var l2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},u2=e=>{v.useEffect(()=>{e.clearReset()},[e])},c2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&hb(n,[e.error,r]),d2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},f2=(e,t)=>e.isLoading&&e.isFetching&&!t,p2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Uv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function h2(e,t,n){var d,u,f,p,h;const r=fb(),i=i2(),s=a2(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",d2(o),l2(o,s),u2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const x=i?dp:l.subscribe(He.batchCalls(m));return l.updateResult(),x},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),p2(o,c))throw Uv(o,l,s);if(c2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,c),o.experimental_prefetchInRender&&!Qi&&f2(c,i)){const m=a?Uv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;m==null||m.catch(dp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function m2(e,t){return h2(e,J_)}function am(e,t){const n=fb(),[r]=v.useState(()=>new n2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(dp)},[r]);if(i.error&&hb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const g2=e=>m2({queryKey:["widgets",e],queryFn:()=>v2(e)}),v2=e=>bo(`widgets/with-link/${e}`);var C=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),Y=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Y||{});function y2(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function bd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function If(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var KE=typeof WeakMap=="function"?WeakMap:Map;function Cw(e,t,n){n=ar(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ou||(Ou=!0,Qf=r),If(e,t)},n}function Tw(e,t,n){n=ar(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){If(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){If(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function gv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new KE;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=c_.bind(null,e,t,n),t.then(e,e))}function vv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ar(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var XE=hr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?ew(t,null,n,r):oo(t,e.child,n,r)}function xv(e,t,n,r,i){n=n.render;var s=t.ref;return Bs(t,i),r=zh(e,t,n,r,s,i),n=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&n&&jh(t),t.flags|=1,yt(e,t,r,i),t.child)}function wv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ew(e,t,s,r,i)):(e=Zl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:va,n(o,r)&&e.ref===t.ref)return fr(e,t,i)}return t.flags|=1,e=Qr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ew(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(va(s,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,fr(e,t,i)}return $f(e,t,n,r,i)}function _w(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(js,$t),$t|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(js,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(js,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(js,$t),$t|=r;return yt(e,t,i,n),t.child}function Pw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $f(e,t,n,r,i){var s=Dt(n)?Ui:mt.current;return s=io(t,s),Bs(t,i),n=zh(e,t,n,r,s,i),r=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&r&&jh(t),t.flags|=1,yt(e,t,n,i),t.child)}function bv(e,t,n,r,i){if(Dt(n)){var s=!0;Su(t)}else s=!1;if(Bs(t,i),t.stateNode===null)Yl(e,t),kw(t,n,r),Lf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=un(c):(c=Dt(n)?Ui:mt.current,c=io(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&mv(t,o,r,c),Cr=!1;var f=t.memoizedState;o.state=f,_u(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ot.current||Cr?(typeof d=="function"&&(Nf(t,n,d,r),l=t.memoizedState),(a=Cr||hv(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vn(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=Dt(n)?Ui:mt.current,l=io(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&mv(t,o,r,l),Cr=!1,f=t.memoizedState,o.state=f,_u(t,r,o,i);var h=t.memoizedState;a!==u||f!==h||Ot.current||Cr?(typeof p=="function"&&(Nf(t,n,p,r),h=t.memoizedState),(c=Cr||hv(t,n,c,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Bf(e,t,n,r,s,i)}function Bf(e,t,n,r,i,s){Pw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&ov(t,n,!1),fr(e,t,s);r=t.stateNode,XE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&ov(t,n,!0),t.child}function jw(e){var t=e.stateNode;t.pendingContext?sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sv(e,t.context,!1),Lh(e,t.containerInfo)}function Sv(e,t,n,r,i){return so(),Ah(i),t.flags|=256,yt(e,t,n,r),t.child}var zf={dehydrated:null,treeContext:null,retryLane:0};function Vf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rw(e,t,n){var r=t.pendingProps,i=Pe.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),we(Pe,i&1),e===null)return Ff(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=fc(o,r,0,null),e=$i(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Vf(n),t.memoizedState=zf,e):Wh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return ZE(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Qr(a,s):(s=$i(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Vf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=zf,r}return s=e.child,e=s.sibling,r=Qr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wh(e,t){return t=fc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cl(e,t,n,r){return r!==null&&Ah(r),oo(t,e.child,null,n),e=Wh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=bd(Error(L(422))),Cl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=fc({mode:"visible",children:r.children},i,0,null),s=$i(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&oo(t,e.child,null,o),t.child.memoizedState=Vf(o),t.memoizedState=zf,s);if(!(t.mode&1))return Cl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(L(419)),r=bd(s,r,void 0),Cl(e,t,o,r)}if(a=(o&e.childLanes)!==0,At||a){if(r=Xe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,dr(e,i),Cn(r,e,i,-1))}return Xh(),r=bd(Error(L(421))),Cl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=d_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Bt=Hr(i.nextSibling),Ut=t,Ee=!0,bn=null,e!==null&&(tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,ir=e.id,sr=e.overflow,Hi=t),t=Wh(t,r.children),t.flags|=4096,t)}function kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mf(e.return,t,n)}function Sd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Aw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kv(e,n,t);else if(e.tag===19)kv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Pu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Pu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sd(t,!0,n,null,s);break;case"together":Sd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JE(e,t,n){switch(t.tag){case 3:jw(t),so();break;case 5:rw(t);break;case 1:Dt(t.type)&&Su(t);break;case 4:Lh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;we(Tu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?Rw(e,t,n):(we(Pe,Pe.current&1),e=fr(e,t,n),e!==null?e.sibling:null);we(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Aw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),we(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,_w(e,t,n)}return fr(e,t,n)}var Ow,Uf,Dw,Fw;Ow=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uf=function(){};Dw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ei(zn.current);var s=null;switch(n){case"input":i=df(e,i),r=df(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=hf(e,i),r=hf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wu)}gf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ca.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ca.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ke("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Fw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function e_(e,t,n){var r=t.pendingProps;switch(Rh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return Dt(t.type)&&bu(),ct(t),null;case 3:return r=t.stateNode,ao(),Te(Ot),Te(mt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(Xf(bn),bn=null))),Uf(e,t),ct(t),null;case 5:Ih(t);var i=Ei(Sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Dw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ct(t),null}if(e=Ei(zn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$n]=t,r[wa]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":Og(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Fg(r,s),ke("invalid",r)}gf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",""+a]):ca.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":pl(r),Dg(r,s,!0);break;case"textarea":pl(r),Mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=wu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=l1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$n]=t,e[wa]=r,Ow(e,t,!1,!1),t.stateNode=e;e:{switch(o=vf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],e);i=r;break;case"source":ke("error",e),i=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),i=r;break;case"details":ke("toggle",e),i=r;break;case"input":Og(e,r),i=df(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Fg(e,r),i=hf(e,r),ke("invalid",e);break;default:i=r}gf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?d1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&u1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&da(e,l):typeof l=="number"&&da(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ca.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ke("scroll",e):l!=null&&mh(e,s,l,o))}switch(n){case"input":pl(e),Dg(e,r,!1);break;case"textarea":pl(e),Mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=wu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ct(t),null;case 6:if(e&&t.stateNode!=null)Fw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Ei(Sa.current),Ei(zn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:bl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return ct(t),null;case 13:if(Te(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&Bt!==null&&t.mode&1&&!(t.flags&128))Z1(),so(),t.flags|=98560,s=!1;else if(s=Sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(L(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(L(317));s[$n]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),s=!1}else bn!==null&&(Xf(bn),bn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pe.current&1?We===0&&(We=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ao(),Uf(e,t),e===null&&ya(t.stateNode.containerInfo),ct(t),null;case 10:return Fh(t.type._context),ct(t),null;case 17:return Dt(t.type)&&bu(),ct(t),null;case 19:if(Te(Pe),s=t.memoizedState,s===null)return ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Mo(s,!1);else{if(We!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Pu(e),o!==null){for(t.flags|=128,Mo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>uo&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return ct(t),null}else 2*$e()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Pe.current,we(Pe,r?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$t&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function t_(e,t){switch(Rh(t),t.tag){case 1:return Dt(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Te(Ot),Te(mt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ih(t),null;case 13:if(Te(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return ao(),null;case 10:return Fh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Tl=!1,pt=!1,n_=typeof WeakSet=="function"?WeakSet:Set,W=null;function Ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Hf(e,t,n){try{n()}catch(r){Me(e,t,r)}}var Cv=!1;function r_(e,t){if(_f=vu,e=$1(),Ph(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var p;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(p=u.firstChild)!==null;)f=u,u=p;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(p=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pf={focusedElem:e,selectionRange:n},vu=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:vn(t.type,m),x);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(k){Me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return h=Cv,Cv=!1,h}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Hf(t,n,s)}i=i.next}while(i!==r)}}function cc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mw(e){var t=e.alternate;t!==null&&(e.alternate=null,Mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[wa],delete t[Af],delete t[$E],delete t[BE])),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 Nw(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wu));else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}function Gf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}var rt=null,xn=!1;function wr(e,t,n){for(n=n.child;n!==null;)Lw(e,t,n),n=n.sibling}function Lw(e,t,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(nc,n)}catch{}switch(n.tag){case 5:pt||Ps(n,t);case 6:var r=rt,i=xn;rt=null,wr(e,t,n),rt=r,xn=i,rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?md(e.parentNode,n):e.nodeType===1&&md(e,n),ma(e)):md(rt,n.stateNode));break;case 4:r=rt,i=xn,rt=n.stateNode.containerInfo,xn=!0,wr(e,t,n),rt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hf(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!pt&&(Ps(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Me(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,wr(e,t,n),pt=r):wr(e,t,n);break;default:wr(e,t,n)}}function Ev(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n_),t.forEach(function(r){var i=f_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:rt=a.stateNode,xn=!1;break e;case 3:rt=a.stateNode.containerInfo,xn=!0;break e;case 4:rt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(rt===null)throw Error(L(160));Lw(s,o,i),rt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Me(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Iw(t,e),t=t.sibling}function Iw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),Rn(e),r&4){try{ea(3,e,e.return),cc(3,e)}catch(m){Me(e,e.return,m)}try{ea(5,e,e.return)}catch(m){Me(e,e.return,m)}}break;case 1:hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return);break;case 5:if(hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return),e.flags&32){var i=e.stateNode;try{da(i,"")}catch(m){Me(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&o1(i,s),vf(a,o);var c=vf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?d1(i,u):d==="dangerouslySetInnerHTML"?u1(i,u):d==="children"?da(i,u):mh(i,d,u,c)}switch(a){case"input":ff(i,s);break;case"textarea":a1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[wa]=s}catch(m){Me(e,e.return,m)}}break;case 6:if(hn(t,e),Rn(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Me(e,e.return,m)}}break;case 3:if(hn(t,e),Rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(m){Me(e,e.return,m)}break;case 4:hn(t,e),Rn(e);break;case 13:hn(t,e),Rn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=$e())),r&4&&Ev(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(c=pt)||d,hn(t,e),pt=c):hn(t,e),Rn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(W=e,d=e.child;d!==null;){for(u=W=d;W!==null;){switch(f=W,p=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:Ps(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Me(r,n,m)}}break;case 5:Ps(f,f.return);break;case 22:if(f.memoizedState!==null){Pv(u);continue}}p!==null?(p.return=f,W=p):Pv(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=c1("display",o))}catch(m){Me(e,e.return,m)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(m){Me(e,e.return,m)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:hn(t,e),Rn(e),r&4&&Ev(e);break;case 21:break;default:hn(t,e),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Nw(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(da(i,""),r.flags&=-33);var s=Tv(e);Gf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Tv(e);qf(e,a,o);break;default:throw Error(L(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i_(e,t,n){W=e,$w(e)}function $w(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var i=W,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Tl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=Tl;var c=pt;if(Tl=o,(pt=l)&&!c)for(W=i;W!==null;)o=W,l=o.child,o.tag===22&&o.memoizedState!==null?jv(i):l!==null?(l.return=o,W=l):jv(i);for(;s!==null;)W=s,$w(s),s=s.sibling;W=i,Tl=a,pt=c}_v(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,W=s):_v(e)}}function _v(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||cc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&dv(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}dv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&ma(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}pt||t.flags&512&&Wf(t)}catch(f){Me(t,t.return,f)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Pv(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function jv(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{cc(4,t)}catch(l){Me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Me(t,i,l)}}var s=t.return;try{Wf(t)}catch(l){Me(t,s,l)}break;case 5:var o=t.return;try{Wf(t)}catch(l){Me(t,o,l)}}}catch(l){Me(t,t.return,l)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var s_=Math.ceil,Au=hr.ReactCurrentDispatcher,qh=hr.ReactCurrentOwner,an=hr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,js=oi(0),We=0,Ea=null,qi=0,dc=0,Gh=0,ta=null,jt=null,Qh=0,uo=1/0,er=null,Ou=!1,Qf=null,qr=null,El=!1,Ir=null,Du=0,na=0,Yf=null,Kl=-1,Xl=0;function wt(){return de&6?$e():Kl!==-1?Kl:Kl=$e()}function Gr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:VE.transition!==null?(Xl===0&&(Xl=k1()),Xl):(e=he,e!==0||(e=window.event,e=e===void 0?16:R1(e.type)),e):1}function Cn(e,t,n,r){if(50<na)throw na=0,Yf=null,Error(L(185));Ga(e,n,r),(!(de&2)||e!==Xe)&&(e===Xe&&(!(de&2)&&(dc|=n),We===4&&_r(e,ot)),Ft(e,r),n===1&&de===0&&!(t.mode&1)&&(uo=$e()+500,ac&&ai()))}function Ft(e,t){var n=e.callbackNode;VT(e,t);var r=gu(e,e===Xe?ot:0);if(r===0)n!==null&&Ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ig(n),t===1)e.tag===0?zE(Rv.bind(null,e)):Y1(Rv.bind(null,e)),LE(function(){!(de&6)&&ai()}),n=null;else{switch(C1(r)){case 1:n=wh;break;case 4:n=b1;break;case 16:n=mu;break;case 536870912:n=S1;break;default:n=mu}n=Gw(n,Bw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bw(e,t){if(Kl=-1,Xl=0,de&6)throw Error(L(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=gu(e,e===Xe?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fu(e,r);else{t=r;var i=de;de|=2;var s=Vw();(Xe!==e||ot!==t)&&(er=null,uo=$e()+500,Ii(e,t));do try{l_();break}catch(a){zw(e,a)}while(!0);Dh(),Au.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=We)}if(t!==0){if(t===2&&(i=Sf(e),i!==0&&(r=i,t=Kf(e,i))),t===1)throw n=Ea,Ii(e,0),_r(e,r),Ft(e,$e()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!o_(i)&&(t=Fu(e,r),t===2&&(s=Sf(e),s!==0&&(r=s,t=Kf(e,s))),t===1))throw n=Ea,Ii(e,0),_r(e,r),Ft(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:yi(e,jt,er);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Qh+500-$e(),10<t)){if(gu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rf(yi.bind(null,e,jt,er),t);break}yi(e,jt,er);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s_(r/1960))-r,10<r){e.timeoutHandle=Rf(yi.bind(null,e,jt,er),r);break}yi(e,jt,er);break;case 5:yi(e,jt,er);break;default:throw Error(L(329))}}}return Ft(e,$e()),e.callbackNode===n?Bw.bind(null,e):null}function Kf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Ii(e,t).flags|=256),e=Fu(e,t),e!==2&&(t=jt,jt=n,t!==null&&Xf(t)),e}function Xf(e){jt===null?jt=e:jt.push.apply(jt,e)}function o_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Tn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _r(e,t){for(t&=~Gh,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function Rv(e){if(de&6)throw Error(L(327));zs();var t=gu(e,0);if(!(t&1))return Ft(e,$e()),null;var n=Fu(e,t);if(e.tag!==0&&n===2){var r=Sf(e);r!==0&&(t=r,n=Kf(e,r))}if(n===1)throw n=Ea,Ii(e,0),_r(e,t),Ft(e,$e()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yi(e,jt,er),Ft(e,$e()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(uo=$e()+500,ac&&ai())}}function Gi(e){Ir!==null&&Ir.tag===0&&!(de&6)&&zs();var t=de;de|=1;var n=an.transition,r=he;try{if(an.transition=null,he=1,e)return e()}finally{he=r,an.transition=n,de=t,!(de&6)&&ai()}}function Kh(){$t=js.current,Te(js)}function Ii(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,NE(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Rh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:ao(),Te(Ot),Te(mt),$h();break;case 5:Ih(r);break;case 4:ao();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Fh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Qr(e.current,null),ot=$t=t,We=0,Ea=null,Gh=dc=qi=0,jt=ta=null,Ti!==null){for(t=0;t<Ti.length;t++)if(n=Ti[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ti=null}return e}function zw(e,t){do{var n=Be;try{if(Dh(),Gl.current=Ru,ju){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ju=!1}if(Wi=0,Ke=Ue=Re=null,Jo=!1,ka=0,qh.current=null,n===null||n.return===null){We=1,Ea=t,Be=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vv(o);if(p!==null){p.flags&=-257,yv(p,o,a,s,t),p.mode&1&&gv(s,c,t),t=p,l=c;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){gv(s,c,t),Xh();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var x=vv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),yv(x,o,a,s,t),Ah(lo(l,a));break e}}s=l=lo(l,a),We!==4&&(We=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Cw(s,l,t);cv(s,g);break e;case 1:a=l;var w=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(qr===null||!qr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=Tw(s,a,t);cv(s,k);break e}}s=s.return}while(s!==null)}Hw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function Vw(){var e=Au.current;return Au.current=Ru,e===null?Ru:e}function Xh(){(We===0||We===3||We===2)&&(We=4),Xe===null||!(qi&268435455)&&!(dc&268435455)||_r(Xe,ot)}function Fu(e,t){var n=de;de|=2;var r=Vw();(Xe!==e||ot!==t)&&(er=null,Ii(e,t));do try{a_();break}catch(i){zw(e,i)}while(!0);if(Dh(),de=n,Au.current=r,Be!==null)throw Error(L(261));return Xe=null,ot=0,We}function a_(){for(;Be!==null;)Uw(Be)}function l_(){for(;Be!==null&&!DT();)Uw(Be)}function Uw(e){var t=qw(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Hw(e):Be=t,qh.current=null}function Hw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=t_(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,Be=null;return}}else if(n=e_(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);We===0&&(We=5)}function yi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,u_(e,t,n,r)}finally{an.transition=i,he=r}return null}function u_(e,t,n,r){do zs();while(Ir!==null);if(de&6)throw Error(L(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(UT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,Gw(mu,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=an.transition,an.transition=null;var o=he;he=1;var a=de;de|=4,qh.current=null,r_(e,n),Iw(n,e),jE(Pf),vu=!!_f,Pf=_f=null,e.current=n,i_(n),FT(),de=a,he=o,an.transition=s}else e.current=n;if(El&&(El=!1,Ir=e,Du=i),s=e.pendingLanes,s===0&&(qr=null),LT(n.stateNode),Ft(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ou)throw Ou=!1,e=Qf,Qf=null,e;return Du&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Yf?na++:(na=0,Yf=e):na=0,ai(),null}function zs(){if(Ir!==null){var e=C1(Du),t=an.transition,n=he;try{if(an.transition=null,he=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,Du=0,de&6)throw Error(L(331));var i=de;for(de|=4,W=e.current;W!==null;){var s=W,o=s.child;if(W.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var d=W;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,W=u;else for(;W!==null;){d=W;var f=d.sibling,p=d.return;if(Mw(d),d===c){W=null;break}if(f!==null){f.return=p,W=f;break}W=p}}}var h=s.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}W=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,W=o;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,W=g;break e}W=s.return}}var w=e.current;for(W=w;W!==null;){o=W;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,W=b;else e:for(o=w;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:cc(9,a)}}catch(T){Me(a,a.return,T)}if(a===o){W=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,W=k;break e}W=a.return}}if(de=i,ai(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(nc,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Av(e,t,n){t=lo(n,t),t=Cw(e,t,1),e=Wr(e,t,1),t=wt(),e!==null&&(Ga(e,1,t),Ft(e,t))}function Me(e,t,n){if(e.tag===3)Av(e,e,n);else for(;t!==null;){if(t.tag===3){Av(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=lo(n,e),e=Tw(t,e,1),t=Wr(t,e,1),e=wt(),t!==null&&(Ga(t,1,e),Ft(t,e));break}}t=t.return}}function c_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(We===4||We===3&&(ot&130023424)===ot&&500>$e()-Qh?Ii(e,0):Gh|=n),Ft(e,t)}function Ww(e,t){t===0&&(e.mode&1?(t=gl,gl<<=1,!(gl&130023424)&&(gl=4194304)):t=1);var n=wt();e=dr(e,t),e!==null&&(Ga(e,t,n),Ft(e,n))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ww(e,n)}function f_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Ww(e,n)}var qw;qw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ot.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,JE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&K1(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var i=io(t,mt.current);Bs(t,n),i=zh(null,t,r,e,i,n);var s=Vh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(r)?(s=!0,Su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nh(t),i.updater=uc,t.stateNode=i,i._reactInternals=t,Lf(t,r,e,n),t=Bf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&jh(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=h_(r),e=vn(r,e),i){case 0:t=$f(null,t,r,e,n);break e;case 1:t=bv(null,t,r,e,n);break e;case 11:t=xv(null,t,r,e,n);break e;case 14:t=wv(null,t,r,vn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),$f(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),bv(e,t,r,i,n);case 3:e:{if(jw(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,nw(e,t),_u(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=lo(Error(L(423)),t),t=Sv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error(L(424)),t),t=Sv(e,t,r,n,i);break e}else for(Bt=Hr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=fr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return rw(t),e===null&&Ff(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,jf(r,i)?o=null:s!==null&&jf(r,s)&&(t.flags|=32),Pw(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return Rw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),xv(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,we(Tu,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!Ot.current){t=fr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=ar(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Mf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Mf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bs(t,n),i=un(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),wv(e,t,r,i,n);case 15:return Ew(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Yl(e,t),t.tag=1,Dt(r)?(e=!0,Su(t)):e=!1,Bs(t,n),kw(t,r,i),Lf(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return Aw(e,t,n);case 22:return _w(e,t,n)}throw Error(L(156,t.tag))};function Gw(e,t){return w1(e,t)}function p_(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 sn(e,t,n,r){return new p_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function h_(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===yh)return 14}return 2}function Qr(e,t){var n=e.alternate;return n===null?(n=sn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xs:return $i(n.children,i,s,t);case gh:o=8,i|=8;break;case af:return e=sn(12,n,t,i|2),e.elementType=af,e.lanes=s,e;case lf:return e=sn(13,n,t,i),e.elementType=lf,e.lanes=s,e;case uf:return e=sn(19,n,t,i),e.elementType=uf,e.lanes=s,e;case r1:return fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case t1:o=10;break e;case n1:o=9;break e;case vh:o=11;break e;case yh:o=14;break e;case kr:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=sn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function $i(e,t,n,r){return e=sn(7,e,r,t),e.lanes=n,e}function fc(e,t,n,r){return e=sn(22,e,r,t),e.elementType=r1,e.lanes=n,e.stateNode={isHidden:!1},e}function kd(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function Cd(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=id(0),this.expirationTimes=id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jh(e,t,n,r,i,s,o,a,l){return e=new m_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(s),e}function g_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ys,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qw(e){if(!e)return ti;e=e._reactInternals;e:{if(Ji(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(Dt(n))return Q1(e,n,t)}return t}function Yw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Qw(null),n=e.current,r=wt(),i=Gr(n),s=ar(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Ga(e,i,r),Ft(e,r),e}function pc(e,t,n,r){var i=t.current,s=wt(),o=Gr(i);return n=Qw(n),t.context===null?t.context=n:t.pendingContext=n,t=ar(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(Cn(e,i,o,s),ql(e,i,o)),o}function Mu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ov(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Ov(e,t),(e=e.alternate)&&Ov(e,t)}function v_(){return null}var Kw=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}hc.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));pc(e,t,null,null)};hc.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){pc(null,e,null,null)}),t[cr]=null}};function hc(e){this._internalRoot=e}hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Er.length&&t!==0&&t<Er[n].priority;n++);Er.splice(n,0,e),n===0&&j1(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function mc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dv(){}function y_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Mu(o);s.call(c)}}var o=Yw(t,r,e,0,null,!1,!1,"",Dv);return e._reactRootContainer=o,e[cr]=o.current,ya(e.nodeType===8?e.parentNode:e),Gi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Mu(l);a.call(c)}}var l=Jh(e,0,!1,null,null,!1,!1,"",Dv);return e._reactRootContainer=l,e[cr]=l.current,ya(e.nodeType===8?e.parentNode:e),Gi(function(){pc(t,l,n,r)}),l}function gc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Mu(o);a.call(l)}}pc(t,o,e,i)}else o=y_(n,t,e,i,r);return Mu(o)}T1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(bh(t,n|1),Ft(t,$e()),!(de&6)&&(uo=$e()+500,ai()))}break;case 13:Gi(function(){var r=dr(e,1);if(r!==null){var i=wt();Cn(r,e,1,i)}}),em(e,1)}};Sh=function(e){if(e.tag===13){var t=dr(e,134217728);if(t!==null){var n=wt();Cn(t,e,134217728,n)}em(e,134217728)}};E1=function(e){if(e.tag===13){var t=Gr(e),n=dr(e,t);if(n!==null){var r=wt();Cn(n,e,t,r)}em(e,t)}};_1=function(){return he};P1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};xf=function(e,t,n){switch(t){case"input":if(ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=oc(r);if(!i)throw Error(L(90));s1(r),ff(r,i)}}}break;case"textarea":a1(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};h1=Yh;m1=Gi;var x_={usingClientEntryPoint:!1,Events:[Ya,ks,oc,f1,p1,Yh]},No={findFiberByHostInstance:Ci,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w_={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||v_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{nc=_l.inject(w_),Bn=_l}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x_;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return g_(e,t,null,n)};Wt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",i=Kw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,!1,r,i),e[cr]=t.current,ya(e.nodeType===8?e.parentNode:e),new tm(t)};Wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=y1(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Gi(e)};Wt.hydrate=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Kw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Yw(t,null,e,1,n??null,i,!1,s,o),e[cr]=t.current,ya(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new hc(t)};Wt.render=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!mc(e))throw Error(L(40));return e._reactRootContainer?(Gi(function(){gc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};Wt.unstable_batchedUpdates=Yh;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!mc(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return gc(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function Xw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xw)}catch(e){console.error(e)}}Xw(),Xx.exports=Wt;var Zw=Xx.exports;const b_=Xi(Zw);var Jw,Fv=Zw;Jw=Fv.createRoot,Fv.hydrateRoot;const S_="@alfatech/livechat",k_="v2025.10.22.5",C_="module",T_="https://api-live.alfatek.dev",E_="wss://api-live.alfatek.dev",__=["dist","README.md","component/chatier.js"],P_="dist/widget.js",j_={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},R_={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},A_={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},eb={name:S_,private:!1,version:k_,type:C_,apiURL:T_,wsURL:E_,files:__,main:P_,scripts:j_,dependencies:R_,devDependencies:A_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},O_=eb.apiURL,D_=eb.wsURL,F_=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],M_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],N_={429:F_,404:M_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${O_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=N_[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const vc=e=>[200,201,204].includes(e),L_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qi=typeof window>"u"||"Deno"in globalThis;function en(){}function I_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function tb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Mv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==rm(o,t.options))return!1}else if(!_a(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Nv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(s))return!1}else if(!_a(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>Jf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function _a(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!_a(e[n],t[n])):!1}function nb(e,t){if(e===t)return e;const n=Lv(e)&&Lv(t);if(n||Jf(e)&&Jf(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=nb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Nu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Lv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jf(e){if(!Iv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Iv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Iv(e){return Object.prototype.toString.call(e)==="[object Object]"}function $_(e){return new Promise(t=>{setTimeout(t,e)})}function ep(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nb(e,t):t}function B_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function z_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function rb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Hs,Rx,V_=(Rx=class extends So{constructor(){super();K(this,Ai);K(this,Pr);K(this,Hs);U(this,Hs,t=>{if(!Qi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),U(this,Pr,void 0))}setEventListener(t){var n;U(this,Hs,t),(n=S(this,Pr))==null||n.call(this),U(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&(U(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Hs=new WeakMap,Rx),sm=new V_,Ws,jr,qs,Ax,U_=(Ax=class extends So{constructor(){super();K(this,Ws,!0);K(this,jr);K(this,qs);U(this,qs,t=>{if(!Qi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),U(this,jr,void 0))}setEventListener(t){var n;U(this,qs,t),(n=S(this,jr))==null||n.call(this),U(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Ws)!==t&&(U(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Ws)}},Ws=new WeakMap,jr=new WeakMap,qs=new WeakMap,Ax),Lu=new U_;function tp(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function H_(e){return Math.min(1e3*2**e,3e4)}function ib(e){return(e??"online")==="online"?Lu.isOnline():!0}var sb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Td(e){return e instanceof sb}function ob(e){let t=!1,n=0,r=!1,i;const s=tp(),o=m=>{var x;r||(f(new sb(m)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||Lu.isOnline())&&e.canRun(),d=()=>ib(e.networkMode)&&e.canRun(),u=m=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,m),i==null||i(),s.reject(m))},p=()=>new Promise(m=>{var x;i=g=>{(r||c())&&m(g)},(x=e.onPause)==null||x.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const x=n===0?e.initialPromise:void 0;try{m=x??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(u).catch(g=>{var E;if(r)return;const w=e.retry??(Qi?0:3),b=e.retryDelay??H_,k=typeof b=="function"?b(n,g):b,T=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),$_(k).then(()=>c()?void 0:p()).then(()=>{t?f(g):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function W_(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var He=W_(),Oi,Ox,ab=(Ox=class{constructor(){K(this,Oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&U(this,Oi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Oi)&&(clearTimeout(S(this,Oi)),U(this,Oi,void 0))}},Oi=new WeakMap,Ox),Gs,Qs,Jt,dt,Va,Di,yn,Jn,Dx,q_=(Dx=class extends ab{constructor(t){super();K(this,yn);K(this,Gs);K(this,Qs);K(this,Jt);K(this,dt);K(this,Va);K(this,Di);U(this,Di,!1),U(this,Va,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,Gs,G_(this.options)),this.state=t.state??S(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,dt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,Va),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Jt).remove(this)}setData(t,n){const r=ep(this.state.data,t,this.options);return se(this,yn,Jn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,yn,Jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,dt))==null?void 0:r.promise;return(i=S(this,dt))==null||i.cancel(t),n?n.then(en).catch(en):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Gs))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!tb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,dt)&&(S(this,Di)?S(this,dt).cancel({revert:!0}):S(this,dt).cancelRetry()),this.scheduleGc()),S(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,yn,Jn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,dt))return S(this,dt).continueRetry(),S(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(U(this,Di,!0),r.signal)})},s=()=>{const u=rb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),U(this,Di,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),U(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&se(this,yn,Jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,p,h,m;Td(u)&&u.silent||se(this,yn,Jn).call(this,{type:"error",error:u}),Td(u)||((p=(f=S(this,Jt).config).onError)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,this.state.data,u,this)),this.scheduleGc()};return U(this,dt,ob({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,p,h,m;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(x){a(x);return}(p=(f=S(this,Jt).config).onSuccess)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{se(this,yn,Jn).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{se(this,yn,Jn).call(this,{type:"pause"})},onContinue:()=>{se(this,yn,Jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,dt).start()}},Gs=new WeakMap,Qs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Va=new WeakMap,Di=new WeakMap,yn=new WeakSet,Jn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...lb(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Td(i)&&i.revert&&S(this,Qs)?{...S(this,Qs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Jt).notify({query:this,type:"updated",action:t})})},Dx);function lb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ib(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function G_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Mn,Fx,Q_=(Fx=class extends So{constructor(t={}){super();K(this,Mn);this.config=t,U(this,Mn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??rm(i,n);let o=this.get(s);return o||(o=new q_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Mn).has(t.queryHash)||(S(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Mn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Mn).get(t)}getAll(){return[...S(this,Mn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Mv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Mv(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,Fx),Nn,gt,Fi,Ln,br,Mx,Y_=(Mx=class extends ab{constructor(t){super();K(this,Ln);K(this,Nn);K(this,gt);K(this,Fi);this.mutationId=t.mutationId,U(this,gt,t.mutationCache),U(this,Nn,[]),this.state=t.state||ub(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Fi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,p,h,m,x,g,w,b,k,T,E,_;U(this,Fi,ob({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,F)=>{se(this,Ln,br).call(this,{type:"failed",failureCount:j,error:F})},onPause:()=>{se(this,Ln,br).call(this,{type:"pause"})},onContinue:()=>{se(this,Ln,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Fi).canStart();try{if(!n){se(this,Ln,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,gt).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&se(this,Ln,br).call(this,{type:"pending",context:F,variables:t,isPaused:r})}const j=await S(this,Fi).start();return await((c=(l=S(this,gt).config).onSuccess)==null?void 0:c.call(l,j,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,j,t,this.state.context)),await((p=(f=S(this,gt).config).onSettled)==null?void 0:p.call(f,j,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,j,null,t,this.state.context)),se(this,Ln,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(x=S(this,gt).config).onError)==null?void 0:g.call(x,j,t,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,j,t,this.state.context)),await((T=(k=S(this,gt).config).onSettled)==null?void 0:T.call(k,void 0,j,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,j,t,this.state.context)),j}finally{se(this,Ln,br).call(this,{type:"error",error:j})}}finally{S(this,gt).runNext(this)}}},Nn=new WeakMap,gt=new WeakMap,Fi=new WeakMap,Ln=new WeakSet,br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Mx);function ub(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It,Ua,Nx,K_=(Nx=class extends So{constructor(t={}){super();K(this,It);K(this,Ua);this.config=t,U(this,It,new Map),U(this,Ua,Date.now())}build(t,n,r){const i=new Y_({mutationCache:this,mutationId:++cl(this,Ua)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Pl(t),r=S(this,It).get(n)??[];r.push(t),S(this,It).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Pl(t);if(S(this,It).has(n)){const i=(r=S(this,It).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,It).delete(n):S(this,It).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,It).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nv(n,r))}findAll(t={}){return this.getAll().filter(n=>Nv(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(en))))}},It=new WeakMap,Ua=new WeakMap,Nx);function Pl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function $v(e){return{onFetch:(t,n)=>{var d,u,f,p,h;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=rb(t.options,t.fetchOptions),w=async(b,k,T)=>{if(m)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};x(E);const _=await g(E),{maxPages:j}=t.options,F=T?z_:B_;return{pages:F(b.pages,_,j),pageParams:F(b.pageParams,k,j)}};if(i&&s.length){const b=i==="backward",k=b?X_:Bv,T={pages:s,pageParams:o},E=k(r,T);a=await w(T,E,b)}else{const b=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:Bv(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var m,x;return(x=(m=t.options).persister)==null?void 0:x.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Bv(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function X_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var De,Rr,Ar,Ys,Ks,Or,Xs,Zs,Lx,Z_=(Lx=class{constructor(e={}){K(this,De);K(this,Rr);K(this,Ar);K(this,Ys);K(this,Ks);K(this,Or);K(this,Xs);K(this,Zs);U(this,De,e.queryCache||new Q_),U(this,Rr,e.mutationCache||new K_),U(this,Ar,e.defaultOptions||{}),U(this,Ys,new Map),U(this,Ks,new Map),U(this,Or,0)}mount(){cl(this,Or)._++,S(this,Or)===1&&(U(this,Xs,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),U(this,Zs,Lu.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onOnline())})))}unmount(){var e,t;cl(this,Or)._--,S(this,Or)===0&&((e=S(this,Xs))==null||e.call(this),U(this,Xs,void 0),(t=S(this,Zs))==null||t.call(this),U(this,Zs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Rr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=S(this,De).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Vs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,De).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=S(this,De).get(r.queryHash),s=i==null?void 0:i.state.data,o=I_(t,s);if(o!==void 0)return S(this,De).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>S(this,De).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,De);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,De),r={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>S(this,De).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(en).catch(en)}invalidateQueries(e,t={}){return He.batch(()=>{if(S(this,De).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=He.batch(()=>S(this,De).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(en)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(en)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,De).build(this,t);return n.isStaleByTime(Vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(en).catch(en)}fetchInfiniteQuery(e){return e.behavior=$v(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=$v(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lu.isOnline()?S(this,Rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Rr)}getDefaultOptions(){return S(this,Ar)}setDefaultOptions(e){U(this,Ar,e)}setQueryDefaults(e,t){S(this,Ys).set(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ys).values()],n={};return t.forEach(r=>{_a(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ks).set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ks).values()];let n={};return t.forEach(r=>{_a(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Ar).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=rm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Ar).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Rr).clear()}},De=new WeakMap,Rr=new WeakMap,Ar=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Or=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Lx),Et,le,Ha,vt,Mi,Js,Dr,In,Wa,eo,to,Ni,Li,Fr,no,pe,Ho,np,rp,ip,sp,op,ap,lp,cb,Ix,J_=(Ix=class extends So{constructor(t,n){super();K(this,pe);K(this,Et);K(this,le);K(this,Ha);K(this,vt);K(this,Mi);K(this,Js);K(this,Dr);K(this,In);K(this,Wa);K(this,eo);K(this,to);K(this,Ni);K(this,Li);K(this,Fr);K(this,no,new Set);this.options=n,U(this,Et,t),U(this,In,null),U(this,Dr,tp()),this.options.experimental_prefetchInRender||S(this,Dr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,le).addObserver(this),zv(S(this,le),this.options)?se(this,pe,Ho).call(this):this.updateResult(),se(this,pe,sp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return up(S(this,le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return up(S(this,le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,pe,op).call(this),se(this,pe,ap).call(this),S(this,le).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,le);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,pe,lp).call(this),S(this,le).setOptions(this.options),r._defaulted&&!Nu(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&Vv(S(this,le),i,this.options,r)&&se(this,pe,Ho).call(this),this.updateResult(n),s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||Vs(this.options.staleTime,S(this,le))!==Vs(r.staleTime,S(this,le)))&&se(this,pe,np).call(this);const o=se(this,pe,rp).call(this);s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||o!==S(this,Fr))&&se(this,pe,ip).call(this,o)}getOptimisticResult(t){const n=S(this,Et).getQueryCache().build(S(this,Et),t),r=this.createResult(n,t);return t2(this,r)&&(U(this,vt,r),U(this,Js,this.options),U(this,Mi,S(this,le).state)),r}getCurrentResult(){return S(this,vt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){S(this,no).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Et).defaultQueryOptions(t),r=S(this,Et).getQueryCache().build(S(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,pe,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,vt)))}createResult(t,n){var j;const r=S(this,le),i=this.options,s=S(this,vt),o=S(this,Mi),a=S(this,Js),c=t!==r?t.state:S(this,Ha),{state:d}=t;let u={...d},f=!1,p;if(n._optimisticResults){const F=this.hasListeners(),P=!F&&zv(t,n),I=F&&Vv(t,r,n,i);(P||I)&&(u={...u,...lb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:x}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,Wa))p=S(this,eo);else try{U(this,Wa,n.select),p=n.select(u.data),p=ep(s==null?void 0:s.data,p,n),U(this,eo,p),U(this,In,null)}catch(F){U(this,In,F)}else p=u.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let F;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))F=s.data;else if(F=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,to))==null?void 0:j.state.data,S(this,to)):n.placeholderData,n.select&&F!==void 0)try{F=n.select(F),U(this,In,null)}catch(P){U(this,In,P)}F!==void 0&&(x="success",p=ep(s==null?void 0:s.data,F,n),f=!0)}S(this,In)&&(h=S(this,In),p=S(this,eo),m=Date.now(),x="error");const g=u.fetchStatus==="fetching",w=x==="pending",b=x==="error",k=w&&g,T=p!==void 0,_={status:x,fetchStatus:u.fetchStatus,isPending:w,isSuccess:x==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:b&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const F=M=>{_.status==="error"?M.reject(_.error):_.data!==void 0&&M.resolve(_.data)},P=()=>{const M=U(this,Dr,_.promise=tp());F(M)},I=S(this,Dr);switch(I.status){case"pending":t.queryHash===r.queryHash&&F(I);break;case"fulfilled":(_.status==="error"||_.data!==I.value)&&P();break;case"rejected":(_.status!=="error"||_.error!==I.reason)&&P();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(U(this,Mi,S(this,le).state),U(this,Js,this.options),S(this,Mi).data!==void 0&&U(this,to,S(this,le)),Nu(r,n))return;U(this,vt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,no).size)return!0;const l=new Set(a??S(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,vt)).some(c=>{const d=c;return S(this,vt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,pe,cb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,sp).call(this)}},Et=new WeakMap,le=new WeakMap,Ha=new WeakMap,vt=new WeakMap,Mi=new WeakMap,Js=new WeakMap,Dr=new WeakMap,In=new WeakMap,Wa=new WeakMap,eo=new WeakMap,to=new WeakMap,Ni=new WeakMap,Li=new WeakMap,Fr=new WeakMap,no=new WeakMap,pe=new WeakSet,Ho=function(t){se(this,pe,lp).call(this);let n=S(this,le).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(en)),n},np=function(){se(this,pe,op).call(this);const t=Vs(this.options.staleTime,S(this,le));if(Qi||S(this,vt).isStale||!Zf(t))return;const r=tb(S(this,vt).dataUpdatedAt,t)+1;U(this,Ni,setTimeout(()=>{S(this,vt).isStale||this.updateResult()},r))},rp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,le)):this.options.refetchInterval)??!1},ip=function(t){se(this,pe,ap).call(this),U(this,Fr,t),!(Qi||Sn(this.options.enabled,S(this,le))===!1||!Zf(S(this,Fr))||S(this,Fr)===0)&&U(this,Li,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Fr)))},sp=function(){se(this,pe,np).call(this),se(this,pe,ip).call(this,se(this,pe,rp).call(this))},op=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),U(this,Ni,void 0))},ap=function(){S(this,Li)&&(clearInterval(S(this,Li)),U(this,Li,void 0))},lp=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,le))return;const n=S(this,le);U(this,le,t),U(this,Ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cb=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Et).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Ix);function e2(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zv(e,t){return e2(e,t)||e.state.data!==void 0&&up(e,t,t.refetchOnMount)}function up(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&om(e,t)}return!1}function Vv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&om(e,n)}function om(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Vs(t.staleTime,e))}function t2(e,t){return!Nu(e.getCurrentResult(),t)}var Mr,Nr,_t,rr,lr,Jl,cp,$x,n2=($x=class extends So{constructor(t,n){super();K(this,lr);K(this,Mr);K(this,Nr);K(this,_t);K(this,rr);U(this,Mr,t),this.setOptions(n),this.bindMethods(),se(this,lr,Jl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=S(this,Mr).defaultMutationOptions(t),Nu(this.options,n)||S(this,Mr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,_t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(this.options.mutationKey)?this.reset():((r=S(this,_t))==null?void 0:r.state.status)==="pending"&&S(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,lr,Jl).call(this),se(this,lr,cp).call(this,t)}getCurrentResult(){return S(this,Nr)}reset(){var t;(t=S(this,_t))==null||t.removeObserver(this),U(this,_t,void 0),se(this,lr,Jl).call(this),se(this,lr,cp).call(this)}mutate(t,n){var r;return U(this,rr,n),(r=S(this,_t))==null||r.removeObserver(this),U(this,_t,S(this,Mr).getMutationCache().build(S(this,Mr),this.options)),S(this,_t).addObserver(this),S(this,_t).execute(t)}},Mr=new WeakMap,Nr=new WeakMap,_t=new WeakMap,rr=new WeakMap,lr=new WeakSet,Jl=function(){var n;const t=((n=S(this,_t))==null?void 0:n.state)??ub();U(this,Nr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},cp=function(t){He.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,rr)&&this.hasListeners()){const d=S(this,Nr).variables,u=S(this,Nr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,rr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=S(this,rr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,rr)).onError)==null||a.call(o,t.error,d,u),(c=(l=S(this,rr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(S(this,Nr))})})},$x),db=v.createContext(void 0),fb=e=>{const t=v.useContext(db);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},r2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(db.Provider,{value:e,children:t})),pb=v.createContext(!1),i2=()=>v.useContext(pb);pb.Provider;function s2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var o2=v.createContext(s2()),a2=()=>v.useContext(o2);function hb(e,t){return typeof e=="function"?e(...t):!!e}function dp(){}var l2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},u2=e=>{v.useEffect(()=>{e.clearReset()},[e])},c2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&hb(n,[e.error,r]),d2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},f2=(e,t)=>e.isLoading&&e.isFetching&&!t,p2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Uv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function h2(e,t,n){var d,u,f,p,h;const r=fb(),i=i2(),s=a2(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",d2(o),l2(o,s),u2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const x=i?dp:l.subscribe(He.batchCalls(m));return l.updateResult(),x},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),p2(o,c))throw Uv(o,l,s);if(c2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,c),o.experimental_prefetchInRender&&!Qi&&f2(c,i)){const m=a?Uv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;m==null||m.catch(dp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function m2(e,t){return h2(e,J_)}function am(e,t){const n=fb(),[r]=v.useState(()=>new n2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(dp)},[r]);if(i.error&&hb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const g2=e=>m2({queryKey:["widgets",e],queryFn:()=>v2(e)}),v2=e=>bo(`widgets/with-link/${e}`);var C=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),Y=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Y||{});function y2(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
41
41
  * @remix-run/router v1.21.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -136,4 +136,4 @@ attempted value: ${o}
136
136
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u$(e){if(Array.isArray(e))return sh(e)}function bx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bx(Object(n),!0).forEach(function(r){MC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(e,t){return f$(e)||d$(e,t)||NC(e,t)||c$()}function c$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
137
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NC(e,t){if(e){if(typeof e=="string")return sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(e,t)}}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function f$(e){if(Array.isArray(e))return e}var p$=typeof nf=="function"?nf:nf.default,h$="file-invalid-type",m$="file-too-large",g$="file-too-small",v$="too-many-files",y$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:h$,message:"File type must be ".concat(r)}},kx=function(t){return{code:m$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Cx=function(t){return{code:g$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},x$={code:v$,message:"Too many files"};function LC(e,t){var n=e.type==="application/x-moz-file"||p$(e,t);return[n,n?null:y$(t)]}function IC(e,t,n){if(ki(e.size))if(ki(t)&&ki(n)){if(e.size>n)return[!1,kx(n)];if(e.size<t)return[!1,Cx(t)]}else{if(ki(t)&&e.size<t)return[!1,Cx(t)];if(ki(n)&&e.size>n)return[!1,kx(n)]}return[!0,null]}function ki(e){return e!=null}function w$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var c=LC(l,n),d=za(c,1),u=d[0],f=IC(l,r,i),p=za(f,1),h=p[0],m=a?a(l):null;return u&&h&&!m})}function Zu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Bl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Tx(e){e.preventDefault()}function b$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function S$(e){return e.indexOf("Edge/")!==-1}function k$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return b$(e)||S$(e)}function On(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!Zu(r)&&a&&a.apply(void 0,[r].concat(s)),Zu(r)})}}function C$(){return"showOpenFilePicker"in window}function T$(e){if(ki(e)){var t=Object.entries(e).filter(function(n){var r=za(n,2),i=r[0],s=r[1],o=!0;return $C(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(BC))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=za(r,2),s=i[0],o=i[1];return Sx(Sx({},n),{},MC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function E$(e){if(ki(e))return Object.entries(e).reduce(function(t,n){var r=za(n,2),i=r[0],s=r[1];return[].concat(wx(t),[i],wx(s))},[]).filter(function(t){return $C(t)||BC(t)}).join(",")}function _$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function P$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function $C(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function BC(e){return/^.*\.[\w]+$/.test(e)}var j$=["children"],R$=["open"],A$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],O$=["refKey","onChange","onClick"];function D$(e){return N$(e)||M$(e)||zC(e)||F$()}function F$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
138
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N$(e){if(Array.isArray(e))return oh(e)}function rf(e,t){return $$(e)||I$(e,t)||zC(e,t)||L$()}function L$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
139
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zC(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function $$(e){if(Array.isArray(e))return e}function Ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ju(e,t){if(e==null)return{};var n=B$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var al=v.forwardRef(function(e,t){var n=e.children,r=Ju(e,j$),i=z$(r),s=i.open,o=Ju(i,R$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),N.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});al.displayName="Dropzone";var VC={disabled:!1,getFilesFromEvent:ZI,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};al.defaultProps=VC;al.propTypes={children:ye.func,accept:ye.objectOf(ye.arrayOf(ye.string)),multiple:ye.bool,preventDropOnDocument:ye.bool,noClick:ye.bool,noKeyboard:ye.bool,noDrag:ye.bool,noDragEventsBubbling:ye.bool,minSize:ye.number,maxSize:ye.number,maxFiles:ye.number,disabled:ye.bool,getFilesFromEvent:ye.func,onFileDialogCancel:ye.func,onFileDialogOpen:ye.func,useFsAccessApi:ye.bool,autoFocus:ye.bool,onDragEnter:ye.func,onDragLeave:ye.func,onDragOver:ye.func,onDrop:ye.func,onDropAccepted:ye.func,onDropRejected:ye.func,onError:ye.func,validator:ye.func};var lh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function z$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},VC),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,x=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,b=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,j=t.onError,F=t.validator,P=v.useMemo(function(){return E$(n)},[n]),I=v.useMemo(function(){return T$(n)},[n]),M=v.useMemo(function(){return typeof x=="function"?x:_x},[x]),B=v.useMemo(function(){return typeof m=="function"?m:_x},[m]),V=v.useRef(null),re=v.useRef(null),J=v.useReducer(V$,lh),te=rf(J,2),O=te[0],$=te[1],H=O.isFocused,q=O.isFileDialogActive,Q=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&C$()),ee=function(){!Q.current&&q&&setTimeout(function(){if(re.current){var D=re.current.files;D.length||($({type:"closeDialog"}),B())}},300)};v.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[re,q,B,Q]);var ce=v.useRef([]),ve=function(D){V.current&&V.current.contains(D.target)||(D.preventDefault(),ce.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Tx,!1),document.addEventListener("drop",ve,!1)),function(){b&&(document.removeEventListener("dragover",Tx),document.removeEventListener("drop",ve))}},[V,b]),v.useEffect(function(){return!r&&w&&V.current&&V.current.focus(),function(){}},[V,w,r]);var ne=v.useCallback(function(A){j?j(A):console.error(A)},[j]),Ne=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[].concat(D$(ce.current),[A.target]),Bl(A)&&Promise.resolve(i(A)).then(function(D){if(!(Zu(A)&&!_)){var G=D.length,X=G>0&&w$({files:D,accept:P,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:F}),ae=G>0&&!X;$({isDragAccept:X,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(A)}}).catch(function(D){return ne(D)})},[i,c,ne,_,P,o,s,a,l,F]),Je=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=Bl(A);if(D&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return D&&u&&u(A),!1},[u,_]),et=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=ce.current.filter(function(X){return V.current&&V.current.contains(X)}),G=D.indexOf(A.target);G!==-1&&D.splice(G,1),ce.current=D,!(D.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bl(A)&&d&&d(A))},[V,d,_]),Mt=v.useCallback(function(A,D){var G=[],X=[];A.forEach(function(ae){var Ve=LC(ae,P),tt=rf(Ve,2),Pn=tt[0],Qt=tt[1],ps=IC(ae,o,s),Xn=rf(ps,2),xr=Xn[0],hs=Xn[1],Po=F?F(ae):null;if(Pn&&xr&&!Po)G.push(ae);else{var pi=[Qt,hs];Po&&(pi=pi.concat(Po)),X.push({file:ae,errors:pi.filter(function(jn){return jn})})}}),(!a&&G.length>1||a&&l>=1&&G.length>l)&&(G.forEach(function(ae){X.push({file:ae,errors:[x$]})}),G.splice(0)),$({acceptedFiles:G,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),f&&f(G,X,D),X.length>0&&h&&h(X,D),G.length>0&&p&&p(G,D)},[$,a,P,o,s,l,f,p,h,F]),_n=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[],Bl(A)&&Promise.resolve(i(A)).then(function(D){Zu(A)&&!_||Mt(D,A)}).catch(function(D){return ne(D)}),$({type:"reset"})},[i,Mt,ne,_]),dn=v.useCallback(function(){if(Q.current){$({type:"openDialog"}),M();var A={multiple:a,types:I};window.showOpenFilePicker(A).then(function(D){return i(D)}).then(function(D){Mt(D,null),$({type:"closeDialog"})}).catch(function(D){_$(D)?(B(D),$({type:"closeDialog"})):P$(D)?(Q.current=!1,re.current?(re.current.value=null,re.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(D)});return}re.current&&($({type:"openDialog"}),M(),re.current.value=null,re.current.click())},[$,M,B,g,Mt,ne,I,a]),di=v.useCallback(function(A){!V.current||!V.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[V,dn]),gr=v.useCallback(function(){$({type:"focus"})},[]),fs=v.useCallback(function(){$({type:"blur"})},[]),fi=v.useCallback(function(){k||(k$()?setTimeout(dn,0):dn())},[k,dn]),Ct=function(D){return r?null:D},vr=function(D){return T?null:Ct(D)},Ge=function(D){return E?null:Ct(D)},yr=function(D){_&&D.stopPropagation()},_o=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,X=A.role,ae=A.onKeyDown,Ve=A.onFocus,tt=A.onBlur,Pn=A.onClick,Qt=A.onDragEnter,ps=A.onDragOver,Xn=A.onDragLeave,xr=A.onDrop,hs=Ju(A,A$);return _e(_e(ah({onKeyDown:vr(On(ae,di)),onFocus:vr(On(Ve,gr)),onBlur:vr(On(tt,fs)),onClick:Ct(On(Pn,fi)),onDragEnter:Ge(On(Qt,Ne)),onDragOver:Ge(On(ps,Je)),onDragLeave:Ge(On(Xn,et)),onDrop:Ge(On(xr,_n)),role:typeof X=="string"&&X!==""?X:"presentation"},G,V),!r&&!T?{tabIndex:0}:{}),hs)}},[V,di,gr,fs,fi,Ne,Je,et,_n,T,E,r]),R=v.useCallback(function(A){A.stopPropagation()},[]),z=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,X=A.onChange,ae=A.onClick,Ve=Ju(A,O$),tt=ah({accept:P,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ct(On(X,_n)),onClick:Ct(On(ae,R)),tabIndex:-1},G,re);return _e(_e({},tt),Ve)}},[re,n,a,_n,r]);return _e(_e({},O),{},{isFocused:H&&!r,getRootProps:_o,getInputProps:z,rootRef:V,inputRef:re,open:Ct(dn)})}function V$(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},lh),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _e(_e({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _e({},lh);default:return e}}function _x(){}const UC=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Px=Object.values(vo).flat();function U$(e){var r;if(e.size>UC)return{isValid:!1,error:`Dosya boyutu 1MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||Px.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Px.join(", ")}`}}function ec(e){for(const t of e){const n=U$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function HC({onDrop:e}){const t=n=>{const r=ec(n);if(!r.isValid){alert(r.error);return}e(n)};return y.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:UC,children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[y.jsx("input",{...r()}),y.jsx("div",{className:"mb-3",children:y.jsx(jC,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),y.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",y.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}HC.Button=({onDrop:e})=>{const t=n=>{const r=ec(n);if(!r.isValid){Us({description:r.error,variant:"error"});return}e(n)};return y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[y.jsx("input",{...r()}),y.jsx(jC,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function H$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=ui(),o=DD(t),a=Oe(),l=rl(),{setIsInputFocused:c}=kt(),[d,u]=v.useState(""),[f,p]=v.useState("3rem"),[h,m]=v.useState(!1),[x,g]=v.useState([]),[w,b]=v.useState(0),[k,T]=v.useState(!1),[E,_]=v.useState(0),[j,F]=v.useState(null);v.useEffect(()=>{if(r.length>0){const M=r[r.length-1];M.id!==j&&(F(M.id),M.sender_type===Le.User&&(b(0),T(!1)))}},[r,j]),v.useEffect(()=>{let M;return k&&E>0&&(M=window.setTimeout(()=>{_(B=>B<=1?(T(!1),b(0),0):B-1)},1e3)),()=>clearTimeout(M)},[k,E]),v.useEffect(()=>{const M=i.current;if(M){const B=()=>c(!0),V=()=>c(!1);return M.addEventListener("focus",B),M.addEventListener("blur",V),()=>{M.removeEventListener("focus",B),M.removeEventListener("blur",V)}}},[c]),Km("paste",M=>{const B=M.clipboardData.items,V=[];for(const re of B){const J=re.getAsFile();J&&V.push(J)}if(V.length>0&&!n){Us({description:l(Y.FileUploadDisabled),variant:"error"});return}if(V.length>0){const re=ec(V);if(!re.isValid){Us({description:re.error,variant:"error"});return}g([...x,...V])}});const P=async()=>{if(!d.trim()&&(!n||x.length===0))return;if(w>5&&!k){T(!0),_(3);return}if(k)return;m(!0);let M;if(n&&x.length>0){const[B,V]=await o.mutateAsync(x);vc(V)&&FD(B)&&(M=B.file_urls)}s==null||s.emit(En.MessageCreate,{content:d,files:M},B=>{u(""),e(B),m(!1),g([]),b(V=>V+1),i.current&&(i.current.style.height="3rem",p("3rem"))})},I=M=>{s==null||s.emit(En.MessageTyping,{content:M})};return y.jsxs(y.Fragment,{children:[k&&y.jsxs(be.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:a.getColor(C.ErrorBackground),borderColor:a.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(C.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(C.ErrorText)},children:l(Y.RateLimitMessage).replace("{seconds}",E.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(C.FooterBackground),borderRadius:a.getRadius()},onSubmit:M=>{M.preventDefault(),P(),M.currentTarget.reset()},children:[n&&x&&x.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(_C,{files:x,onDelete:M=>{g(x.filter((B,V)=>V!==M))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(yg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:f,maxHeight:"6rem"},placeholder:l(Y.MessagePlaceholder),value:d,maxLength:2e3,onChange:M=>{const B=M.target.value;if(B.length<=2e3&&(u(B),I(B)),B.length>0&&M.currentTarget.scrollHeight>M.currentTarget.clientHeight){const V=`${M.currentTarget.scrollHeight}px`;M.currentTarget.style.height=V,p(V)}else M.currentTarget.style.height="3rem",p("3rem")},onKeyDown:M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),M.stopPropagation(),P())}}),d.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:d.length>=2e3?a.getColor(C.ErrorText):a.getColor(C.FooterText),fontWeight:d.length>=2e3?"600":"normal"},children:2e3-d.length})]}),y.jsxs(be.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(HC.Button,{onDrop:M=>{if(M.length){const B=ec(M);if(!B.isValid){console.log("val",B),Us({description:B.error,variant:"error"});return}g([...x,...M])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:h||!d.trim()&&x.length===0||k,children:h?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):k?y.jsx("span",{className:"text-xs font-bold",children:E}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function W$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var w,b;const{widget:o,setOpen:a,open:l,isHaveChat:c,isInputFocused:d}=kt(),u=Oe(),f=is(),p=Xm(),h=ui(),m=v.useRef(new Set),x=v.useRef(!1),g=v.useCallback(()=>{if(!h||!l||!c)return;const k=r.filter(T=>T.sender_type===Le.User&&!m.current.has(T.id)).map(T=>T.id);k.length!==0&&h.emit(En.MessageRead,{message_ids:k},T=>{if(T&&T.success===!0)for(const E of k)m.current.add(E)})},[h,r,l,c]);return v.useEffect(()=>{l&&(x.current=!0),l&&c&&(d||x.current)&&(g(),x.current=!1)},[l,c,d,g]),y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:u.getColor(C.HeaderBackground),color:u.getColor(C.HeaderText),borderBottom:`1px solid ${u.getColor(C.HeaderBorder)}`,borderTopLeftRadius:f?"":u.getRadius(),borderTopRightRadius:f?"":u.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(JL,{name:e.agent_name,avatar:e.agent_avatar,textColor:u.getColor(C.HeaderText)}):y.jsx("div",{style:{color:u.getColor(C.HeaderText)},className:"font-medium",children:((b=(w=o==null?void 0:o.appearance)==null?void 0:w.design)==null?void 0:b.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(RI,{onChatClose:s}),!p&&!f&&y.jsx("button",{type:"button",style:{color:u.getColor(C.HeaderText)},onClick:()=>a(!1),children:y.jsx(fe.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx(NI,{messages:r,isTyping:t||n.length>0}),y.jsx(H$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:k=>{i(k)}}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:u.getColor(C.FooterText),borderTop:`1px solid ${u.getColor(C.FooterBorder)}`,backgroundColor:u.getColor(C.FooterBackground)},children:[y.jsx("span",{children:"Powered by"}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function q$({rating:e,onChange:t}){const n=Oe();return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),s&&y.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),i&&y.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),y.jsxs("div",{className:"absolute inset-0 flex",children:[y.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function G$({onOk:e}){const t=Oe(),n=rl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=OD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const m=setInterval(()=>{l(x=>x<=1?(clearInterval(m),e(!0),0):x-1)},1e3);return()=>clearInterval(m)}},[s]);const f=rg({comment:Yu()}),p=cC({init:{comment:""},schema:f,action:async m=>{const[x,g]=await c.mutateAsync({rating:r,comment:m.comment});if(vc(g)){o(!0);return}fC(x,{form:p})}}),h=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:s?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?Y.RatingHeaderThanks:Y.RatingHeaderEvaluate)}),y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(fe.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?y.jsxs(be.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(Y.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:h,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]}):y.jsxs(be.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[y.jsx("div",{className:"text-center mb-6",children:y.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(Y.RatingRateConversation)}),y.jsx(q$,{rating:r,onChange:m=>{i(m),m>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(Y.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:p.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(Y.RatingComment)}),y.jsx(yg,{id:"comment",onChange:p.handleChange,onBlur:p.handleBlur,value:p.values.comment,placeholder:n(Y.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:p.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:m=>{r<1&&(m.preventDefault(),m.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingSubmit)}),y.jsx(on,{onClick:h,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[y.jsx("span",{children:n(Y.PoweredBy)}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function Q$({children:e}){const{widget:t}=kt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function Y$({children:e}){const t=ui(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function K$(){const{widget:e,setOpen:t,setIsHaveChat:n}=kt(),r=Oe(),i=ui(),s=il(),o=Pc(),a=is(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,p]=v.useState(!1),[h,m]=v.useState([]),x=()=>{if(l){c({...l,status:vs.Closed});return}g()},g=b=>{b||t(!1),Vp((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),m([]),Up(e.client_id,ho(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(En.ChatView,{},b=>{if(b===null){t(!1),n(!1),Up(e.client_id,ho(s)),u([]),m([]),Vp((e==null?void 0:e.link_id)||""),o.push("registration");return}c(b),n(!0)})},[]);const w=v.useCallback(b=>{l&&![vs.Closed,vs.Deleted].includes(l.status)&&u([...d,b])},[d,l]);return v.useEffect(()=>{if(!i)return;const b=j=>{const F={content:j.content,created_at:j.created_at,files:j.files,id:j._id,sender_type:j.sender_type,answers:j.answers,reply_id:j.reply_id,buttons:j.buttons};if(h.length>0){m(P=>[...P,F]);return}j.is_shortcut?m([F]):w(F),p(!1)},k=j=>{c({...l,agent_name:j.name,agent_avatar:j.avatar,is_customer_uploadable:(l==null?void 0:l.is_customer_uploadable)??!1,status:(l==null?void 0:l.status)??vs.Open}),w({content:` _ _${j.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:Le.Activity,activity_type:Si.AdminJoin,sender_name:j.name})},T=()=>{p(!0)},E=()=>{x()},_=({is_customer_uploadable:j})=>{c(l?{...l,is_customer_uploadable:j}:null)};return i.on(st.MessageAgentCreate,b),i.on(st.ChatUserAssignee,k),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,b),i.off(st.ChatUserAssignee,k),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[w]),v.useEffect(()=>{!i||!l||i.emit(En.MessageList,{},b=>{u(b)})},[i,l]),v.useEffect(()=>{const b=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(b)},[f]),v.useEffect(()=>{if(!e||h.length===0)return;let b=0;e.writing_timeout&&(b=[...h[0].content].length/e.writing_timeout,b<0&&(b=0));const k=setTimeout(()=>{w(h[0]),m(h.slice(1))},b*1e3);return()=>clearTimeout(k)},[h,e]),l?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Kr,{children:y.jsx(be.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:`h-full w-full ${a?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:a?"100%":"",minHeight:a?"var(--app-height, 100dvh)":"",maxHeight:a?"var(--app-height, 100dvh)":"",backgroundColor:r.getColor(C.Background)},children:l.status===vs.Closed?y.jsx(G$,{onOk:g}):y.jsx(W$,{chat:l,isTyping:f,messages:d,shortcutMessages:h,onNewMessage:w,onChatClose:x})})})]}):null}function X$(){return GL(),null}function Z$(){return y.jsxs(Y$,{children:[y.jsx(wk,{defaultOpen:!0,children:y.jsx(Q$,{children:y.jsx(K$,{})})}),y.jsx(X$,{})]})}const J$=[{path:"/chat",component:Z$,name:"chat"}],WC=[...J$],qC=[...ZL],eB=[...WC,...qC];function tB(){return y.jsx(lP,{future:{v7_startTransition:!0},children:y.jsxs(cP,{children:[WC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t)),qC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}const nB=v.forwardRef((e,t)=>{const{data:n,isLoading:r}=g2(e.link_id),{widget:i,setWidget:s,setSoundPath:o,setDefaultValues:a,setOpen:l,setOnTooltipClose:c,setIsTooltipVisible:d,setOnOpen:u,setOnClose:f,onOpen:p,onClose:h}=kt();return v.useImperativeHandle(t,()=>({open:()=>{l(!0),p&&p()},close:()=>{l(!1),h&&h()}})),v.useEffect(()=>{n&&Array.isArray(n)&&y2(n[0])&&s(n[0]),e.soundPath&&o(e.soundPath),e.defaultValues&&a(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&d(!1),e.onOpen&&u(e.onOpen),e.onClose&&f(e.onClose)},[n,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),r?y.jsx("div",{children:"Loading..."}):i?y.jsx(ML,{children:y.jsx(ED,{children:y.jsx(tB,{})})}):y.jsx("div",{children:"Widget not found"})}),rB=new Z_;let jx=null;function iB(e){if(!e.container)return;const t=N.createRef();return jx=Jw(e.container),jx.render(y.jsxs(r2,{client:rB,children:[y.jsx(nB,{...e,ref:t}),y.jsx(EL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=iB});export default sB();
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zC(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function $$(e){if(Array.isArray(e))return e}function Ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ju(e,t){if(e==null)return{};var n=B$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var al=v.forwardRef(function(e,t){var n=e.children,r=Ju(e,j$),i=z$(r),s=i.open,o=Ju(i,R$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),N.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});al.displayName="Dropzone";var VC={disabled:!1,getFilesFromEvent:ZI,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};al.defaultProps=VC;al.propTypes={children:ye.func,accept:ye.objectOf(ye.arrayOf(ye.string)),multiple:ye.bool,preventDropOnDocument:ye.bool,noClick:ye.bool,noKeyboard:ye.bool,noDrag:ye.bool,noDragEventsBubbling:ye.bool,minSize:ye.number,maxSize:ye.number,maxFiles:ye.number,disabled:ye.bool,getFilesFromEvent:ye.func,onFileDialogCancel:ye.func,onFileDialogOpen:ye.func,useFsAccessApi:ye.bool,autoFocus:ye.bool,onDragEnter:ye.func,onDragLeave:ye.func,onDragOver:ye.func,onDrop:ye.func,onDropAccepted:ye.func,onDropRejected:ye.func,onError:ye.func,validator:ye.func};var lh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function z$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},VC),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,x=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,b=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,j=t.onError,F=t.validator,P=v.useMemo(function(){return E$(n)},[n]),I=v.useMemo(function(){return T$(n)},[n]),M=v.useMemo(function(){return typeof x=="function"?x:_x},[x]),B=v.useMemo(function(){return typeof m=="function"?m:_x},[m]),V=v.useRef(null),re=v.useRef(null),J=v.useReducer(V$,lh),te=rf(J,2),O=te[0],$=te[1],H=O.isFocused,q=O.isFileDialogActive,Q=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&C$()),ee=function(){!Q.current&&q&&setTimeout(function(){if(re.current){var D=re.current.files;D.length||($({type:"closeDialog"}),B())}},300)};v.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[re,q,B,Q]);var ce=v.useRef([]),ve=function(D){V.current&&V.current.contains(D.target)||(D.preventDefault(),ce.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Tx,!1),document.addEventListener("drop",ve,!1)),function(){b&&(document.removeEventListener("dragover",Tx),document.removeEventListener("drop",ve))}},[V,b]),v.useEffect(function(){return!r&&w&&V.current&&V.current.focus(),function(){}},[V,w,r]);var ne=v.useCallback(function(A){j?j(A):console.error(A)},[j]),Ne=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[].concat(D$(ce.current),[A.target]),Bl(A)&&Promise.resolve(i(A)).then(function(D){if(!(Zu(A)&&!_)){var G=D.length,X=G>0&&w$({files:D,accept:P,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:F}),ae=G>0&&!X;$({isDragAccept:X,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(A)}}).catch(function(D){return ne(D)})},[i,c,ne,_,P,o,s,a,l,F]),Je=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=Bl(A);if(D&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return D&&u&&u(A),!1},[u,_]),et=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=ce.current.filter(function(X){return V.current&&V.current.contains(X)}),G=D.indexOf(A.target);G!==-1&&D.splice(G,1),ce.current=D,!(D.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bl(A)&&d&&d(A))},[V,d,_]),Mt=v.useCallback(function(A,D){var G=[],X=[];A.forEach(function(ae){var Ve=LC(ae,P),tt=rf(Ve,2),Pn=tt[0],Qt=tt[1],ps=IC(ae,o,s),Xn=rf(ps,2),xr=Xn[0],hs=Xn[1],Po=F?F(ae):null;if(Pn&&xr&&!Po)G.push(ae);else{var pi=[Qt,hs];Po&&(pi=pi.concat(Po)),X.push({file:ae,errors:pi.filter(function(jn){return jn})})}}),(!a&&G.length>1||a&&l>=1&&G.length>l)&&(G.forEach(function(ae){X.push({file:ae,errors:[x$]})}),G.splice(0)),$({acceptedFiles:G,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),f&&f(G,X,D),X.length>0&&h&&h(X,D),G.length>0&&p&&p(G,D)},[$,a,P,o,s,l,f,p,h,F]),_n=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[],Bl(A)&&Promise.resolve(i(A)).then(function(D){Zu(A)&&!_||Mt(D,A)}).catch(function(D){return ne(D)}),$({type:"reset"})},[i,Mt,ne,_]),dn=v.useCallback(function(){if(Q.current){$({type:"openDialog"}),M();var A={multiple:a,types:I};window.showOpenFilePicker(A).then(function(D){return i(D)}).then(function(D){Mt(D,null),$({type:"closeDialog"})}).catch(function(D){_$(D)?(B(D),$({type:"closeDialog"})):P$(D)?(Q.current=!1,re.current?(re.current.value=null,re.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(D)});return}re.current&&($({type:"openDialog"}),M(),re.current.value=null,re.current.click())},[$,M,B,g,Mt,ne,I,a]),di=v.useCallback(function(A){!V.current||!V.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[V,dn]),gr=v.useCallback(function(){$({type:"focus"})},[]),fs=v.useCallback(function(){$({type:"blur"})},[]),fi=v.useCallback(function(){k||(k$()?setTimeout(dn,0):dn())},[k,dn]),Ct=function(D){return r?null:D},vr=function(D){return T?null:Ct(D)},Ge=function(D){return E?null:Ct(D)},yr=function(D){_&&D.stopPropagation()},_o=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,X=A.role,ae=A.onKeyDown,Ve=A.onFocus,tt=A.onBlur,Pn=A.onClick,Qt=A.onDragEnter,ps=A.onDragOver,Xn=A.onDragLeave,xr=A.onDrop,hs=Ju(A,A$);return _e(_e(ah({onKeyDown:vr(On(ae,di)),onFocus:vr(On(Ve,gr)),onBlur:vr(On(tt,fs)),onClick:Ct(On(Pn,fi)),onDragEnter:Ge(On(Qt,Ne)),onDragOver:Ge(On(ps,Je)),onDragLeave:Ge(On(Xn,et)),onDrop:Ge(On(xr,_n)),role:typeof X=="string"&&X!==""?X:"presentation"},G,V),!r&&!T?{tabIndex:0}:{}),hs)}},[V,di,gr,fs,fi,Ne,Je,et,_n,T,E,r]),R=v.useCallback(function(A){A.stopPropagation()},[]),z=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,X=A.onChange,ae=A.onClick,Ve=Ju(A,O$),tt=ah({accept:P,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ct(On(X,_n)),onClick:Ct(On(ae,R)),tabIndex:-1},G,re);return _e(_e({},tt),Ve)}},[re,n,a,_n,r]);return _e(_e({},O),{},{isFocused:H&&!r,getRootProps:_o,getInputProps:z,rootRef:V,inputRef:re,open:Ct(dn)})}function V$(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},lh),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _e(_e({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _e({},lh);default:return e}}function _x(){}const UC=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Px=Object.values(vo).flat();function U$(e){var r;if(e.size>UC)return{isValid:!1,error:`Dosya boyutu 1MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||Px.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Px.join(", ")}`}}function ec(e){for(const t of e){const n=U$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function HC({onDrop:e}){const t=n=>{const r=ec(n);if(!r.isValid){alert(r.error);return}e(n)};return y.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:UC,children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[y.jsx("input",{...r()}),y.jsx("div",{className:"mb-3",children:y.jsx(jC,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),y.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",y.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}HC.Button=({onDrop:e})=>{const t=n=>{const r=ec(n);if(!r.isValid){Us({description:r.error,variant:"error"});return}e(n)};return y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[y.jsx("input",{...r()}),y.jsx(jC,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function H$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=ui(),o=DD(t),a=Oe(),l=rl(),{setIsInputFocused:c}=kt(),[d,u]=v.useState(""),[f,p]=v.useState("3rem"),[h,m]=v.useState(!1),[x,g]=v.useState([]),[w,b]=v.useState(0),[k,T]=v.useState(!1),[E,_]=v.useState(0),[j,F]=v.useState(null);v.useEffect(()=>{if(r.length>0){const M=r[r.length-1];M.id!==j&&(F(M.id),M.sender_type===Le.User&&(b(0),T(!1)))}},[r,j]),v.useEffect(()=>{let M;return k&&E>0&&(M=window.setTimeout(()=>{_(B=>B<=1?(T(!1),b(0),0):B-1)},1e3)),()=>clearTimeout(M)},[k,E]),v.useEffect(()=>{const M=i.current;if(M){const B=()=>c(!0),V=()=>c(!1);return M.addEventListener("focus",B),M.addEventListener("blur",V),()=>{M.removeEventListener("focus",B),M.removeEventListener("blur",V)}}},[c]),Km("paste",M=>{const B=M.clipboardData.items,V=[];for(const re of B){const J=re.getAsFile();J&&V.push(J)}if(V.length>0&&!n){Us({description:l(Y.FileUploadDisabled),variant:"error"});return}if(V.length>0){const re=ec(V);if(!re.isValid){Us({description:re.error,variant:"error"});return}g([...x,...V])}});const P=async()=>{if(!d.trim()&&(!n||x.length===0))return;if(w>5&&!k){T(!0),_(3);return}if(k)return;m(!0);let M;if(n&&x.length>0){const[B,V]=await o.mutateAsync(x);vc(V)&&FD(B)&&(M=B.file_urls)}s==null||s.emit(En.MessageCreate,{content:d,files:M},B=>{u(""),e(B),m(!1),g([]),b(V=>V+1),i.current&&(i.current.style.height="3rem",p("3rem"))})},I=M=>{s==null||s.emit(En.MessageTyping,{content:M})};return y.jsxs(y.Fragment,{children:[k&&y.jsxs(be.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:a.getColor(C.ErrorBackground),borderColor:a.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(C.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(C.ErrorText)},children:l(Y.RateLimitMessage).replace("{seconds}",E.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(C.FooterBackground),borderRadius:a.getRadius()},onSubmit:M=>{M.preventDefault(),P(),M.currentTarget.reset()},children:[n&&x&&x.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(_C,{files:x,onDelete:M=>{g(x.filter((B,V)=>V!==M))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(yg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:f,maxHeight:"6rem"},placeholder:l(Y.MessagePlaceholder),value:d,maxLength:2e3,onChange:M=>{const B=M.target.value;if(B.length<=2e3&&(u(B),I(B)),B.length>0&&M.currentTarget.scrollHeight>M.currentTarget.clientHeight){const V=`${M.currentTarget.scrollHeight}px`;M.currentTarget.style.height=V,p(V)}else M.currentTarget.style.height="3rem",p("3rem")},onKeyDown:M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),M.stopPropagation(),P())}}),d.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:d.length>=2e3?a.getColor(C.ErrorText):a.getColor(C.FooterText),fontWeight:d.length>=2e3?"600":"normal"},children:2e3-d.length})]}),y.jsxs(be.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(HC.Button,{onDrop:M=>{if(M.length){const B=ec(M);if(!B.isValid){console.log("val",B),Us({description:B.error,variant:"error"});return}g([...x,...M])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:h||!d.trim()&&x.length===0||k,children:h?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):k?y.jsx("span",{className:"text-xs font-bold",children:E}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function W$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var w,b;const{widget:o,setOpen:a,open:l,isHaveChat:c,isInputFocused:d}=kt(),u=Oe(),f=is(),p=Xm(),h=ui(),m=v.useRef(new Set),x=v.useRef(!1),g=v.useCallback(()=>{if(!h||!l||!c)return;const k=r.filter(T=>T.sender_type===Le.User&&!m.current.has(T.id)).map(T=>T.id);k.length!==0&&h.emit(En.MessageRead,{message_ids:k},T=>{if(T&&T.success===!0)for(const E of k)m.current.add(E)})},[h,r,l,c]);return v.useEffect(()=>{l&&(x.current=!0),l&&c&&(d||x.current)&&(g(),x.current=!1)},[l,c,d,g]),y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:u.getColor(C.HeaderBackground),color:u.getColor(C.HeaderText),borderBottom:`1px solid ${u.getColor(C.HeaderBorder)}`,borderTopLeftRadius:f?"":u.getRadius(),borderTopRightRadius:f?"":u.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(JL,{name:e.agent_name,avatar:e.agent_avatar,textColor:u.getColor(C.HeaderText)}):y.jsx("div",{style:{color:u.getColor(C.HeaderText)},className:"font-medium",children:((b=(w=o==null?void 0:o.appearance)==null?void 0:w.design)==null?void 0:b.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(RI,{onChatClose:s}),!p&&!f&&y.jsx("button",{type:"button",style:{color:u.getColor(C.HeaderText)},onClick:()=>a(!1),children:y.jsx(fe.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx(NI,{messages:r,isTyping:t||n.length>0}),y.jsx(H$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:k=>{i(k)}}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:u.getColor(C.FooterText),borderTop:`1px solid ${u.getColor(C.FooterBorder)}`,backgroundColor:u.getColor(C.FooterBackground)},children:[y.jsx("span",{children:"Powered by"}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function q$({rating:e,onChange:t}){const n=Oe();return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),s&&y.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),i&&y.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),y.jsxs("div",{className:"absolute inset-0 flex",children:[y.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function G$({onOk:e}){const t=Oe(),n=rl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=OD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const m=setInterval(()=>{l(x=>x<=1?(clearInterval(m),e(!0),0):x-1)},1e3);return()=>clearInterval(m)}},[s]);const f=rg({comment:Yu()}),p=cC({init:{comment:""},schema:f,action:async m=>{const[x,g]=await c.mutateAsync({rating:r,comment:m.comment});if(vc(g)){o(!0);return}fC(x,{form:p})}}),h=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:s?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?Y.RatingHeaderThanks:Y.RatingHeaderEvaluate)}),y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(fe.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?y.jsxs(be.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(Y.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:h,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]}):y.jsxs(be.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[y.jsx("div",{className:"text-center mb-6",children:y.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(Y.RatingRateConversation)}),y.jsx(q$,{rating:r,onChange:m=>{i(m),m>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(Y.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:p.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(Y.RatingComment)}),y.jsx(yg,{id:"comment",onChange:p.handleChange,onBlur:p.handleBlur,value:p.values.comment,placeholder:n(Y.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:p.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:m=>{r<1&&(m.preventDefault(),m.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingSubmit)}),y.jsx(on,{onClick:h,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[y.jsx("span",{children:n(Y.PoweredBy)}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function Q$({children:e}){const{widget:t}=kt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function Y$({children:e}){const t=ui(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function K$(){const{widget:e,setOpen:t,setIsHaveChat:n}=kt(),r=Oe(),i=ui(),s=il(),o=Pc(),a=is(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,p]=v.useState(!1),[h,m]=v.useState([]),x=()=>{if(l){c({...l,status:vs.Closed});return}g()},g=b=>{b||t(!1),Vp((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),m([]),Up(e.client_id,ho(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(En.ChatView,{},b=>{if(b===null){t(!1),n(!1),Up(e.client_id,ho(s)),u([]),m([]),Vp((e==null?void 0:e.link_id)||""),o.push("registration");return}c(b),n(!0)})},[]);const w=v.useCallback(b=>{l&&![vs.Closed,vs.Deleted].includes(l.status)&&u([...d,b])},[d,l]);return v.useEffect(()=>{if(!i)return;const b=j=>{const F={content:j.content,created_at:j.created_at,files:j.files,id:j._id,sender_type:j.sender_type,answers:j.answers,reply_id:j.reply_id,buttons:j.buttons};if(h.length>0){m(P=>[...P,F]);return}j.is_shortcut?m([F]):w(F),p(!1)},k=j=>{c({...l,agent_name:j.name,agent_avatar:j.avatar,is_customer_uploadable:(l==null?void 0:l.is_customer_uploadable)??!1,status:(l==null?void 0:l.status)??vs.Open}),w({content:` _ _${j.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:Le.Activity,activity_type:Si.AdminJoin,sender_name:j.name})},T=()=>{p(!0)},E=()=>{x()},_=({is_customer_uploadable:j})=>{c(l?{...l,is_customer_uploadable:j}:null)};return i.on(st.MessageAgentCreate,b),i.on(st.ChatUserAssignee,k),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,b),i.off(st.ChatUserAssignee,k),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[w]),v.useEffect(()=>{!i||!l||i.emit(En.MessageList,{},b=>{u(b)})},[i,l]),v.useEffect(()=>{const b=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(b)},[f]),v.useEffect(()=>{if(!e||h.length===0)return;let b=0;e.writing_timeout&&(b=[...h[0].content].length/e.writing_timeout,b<0&&(b=0));const k=setTimeout(()=>{w(h[0]),m(h.slice(1))},b*1e3);return()=>clearTimeout(k)},[h,e]),l?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Kr,{children:y.jsx(be.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:`h-full w-full ${a?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:a?"100%":"",minHeight:a?"var(--app-height, 100dvh)":"",maxHeight:a?"var(--app-height, 100dvh)":"",backgroundColor:r.getColor(C.Background)},children:l.status===vs.Closed?y.jsx(G$,{onOk:g}):y.jsx(W$,{chat:l,isTyping:f,messages:d,shortcutMessages:h,onNewMessage:w,onChatClose:x})})})]}):null}function X$(){return GL(),null}function Z$(){return y.jsxs(Y$,{children:[y.jsx(wk,{defaultOpen:!0,children:y.jsx(Q$,{children:y.jsx(K$,{})})}),y.jsx(X$,{})]})}const J$=[{path:"/chat",component:Z$,name:"chat"}],WC=[...J$],qC=[...ZL],eB=[...WC,...qC];function tB(){return y.jsx(lP,{future:{v7_startTransition:!0},children:y.jsxs(cP,{children:[WC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t)),qC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}const nB=v.forwardRef((e,t)=>{const{data:n,isLoading:r}=g2(e.link_id),{widget:i,setWidget:s,setSoundPath:o,setDefaultValues:a,setOpen:l,setOnTooltipClose:c,setIsTooltipVisible:d,setOnOpen:u,setOnClose:f,onOpen:p,onClose:h}=kt();return v.useImperativeHandle(t,()=>({open:()=>{l(!0),p&&p()},close:()=>{l(!1),h&&h()}})),v.useEffect(()=>{n&&Array.isArray(n)&&y2(n[0])&&s(n[0]),e.soundPath&&o(e.soundPath),e.defaultValues&&a(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&d(!1),e.onOpen&&u(e.onOpen),e.onClose&&f(e.onClose)},[n,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),r?y.jsx("div",{children:"Loading..."}):i?y.jsx(ML,{children:y.jsx(ED,{children:y.jsx(tB,{})})}):y.jsx("div",{children:"Widget not found"})}),rB=new Z_;let jx=null;function iB(e){if(!e.container)return;const t=N.createRef();return jx=Jw(e.container),jx.render(y.jsxs(r2,{client:rB,children:[y.jsx(nB,{...e,ref:t}),y.jsx(EL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=iB});export default sB();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alfatech/livechat",
3
3
  "private": false,
4
- "version": "v2025.10.22.4",
4
+ "version": "v2025.10.22.5",
5
5
  "type": "module",
6
6
  "apiURL": "https://api-live.alfatek.dev",
7
7
  "wsURL": "wss://api-live.alfatek.dev",