@alfatech/livechat 2025.7.3-1.2 → 2025.8.0-4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +2 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -37,7 +37,7 @@ var Cg=e=>{throw TypeError(e)};var WC=(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 bT(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 ys:return"Fragment";case vs: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 e1:return(e.displayName||"Context")+".Consumer";case Jx: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 ST(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 n1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kT(e){var t=n1(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=kT(e))}function r1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=n1(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 Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rg(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 i1(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function ff(e,t){i1(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 Og(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 Ms(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 Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dg(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 s1(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 Ng(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function o1(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"?o1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hl,a1=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},CT=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){CT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function l1(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 u1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=l1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var TT=Re({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(TT[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,Fs=null,Ls=null;function Mg(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 c1(e){Fs?Ls?Ls.push(e):Ls=[e]:Fs=e}function d1(){if(Fs){var e=Fs,t=Ls;if(Ls=Fs=null,Mg(e),t)for(e=0;e<t.length;e++)Mg(t[e])}}function f1(e,t){return e(t)}function p1(){}var rd=!1;function h1(e,t,n){if(rd)return e(t,n);rd=!0;try{return f1(e,t,n)}finally{rd=!1,(Fs!==null||Ls!==null)&&(p1(),d1())}}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 Ao={};Object.defineProperty(Ao,"passive",{get:function(){wf=!0}}),window.addEventListener("test",Ao,Ao),window.removeEventListener("test",Ao,Ao)}catch{wf=!1}function ET(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,_T={onError:function(e){Yo=!0,pu=e}};function PT(e,t,n,r,i,s,o,a,l){Yo=!1,pu=null,ET.apply(_T,arguments)}function jT(e,t,n,r,i,s,o,a,l){if(PT.apply(this,arguments),Yo){if(Yo){var c=pu;Yo=!1,pu=null}else throw Error(L(198));hu||(hu=!0,bf=c)}}function Zi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m1(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 Fg(e){if(Zi(e)!==e)throw Error(L(188))}function AT(e){var t=e.alternate;if(!t){if(t=Zi(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 Fg(i),e;if(s===r)return Fg(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 g1(e){return e=AT(e),e!==null?v1(e):null}function v1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=v1(e);if(t!==null)return t;e=e.sibling}return null}var y1=Ht.unstable_scheduleCallback,Lg=Ht.unstable_cancelCallback,RT=Ht.unstable_shouldYield,OT=Ht.unstable_requestPaint,Ie=Ht.unstable_now,DT=Ht.unstable_getCurrentPriorityLevel,wh=Ht.unstable_ImmediatePriority,x1=Ht.unstable_UserBlockingPriority,mu=Ht.unstable_NormalPriority,NT=Ht.unstable_LowPriority,w1=Ht.unstable_IdlePriority,nc=null,$n=null;function MT(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(nc,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:IT,FT=Math.log,LT=Math.LN2;function IT(e){return e>>>=0,e===0?32:31-(FT(e)/LT|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 $T(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 BT(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]=$T(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 b1(){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 zT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-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 S1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var k1,Sh,C1,T1,E1,kf=!1,vl=[],zr=null,Vr=null,Ur=null,pa=new Map,ha=new Map,Er=[],VT="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 Ig(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 Ro(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 UT(e,t,n,r,i){switch(t){case"focusin":return zr=Ro(zr,e,t,n,r,i),!0;case"dragenter":return Vr=Ro(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=Ro(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return pa.set(s,Ro(pa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ha.set(s,Ro(ha.get(s)||null,e,t,n,r,i)),!0}return!1}function _1(e){var t=ki(e.target);if(t!==null){var n=Zi(t);if(n!==null){if(t=n.tag,t===13){if(t=m1(n),t!==null){e.blockedOn=t,E1(e.priority,function(){C1(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 $g(e,t,n){Ul(e)&&n.delete(t)}function HT(){kf=!1,zr!==null&&Ul(zr)&&(zr=null),Vr!==null&&Ul(Vr)&&(Vr=null),Ur!==null&&Ul(Ur)&&(Ur=null),pa.forEach($g),ha.forEach($g)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,kf||(kf=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,HT)))}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);)_1(n),n.blockedOn===null&&Er.shift()}var Is=hr.ReactCurrentBatchConfig,vu=!0;function qT(e,t,n,r){var i=he,s=Is.transition;Is.transition=null;try{he=1,kh(e,t,n,r)}finally{he=i,Is.transition=s}}function WT(e,t,n,r){var i=he,s=Is.transition;Is.transition=null;try{he=4,kh(e,t,n,r)}finally{he=i,Is.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),Ig(e,r);else if(UT(i,e,t,n,r))r.stopPropagation();else if(Ig(e,r),t&4&&-1<VT.indexOf(e)){for(;i!==null;){var s=Ya(i);if(s!==null&&k1(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=ki(e),e!==null)if(t=Zi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=m1(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 P1(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(DT()){case wh:return 1;case x1:return 4;case mu:case NT:return 16;case w1:return 536870912;default:return 16}default:return 16}}var Lr=null,Ch=null,Hl=null;function j1(){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 ql(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 Bg(){return!1}function Wt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yl:Bg,this.isPropagationStopped=Bg,this}return Re(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 yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=Wt(yo),Qa=Re({},yo,{view:0,detail:0}),GT=Wt(Qa),sd,od,Do,rc=Re({},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}}),zg=Wt(rc),QT=Re({},rc,{dataTransfer:0}),YT=Wt(QT),KT=Re({},Qa,{relatedTarget:0}),ad=Wt(KT),XT=Re({},yo,{animationName:0,elapsedTime:0,pseudoElement:0}),ZT=Wt(XT),JT=Re({},yo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eE=Wt(JT),tE=Re({},yo,{data:0}),Vg=Wt(tE),nE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rE={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"},iE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iE[e])?!!t[e]:!1}function Eh(){return sE}var oE=Re({},Qa,{key:function(e){if(e.key){var t=nE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ql(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rE[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"?ql(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ql(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),aE=Wt(oE),lE=Re({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ug=Wt(lE),uE=Re({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),cE=Wt(uE),dE=Re({},yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),fE=Wt(dE),pE=Re({},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}),hE=Wt(pE),mE=[9,13,27,32],_h=ur&&"CompositionEvent"in window,Ko=null;ur&&"documentMode"in document&&(Ko=document.documentMode);var gE=ur&&"TextEvent"in window&&!Ko,A1=ur&&(!_h||Ko&&8<Ko&&11>=Ko),Hg=" ",qg=!1;function R1(e,t){switch(e){case"keyup":return mE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function O1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function vE(e,t){switch(e){case"compositionend":return O1(t);case"keypress":return t.which!==32?null:(qg=!0,Hg);case"textInput":return e=t.data,e===Hg&&qg?null:e;default:return null}}function yE(e,t){if(xs)return e==="compositionend"||!_h&&R1(e,t)?(e=j1(),Hl=Ch=Lr=null,xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return A1&&t.locale!=="ko"?null:t.data;default:return null}}var xE={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 Wg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xE[e.type]:t==="textarea"}function D1(e,t,n,r){c1(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 wE(e){H1(e,0)}function ic(e){var t=Ss(e);if(r1(t))return e}function bE(e,t){if(e==="change")return t}var N1=!1;if(ur){var ld;if(ur){var ud="oninput"in document;if(!ud){var Gg=document.createElement("div");Gg.setAttribute("oninput","return;"),ud=typeof Gg.oninput=="function"}ld=ud}else ld=!1;N1=ld&&(!document.documentMode||9<document.documentMode)}function Qg(){Xo&&(Xo.detachEvent("onpropertychange",M1),ga=Xo=null)}function M1(e){if(e.propertyName==="value"&&ic(ga)){var t=[];D1(t,ga,e,xh(e)),h1(wE,t)}}function SE(e,t,n){e==="focusin"?(Qg(),Xo=t,ga=n,Xo.attachEvent("onpropertychange",M1)):e==="focusout"&&Qg()}function kE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic(ga)}function CE(e,t){if(e==="click")return ic(t)}function TE(e,t){if(e==="input"||e==="change")return ic(t)}function EE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:EE;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 Yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kg(e,t){var n=Yg(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=Yg(n)}}function F1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?F1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function L1(){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 _E(e){var t=L1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&F1(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=Kg(n,s);var o=Kg(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 PE=ur&&"documentMode"in document&&11>=document.documentMode,ws=null,Tf=null,Zo=null,Ef=!1;function Xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ef||ws==null||ws!==fu(r)||(r=ws,"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=ws)))}function xl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bs={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},cd={},I1={};ur&&(I1=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function sc(e){if(cd[e])return cd[e];if(!bs[e])return e;var t=bs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in I1)return cd[e]=t[n];return e}var $1=sc("animationend"),B1=sc("animationiteration"),z1=sc("animationstart"),V1=sc("transitionend"),U1=new Map,Zg="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){U1.set(e,t),Xi(t,[e])}for(var dd=0;dd<Zg.length;dd++){var fd=Zg[dd],jE=fd.toLowerCase(),AE=fd[0].toUpperCase()+fd.slice(1);si(jE,"on"+AE)}si($1,"onAnimationEnd");si(B1,"onAnimationIteration");si(z1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(V1,"onTransitionEnd");no("onMouseEnter",["mouseout","mouseover"]);no("onMouseLeave",["mouseout","mouseover"]);no("onPointerEnter",["pointerout","pointerover"]);no("onPointerLeave",["pointerout","pointerover"]);Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var 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(" "),RE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function Jg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,jT(r,t,void 0,e),e.currentTarget=null}function H1(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;Jg(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;Jg(i,a,c),s=l}}}if(hu)throw e=bf,hu=!1,bf=null,e}function ke(e,t){var n=t[Rf];n===void 0&&(n=t[Rf]=new Set);var r=e+"__bubble";n.has(r)||(q1(t,e,2,!1),n.add(r))}function pd(e,t,n){var r=0;t&&(r|=4),q1(n,e,r,t)}var wl="_reactListening"+Math.random().toString(36).slice(2);function ya(e){if(!e[wl]){e[wl]=!0,Zx.forEach(function(n){n!=="selectionchange"&&(RE.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 q1(e,t,n,r){switch(P1(t)){case 1:var i=qT;break;case 4:i=WT;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=ki(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}h1(function(){var c=s,d=xh(n),u=[];e:{var f=U1.get(e);if(f!==void 0){var h=Th,m=e;switch(e){case"keypress":if(ql(n)===0)break e;case"keydown":case"keyup":h=aE;break;case"focusin":m="focus",h=ad;break;case"focusout":m="blur",h=ad;break;case"beforeblur":case"afterblur":h=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":h=zg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=YT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=cE;break;case $1:case B1:case z1:h=ZT;break;case V1:h=fE;break;case"scroll":h=GT;break;case"wheel":h=hE;break;case"copy":case"cut":case"paste":h=eE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ug}var p=(t&4)!==0,b=!p&&e==="scroll",g=p?f!==null?f+"Capture":null:f;p=[];for(var x=c,w;x!==null;){w=x;var C=w.stateNode;if(w.tag===5&&C!==null&&(w=C,g!==null&&(C=fa(x,g),C!=null&&p.push(xa(x,C,w)))),b)break;x=x.return}0<p.length&&(f=new h(f,m,null,n,d),u.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==yf&&(m=n.relatedTarget||n.fromElement)&&(ki(m)||m[cr]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?ki(m):null,m!==null&&(b=Zi(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(p=zg,C="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(p=Ug,C="onPointerLeave",g="onPointerEnter",x="pointer"),b=h==null?f:Ss(h),w=m==null?f:Ss(m),f=new p(C,x+"leave",h,n,d),f.target=b,f.relatedTarget=w,C=null,ki(d)===c&&(p=new p(g,x+"enter",m,n,d),p.target=w,p.relatedTarget=b,C=p),b=C,h&&m)t:{for(p=h,g=m,x=0,w=p;w;w=hs(w))x++;for(w=0,C=g;C;C=hs(C))w++;for(;0<x-w;)p=hs(p),x--;for(;0<w-x;)g=hs(g),w--;for(;x--;){if(p===g||g!==null&&p===g.alternate)break t;p=hs(p),g=hs(g)}p=null}else p=null;h!==null&&ev(u,f,h,p,!1),m!==null&&b!==null&&ev(u,b,m,p,!0)}}e:{if(f=c?Ss(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var T=bE;else if(Wg(f))if(N1)T=TE;else{T=kE;var E=SE}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=CE);if(T&&(T=T(e,c))){D1(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?Ss(c):window,e){case"focusin":(Wg(E)||E.contentEditable==="true")&&(ws=E,Tf=c,Zo=null);break;case"focusout":Zo=Tf=ws=null;break;case"mousedown":Ef=!0;break;case"contextmenu":case"mouseup":case"dragend":Ef=!1,Xg(u,n,d);break;case"selectionchange":if(PE)break;case"keydown":case"keyup":Xg(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 xs?R1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(A1&&n.locale!=="ko"&&(xs||j!=="onCompositionStart"?j==="onCompositionEnd"&&xs&&(_=j1()):(Lr=d,Ch="value"in Lr?Lr.value:Lr.textContent,xs=!0)),E=xu(c,j),0<E.length&&(j=new Vg(j,e,null,n,d),u.push({event:j,listeners:E}),_?j.data=_:(_=O1(n),_!==null&&(j.data=_)))),(_=gE?vE(e,n):yE(e,n))&&(c=xu(c,"onBeforeInput"),0<c.length&&(d=new Vg("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=_))}H1(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 hs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ev(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 OE=/\r\n?/g,DE=/\u0000|\uFFFD/g;function tv(e){return(typeof e=="string"?e:""+e).replace(OE,`
|
|
38
38
|
`).replace(DE,"")}function bl(e,t,n){if(t=tv(t),tv(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 Af=typeof setTimeout=="function"?setTimeout:void 0,NE=typeof clearTimeout=="function"?clearTimeout:void 0,nv=typeof Promise=="function"?Promise:void 0,ME=typeof queueMicrotask=="function"?queueMicrotask:typeof nv<"u"?function(e){return nv.resolve(null).then(e).catch(FE)}:Af;function FE(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 rv(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 xo=Math.random().toString(36).slice(2),In="__reactFiber$"+xo,wa="__reactProps$"+xo,cr="__reactContainer$"+xo,Rf="__reactEvents$"+xo,LE="__reactListeners$"+xo,IE="__reactHandles$"+xo;function ki(e){var t=e[In];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[In]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=rv(e);e!==null;){if(n=e[In])return n;e=rv(e)}return t}e=n,n=e.parentNode}return null}function Ya(e){return e=e[In]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function oc(e){return e[wa]||null}var Of=[],ks=-1;function oi(e){return{current:e}}function Te(e){0>ks||(e.current=Of[ks],Of[ks]=null,ks--)}function we(e,t){ks++,Of[ks]=e.current,e.current=t}var ti={},mt=oi(ti),Rt=oi(!1),Vi=ti;function ro(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 Ot(e){return e=e.childContextTypes,e!=null}function bu(){Te(Rt),Te(mt)}function iv(e,t,n){if(mt.current!==ti)throw Error(L(168));we(mt,t),we(Rt,n)}function W1(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,ST(e)||"Unknown",i));return Re({},n,r)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Vi=mt.current,we(mt,e),we(Rt,Rt.current),!0}function sv(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=W1(e,t,Vi),r.__reactInternalMemoizedMergedChildContext=e,Te(Rt),Te(mt),we(mt,e)):Te(Rt),we(Rt,n)}var tr=null,ac=!1,gd=!1;function G1(e){tr===null?tr=[e]:tr.push(e)}function $E(e){ac=!0,G1(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)),y1(wh,ai),i}finally{he=t,gd=!1}}return null}var Cs=[],Ts=0,ku=null,Cu=0,tn=[],nn=0,Ui=null,ir=1,sr="";function gi(e,t){Cs[Ts++]=Cu,Cs[Ts++]=ku,ku=e,Cu=t}function Q1(e,t,n){tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Ui,Ui=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&&(gi(e,1),Q1(e,1,0))}function Ah(e){for(;e===ku;)ku=Cs[--Ts],Cs[Ts]=null,Cu=Cs[--Ts],Cs[Ts]=null;for(;e===Ui;)Ui=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 Y1(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 ov(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=Ui!==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 Nf(e){if(Ee){var t=Bt;if(t){var n=t;if(!ov(e,t)){if(Df(e))throw Error(L(418));t=Hr(n.nextSibling);var r=Ut;t&&ov(e,t)?Y1(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 av(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 av(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 K1(),Error(L(418));for(;t;)Y1(e,t),t=Hr(t.nextSibling)}if(av(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 K1(){for(var e=Bt;e;)e=Hr(e.nextSibling)}function io(){Bt=Ut=null,Ee=!1}function Rh(e){bn===null?bn=[e]:bn.push(e)}var BE=hr.ReactCurrentBatchConfig;function No(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(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 lv(e){var t=e._init;return t(e._payload)}function X1(e){function t(g,x){if(e){var w=g.deletions;w===null?(g.deletions=[x],g.flags|=16):w.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Qr(g,x),g.index=0,g.sibling=null,g}function s(g,x,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<x?(g.flags|=2,x):w):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,x,w,C){return x===null||x.tag!==6?(x=kd(w,g.mode,C),x.return=g,x):(x=i(x,w),x.return=g,x)}function l(g,x,w,C){var T=w.type;return T===ys?d(g,x,w.props.children,C,w.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&lv(T)===x.type)?(C=i(x,w.props),C.ref=No(g,x,w),C.return=g,C):(C=Zl(w.type,w.key,w.props,null,g.mode,C),C.ref=No(g,x,w),C.return=g,C)}function c(g,x,w,C){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=Cd(w,g.mode,C),x.return=g,x):(x=i(x,w.children||[]),x.return=g,x)}function d(g,x,w,C,T){return x===null||x.tag!==7?(x=Ii(w,g.mode,C,T),x.return=g,x):(x=i(x,w),x.return=g,x)}function u(g,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=kd(""+x,g.mode,w),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case fl:return w=Zl(x.type,x.key,x.props,null,g.mode,w),w.ref=No(g,null,x),w.return=g,w;case vs:return x=Cd(x,g.mode,w),x.return=g,x;case kr:var C=x._init;return u(g,C(x._payload),w)}if(zo(x)||jo(x))return x=Ii(x,g.mode,w,null),x.return=g,x;kl(g,x)}return null}function f(g,x,w,C){var T=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return T!==null?null:a(g,x,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:return w.key===T?l(g,x,w,C):null;case vs:return w.key===T?c(g,x,w,C):null;case kr:return T=w._init,f(g,x,T(w._payload),C)}if(zo(w)||jo(w))return T!==null?null:d(g,x,w,C,null);kl(g,w)}return null}function h(g,x,w,C,T){if(typeof C=="string"&&C!==""||typeof C=="number")return g=g.get(w)||null,a(x,g,""+C,T);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case fl:return g=g.get(C.key===null?w:C.key)||null,l(x,g,C,T);case vs:return g=g.get(C.key===null?w:C.key)||null,c(x,g,C,T);case kr:var E=C._init;return h(g,x,w,E(C._payload),T)}if(zo(C)||jo(C))return g=g.get(w)||null,d(x,g,C,T,null);kl(x,C)}return null}function m(g,x,w,C){for(var T=null,E=null,_=x,j=x=0,P=null;_!==null&&j<w.length;j++){_.index>j?(P=_,_=null):P=_.sibling;var O=f(g,_,w[j],C);if(O===null){_===null&&(_=P);break}e&&_&&O.alternate===null&&t(g,_),x=s(O,x,j),E===null?T=O:E.sibling=O,E=O,_=P}if(j===w.length)return n(g,_),Ee&&gi(g,j),T;if(_===null){for(;j<w.length;j++)_=u(g,w[j],C),_!==null&&(x=s(_,x,j),E===null?T=_:E.sibling=_,E=_);return Ee&&gi(g,j),T}for(_=r(g,_);j<w.length;j++)P=h(_,g,j,w[j],C),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?j:P.key),x=s(P,x,j),E===null?T=P:E.sibling=P,E=P);return e&&_.forEach(function(D){return t(g,D)}),Ee&&gi(g,j),T}function p(g,x,w,C){var T=jo(w);if(typeof T!="function")throw Error(L(150));if(w=T.call(w),w==null)throw Error(L(151));for(var E=T=null,_=x,j=x=0,P=null,O=w.next();_!==null&&!O.done;j++,O=w.next()){_.index>j?(P=_,_=null):P=_.sibling;var D=f(g,_,O.value,C);if(D===null){_===null&&(_=P);break}e&&_&&D.alternate===null&&t(g,_),x=s(D,x,j),E===null?T=D:E.sibling=D,E=D,_=P}if(O.done)return n(g,_),Ee&&gi(g,j),T;if(_===null){for(;!O.done;j++,O=w.next())O=u(g,O.value,C),O!==null&&(x=s(O,x,j),E===null?T=O:E.sibling=O,E=O);return Ee&&gi(g,j),T}for(_=r(g,_);!O.done;j++,O=w.next())O=h(_,g,j,O.value,C),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?j:O.key),x=s(O,x,j),E===null?T=O:E.sibling=O,E=O);return e&&_.forEach(function(B){return t(g,B)}),Ee&&gi(g,j),T}function b(g,x,w,C){if(typeof w=="object"&&w!==null&&w.type===ys&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:e:{for(var T=w.key,E=x;E!==null;){if(E.key===T){if(T=w.type,T===ys){if(E.tag===7){n(g,E.sibling),x=i(E,w.props.children),x.return=g,g=x;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&lv(T)===E.type){n(g,E.sibling),x=i(E,w.props),x.ref=No(g,E,w),x.return=g,g=x;break e}n(g,E);break}else t(g,E);E=E.sibling}w.type===ys?(x=Ii(w.props.children,g.mode,C,w.key),x.return=g,g=x):(C=Zl(w.type,w.key,w.props,null,g.mode,C),C.ref=No(g,x,w),C.return=g,g=C)}return o(g);case vs:e:{for(E=w.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(g,x.sibling),x=i(x,w.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Cd(w,g.mode,C),x.return=g,g=x}return o(g);case kr:return E=w._init,b(g,x,E(w._payload),C)}if(zo(w))return m(g,x,w,C);if(jo(w))return p(g,x,w,C);kl(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,w),x.return=g,g=x):(n(g,x),x=kd(w,g.mode,C),x.return=g,g=x),o(g)):n(g,x)}return b}var so=X1(!0),Z1=X1(!1),Tu=oi(null),Eu=null,Es=null,Oh=null;function Dh(){Oh=Es=Eu=null}function Nh(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 $s(e,t){Eu=e,Oh=Es=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},Es===null){if(Eu===null)throw Error(L(308));Es=e,Eu.dependencies={lanes:0,firstContext:e}}else Es=Es.next=e;return t}var Ci=null;function Mh(e){Ci===null?Ci=[e]:Ci.push(e)}function J1(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 Fh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ew(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 qr(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 Wl(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 uv(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,h=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,p=a;switch(f=t,h=n,p.tag){case 1:if(m=p.payload,typeof m=="function"){u=m.call(h,u,f);break e}u=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=p.payload,f=typeof m=="function"?m.call(h,u,f):m,f==null)break e;u=Re({},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 h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=u):d=d.next=h,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 cv(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={},Bn=oi(Ka),ba=oi(Ka),Sa=oi(Ka);function Ti(e){if(e===Ka)throw Error(L(174));return e}function Lh(e,t){switch(we(Sa,t),we(ba,e),we(Bn,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(Bn),we(Bn,t)}function oo(){Te(Bn),Te(ba),Te(Sa)}function tw(e){Ti(Sa.current);var t=Ti(Bn.current),n=mf(t,e.type);t!==n&&(we(ba,e),we(Bn,n))}function Ih(e){ba.current===e&&(Te(Bn),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,Hi=0,Ae=null,Ue=null,Ke=null,ju=!1,Jo=!1,ka=0,zE=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(Hi=s,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gl.current=e===null||e.memoizedState===null?qE:WE,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=GE,e=n(r,i)}while(Jo)}if(Gl.current=Au,t=Ue!==null&&Ue.next!==null,Hi=0,Ke=Ue=Ae=null,ju=!1,t)throw Error(L(300));return e}function Vh(){var e=ka!==0;return ka=0,e}function On(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Ae.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function cn(){if(Ue===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Ae.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?Ae.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((Hi&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,Ae.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,Ae.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 nw(){}function rw(e,t){var n=Ae,r=cn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,At=!0),r=r.queue,Uh(ow.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Ta(9,sw.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(L(349));Hi&30||iw(n,t,i)}return i}function iw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sw(e,t,n,r){t.value=n,t.getSnapshot=r,aw(t)&&lw(e)}function ow(e,t,n){return n(function(){aw(t)&&lw(e)})}function aw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function lw(e){var t=dr(e,1);t!==null&&Cn(t,e,1,-1)}function dv(e){var t=On();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t.queue=e,e=e.dispatch=HE.bind(null,Ae,e),[t.memoizedState,e]}function Ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.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 uw(){return cn().memoizedState}function Ql(e,t,n,r){var i=On();Ae.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}}Ae.flags|=e,i.memoizedState=Ta(1|t,n,s,r)}function fv(e,t){return Ql(8390656,8,e,t)}function Uh(e,t){return lc(2048,8,e,t)}function cw(e,t){return lc(4,2,e,t)}function dw(e,t){return lc(4,4,e,t)}function fw(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 pw(e,t,n){return n=n!=null?n.concat([e]):null,lc(4,4,fw.bind(null,t,e),n)}function Hh(){}function hw(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 mw(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 gw(e,t,n){return Hi&21?(Tn(n,t)||(n=b1(),Ae.lanes|=n,qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=n)}function VE(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 vw(){return cn().memoizedState}function UE(e,t,n){var r=Gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yw(e))xw(t,n);else if(n=J1(e,t,n,r),n!==null){var i=wt();Cn(n,e,r,i),ww(n,t,r)}}function HE(e,t,n){var r=Gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yw(e))xw(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=J1(e,t,i,r),n!==null&&(i=wt(),Cn(n,e,r,i),ww(n,t,r))}}function yw(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function xw(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 ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}var Au={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},qE={readContext:un,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:fv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ql(4194308,4,fw.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=On();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=On();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=UE.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:dv,useDebugValue:Hh,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=dv(!1),t=e[0];return e=VE.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,i=On();if(Ee){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Xe===null)throw Error(L(349));Hi&30||iw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,fv(ow.bind(null,r,s,e),[e]),r.flags|=2048,Ta(9,sw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=On(),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=zE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},WE={readContext:un,useCallback:hw,useContext:un,useEffect:Uh,useImperativeHandle:pw,useInsertionEffect:cw,useLayoutEffect:dw,useMemo:mw,useReducer:xd,useRef:uw,useState:function(){return xd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return gw(t,Ue.memoizedState,e)},useTransition:function(){var e=xd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:nw,useSyncExternalStore:rw,useId:vw,unstable_isNewReconciler:!1},GE={readContext:un,useCallback:hw,useContext:un,useEffect:Uh,useImperativeHandle:pw,useInsertionEffect:cw,useLayoutEffect:dw,useMemo:mw,useReducer:wd,useRef:uw,useState:function(){return wd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return Ue===null?t.memoizedState=e:gw(t,Ue.memoizedState,e)},useTransition:function(){var e=wd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:nw,useSyncExternalStore:rw,useId:vw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ff(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uc={isMounted:function(e){return(e=e._reactInternals)?Zi(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=qr(e,s,i),t!==null&&(Cn(t,e,i,r),Wl(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=qr(e,s,i),t!==null&&(Cn(t,e,i,r),Wl(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=qr(e,i,r),t!==null&&(Cn(t,e,r,n),Wl(t,e,r))}};function pv(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 bw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=Ot(t)?Vi:mt.current,r=t.contextTypes,s=(r=r!=null)?ro(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 hv(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={},Fh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=Ot(t)?Vi:mt.current,i.context=ro(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ff(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 ao(e,t){try{var n="",r=t;do n+=bT(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 QE=typeof WeakMap=="function"?WeakMap:Map;function Sw(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 kw(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"&&(Wr===null?Wr=new Set([this]):Wr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function mv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new QE;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=l_.bind(null,e,t,n),t.then(e,e))}function gv(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 vv(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,qr(n,t,1))),n.lanes|=1),e)}var YE=hr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?Z1(t,null,n,r):so(t,e.child,n,r)}function yv(e,t,n,r,i){n=n.render;var s=t.ref;return $s(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 xv(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,Cw(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 Cw(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 Tw(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(Ps,$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(Ps,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(Ps,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(Ps,$t),$t|=r;return yt(e,t,i,n),t.child}function Ew(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=Ot(n)?Vi:mt.current;return s=ro(t,s),$s(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 wv(e,t,n,r,i){if(Ot(n)){var s=!0;Su(t)}else s=!1;if($s(t,i),t.stateNode===null)Yl(e,t),bw(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=Ot(n)?Vi:mt.current,c=ro(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)&&hv(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||Rt.current||Cr?(typeof d=="function"&&(Ff(t,n,d,r),l=t.memoizedState),(a=Cr||pv(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,ew(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=Ot(n)?Vi:mt.current,l=ro(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&hv(t,o,r,l),Cr=!1,f=t.memoizedState,o.state=f,_u(t,r,o,i);var m=t.memoizedState;a!==u||f!==m||Rt.current||Cr?(typeof h=="function"&&(Ff(t,n,h,r),m=t.memoizedState),(c=Cr||pv(t,n,c,r,f,m,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=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){Ew(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&sv(t,n,!1),fr(e,t,s);r=t.stateNode,YE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=so(t,e.child,null,s),t.child=so(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&sv(t,n,!0),t.child}function _w(e){var t=e.stateNode;t.pendingContext?iv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&iv(e,t.context,!1),Lh(e,t.containerInfo)}function bv(e,t,n,r,i){return io(),Rh(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 Pw(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 Nf(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=Ii(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):qh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return KE(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=Ii(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?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 qh(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&&Rh(r),so(t,e.child,null,n),e=qh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function KE(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=Ii(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&so(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=u_.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++]=Ui,ir=e.id,sr=e.overflow,Ui=t),t=qh(t,r.children),t.flags|=4096,t)}function Sv(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 jw(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&&Sv(e,n,t);else if(e.tag===19)Sv(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 XE(e,t,n){switch(t.tag){case 3:_w(t),io();break;case 5:tw(t);break;case 1:Ot(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?Pw(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 jw(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,Tw(e,t,n)}return fr(e,t,n)}var Aw,Uf,Rw,Ow;Aw=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(){};Rw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(Bn.current);var s=null;switch(n){case"input":i=df(e,i),r=df(e,r),s=[];break;case"select":i=Re({},i,{value:void 0}),r=Re({},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)}};Ow=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 ZE(e,t,n){var r=t.pendingProps;switch(Ah(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 Ot(t.type)&&bu(),ct(t),null;case 3:return r=t.stateNode,oo(),Te(Rt),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=Ti(Sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Rw(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=Ti(Bn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[In]=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":Rg(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Dg(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),Og(r,s,!0);break;case"textarea":pl(r),Ng(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=o1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[In]=t,e[wa]=r,Aw(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":Rg(e,r),i=df(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Re({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Dg(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"?u1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&a1(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),Og(e,r,!1);break;case"textarea":pl(e),Ng(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?Ms(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ms(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)Ow(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Ti(Sa.current),Ti(Bn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[In]=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[In]=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))K1(),io(),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[In]=t}else io(),!(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?qe===0&&(qe=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return oo(),Uf(e,t),e===null&&ya(t.stateNode.containerInfo),ct(t),null;case 10:return Nh(t.type._context),ct(t),null;case 17:return Ot(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(qe!==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&&Ie()>lo&&(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*Ie()-s.renderingStartTime>lo&&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=Ie(),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 JE(e,t){switch(Ah(t),t.tag){case 1:return Ot(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oo(),Te(Rt),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));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return oo(),null;case 10:return Nh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Tl=!1,pt=!1,e_=typeof WeakSet=="function"?WeakSet:Set,U=null;function _s(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 kv=!1;function t_(e,t){if(_f=vu,e=L1(),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 h;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),(h=u.firstChild)!==null;)f=u,u=h;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(h=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=h}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,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var p=m.memoizedProps,b=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:vn(t.type,p),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(C){Me(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return m=kv,kv=!1,m}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&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 qf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Dw(e){var t=e.alternate;t!==null&&(e.alternate=null,Dw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[In],delete t[wa],delete t[Rf],delete t[LE],delete t[IE])),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 Cv(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 Wf(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(Wf(e,t,n),e=e.sibling;e!==null;)Wf(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;)Mw(e,t,n),n=n.sibling}function Mw(e,t,n){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(nc,n)}catch{}switch(n.tag){case 5:pt||_s(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&&(_s(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 Tv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new e_),t.forEach(function(r){var i=c_.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));Mw(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;)Fw(t,e),t=t.sibling}function Fw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),jn(e),r&4){try{ea(3,e,e.return),cc(3,e)}catch(p){Me(e,e.return,p)}try{ea(5,e,e.return)}catch(p){Me(e,e.return,p)}}break;case 1:hn(t,e),jn(e),r&512&&n!==null&&_s(n,n.return);break;case 5:if(hn(t,e),jn(e),r&512&&n!==null&&_s(n,n.return),e.flags&32){var i=e.stateNode;try{da(i,"")}catch(p){Me(e,e.return,p)}}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&&i1(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"?u1(i,u):d==="dangerouslySetInnerHTML"?a1(i,u):d==="children"?da(i,u):mh(i,d,u,c)}switch(a){case"input":ff(i,s);break;case"textarea":s1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Ms(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ms(i,!!s.multiple,s.defaultValue,!0):Ms(i,!!s.multiple,s.multiple?[]:"",!1))}i[wa]=s}catch(p){Me(e,e.return,p)}}break;case 6:if(hn(t,e),jn(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(p){Me(e,e.return,p)}}break;case 3:if(hn(t,e),jn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(p){Me(e,e.return,p)}break;case 4:hn(t,e),jn(e);break;case 13:hn(t,e),jn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=Ie())),r&4&&Tv(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),jn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(U=e,d=e.child;d!==null;){for(u=U=d;U!==null;){switch(f=U,h=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:_s(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(p){Me(r,n,p)}}break;case 5:_s(f,f.return);break;case 22:if(f.memoizedState!==null){_v(u);continue}}h!==null?(h.return=f,U=h):_v(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=l1("display",o))}catch(p){Me(e,e.return,p)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(p){Me(e,e.return,p)}}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),jn(e),r&4&&Tv(e);break;case 21:break;default:hn(t,e),jn(e)}}function jn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(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=Cv(e);Gf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Cv(e);Wf(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 n_(e,t,n){U=e,Lw(e)}function Lw(e,t,n){for(var r=(e.mode&1)!==0;U!==null;){var i=U,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(U=i;U!==null;)o=U,l=o.child,o.tag===22&&o.memoizedState!==null?Pv(i):l!==null?(l.return=o,U=l):Pv(i);for(;s!==null;)U=s,Lw(s),s=s.sibling;U=i,Tl=a,pt=c}Ev(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,U=s):Ev(e)}}function Ev(e){for(;U!==null;){var t=U;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&&cv(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}cv(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&&qf(t)}catch(f){Me(t,t.return,f)}}if(t===e){U=null;break}if(n=t.sibling,n!==null){n.return=t.return,U=n;break}U=t.return}}function _v(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var n=t.sibling;if(n!==null){n.return=t.return,U=n;break}U=t.return}}function Pv(e){for(;U!==null;){var t=U;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{qf(t)}catch(l){Me(t,s,l)}break;case 5:var o=t.return;try{qf(t)}catch(l){Me(t,o,l)}}}catch(l){Me(t,t.return,l)}if(t===e){U=null;break}var a=t.sibling;if(a!==null){a.return=t.return,U=a;break}U=t.return}}var r_=Math.ceil,Ru=hr.ReactCurrentDispatcher,Wh=hr.ReactCurrentOwner,an=hr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,Ps=oi(0),qe=0,Ea=null,qi=0,dc=0,Gh=0,ta=null,Pt=null,Qh=0,lo=1/0,er=null,Ou=!1,Qf=null,Wr=null,El=!1,Ir=null,Du=0,na=0,Yf=null,Kl=-1,Xl=0;function wt(){return de&6?Ie():Kl!==-1?Kl:Kl=Ie()}function Gr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:BE.transition!==null?(Xl===0&&(Xl=b1()),Xl):(e=he,e!==0||(e=window.event,e=e===void 0?16:P1(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),qe===4&&_r(e,ot)),Dt(e,r),n===1&&de===0&&!(t.mode&1)&&(lo=Ie()+500,ac&&ai()))}function Dt(e,t){var n=e.callbackNode;BT(e,t);var r=gu(e,e===Xe?ot:0);if(r===0)n!==null&&Lg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lg(n),t===1)e.tag===0?$E(jv.bind(null,e)):G1(jv.bind(null,e)),ME(function(){!(de&6)&&ai()}),n=null;else{switch(S1(r)){case 1:n=wh;break;case 4:n=x1;break;case 16:n=mu;break;case 536870912:n=w1;break;default:n=mu}n=qw(n,Iw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Iw(e,t){if(Kl=-1,Xl=0,de&6)throw Error(L(327));var n=e.callbackNode;if(Bs()&&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=Nu(e,r);else{t=r;var i=de;de|=2;var s=Bw();(Xe!==e||ot!==t)&&(er=null,lo=Ie()+500,Li(e,t));do try{o_();break}catch(a){$w(e,a)}while(!0);Dh(),Ru.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=qe)}if(t!==0){if(t===2&&(i=Sf(e),i!==0&&(r=i,t=Kf(e,i))),t===1)throw n=Ea,Li(e,0),_r(e,r),Dt(e,Ie()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!i_(i)&&(t=Nu(e,r),t===2&&(s=Sf(e),s!==0&&(r=s,t=Kf(e,s))),t===1))throw n=Ea,Li(e,0),_r(e,r),Dt(e,Ie()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:vi(e,Pt,er);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Qh+500-Ie(),10<t)){if(gu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Af(vi.bind(null,e,Pt,er),t);break}vi(e,Pt,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=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*r_(r/1960))-r,10<r){e.timeoutHandle=Af(vi.bind(null,e,Pt,er),r);break}vi(e,Pt,er);break;case 5:vi(e,Pt,er);break;default:throw Error(L(329))}}}return Dt(e,Ie()),e.callbackNode===n?Iw.bind(null,e):null}function Kf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Li(e,t).flags|=256),e=Nu(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&Xf(t)),e}function Xf(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function i_(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 jv(e){if(de&6)throw Error(L(327));Bs();var t=gu(e,0);if(!(t&1))return Dt(e,Ie()),null;var n=Nu(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,Li(e,0),_r(e,t),Dt(e,Ie()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,Pt,er),Dt(e,Ie()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(lo=Ie()+500,ac&&ai())}}function Wi(e){Ir!==null&&Ir.tag===0&&!(de&6)&&Bs();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=Ps.current,Te(Ps)}function Li(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(Ah(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:oo(),Te(Rt),Te(mt),$h();break;case 5:Ih(r);break;case 4:oo();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Nh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Qr(e.current,null),ot=$t=t,qe=0,Ea=null,Gh=dc=qi=0,Pt=ta=null,Ci!==null){for(t=0;t<Ci.length;t++)if(n=Ci[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}Ci=null}return e}function $w(e,t){do{var n=Be;try{if(Dh(),Gl.current=Au,ju){for(var r=Ae.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ju=!1}if(Hi=0,Ke=Ue=Ae=null,Jo=!1,ka=0,Wh.current=null,n===null||n.return===null){qe=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 h=gv(o);if(h!==null){h.flags&=-257,vv(h,o,a,s,t),h.mode&1&&mv(s,c,t),t=h,l=c;var m=t.updateQueue;if(m===null){var p=new Set;p.add(l),t.updateQueue=p}else m.add(l);break e}else{if(!(t&1)){mv(s,c,t),Xh();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var b=gv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),vv(b,o,a,s,t),Rh(ao(l,a));break e}}s=l=ao(l,a),qe!==4&&(qe=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Sw(s,l,t);uv(s,g);break e;case 1:a=l;var x=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wr===null||!Wr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=kw(s,a,t);uv(s,C);break e}}s=s.return}while(s!==null)}Vw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function Bw(){var e=Ru.current;return Ru.current=Au,e===null?Au:e}function Xh(){(qe===0||qe===3||qe===2)&&(qe=4),Xe===null||!(qi&268435455)&&!(dc&268435455)||_r(Xe,ot)}function Nu(e,t){var n=de;de|=2;var r=Bw();(Xe!==e||ot!==t)&&(er=null,Li(e,t));do try{s_();break}catch(i){$w(e,i)}while(!0);if(Dh(),de=n,Ru.current=r,Be!==null)throw Error(L(261));return Xe=null,ot=0,qe}function s_(){for(;Be!==null;)zw(Be)}function o_(){for(;Be!==null&&!RT();)zw(Be)}function zw(e){var t=Hw(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Vw(e):Be=t,Wh.current=null}function Vw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=JE(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,Be=null;return}}else if(n=ZE(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);qe===0&&(qe=5)}function vi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,a_(e,t,n,r)}finally{an.transition=i,he=r}return null}function a_(e,t,n,r){do Bs();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(zT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,qw(mu,function(){return Bs(),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,Wh.current=null,t_(e,n),Fw(n,e),_E(Pf),vu=!!_f,Pf=_f=null,e.current=n,n_(n),OT(),de=a,he=o,an.transition=s}else e.current=n;if(El&&(El=!1,Ir=e,Du=i),s=e.pendingLanes,s===0&&(Wr=null),MT(n.stateNode),Dt(e,Ie()),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&&Bs(),s=e.pendingLanes,s&1?e===Yf?na++:(na=0,Yf=e):na=0,ai(),null}function Bs(){if(Ir!==null){var e=S1(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,U=e.current;U!==null;){var s=U,o=s.child;if(U.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(U=c;U!==null;){var d=U;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,U=u;else for(;U!==null;){d=U;var f=d.sibling,h=d.return;if(Dw(d),d===c){U=null;break}if(f!==null){f.return=h,U=f;break}U=h}}}var m=s.alternate;if(m!==null){var p=m.child;if(p!==null){m.child=null;do{var b=p.sibling;p.sibling=null,p=b}while(p!==null)}}U=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,U=o;else e:for(;U!==null;){if(s=U,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,U=g;break e}U=s.return}}var x=e.current;for(U=x;U!==null;){o=U;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,U=w;else e:for(o=x;U!==null;){if(a=U,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){U=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,U=C;break e}U=a.return}}if(de=i,ai(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(nc,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Av(e,t,n){t=ao(n,t),t=Sw(e,t,1),e=qr(e,t,1),t=wt(),e!==null&&(Ga(e,1,t),Dt(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"&&(Wr===null||!Wr.has(r))){e=ao(n,e),e=kw(t,e,1),t=qr(t,e,1),e=wt(),t!==null&&(Ga(t,1,e),Dt(t,e));break}}t=t.return}}function l_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(qe===4||qe===3&&(ot&130023424)===ot&&500>Ie()-Qh?Li(e,0):Gh|=n),Dt(e,t)}function Uw(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),Dt(e,n))}function u_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uw(e,n)}function c_(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),Uw(e,n)}var Hw;Hw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Rt.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,XE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&Q1(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var i=ro(t,mt.current);$s(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,Ot(r)?(s=!0,Su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Fh(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=f_(r),e=vn(r,e),i){case 0:t=$f(null,t,r,e,n);break e;case 1:t=wv(null,t,r,e,n);break e;case 11:t=yv(null,t,r,e,n);break e;case 14:t=xv(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),wv(e,t,r,i,n);case 3:e:{if(_w(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ew(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=ao(Error(L(423)),t),t=bv(e,t,r,n,i);break e}else if(r!==i){i=ao(Error(L(424)),t),t=bv(e,t,r,n,i);break e}else for(Bt=Hr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=Z1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(io(),r===i){t=fr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return tw(t),e===null&&Nf(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),Ew(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Nf(t),null;case 13:return Pw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(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),yv(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&&!Rt.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,$s(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),xv(e,t,r,i,n);case 15:return Cw(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,Ot(r)?(e=!0,Su(t)):e=!1,$s(t,n),bw(t,r,i),Lf(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return jw(e,t,n);case 22:return Tw(e,t,n)}throw Error(L(156,t.tag))};function qw(e,t){return y1(e,t)}function d_(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 d_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function f_(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 ys:return Ii(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 t1:return fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jx:o=10;break e;case e1: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 Ii(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=t1,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 p_(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 p_(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},Fh(s),e}function h_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ww(e){if(!e)return ti;e=e._reactInternals;e:{if(Zi(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(Ot(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(Ot(n))return W1(e,n,t)}return t}function Gw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Ww(null),n=e.current,r=wt(),i=Gr(n),s=ar(r,i),s.callback=t??null,qr(n,s,i),e.current.lanes=i,Ga(e,i,r),Dt(e,r),e}function pc(e,t,n,r){var i=t.current,s=wt(),o=Gr(i);return n=Ww(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=qr(i,t,o),e!==null&&(Cn(e,i,o,s),Wl(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 Rv(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){Rv(e,t),(e=e.alternate)&&Rv(e,t)}function m_(){return null}var Qw=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;Wi(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=T1();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&&_1(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 Ov(){}function g_(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=Gw(t,r,e,0,null,!1,!1,"",Ov);return e._reactRootContainer=o,e[cr]=o.current,ya(e.nodeType===8?e.parentNode:e),Wi(),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,"",Ov);return e._reactRootContainer=l,e[cr]=l.current,ya(e.nodeType===8?e.parentNode:e),Wi(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=g_(n,t,e,i,r);return Mu(o)}k1=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),Dt(t,Ie()),!(de&6)&&(lo=Ie()+500,ai()))}break;case 13:Wi(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)}};C1=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)}};T1=function(){return he};E1=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));r1(r),ff(r,i)}}}break;case"textarea":s1(e,n);break;case"select":t=n.value,t!=null&&Ms(e,!!n.multiple,t,!1)}};f1=Yh;p1=Wi;var v_={usingClientEntryPoint:!1,Events:[Ya,Ss,oc,c1,d1,Yh]},Fo={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},y_={bundleType:Fo.bundleType,version:Fo.version,rendererPackageName:Fo.rendererPackageName,rendererConfig:Fo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=g1(e),e===null?null:e.stateNode},findFiberByHostInstance:Fo.findFiberByHostInstance||m_,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(y_),$n=_l}catch{}}qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v_;qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return h_(e,t,null,n)};qt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",i=Qw;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)};qt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=g1(t),e=e===null?null:e.stateNode,e};qt.flushSync=function(e){return Wi(e)};qt.hydrate=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!0,n)};qt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Qw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Gw(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)};qt.render=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!1,n)};qt.unmountComponentAtNode=function(e){if(!mc(e))throw Error(L(40));return e._reactRootContainer?(Wi(function(){gc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};qt.unstable_batchedUpdates=Yh;qt.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)};qt.version="18.3.1-next-f1338f8080-20240426";function Yw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yw)}catch(e){console.error(e)}}Yw(),Yx.exports=qt;var Kw=Yx.exports;const x_=Ki(Kw);var Xw,Dv=Kw;Xw=Dv.createRoot,Dv.hydrateRoot;const w_="@alfatech/livechat",b_="v2025.07.31.2",S_="module",k_="https://api-live.alfatek.dev",C_="wss://api-live.alfatek.dev",T_=["dist","README.md","component/chatier.js"],E_="dist/widget.js",__={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"},P_={"@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"},j_={"@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"},Zw={name:w_,private:!1,version:b_,type:S_,apiURL:k_,wsURL:C_,files:T_,main:E_,scripts:__,dependencies:P_,devDependencies:j_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},A_=Zw.apiURL,R_=Zw.wsURL,O_=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],D_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],N_={429:O_,404:D_};async function wo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${A_}/${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),M_=(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 bo=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(){}},Gi=typeof window>"u"||"Deno"in globalThis;function en(){}function F_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Nv(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 Mv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Qi(t.options.mutationKey)!==Qi(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)||Qi)(e)}function Qi(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 eb(e,t){if(e===t)return e;const n=Fv(e)&&Fv(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]=eb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Fu(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 Fv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jf(e){if(!Lv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Lv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lv(e){return Object.prototype.toString.call(e)==="[object Object]"}function L_(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?eb(e,t):t}function I_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function tb(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,Us,Px,B_=(Px=class extends bo{constructor(){super();K(this,Ai);K(this,Pr);K(this,Us);z(this,Us,t=>{if(!Gi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Us))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),z(this,Pr,void 0))}setEventListener(t){var n;z(this,Us,t),(n=S(this,Pr))==null||n.call(this),z(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&(z(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,Us=new WeakMap,Px),sm=new B_,Hs,jr,qs,jx,z_=(jx=class extends bo{constructor(){super();K(this,Hs,!0);K(this,jr);K(this,qs);z(this,qs,t=>{if(!Gi&&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),z(this,jr,void 0))}setEventListener(t){var n;z(this,qs,t),(n=S(this,jr))==null||n.call(this),z(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Hs)!==t&&(z(this,Hs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Hs)}},Hs=new WeakMap,jr=new WeakMap,qs=new WeakMap,jx),Lu=new z_;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 V_(e){return Math.min(1e3*2**e,3e4)}function nb(e){return(e??"online")==="online"?Lu.isOnline():!0}var rb=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 rb}function ib(e){let t=!1,n=0,r=!1,i;const s=tp(),o=p=>{var b;r||(f(new rb(p)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||Lu.isOnline())&&e.canRun(),d=()=>nb(e.networkMode)&&e.canRun(),u=p=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,p),i==null||i(),s.resolve(p))},f=p=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,p),i==null||i(),s.reject(p))},h=()=>new Promise(p=>{var b;i=g=>{(r||c())&&p(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;i=void 0,r||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(r)return;let p;const b=n===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(u).catch(g=>{var E;if(r)return;const x=e.retry??(Gi?0:3),w=e.retryDelay??V_,C=typeof w=="function"?w(n,g):w,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),L_(C).then(()=>c()?void 0:h()).then(()=>{t?f(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():h().then(m),s)}}function U_(){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=U_(),Ri,Ax,sb=(Ax=class{constructor(){K(this,Ri)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&z(this,Ri,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Ri)&&(clearTimeout(S(this,Ri)),z(this,Ri,void 0))}},Ri=new WeakMap,Ax),Ws,Gs,Jt,dt,Va,Oi,yn,Jn,Rx,H_=(Rx=class extends sb{constructor(t){super();K(this,yn);K(this,Ws);K(this,Gs);K(this,Jt);K(this,dt);K(this,Va);K(this,Oi);z(this,Oi,!1),z(this,Va,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,Ws,q_(this.options)),this.state=t.state??S(this,Ws),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,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,Ws))}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||!Jw(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,Oi)?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:()=>(z(this,Oi,!0),r.signal)})},s=()=>{const u=tb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),z(this,Oi,!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),z(this,Gs,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,h,m,p;Td(u)&&u.silent||se(this,yn,Jn).call(this,{type:"error",error:u}),Td(u)||((h=(f=S(this,Jt).config).onError)==null||h.call(f,u,this),(p=(m=S(this,Jt).config).onSettled)==null||p.call(m,this.state.data,u,this)),this.scheduleGc()};return z(this,dt,ib({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,h,m,p;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(h=(f=S(this,Jt).config).onSuccess)==null||h.call(f,u,this),(p=(m=S(this,Jt).config).onSettled)==null||p.call(m,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()}},Ws=new WeakMap,Gs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Va=new WeakMap,Oi=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,...ob(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,Gs)?{...S(this,Gs),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})})},Rx);function ob(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q_(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 Nn,Ox,W_=(Ox=class extends bo{constructor(t={}){super();K(this,Nn);this.config=t,z(this,Nn,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 H_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Nn).has(t.queryHash)||(S(this,Nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Nn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Nn).get(t)}getAll(){return[...S(this,Nn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Nv(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()})})}},Nn=new WeakMap,Ox),Mn,gt,Di,Fn,br,Dx,G_=(Dx=class extends sb{constructor(t){super();K(this,Fn);K(this,Mn);K(this,gt);K(this,Di);this.mutationId=t.mutationId,z(this,gt,t.mutationCache),z(this,Mn,[]),this.state=t.state||ab(),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,Mn).includes(t)||(S(this,Mn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,Mn,S(this,Mn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Mn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,h,m,p,b,g,x,w,C,T,E,_;z(this,Di,ib({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,P)=>{se(this,Fn,br).call(this,{type:"failed",failureCount:j,error:P})},onPause:()=>{se(this,Fn,br).call(this,{type:"pause"})},onContinue:()=>{se(this,Fn,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,Di).canStart();try{if(!n){se(this,Fn,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 P=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));P!==this.state.context&&se(this,Fn,br).call(this,{type:"pending",context:P,variables:t,isPaused:r})}const j=await S(this,Di).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((h=(f=S(this,gt).config).onSettled)==null?void 0:h.call(f,j,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,j,null,t,this.state.context)),se(this,Fn,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(b=S(this,gt).config).onError)==null?void 0:g.call(b,j,t,this.state.context,this)),await((w=(x=this.options).onError)==null?void 0:w.call(x,j,t,this.state.context)),await((T=(C=S(this,gt).config).onSettled)==null?void 0:T.call(C,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,Fn,br).call(this,{type:"error",error:j})}}finally{S(this,gt).runNext(this)}}},Mn=new WeakMap,gt=new WeakMap,Di=new WeakMap,Fn=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,Mn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Dx);function ab(){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,Q_=(Nx=class extends bo{constructor(t={}){super();K(this,It);K(this,Ua);this.config=t,z(this,It,new Map),z(this,Ua,Date.now())}build(t,n,r){const i=new G_({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=>Mv(n,r))}findAll(t={}){return this.getAll().filter(n=>Mv(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 Iv(e){return{onFetch:(t,n)=>{var d,u,f,h,m;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=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let p=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=tb(t.options,t.fetchOptions),x=async(w,C,T)=>{if(p)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const E={queryKey:t.queryKey,pageParam:C,direction:T?"backward":"forward",meta:t.options.meta};b(E);const _=await g(E),{maxPages:j}=t.options,P=T?$_:I_;return{pages:P(w.pages,_,j),pageParams:P(w.pageParams,C,j)}};if(i&&s.length){const w=i==="backward",C=w?Y_:$v,T={pages:s,pageParams:o},E=C(r,T);a=await x(T,E,w)}else{const w=e??s.length;do{const C=l===0?o[0]??r.initialPageParam:$v(r,a);if(l>0&&C==null)break;a=await x(a,C),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function $v(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 Y_(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,Ar,Rr,Qs,Ys,Or,Ks,Xs,Mx,K_=(Mx=class{constructor(e={}){K(this,De);K(this,Ar);K(this,Rr);K(this,Qs);K(this,Ys);K(this,Or);K(this,Ks);K(this,Xs);z(this,De,e.queryCache||new W_),z(this,Ar,e.mutationCache||new Q_),z(this,Rr,e.defaultOptions||{}),z(this,Qs,new Map),z(this,Ys,new Map),z(this,Or,0)}mount(){cl(this,Or)._++,S(this,Or)===1&&(z(this,Ks,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),z(this,Xs,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,Ks))==null||e.call(this),z(this,Ks,void 0),(t=S(this,Xs))==null||t.call(this),z(this,Xs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,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(zs(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=F_(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(zs(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=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lu.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Rr)}setDefaultOptions(e){z(this,Rr,e)}setQueryDefaults(e,t){S(this,Qs).set(Qi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Qs).values()],n={};return t.forEach(r=>{_a(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ys).set(Qi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ys).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,Rr).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,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Ar).clear()}},De=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Qs=new WeakMap,Ys=new WeakMap,Or=new WeakMap,Ks=new WeakMap,Xs=new WeakMap,Mx),Tt,le,Ha,vt,Ni,Zs,Dr,Ln,qa,Js,eo,Mi,Fi,Nr,to,pe,Ho,np,rp,ip,sp,op,ap,lp,lb,Fx,X_=(Fx=class extends bo{constructor(t,n){super();K(this,pe);K(this,Tt);K(this,le);K(this,Ha);K(this,vt);K(this,Ni);K(this,Zs);K(this,Dr);K(this,Ln);K(this,qa);K(this,Js);K(this,eo);K(this,Mi);K(this,Fi);K(this,Nr);K(this,to,new Set);this.options=n,z(this,Tt,t),z(this,Ln,null),z(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),Bv(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,Tt).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&&!Fu(this.options,r)&&S(this,Tt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&zv(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))||zs(this.options.staleTime,S(this,le))!==zs(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,Nr))&&se(this,pe,ip).call(this,o)}getOptimisticResult(t){const n=S(this,Tt).getQueryCache().build(S(this,Tt),t),r=this.createResult(n,t);return J_(this,r)&&(z(this,vt,r),z(this,Zs,this.options),z(this,Ni,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,to).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Tt).defaultQueryOptions(t),r=S(this,Tt).getQueryCache().build(S(this,Tt),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,Ni),a=S(this,Zs),c=t!==r?t.state:S(this,Ha),{state:d}=t;let u={...d},f=!1,h;if(n._optimisticResults){const P=this.hasListeners(),O=!P&&Bv(t,n),D=P&&zv(t,r,n,i);(O||D)&&(u={...u,...ob(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:b}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,qa))h=S(this,Js);else try{z(this,qa,n.select),h=n.select(u.data),h=ep(s==null?void 0:s.data,h,n),z(this,Js,h),z(this,Ln,null)}catch(P){z(this,Ln,P)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let P;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))P=s.data;else if(P=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,eo))==null?void 0:j.state.data,S(this,eo)):n.placeholderData,n.select&&P!==void 0)try{P=n.select(P),z(this,Ln,null)}catch(O){z(this,Ln,O)}P!==void 0&&(b="success",h=ep(s==null?void 0:s.data,P,n),f=!0)}S(this,Ln)&&(m=S(this,Ln),h=S(this,Js),p=Date.now(),b="error");const g=u.fetchStatus==="fetching",x=b==="pending",w=b==="error",C=x&&g,T=h!==void 0,_={status:b,fetchStatus:u.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:p,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&&!x,isLoadingError:w&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const P=B=>{_.status==="error"?B.reject(_.error):_.data!==void 0&&B.resolve(_.data)},O=()=>{const B=z(this,Dr,_.promise=tp());P(B)},D=S(this,Dr);switch(D.status){case"pending":t.queryHash===r.queryHash&&P(D);break;case"fulfilled":(_.status==="error"||_.data!==D.value)&&O();break;case"rejected":(_.status!=="error"||_.error!==D.reason)&&O();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(z(this,Ni,S(this,le).state),z(this,Zs,this.options),S(this,Ni).data!==void 0&&z(this,eo,S(this,le)),Fu(r,n))return;z(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,to).size)return!0;const l=new Set(a??S(this,to));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,lb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,sp).call(this)}},Tt=new WeakMap,le=new WeakMap,Ha=new WeakMap,vt=new WeakMap,Ni=new WeakMap,Zs=new WeakMap,Dr=new WeakMap,Ln=new WeakMap,qa=new WeakMap,Js=new WeakMap,eo=new WeakMap,Mi=new WeakMap,Fi=new WeakMap,Nr=new WeakMap,to=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=zs(this.options.staleTime,S(this,le));if(Gi||S(this,vt).isStale||!Zf(t))return;const r=Jw(S(this,vt).dataUpdatedAt,t)+1;z(this,Mi,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),z(this,Nr,t),!(Gi||Sn(this.options.enabled,S(this,le))===!1||!Zf(S(this,Nr))||S(this,Nr)===0)&&z(this,Fi,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Nr)))},sp=function(){se(this,pe,np).call(this),se(this,pe,ip).call(this,se(this,pe,rp).call(this))},op=function(){S(this,Mi)&&(clearTimeout(S(this,Mi)),z(this,Mi,void 0))},ap=function(){S(this,Fi)&&(clearInterval(S(this,Fi)),z(this,Fi,void 0))},lp=function(){const t=S(this,Tt).getQueryCache().build(S(this,Tt),this.options);if(t===S(this,le))return;const n=S(this,le);z(this,le,t),z(this,Ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},lb=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Tt).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Fx);function Z_(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bv(e,t){return Z_(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 zv(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(zs(t.staleTime,e))}function J_(e,t){return!Fu(e.getCurrentResult(),t)}var Mr,Fr,Et,rr,lr,Jl,cp,Lx,e2=(Lx=class extends bo{constructor(t,n){super();K(this,lr);K(this,Mr);K(this,Fr);K(this,Et);K(this,rr);z(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),Fu(this.options,n)||S(this,Mr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Et),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Qi(n.mutationKey)!==Qi(this.options.mutationKey)?this.reset():((r=S(this,Et))==null?void 0:r.state.status)==="pending"&&S(this,Et).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Et))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,lr,Jl).call(this),se(this,lr,cp).call(this,t)}getCurrentResult(){return S(this,Fr)}reset(){var t;(t=S(this,Et))==null||t.removeObserver(this),z(this,Et,void 0),se(this,lr,Jl).call(this),se(this,lr,cp).call(this)}mutate(t,n){var r;return z(this,rr,n),(r=S(this,Et))==null||r.removeObserver(this),z(this,Et,S(this,Mr).getMutationCache().build(S(this,Mr),this.options)),S(this,Et).addObserver(this),S(this,Et).execute(t)}},Mr=new WeakMap,Fr=new WeakMap,Et=new WeakMap,rr=new WeakMap,lr=new WeakSet,Jl=function(){var n;const t=((n=S(this,Et))==null?void 0:n.state)??ab();z(this,Fr,{...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,Fr).variables,u=S(this,Fr).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,Fr))})})},Lx),ub=v.createContext(void 0),cb=e=>{const t=v.useContext(ub);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},t2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(ub.Provider,{value:e,children:t})),db=v.createContext(!1),n2=()=>v.useContext(db);db.Provider;function r2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var i2=v.createContext(r2()),s2=()=>v.useContext(i2);function fb(e,t){return typeof e=="function"?e(...t):!!e}function dp(){}var o2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},a2=e=>{v.useEffect(()=>{e.clearReset()},[e])},l2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&fb(n,[e.error,r]),u2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},c2=(e,t)=>e.isLoading&&e.isFetching&&!t,d2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function f2(e,t,n){var d,u,f,h,m;const r=cb(),i=n2(),s=s2(),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",u2(o),o2(o,s),a2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(p=>{const b=i?dp:l.subscribe(He.batchCalls(p));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),d2(o,c))throw Vv(o,l,s);if(l2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||h.call(f,o,c),o.experimental_prefetchInRender&&!Gi&&c2(c,i)){const p=a?Vv(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(dp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function p2(e,t){return f2(e,X_)}function am(e,t){const n=cb(),[r]=v.useState(()=>new e2(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&&fb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const h2=e=>p2({queryKey:["widgets",e],queryFn:()=>m2(e)}),m2=e=>wo(`widgets/with-link/${e}`);var k=(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))(k||{}),W=(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))(W||{});function g2(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 QE=typeof WeakMap=="function"?WeakMap:Map;function Sw(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 kw(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"&&(Wr===null?Wr=new Set([this]):Wr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function mv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new QE;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=l_.bind(null,e,t,n),t.then(e,e))}function gv(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 vv(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,qr(n,t,1))),n.lanes|=1),e)}var YE=hr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?Z1(t,null,n,r):so(t,e.child,n,r)}function yv(e,t,n,r,i){n=n.render;var s=t.ref;return $s(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 xv(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,Cw(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 Cw(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 Tw(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(Ps,$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(Ps,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(Ps,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(Ps,$t),$t|=r;return yt(e,t,i,n),t.child}function Ew(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=Ot(n)?Vi:mt.current;return s=ro(t,s),$s(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 wv(e,t,n,r,i){if(Ot(n)){var s=!0;Su(t)}else s=!1;if($s(t,i),t.stateNode===null)Yl(e,t),bw(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=Ot(n)?Vi:mt.current,c=ro(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)&&hv(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||Rt.current||Cr?(typeof d=="function"&&(Ff(t,n,d,r),l=t.memoizedState),(a=Cr||pv(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,ew(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=Ot(n)?Vi:mt.current,l=ro(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&hv(t,o,r,l),Cr=!1,f=t.memoizedState,o.state=f,_u(t,r,o,i);var m=t.memoizedState;a!==u||f!==m||Rt.current||Cr?(typeof h=="function"&&(Ff(t,n,h,r),m=t.memoizedState),(c=Cr||pv(t,n,c,r,f,m,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=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){Ew(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&sv(t,n,!1),fr(e,t,s);r=t.stateNode,YE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=so(t,e.child,null,s),t.child=so(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&sv(t,n,!0),t.child}function _w(e){var t=e.stateNode;t.pendingContext?iv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&iv(e,t.context,!1),Lh(e,t.containerInfo)}function bv(e,t,n,r,i){return io(),Rh(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 Pw(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 Nf(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=Ii(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):qh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return KE(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=Ii(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?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 qh(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&&Rh(r),so(t,e.child,null,n),e=qh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function KE(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=Ii(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&so(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=u_.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++]=Ui,ir=e.id,sr=e.overflow,Ui=t),t=qh(t,r.children),t.flags|=4096,t)}function Sv(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 jw(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&&Sv(e,n,t);else if(e.tag===19)Sv(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 XE(e,t,n){switch(t.tag){case 3:_w(t),io();break;case 5:tw(t);break;case 1:Ot(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?Pw(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 jw(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,Tw(e,t,n)}return fr(e,t,n)}var Aw,Uf,Rw,Ow;Aw=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(){};Rw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(Bn.current);var s=null;switch(n){case"input":i=df(e,i),r=df(e,r),s=[];break;case"select":i=Re({},i,{value:void 0}),r=Re({},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)}};Ow=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 ZE(e,t,n){var r=t.pendingProps;switch(Ah(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 Ot(t.type)&&bu(),ct(t),null;case 3:return r=t.stateNode,oo(),Te(Rt),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=Ti(Sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Rw(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=Ti(Bn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[In]=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":Rg(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Dg(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),Og(r,s,!0);break;case"textarea":pl(r),Ng(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=o1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[In]=t,e[wa]=r,Aw(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":Rg(e,r),i=df(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Re({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Dg(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"?u1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&a1(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),Og(e,r,!1);break;case"textarea":pl(e),Ng(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?Ms(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ms(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)Ow(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Ti(Sa.current),Ti(Bn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[In]=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[In]=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))K1(),io(),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[In]=t}else io(),!(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?qe===0&&(qe=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return oo(),Uf(e,t),e===null&&ya(t.stateNode.containerInfo),ct(t),null;case 10:return Nh(t.type._context),ct(t),null;case 17:return Ot(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(qe!==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&&Ie()>lo&&(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*Ie()-s.renderingStartTime>lo&&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=Ie(),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 JE(e,t){switch(Ah(t),t.tag){case 1:return Ot(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oo(),Te(Rt),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));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return oo(),null;case 10:return Nh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Tl=!1,pt=!1,e_=typeof WeakSet=="function"?WeakSet:Set,U=null;function _s(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 kv=!1;function t_(e,t){if(_f=vu,e=L1(),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 h;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),(h=u.firstChild)!==null;)f=u,u=h;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(h=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=h}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,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var p=m.memoizedProps,b=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:vn(t.type,p),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(C){Me(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return m=kv,kv=!1,m}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&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 qf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Dw(e){var t=e.alternate;t!==null&&(e.alternate=null,Dw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[In],delete t[wa],delete t[Rf],delete t[LE],delete t[IE])),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 Cv(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 Wf(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(Wf(e,t,n),e=e.sibling;e!==null;)Wf(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;)Mw(e,t,n),n=n.sibling}function Mw(e,t,n){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(nc,n)}catch{}switch(n.tag){case 5:pt||_s(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&&(_s(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 Tv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new e_),t.forEach(function(r){var i=c_.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));Mw(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;)Fw(t,e),t=t.sibling}function Fw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),jn(e),r&4){try{ea(3,e,e.return),cc(3,e)}catch(p){Me(e,e.return,p)}try{ea(5,e,e.return)}catch(p){Me(e,e.return,p)}}break;case 1:hn(t,e),jn(e),r&512&&n!==null&&_s(n,n.return);break;case 5:if(hn(t,e),jn(e),r&512&&n!==null&&_s(n,n.return),e.flags&32){var i=e.stateNode;try{da(i,"")}catch(p){Me(e,e.return,p)}}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&&i1(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"?u1(i,u):d==="dangerouslySetInnerHTML"?a1(i,u):d==="children"?da(i,u):mh(i,d,u,c)}switch(a){case"input":ff(i,s);break;case"textarea":s1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Ms(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ms(i,!!s.multiple,s.defaultValue,!0):Ms(i,!!s.multiple,s.multiple?[]:"",!1))}i[wa]=s}catch(p){Me(e,e.return,p)}}break;case 6:if(hn(t,e),jn(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(p){Me(e,e.return,p)}}break;case 3:if(hn(t,e),jn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(p){Me(e,e.return,p)}break;case 4:hn(t,e),jn(e);break;case 13:hn(t,e),jn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=Ie())),r&4&&Tv(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),jn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(U=e,d=e.child;d!==null;){for(u=U=d;U!==null;){switch(f=U,h=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:_s(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(p){Me(r,n,p)}}break;case 5:_s(f,f.return);break;case 22:if(f.memoizedState!==null){_v(u);continue}}h!==null?(h.return=f,U=h):_v(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=l1("display",o))}catch(p){Me(e,e.return,p)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(p){Me(e,e.return,p)}}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),jn(e),r&4&&Tv(e);break;case 21:break;default:hn(t,e),jn(e)}}function jn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(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=Cv(e);Gf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Cv(e);Wf(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 n_(e,t,n){U=e,Lw(e)}function Lw(e,t,n){for(var r=(e.mode&1)!==0;U!==null;){var i=U,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(U=i;U!==null;)o=U,l=o.child,o.tag===22&&o.memoizedState!==null?Pv(i):l!==null?(l.return=o,U=l):Pv(i);for(;s!==null;)U=s,Lw(s),s=s.sibling;U=i,Tl=a,pt=c}Ev(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,U=s):Ev(e)}}function Ev(e){for(;U!==null;){var t=U;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&&cv(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}cv(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&&qf(t)}catch(f){Me(t,t.return,f)}}if(t===e){U=null;break}if(n=t.sibling,n!==null){n.return=t.return,U=n;break}U=t.return}}function _v(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var n=t.sibling;if(n!==null){n.return=t.return,U=n;break}U=t.return}}function Pv(e){for(;U!==null;){var t=U;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{qf(t)}catch(l){Me(t,s,l)}break;case 5:var o=t.return;try{qf(t)}catch(l){Me(t,o,l)}}}catch(l){Me(t,t.return,l)}if(t===e){U=null;break}var a=t.sibling;if(a!==null){a.return=t.return,U=a;break}U=t.return}}var r_=Math.ceil,Ru=hr.ReactCurrentDispatcher,Wh=hr.ReactCurrentOwner,an=hr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,Ps=oi(0),qe=0,Ea=null,qi=0,dc=0,Gh=0,ta=null,Pt=null,Qh=0,lo=1/0,er=null,Ou=!1,Qf=null,Wr=null,El=!1,Ir=null,Du=0,na=0,Yf=null,Kl=-1,Xl=0;function wt(){return de&6?Ie():Kl!==-1?Kl:Kl=Ie()}function Gr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:BE.transition!==null?(Xl===0&&(Xl=b1()),Xl):(e=he,e!==0||(e=window.event,e=e===void 0?16:P1(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),qe===4&&_r(e,ot)),Dt(e,r),n===1&&de===0&&!(t.mode&1)&&(lo=Ie()+500,ac&&ai()))}function Dt(e,t){var n=e.callbackNode;BT(e,t);var r=gu(e,e===Xe?ot:0);if(r===0)n!==null&&Lg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lg(n),t===1)e.tag===0?$E(jv.bind(null,e)):G1(jv.bind(null,e)),ME(function(){!(de&6)&&ai()}),n=null;else{switch(S1(r)){case 1:n=wh;break;case 4:n=x1;break;case 16:n=mu;break;case 536870912:n=w1;break;default:n=mu}n=qw(n,Iw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Iw(e,t){if(Kl=-1,Xl=0,de&6)throw Error(L(327));var n=e.callbackNode;if(Bs()&&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=Nu(e,r);else{t=r;var i=de;de|=2;var s=Bw();(Xe!==e||ot!==t)&&(er=null,lo=Ie()+500,Li(e,t));do try{o_();break}catch(a){$w(e,a)}while(!0);Dh(),Ru.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=qe)}if(t!==0){if(t===2&&(i=Sf(e),i!==0&&(r=i,t=Kf(e,i))),t===1)throw n=Ea,Li(e,0),_r(e,r),Dt(e,Ie()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!i_(i)&&(t=Nu(e,r),t===2&&(s=Sf(e),s!==0&&(r=s,t=Kf(e,s))),t===1))throw n=Ea,Li(e,0),_r(e,r),Dt(e,Ie()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:vi(e,Pt,er);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Qh+500-Ie(),10<t)){if(gu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Af(vi.bind(null,e,Pt,er),t);break}vi(e,Pt,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=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*r_(r/1960))-r,10<r){e.timeoutHandle=Af(vi.bind(null,e,Pt,er),r);break}vi(e,Pt,er);break;case 5:vi(e,Pt,er);break;default:throw Error(L(329))}}}return Dt(e,Ie()),e.callbackNode===n?Iw.bind(null,e):null}function Kf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Li(e,t).flags|=256),e=Nu(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&Xf(t)),e}function Xf(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function i_(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 jv(e){if(de&6)throw Error(L(327));Bs();var t=gu(e,0);if(!(t&1))return Dt(e,Ie()),null;var n=Nu(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,Li(e,0),_r(e,t),Dt(e,Ie()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,Pt,er),Dt(e,Ie()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(lo=Ie()+500,ac&&ai())}}function Wi(e){Ir!==null&&Ir.tag===0&&!(de&6)&&Bs();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=Ps.current,Te(Ps)}function Li(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(Ah(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:oo(),Te(Rt),Te(mt),$h();break;case 5:Ih(r);break;case 4:oo();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Nh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Qr(e.current,null),ot=$t=t,qe=0,Ea=null,Gh=dc=qi=0,Pt=ta=null,Ci!==null){for(t=0;t<Ci.length;t++)if(n=Ci[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}Ci=null}return e}function $w(e,t){do{var n=Be;try{if(Dh(),Gl.current=Au,ju){for(var r=Ae.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ju=!1}if(Hi=0,Ke=Ue=Ae=null,Jo=!1,ka=0,Wh.current=null,n===null||n.return===null){qe=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 h=gv(o);if(h!==null){h.flags&=-257,vv(h,o,a,s,t),h.mode&1&&mv(s,c,t),t=h,l=c;var m=t.updateQueue;if(m===null){var p=new Set;p.add(l),t.updateQueue=p}else m.add(l);break e}else{if(!(t&1)){mv(s,c,t),Xh();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var b=gv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),vv(b,o,a,s,t),Rh(ao(l,a));break e}}s=l=ao(l,a),qe!==4&&(qe=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Sw(s,l,t);uv(s,g);break e;case 1:a=l;var x=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wr===null||!Wr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=kw(s,a,t);uv(s,C);break e}}s=s.return}while(s!==null)}Vw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function Bw(){var e=Ru.current;return Ru.current=Au,e===null?Au:e}function Xh(){(qe===0||qe===3||qe===2)&&(qe=4),Xe===null||!(qi&268435455)&&!(dc&268435455)||_r(Xe,ot)}function Nu(e,t){var n=de;de|=2;var r=Bw();(Xe!==e||ot!==t)&&(er=null,Li(e,t));do try{s_();break}catch(i){$w(e,i)}while(!0);if(Dh(),de=n,Ru.current=r,Be!==null)throw Error(L(261));return Xe=null,ot=0,qe}function s_(){for(;Be!==null;)zw(Be)}function o_(){for(;Be!==null&&!RT();)zw(Be)}function zw(e){var t=Hw(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Vw(e):Be=t,Wh.current=null}function Vw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=JE(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,Be=null;return}}else if(n=ZE(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);qe===0&&(qe=5)}function vi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,a_(e,t,n,r)}finally{an.transition=i,he=r}return null}function a_(e,t,n,r){do Bs();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(zT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,qw(mu,function(){return Bs(),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,Wh.current=null,t_(e,n),Fw(n,e),_E(Pf),vu=!!_f,Pf=_f=null,e.current=n,n_(n),OT(),de=a,he=o,an.transition=s}else e.current=n;if(El&&(El=!1,Ir=e,Du=i),s=e.pendingLanes,s===0&&(Wr=null),MT(n.stateNode),Dt(e,Ie()),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&&Bs(),s=e.pendingLanes,s&1?e===Yf?na++:(na=0,Yf=e):na=0,ai(),null}function Bs(){if(Ir!==null){var e=S1(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,U=e.current;U!==null;){var s=U,o=s.child;if(U.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(U=c;U!==null;){var d=U;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,U=u;else for(;U!==null;){d=U;var f=d.sibling,h=d.return;if(Dw(d),d===c){U=null;break}if(f!==null){f.return=h,U=f;break}U=h}}}var m=s.alternate;if(m!==null){var p=m.child;if(p!==null){m.child=null;do{var b=p.sibling;p.sibling=null,p=b}while(p!==null)}}U=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,U=o;else e:for(;U!==null;){if(s=U,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,U=g;break e}U=s.return}}var x=e.current;for(U=x;U!==null;){o=U;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,U=w;else e:for(o=x;U!==null;){if(a=U,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){U=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,U=C;break e}U=a.return}}if(de=i,ai(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(nc,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Av(e,t,n){t=ao(n,t),t=Sw(e,t,1),e=qr(e,t,1),t=wt(),e!==null&&(Ga(e,1,t),Dt(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"&&(Wr===null||!Wr.has(r))){e=ao(n,e),e=kw(t,e,1),t=qr(t,e,1),e=wt(),t!==null&&(Ga(t,1,e),Dt(t,e));break}}t=t.return}}function l_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(qe===4||qe===3&&(ot&130023424)===ot&&500>Ie()-Qh?Li(e,0):Gh|=n),Dt(e,t)}function Uw(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),Dt(e,n))}function u_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uw(e,n)}function c_(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),Uw(e,n)}var Hw;Hw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Rt.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,XE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&Q1(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var i=ro(t,mt.current);$s(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,Ot(r)?(s=!0,Su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Fh(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=f_(r),e=vn(r,e),i){case 0:t=$f(null,t,r,e,n);break e;case 1:t=wv(null,t,r,e,n);break e;case 11:t=yv(null,t,r,e,n);break e;case 14:t=xv(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),wv(e,t,r,i,n);case 3:e:{if(_w(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ew(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=ao(Error(L(423)),t),t=bv(e,t,r,n,i);break e}else if(r!==i){i=ao(Error(L(424)),t),t=bv(e,t,r,n,i);break e}else for(Bt=Hr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=Z1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(io(),r===i){t=fr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return tw(t),e===null&&Nf(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),Ew(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Nf(t),null;case 13:return Pw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(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),yv(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&&!Rt.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,$s(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),xv(e,t,r,i,n);case 15:return Cw(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,Ot(r)?(e=!0,Su(t)):e=!1,$s(t,n),bw(t,r,i),Lf(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return jw(e,t,n);case 22:return Tw(e,t,n)}throw Error(L(156,t.tag))};function qw(e,t){return y1(e,t)}function d_(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 d_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function f_(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 ys:return Ii(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 t1:return fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jx:o=10;break e;case e1: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 Ii(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=t1,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 p_(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 p_(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},Fh(s),e}function h_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ww(e){if(!e)return ti;e=e._reactInternals;e:{if(Zi(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(Ot(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(Ot(n))return W1(e,n,t)}return t}function Gw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Ww(null),n=e.current,r=wt(),i=Gr(n),s=ar(r,i),s.callback=t??null,qr(n,s,i),e.current.lanes=i,Ga(e,i,r),Dt(e,r),e}function pc(e,t,n,r){var i=t.current,s=wt(),o=Gr(i);return n=Ww(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=qr(i,t,o),e!==null&&(Cn(e,i,o,s),Wl(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 Rv(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){Rv(e,t),(e=e.alternate)&&Rv(e,t)}function m_(){return null}var Qw=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;Wi(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=T1();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&&_1(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 Ov(){}function g_(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=Gw(t,r,e,0,null,!1,!1,"",Ov);return e._reactRootContainer=o,e[cr]=o.current,ya(e.nodeType===8?e.parentNode:e),Wi(),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,"",Ov);return e._reactRootContainer=l,e[cr]=l.current,ya(e.nodeType===8?e.parentNode:e),Wi(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=g_(n,t,e,i,r);return Mu(o)}k1=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),Dt(t,Ie()),!(de&6)&&(lo=Ie()+500,ai()))}break;case 13:Wi(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)}};C1=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)}};T1=function(){return he};E1=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));r1(r),ff(r,i)}}}break;case"textarea":s1(e,n);break;case"select":t=n.value,t!=null&&Ms(e,!!n.multiple,t,!1)}};f1=Yh;p1=Wi;var v_={usingClientEntryPoint:!1,Events:[Ya,Ss,oc,c1,d1,Yh]},Fo={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},y_={bundleType:Fo.bundleType,version:Fo.version,rendererPackageName:Fo.rendererPackageName,rendererConfig:Fo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=g1(e),e===null?null:e.stateNode},findFiberByHostInstance:Fo.findFiberByHostInstance||m_,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(y_),$n=_l}catch{}}qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v_;qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return h_(e,t,null,n)};qt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",i=Qw;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)};qt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=g1(t),e=e===null?null:e.stateNode,e};qt.flushSync=function(e){return Wi(e)};qt.hydrate=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!0,n)};qt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Qw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Gw(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)};qt.render=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!1,n)};qt.unmountComponentAtNode=function(e){if(!mc(e))throw Error(L(40));return e._reactRootContainer?(Wi(function(){gc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};qt.unstable_batchedUpdates=Yh;qt.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)};qt.version="18.3.1-next-f1338f8080-20240426";function Yw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yw)}catch(e){console.error(e)}}Yw(),Yx.exports=qt;var Kw=Yx.exports;const x_=Ki(Kw);var Xw,Dv=Kw;Xw=Dv.createRoot,Dv.hydrateRoot;const w_="@alfatech/livechat",b_="v2025.08.04.1",S_="module",k_="https://api-live.alfatek.dev",C_="wss://api-live.alfatek.dev",T_=["dist","README.md","component/chatier.js"],E_="dist/widget.js",__={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"},P_={"@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"},j_={"@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"},Zw={name:w_,private:!1,version:b_,type:S_,apiURL:k_,wsURL:C_,files:T_,main:E_,scripts:__,dependencies:P_,devDependencies:j_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},A_=Zw.apiURL,R_=Zw.wsURL,O_=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],D_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],N_={429:O_,404:D_};async function wo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${A_}/${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),M_=(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 bo=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(){}},Gi=typeof window>"u"||"Deno"in globalThis;function en(){}function F_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Nv(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 Mv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Qi(t.options.mutationKey)!==Qi(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)||Qi)(e)}function Qi(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 eb(e,t){if(e===t)return e;const n=Fv(e)&&Fv(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]=eb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Fu(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 Fv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jf(e){if(!Lv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Lv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lv(e){return Object.prototype.toString.call(e)==="[object Object]"}function L_(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?eb(e,t):t}function I_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function tb(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,Us,Px,B_=(Px=class extends bo{constructor(){super();K(this,Ai);K(this,Pr);K(this,Us);z(this,Us,t=>{if(!Gi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Us))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),z(this,Pr,void 0))}setEventListener(t){var n;z(this,Us,t),(n=S(this,Pr))==null||n.call(this),z(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&(z(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,Us=new WeakMap,Px),sm=new B_,Hs,jr,qs,jx,z_=(jx=class extends bo{constructor(){super();K(this,Hs,!0);K(this,jr);K(this,qs);z(this,qs,t=>{if(!Gi&&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),z(this,jr,void 0))}setEventListener(t){var n;z(this,qs,t),(n=S(this,jr))==null||n.call(this),z(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Hs)!==t&&(z(this,Hs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Hs)}},Hs=new WeakMap,jr=new WeakMap,qs=new WeakMap,jx),Lu=new z_;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 V_(e){return Math.min(1e3*2**e,3e4)}function nb(e){return(e??"online")==="online"?Lu.isOnline():!0}var rb=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 rb}function ib(e){let t=!1,n=0,r=!1,i;const s=tp(),o=p=>{var b;r||(f(new rb(p)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||Lu.isOnline())&&e.canRun(),d=()=>nb(e.networkMode)&&e.canRun(),u=p=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,p),i==null||i(),s.resolve(p))},f=p=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,p),i==null||i(),s.reject(p))},h=()=>new Promise(p=>{var b;i=g=>{(r||c())&&p(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;i=void 0,r||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(r)return;let p;const b=n===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(u).catch(g=>{var E;if(r)return;const x=e.retry??(Gi?0:3),w=e.retryDelay??V_,C=typeof w=="function"?w(n,g):w,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),L_(C).then(()=>c()?void 0:h()).then(()=>{t?f(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():h().then(m),s)}}function U_(){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=U_(),Ri,Ax,sb=(Ax=class{constructor(){K(this,Ri)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&z(this,Ri,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Ri)&&(clearTimeout(S(this,Ri)),z(this,Ri,void 0))}},Ri=new WeakMap,Ax),Ws,Gs,Jt,dt,Va,Oi,yn,Jn,Rx,H_=(Rx=class extends sb{constructor(t){super();K(this,yn);K(this,Ws);K(this,Gs);K(this,Jt);K(this,dt);K(this,Va);K(this,Oi);z(this,Oi,!1),z(this,Va,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,Ws,q_(this.options)),this.state=t.state??S(this,Ws),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,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,Ws))}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||!Jw(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,Oi)?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:()=>(z(this,Oi,!0),r.signal)})},s=()=>{const u=tb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),z(this,Oi,!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),z(this,Gs,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,h,m,p;Td(u)&&u.silent||se(this,yn,Jn).call(this,{type:"error",error:u}),Td(u)||((h=(f=S(this,Jt).config).onError)==null||h.call(f,u,this),(p=(m=S(this,Jt).config).onSettled)==null||p.call(m,this.state.data,u,this)),this.scheduleGc()};return z(this,dt,ib({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,h,m,p;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(h=(f=S(this,Jt).config).onSuccess)==null||h.call(f,u,this),(p=(m=S(this,Jt).config).onSettled)==null||p.call(m,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()}},Ws=new WeakMap,Gs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Va=new WeakMap,Oi=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,...ob(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,Gs)?{...S(this,Gs),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})})},Rx);function ob(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q_(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 Nn,Ox,W_=(Ox=class extends bo{constructor(t={}){super();K(this,Nn);this.config=t,z(this,Nn,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 H_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Nn).has(t.queryHash)||(S(this,Nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Nn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Nn).get(t)}getAll(){return[...S(this,Nn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Nv(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()})})}},Nn=new WeakMap,Ox),Mn,gt,Di,Fn,br,Dx,G_=(Dx=class extends sb{constructor(t){super();K(this,Fn);K(this,Mn);K(this,gt);K(this,Di);this.mutationId=t.mutationId,z(this,gt,t.mutationCache),z(this,Mn,[]),this.state=t.state||ab(),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,Mn).includes(t)||(S(this,Mn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,Mn,S(this,Mn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Mn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,h,m,p,b,g,x,w,C,T,E,_;z(this,Di,ib({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,P)=>{se(this,Fn,br).call(this,{type:"failed",failureCount:j,error:P})},onPause:()=>{se(this,Fn,br).call(this,{type:"pause"})},onContinue:()=>{se(this,Fn,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,Di).canStart();try{if(!n){se(this,Fn,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 P=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));P!==this.state.context&&se(this,Fn,br).call(this,{type:"pending",context:P,variables:t,isPaused:r})}const j=await S(this,Di).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((h=(f=S(this,gt).config).onSettled)==null?void 0:h.call(f,j,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,j,null,t,this.state.context)),se(this,Fn,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(b=S(this,gt).config).onError)==null?void 0:g.call(b,j,t,this.state.context,this)),await((w=(x=this.options).onError)==null?void 0:w.call(x,j,t,this.state.context)),await((T=(C=S(this,gt).config).onSettled)==null?void 0:T.call(C,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,Fn,br).call(this,{type:"error",error:j})}}finally{S(this,gt).runNext(this)}}},Mn=new WeakMap,gt=new WeakMap,Di=new WeakMap,Fn=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,Mn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Dx);function ab(){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,Q_=(Nx=class extends bo{constructor(t={}){super();K(this,It);K(this,Ua);this.config=t,z(this,It,new Map),z(this,Ua,Date.now())}build(t,n,r){const i=new G_({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=>Mv(n,r))}findAll(t={}){return this.getAll().filter(n=>Mv(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 Iv(e){return{onFetch:(t,n)=>{var d,u,f,h,m;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=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let p=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=tb(t.options,t.fetchOptions),x=async(w,C,T)=>{if(p)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const E={queryKey:t.queryKey,pageParam:C,direction:T?"backward":"forward",meta:t.options.meta};b(E);const _=await g(E),{maxPages:j}=t.options,P=T?$_:I_;return{pages:P(w.pages,_,j),pageParams:P(w.pageParams,C,j)}};if(i&&s.length){const w=i==="backward",C=w?Y_:$v,T={pages:s,pageParams:o},E=C(r,T);a=await x(T,E,w)}else{const w=e??s.length;do{const C=l===0?o[0]??r.initialPageParam:$v(r,a);if(l>0&&C==null)break;a=await x(a,C),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function $v(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 Y_(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,Ar,Rr,Qs,Ys,Or,Ks,Xs,Mx,K_=(Mx=class{constructor(e={}){K(this,De);K(this,Ar);K(this,Rr);K(this,Qs);K(this,Ys);K(this,Or);K(this,Ks);K(this,Xs);z(this,De,e.queryCache||new W_),z(this,Ar,e.mutationCache||new Q_),z(this,Rr,e.defaultOptions||{}),z(this,Qs,new Map),z(this,Ys,new Map),z(this,Or,0)}mount(){cl(this,Or)._++,S(this,Or)===1&&(z(this,Ks,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),z(this,Xs,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,Ks))==null||e.call(this),z(this,Ks,void 0),(t=S(this,Xs))==null||t.call(this),z(this,Xs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,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(zs(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=F_(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(zs(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=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lu.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Rr)}setDefaultOptions(e){z(this,Rr,e)}setQueryDefaults(e,t){S(this,Qs).set(Qi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Qs).values()],n={};return t.forEach(r=>{_a(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ys).set(Qi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ys).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,Rr).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,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Ar).clear()}},De=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Qs=new WeakMap,Ys=new WeakMap,Or=new WeakMap,Ks=new WeakMap,Xs=new WeakMap,Mx),Tt,le,Ha,vt,Ni,Zs,Dr,Ln,qa,Js,eo,Mi,Fi,Nr,to,pe,Ho,np,rp,ip,sp,op,ap,lp,lb,Fx,X_=(Fx=class extends bo{constructor(t,n){super();K(this,pe);K(this,Tt);K(this,le);K(this,Ha);K(this,vt);K(this,Ni);K(this,Zs);K(this,Dr);K(this,Ln);K(this,qa);K(this,Js);K(this,eo);K(this,Mi);K(this,Fi);K(this,Nr);K(this,to,new Set);this.options=n,z(this,Tt,t),z(this,Ln,null),z(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),Bv(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,Tt).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&&!Fu(this.options,r)&&S(this,Tt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&zv(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))||zs(this.options.staleTime,S(this,le))!==zs(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,Nr))&&se(this,pe,ip).call(this,o)}getOptimisticResult(t){const n=S(this,Tt).getQueryCache().build(S(this,Tt),t),r=this.createResult(n,t);return J_(this,r)&&(z(this,vt,r),z(this,Zs,this.options),z(this,Ni,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,to).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Tt).defaultQueryOptions(t),r=S(this,Tt).getQueryCache().build(S(this,Tt),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,Ni),a=S(this,Zs),c=t!==r?t.state:S(this,Ha),{state:d}=t;let u={...d},f=!1,h;if(n._optimisticResults){const P=this.hasListeners(),O=!P&&Bv(t,n),D=P&&zv(t,r,n,i);(O||D)&&(u={...u,...ob(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:b}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,qa))h=S(this,Js);else try{z(this,qa,n.select),h=n.select(u.data),h=ep(s==null?void 0:s.data,h,n),z(this,Js,h),z(this,Ln,null)}catch(P){z(this,Ln,P)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let P;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))P=s.data;else if(P=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,eo))==null?void 0:j.state.data,S(this,eo)):n.placeholderData,n.select&&P!==void 0)try{P=n.select(P),z(this,Ln,null)}catch(O){z(this,Ln,O)}P!==void 0&&(b="success",h=ep(s==null?void 0:s.data,P,n),f=!0)}S(this,Ln)&&(m=S(this,Ln),h=S(this,Js),p=Date.now(),b="error");const g=u.fetchStatus==="fetching",x=b==="pending",w=b==="error",C=x&&g,T=h!==void 0,_={status:b,fetchStatus:u.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:p,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&&!x,isLoadingError:w&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const P=B=>{_.status==="error"?B.reject(_.error):_.data!==void 0&&B.resolve(_.data)},O=()=>{const B=z(this,Dr,_.promise=tp());P(B)},D=S(this,Dr);switch(D.status){case"pending":t.queryHash===r.queryHash&&P(D);break;case"fulfilled":(_.status==="error"||_.data!==D.value)&&O();break;case"rejected":(_.status!=="error"||_.error!==D.reason)&&O();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(z(this,Ni,S(this,le).state),z(this,Zs,this.options),S(this,Ni).data!==void 0&&z(this,eo,S(this,le)),Fu(r,n))return;z(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,to).size)return!0;const l=new Set(a??S(this,to));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,lb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,sp).call(this)}},Tt=new WeakMap,le=new WeakMap,Ha=new WeakMap,vt=new WeakMap,Ni=new WeakMap,Zs=new WeakMap,Dr=new WeakMap,Ln=new WeakMap,qa=new WeakMap,Js=new WeakMap,eo=new WeakMap,Mi=new WeakMap,Fi=new WeakMap,Nr=new WeakMap,to=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=zs(this.options.staleTime,S(this,le));if(Gi||S(this,vt).isStale||!Zf(t))return;const r=Jw(S(this,vt).dataUpdatedAt,t)+1;z(this,Mi,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),z(this,Nr,t),!(Gi||Sn(this.options.enabled,S(this,le))===!1||!Zf(S(this,Nr))||S(this,Nr)===0)&&z(this,Fi,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Nr)))},sp=function(){se(this,pe,np).call(this),se(this,pe,ip).call(this,se(this,pe,rp).call(this))},op=function(){S(this,Mi)&&(clearTimeout(S(this,Mi)),z(this,Mi,void 0))},ap=function(){S(this,Fi)&&(clearInterval(S(this,Fi)),z(this,Fi,void 0))},lp=function(){const t=S(this,Tt).getQueryCache().build(S(this,Tt),this.options);if(t===S(this,le))return;const n=S(this,le);z(this,le,t),z(this,Ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},lb=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Tt).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Fx);function Z_(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bv(e,t){return Z_(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 zv(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(zs(t.staleTime,e))}function J_(e,t){return!Fu(e.getCurrentResult(),t)}var Mr,Fr,Et,rr,lr,Jl,cp,Lx,e2=(Lx=class extends bo{constructor(t,n){super();K(this,lr);K(this,Mr);K(this,Fr);K(this,Et);K(this,rr);z(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),Fu(this.options,n)||S(this,Mr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Et),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Qi(n.mutationKey)!==Qi(this.options.mutationKey)?this.reset():((r=S(this,Et))==null?void 0:r.state.status)==="pending"&&S(this,Et).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Et))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,lr,Jl).call(this),se(this,lr,cp).call(this,t)}getCurrentResult(){return S(this,Fr)}reset(){var t;(t=S(this,Et))==null||t.removeObserver(this),z(this,Et,void 0),se(this,lr,Jl).call(this),se(this,lr,cp).call(this)}mutate(t,n){var r;return z(this,rr,n),(r=S(this,Et))==null||r.removeObserver(this),z(this,Et,S(this,Mr).getMutationCache().build(S(this,Mr),this.options)),S(this,Et).addObserver(this),S(this,Et).execute(t)}},Mr=new WeakMap,Fr=new WeakMap,Et=new WeakMap,rr=new WeakMap,lr=new WeakSet,Jl=function(){var n;const t=((n=S(this,Et))==null?void 0:n.state)??ab();z(this,Fr,{...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,Fr).variables,u=S(this,Fr).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,Fr))})})},Lx),ub=v.createContext(void 0),cb=e=>{const t=v.useContext(ub);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},t2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(ub.Provider,{value:e,children:t})),db=v.createContext(!1),n2=()=>v.useContext(db);db.Provider;function r2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var i2=v.createContext(r2()),s2=()=>v.useContext(i2);function fb(e,t){return typeof e=="function"?e(...t):!!e}function dp(){}var o2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},a2=e=>{v.useEffect(()=>{e.clearReset()},[e])},l2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&fb(n,[e.error,r]),u2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},c2=(e,t)=>e.isLoading&&e.isFetching&&!t,d2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function f2(e,t,n){var d,u,f,h,m;const r=cb(),i=n2(),s=s2(),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",u2(o),o2(o,s),a2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(p=>{const b=i?dp:l.subscribe(He.batchCalls(p));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),d2(o,c))throw Vv(o,l,s);if(l2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||h.call(f,o,c),o.experimental_prefetchInRender&&!Gi&&c2(c,i)){const p=a?Vv(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(dp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function p2(e,t){return f2(e,X_)}function am(e,t){const n=cb(),[r]=v.useState(()=>new e2(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&&fb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const h2=e=>p2({queryKey:["widgets",e],queryFn:()=>m2(e)}),m2=e=>wo(`widgets/with-link/${e}`);var k=(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))(k||{}),W=(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))(W||{});function g2(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 o$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a$(e){if(Array.isArray(e))return sh(e)}function wx(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 bx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wx(Object(n),!0).forEach(function(r){DC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DC(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 c$(e)||u$(e,t)||NC(e,t)||l$()}function l$(){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 u$(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 c$(e){if(Array.isArray(e))return e}var d$=typeof nf=="function"?nf:nf.default,f$="file-invalid-type",p$="file-too-large",h$="file-too-small",m$="too-many-files",g$=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:f$,message:"File type must be ".concat(r)}},Sx=function(t){return{code:p$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},kx=function(t){return{code:h$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},v$={code:m$,message:"Too many files"};function MC(e,t){var n=e.type==="application/x-moz-file"||d$(e,t);return[n,n?null:g$(t)]}function FC(e,t,n){if(Si(e.size))if(Si(t)&&Si(n)){if(e.size>n)return[!1,Sx(n)];if(e.size<t)return[!1,kx(t)]}else{if(Si(t)&&e.size<t)return[!1,kx(t)];if(Si(n)&&e.size>n)return[!1,Sx(n)]}return[!0,null]}function Si(e){return e!=null}function y$(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=MC(l,n),d=za(c,1),u=d[0],f=FC(l,r,i),h=za(f,1),m=h[0],p=a?a(l):null;return u&&m&&!p})}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 Cx(e){e.preventDefault()}function x$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function w$(e){return e.indexOf("Edge/")!==-1}function b$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return x$(e)||w$(e)}function Rn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!Zu(r)&&a&&a.apply(void 0,[r].concat(s)),Zu(r)})}}function S$(){return"showOpenFilePicker"in window}function k$(e){if(Si(e)){var t=Object.entries(e).filter(function(n){var r=za(n,2),i=r[0],s=r[1],o=!0;return LC(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(IC))&&(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 bx(bx({},n),{},DC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function C$(e){if(Si(e))return Object.entries(e).reduce(function(t,n){var r=za(n,2),i=r[0],s=r[1];return[].concat(xx(t),[i],xx(s))},[]).filter(function(t){return LC(t)||IC(t)}).join(",")}function T$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function E$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function LC(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function IC(e){return/^.*\.[\w]+$/.test(e)}var _$=["children"],P$=["open"],j$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],A$=["refKey","onChange","onClick"];function R$(e){return N$(e)||D$(e)||$C(e)||O$()}function O$(){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 D$(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 L$(e)||F$(e,t)||$C(e,t)||M$()}function M$(){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 $C(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 F$(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 L$(e){if(Array.isArray(e))return e}function Tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function 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=I$(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 I$(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,_$),i=$$(r),s=i.open,o=Ju(i,P$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});al.displayName="Dropzone";var BC={disabled:!1,getFilesFromEvent:KI,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=BC;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 $$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},BC),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,h=t.onDropAccepted,m=t.onDropRejected,p=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,C=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,j=t.onError,P=t.validator,O=v.useMemo(function(){return C$(n)},[n]),D=v.useMemo(function(){return k$(n)},[n]),B=v.useMemo(function(){return typeof b=="function"?b:Ex},[b]),V=v.useMemo(function(){return typeof p=="function"?p:Ex},[p]),ee=v.useRef(null),te=v.useRef(null),Q=v.useReducer(B$,lh),ne=rf(Q,2),N=ne[0],I=ne[1],q=N.isFocused,G=N.isFileDialogActive,Y=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&S$()),J=function(){!Y.current&&G&&setTimeout(function(){if(te.current){var M=te.current.files;M.length||(I({type:"closeDialog"}),V())}},300)};v.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[te,G,V,Y]);var ce=v.useRef([]),ve=function(M){ee.current&&ee.current.contains(M.target)||(M.preventDefault(),ce.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",Cx,!1),document.addEventListener("drop",ve,!1)),function(){w&&(document.removeEventListener("dragover",Cx),document.removeEventListener("drop",ve))}},[ee,w]),v.useEffect(function(){return!r&&x&&ee.current&&ee.current.focus(),function(){}},[ee,x,r]);var re=v.useCallback(function(R){j?j(R):console.error(R)},[j]),Fe=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R),ce.current=[].concat(R$(ce.current),[R.target]),Bl(R)&&Promise.resolve(i(R)).then(function(M){if(!(Zu(R)&&!_)){var H=M.length,X=H>0&&y$({files:M,accept:O,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:P}),ae=H>0&&!X;I({isDragAccept:X,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(R)}}).catch(function(M){return re(M)})},[i,c,re,_,O,o,s,a,l,P]),Je=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R);var M=Bl(R);if(M&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return M&&u&&u(R),!1},[u,_]),et=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R);var M=ce.current.filter(function(X){return ee.current&&ee.current.contains(X)}),H=M.indexOf(R.target);H!==-1&&M.splice(H,1),ce.current=M,!(M.length>0)&&(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bl(R)&&d&&d(R))},[ee,d,_]),Mt=v.useCallback(function(R,M){var H=[],X=[];R.forEach(function(ae){var Ve=MC(ae,O),tt=rf(Ve,2),_n=tt[0],Qt=tt[1],fs=FC(ae,o,s),Xn=rf(fs,2),xr=Xn[0],ps=Xn[1],Po=P?P(ae):null;if(_n&&xr&&!Po)H.push(ae);else{var fi=[Qt,ps];Po&&(fi=fi.concat(Po)),X.push({file:ae,errors:fi.filter(function(Pn){return Pn})})}}),(!a&&H.length>1||a&&l>=1&&H.length>l)&&(H.forEach(function(ae){X.push({file:ae,errors:[v$]})}),H.splice(0)),I({acceptedFiles:H,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),f&&f(H,X,M),X.length>0&&m&&m(X,M),H.length>0&&h&&h(H,M)},[I,a,O,o,s,l,f,h,m,P]),En=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R),ce.current=[],Bl(R)&&Promise.resolve(i(R)).then(function(M){Zu(R)&&!_||Mt(M,R)}).catch(function(M){return re(M)}),I({type:"reset"})},[i,Mt,re,_]),dn=v.useCallback(function(){if(Y.current){I({type:"openDialog"}),B();var R={multiple:a,types:D};window.showOpenFilePicker(R).then(function(M){return i(M)}).then(function(M){Mt(M,null),I({type:"closeDialog"})}).catch(function(M){T$(M)?(V(M),I({type:"closeDialog"})):E$(M)?(Y.current=!1,te.current?(te.current.value=null,te.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(M)});return}te.current&&(I({type:"openDialog"}),B(),te.current.value=null,te.current.click())},[I,B,V,g,Mt,re,D,a]),ci=v.useCallback(function(R){!ee.current||!ee.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),dn())},[ee,dn]),gr=v.useCallback(function(){I({type:"focus"})},[]),ds=v.useCallback(function(){I({type:"blur"})},[]),di=v.useCallback(function(){C||(b$()?setTimeout(dn,0):dn())},[C,dn]),kt=function(M){return r?null:M},vr=function(M){return T?null:kt(M)},Ge=function(M){return E?null:kt(M)},yr=function(M){_&&M.stopPropagation()},_o=v.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=R.refKey,H=M===void 0?"ref":M,X=R.role,ae=R.onKeyDown,Ve=R.onFocus,tt=R.onBlur,_n=R.onClick,Qt=R.onDragEnter,fs=R.onDragOver,Xn=R.onDragLeave,xr=R.onDrop,ps=Ju(R,j$);return _e(_e(ah({onKeyDown:vr(Rn(ae,ci)),onFocus:vr(Rn(Ve,gr)),onBlur:vr(Rn(tt,ds)),onClick:kt(Rn(_n,di)),onDragEnter:Ge(Rn(Qt,Fe)),onDragOver:Ge(Rn(fs,Je)),onDragLeave:Ge(Rn(Xn,et)),onDrop:Ge(Rn(xr,En)),role:typeof X=="string"&&X!==""?X:"presentation"},H,ee),!r&&!T?{tabIndex:0}:{}),ps)}},[ee,ci,gr,ds,di,Fe,Je,et,En,T,E,r]),A=v.useCallback(function(R){R.stopPropagation()},[]),$=v.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=R.refKey,H=M===void 0?"ref":M,X=R.onChange,ae=R.onClick,Ve=Ju(R,A$),tt=ah({accept:O,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:kt(Rn(X,En)),onClick:kt(Rn(ae,A)),tabIndex:-1},H,te);return _e(_e({},tt),Ve)}},[te,n,a,En,r]);return _e(_e({},N),{},{isFocused:q&&!r,getRootProps:_o,getInputProps:$,rootRef:ee,inputRef:te,open:kt(dn)})}function B$(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 Ex(){}const zC=5*1024*1024,go={"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"]},_x=Object.values(go).flat();function z$(e){var r;if(e.size>zC)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(go).includes(e.type)||_x.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${_x.join(", ")}`}}function ec(e){for(const t of e){const n=z$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function VC({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(go).reduce((n,r)=>(n[r]=go[r],n),{}),maxSize:zC,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(_C,{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"})]})]})})})}VC.Button=({onDrop:e})=>{const t=n=>{const r=ec(n);if(!r.isValid){Vs({description:r.error,variant:"error"});return}e(n)};return y.jsx(al,{onDrop:t,accept:Object.keys(go).reduce((n,r)=>(n[r]=go[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(_C,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function V$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=rs(),o=RD(t),a=Oe(),l=rl(),[c,d]=v.useState(""),[u,f]=v.useState("3rem"),[h,m]=v.useState(!1),[p,b]=v.useState([]),[g,x]=v.useState(0),[w,C]=v.useState(!1),[T,E]=v.useState(0),[_,j]=v.useState(null);v.useEffect(()=>{if(r.length>0){const D=r[r.length-1];D.id!==_&&(j(D.id),D.sender_type===$e.User&&(x(0),C(!1)))}},[r,_]),v.useEffect(()=>{let D;return w&&T>0&&(D=window.setTimeout(()=>{E(B=>B<=1?(C(!1),x(0),0):B-1)},1e3)),()=>clearTimeout(D)},[w,T]),Km("paste",D=>{const B=D.clipboardData.items,V=[];for(const ee of B){const te=ee.getAsFile();te&&V.push(te)}if(V.length>0&&!n){Vs({description:l(W.FileUploadDisabled),variant:"error"});return}if(V.length>0){const ee=ec(V);if(!ee.isValid){Vs({description:ee.error,variant:"error"});return}b([...p,...V])}});const P=async()=>{if(!c.trim()&&(!n||p.length===0))return;if(g>5&&!w){C(!0),E(3);return}if(w)return;m(!0);let D;if(n&&p.length>0){const[B,V]=await o.mutateAsync(p);vc(V)&&OD(B)&&(D=B.file_urls)}s==null||s.emit(Qn.MessageCreate,{content:c,files:D},B=>{d(""),e(B),m(!1),b([]),x(V=>V+1),i.current&&(i.current.style.height="3rem",f("3rem"))})},O=D=>{s==null||s.emit(Qn.MessageTyping,{content:D})};return y.jsxs(y.Fragment,{children:[w&&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(k.ErrorBackground),borderColor:a.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(k.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(k.ErrorText)},children:l(W.RateLimitMessage).replace("{seconds}",T.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(k.FooterBackground),borderRadius:a.getRadius()},onSubmit:D=>{D.preventDefault(),P(),D.currentTarget.reset()},children:[n&&p&&p.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(TC,{files:p,onDelete:D=>{b(p.filter((B,V)=>V!==D))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(vg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:u,maxHeight:"6rem"},placeholder:l(W.MessagePlaceholder),value:c,maxLength:2e3,onChange:D=>{const B=D.target.value;if(B.length<=2e3&&(d(B),O(B)),B.length>0&&D.currentTarget.scrollHeight>D.currentTarget.clientHeight){const V=`${D.currentTarget.scrollHeight}px`;D.currentTarget.style.height=V,f(V)}else D.currentTarget.style.height="3rem",f("3rem")},onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),D.stopPropagation(),P())}}),c.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:c.length>=2e3?a.getColor(k.ErrorText):a.getColor(k.FooterText),fontWeight:c.length>=2e3?"600":"normal"},children:2e3-c.length})]}),y.jsxs(be.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(VC.Button,{onDrop:D=>{if(D.length){const B=ec(D);if(!B.isValid){console.log("val",B),Vs({description:B.error,variant:"error"});return}b([...p,...D])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:h||!c.trim()&&p.length===0||w,children:h?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):w?y.jsx("span",{className:"text-xs font-bold",children:T}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function U$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var d,u;const{widget:o,setOpen:a}=Nt(),l=Oe(),c=To();return y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:l.getColor(k.HeaderBackground),color:l.getColor(k.HeaderText),borderBottom:`1px solid ${l.getColor(k.HeaderBorder)}`,borderTopLeftRadius:l.getRadius(),borderTopRightRadius:l.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(XL,{name:e.agent_name,avatar:e.agent_avatar,textColor:l.getColor(k.HeaderText)}):y.jsx("div",{style:{color:l.getColor(k.HeaderText)},className:"font-medium",children:((u=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:u.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(PI,{onChatClose:s}),c&&y.jsx("button",{type:"button",style:{color:l.getColor(k.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(V$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:f=>{i(f)}}),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:l.getColor(k.FooterText),borderTop:`1px solid ${l.getColor(k.FooterBorder)}`,backgroundColor:l.getColor(k.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 H$({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(k.StarInactiveColor),fill:n.getColor(k.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(k.StarActiveColor),fill:n.getColor(k.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(k.StarActiveColor),fill:n.getColor(k.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 q$({onOk:e}){const t=Oe(),n=rl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=AD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const p=setInterval(()=>{l(b=>b<=1?(clearInterval(p),e(!0),0):b-1)},1e3);return()=>clearInterval(p)}},[s]);const f=ng({comment:Yu()}),h=lC({init:{comment:""},schema:f,action:async p=>{const[b,g]=await c.mutateAsync({rating:r,comment:p.comment});if(vc(g)){o(!0);return}cC(b,{form:h})}}),m=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(k.RatingSuccessBackground):t.getColor(k.RatingHeaderBackground),color:s?t.getColor(k.RatingSuccessText):t.getColor(k.RatingHeaderText),borderBottom:`1px solid ${t.getColor(k.HeaderBorder)}`},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?W.RatingHeaderThanks:W.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(k.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(k.HeaderText)},children:n(W.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(k.FooterText)},children:n(W.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(k.FooterText)},children:n(W.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:m,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.ButtonBackground),color:t.getColor(k.ButtonText),borderRadius:t.getRadius()},children:n(W.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(k.FooterText)},children:n(W.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(k.RatingRateConversationText)},children:n(W.RatingRateConversation)}),y.jsx(H$,{rating:r,onChange:p=>{i(p),p>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(k.FooterText)},children:n(W.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(k.ErrorText)},children:n(W.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:h.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(k.InputText)},children:n(W.RatingComment)}),y.jsx(vg,{id:"comment",onChange:h.handleChange,onBlur:h.handleBlur,value:h.values.comment,placeholder:n(W.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(k.InputBorder),backgroundColor:t.getColor(k.InputBackground),color:t.getColor(k.InputText),borderRadius:t.getRadius()},error:h.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:p=>{r<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.ButtonBackground),color:t.getColor(k.ButtonText),borderRadius:t.getRadius()},children:n(W.RatingSubmit)}),y.jsx(on,{onClick:m,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.GreeterBackground),color:t.getColor(k.GreeterText),borderRadius:t.getRadius()},children:n(W.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(k.FooterText),borderTop:`1px solid ${t.getColor(k.FooterBorder)}`,backgroundColor:t.getColor(k.FooterBackground)},children:[y.jsx("span",{children:n(W.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 W$({children:e}){const{widget:t}=Nt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function G$({children:e}){const t=rs(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function Q$(){const{widget:e,setOpen:t,setIsHaveChat:n}=Nt(),r=Oe(),i=rs(),s=il(),o=Pc(),a=To(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,h]=v.useState(!1),[m,p]=v.useState([]),b=()=>{if(l){c({...l,status:gs.Closed});return}g()},g=w=>{w||t(!1),Vp((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),p([]),Up(e.client_id,po(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(Qn.ChatView,{},w=>{if(w===null){t(!1),n(!1),Up(e.client_id,po(s)),u([]),p([]),Vp((e==null?void 0:e.link_id)||""),o.push("registration");return}c(w),n(!0)})},[]);const x=v.useCallback(w=>{l&&![gs.Closed,gs.Deleted].includes(l.status)&&u([...d,w])},[d,l]);return v.useEffect(()=>{if(!i)return;const w=j=>{const P={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};if(m.length>0){p(O=>[...O,P]);return}j.is_shortcut?p([P]):x(P),h(!1)},C=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)??gs.Open}),x({content:` _ _${j.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:$e.Activity,activity_type:bi.AdminJoin,sender_name:j.name})},T=()=>{h(!0)},E=()=>{b()},_=({is_customer_uploadable:j})=>{c(l?{...l,is_customer_uploadable:j}:null)};return i.on(st.MessageAgentCreate,w),i.on(st.ChatUserAssignee,C),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,w),i.off(st.ChatUserAssignee,C),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[x]),v.useEffect(()=>{!i||!l||i.emit(Qn.MessageList,{},w=>{u(w)})},[i,l]),v.useEffect(()=>{const w=setTimeout(()=>{h(!1)},2e3);return()=>clearTimeout(w)},[f]),v.useEffect(()=>{if(!e||m.length===0)return;let w=0;e.writing_timeout&&(w=[...m[0].content].length/e.writing_timeout,w<0&&(w=0));const C=setTimeout(()=>{x(m[0]),p(m.slice(1))},w*1e3);return()=>clearTimeout(C)},[m,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 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(k.Background),borderRadius:r.getRadius()},children:l.status===gs.Closed?y.jsx(q$,{onOk:g}):y.jsx(U$,{chat:l,isTyping:f,messages:d,shortcutMessages:m,onNewMessage:x,onChatClose:b})})})]}):null}function Y$(){return qL(),null}function K$(){return y.jsxs(G$,{children:[y.jsx(yk,{defaultOpen:!0,children:y.jsx(W$,{children:y.jsx(Q$,{})})}),y.jsx(Y$,{})]})}const X$=[{path:"/chat",component:K$,name:"chat"}],UC=[...X$],HC=[...KL],Z$=[...UC,...HC];function J$(){return y.jsx(oP,{future:{v7_startTransition:!0},children:y.jsxs(lP,{children:[UC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t)),HC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}function eB({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=Nt(),{data:a,isLoading:l}=h2(e);return v.useEffect(()=>{Array.isArray(a)&&g2(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:y.jsx(DL,{children:y.jsx(CD,{children:y.jsx(J$,{})})})}const tB=new K_;function nB({container:e,link_id:t,defaultValues:n,soundPath:r}){Xw(e).render(y.jsxs(t2,{client:tB,children:[y.jsx(eB,{link_id:t,defaultValues:n,soundPath:r}),y.jsx(CL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]}))}window.widget=nB});export default rB();
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $C(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 F$(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 L$(e){if(Array.isArray(e))return e}function Tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function 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=I$(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 I$(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,_$),i=$$(r),s=i.open,o=Ju(i,P$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});al.displayName="Dropzone";var BC={disabled:!1,getFilesFromEvent:KI,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=BC;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 $$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},BC),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,h=t.onDropAccepted,m=t.onDropRejected,p=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,C=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,j=t.onError,P=t.validator,O=v.useMemo(function(){return C$(n)},[n]),D=v.useMemo(function(){return k$(n)},[n]),B=v.useMemo(function(){return typeof b=="function"?b:Ex},[b]),V=v.useMemo(function(){return typeof p=="function"?p:Ex},[p]),ee=v.useRef(null),te=v.useRef(null),Q=v.useReducer(B$,lh),ne=rf(Q,2),N=ne[0],I=ne[1],q=N.isFocused,G=N.isFileDialogActive,Y=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&S$()),J=function(){!Y.current&&G&&setTimeout(function(){if(te.current){var M=te.current.files;M.length||(I({type:"closeDialog"}),V())}},300)};v.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[te,G,V,Y]);var ce=v.useRef([]),ve=function(M){ee.current&&ee.current.contains(M.target)||(M.preventDefault(),ce.current=[])};v.useEffect(function(){return w&&(document.addEventListener("dragover",Cx,!1),document.addEventListener("drop",ve,!1)),function(){w&&(document.removeEventListener("dragover",Cx),document.removeEventListener("drop",ve))}},[ee,w]),v.useEffect(function(){return!r&&x&&ee.current&&ee.current.focus(),function(){}},[ee,x,r]);var re=v.useCallback(function(R){j?j(R):console.error(R)},[j]),Fe=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R),ce.current=[].concat(R$(ce.current),[R.target]),Bl(R)&&Promise.resolve(i(R)).then(function(M){if(!(Zu(R)&&!_)){var H=M.length,X=H>0&&y$({files:M,accept:O,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:P}),ae=H>0&&!X;I({isDragAccept:X,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(R)}}).catch(function(M){return re(M)})},[i,c,re,_,O,o,s,a,l,P]),Je=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R);var M=Bl(R);if(M&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return M&&u&&u(R),!1},[u,_]),et=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R);var M=ce.current.filter(function(X){return ee.current&&ee.current.contains(X)}),H=M.indexOf(R.target);H!==-1&&M.splice(H,1),ce.current=M,!(M.length>0)&&(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bl(R)&&d&&d(R))},[ee,d,_]),Mt=v.useCallback(function(R,M){var H=[],X=[];R.forEach(function(ae){var Ve=MC(ae,O),tt=rf(Ve,2),_n=tt[0],Qt=tt[1],fs=FC(ae,o,s),Xn=rf(fs,2),xr=Xn[0],ps=Xn[1],Po=P?P(ae):null;if(_n&&xr&&!Po)H.push(ae);else{var fi=[Qt,ps];Po&&(fi=fi.concat(Po)),X.push({file:ae,errors:fi.filter(function(Pn){return Pn})})}}),(!a&&H.length>1||a&&l>=1&&H.length>l)&&(H.forEach(function(ae){X.push({file:ae,errors:[v$]})}),H.splice(0)),I({acceptedFiles:H,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),f&&f(H,X,M),X.length>0&&m&&m(X,M),H.length>0&&h&&h(H,M)},[I,a,O,o,s,l,f,h,m,P]),En=v.useCallback(function(R){R.preventDefault(),R.persist(),yr(R),ce.current=[],Bl(R)&&Promise.resolve(i(R)).then(function(M){Zu(R)&&!_||Mt(M,R)}).catch(function(M){return re(M)}),I({type:"reset"})},[i,Mt,re,_]),dn=v.useCallback(function(){if(Y.current){I({type:"openDialog"}),B();var R={multiple:a,types:D};window.showOpenFilePicker(R).then(function(M){return i(M)}).then(function(M){Mt(M,null),I({type:"closeDialog"})}).catch(function(M){T$(M)?(V(M),I({type:"closeDialog"})):E$(M)?(Y.current=!1,te.current?(te.current.value=null,te.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(M)});return}te.current&&(I({type:"openDialog"}),B(),te.current.value=null,te.current.click())},[I,B,V,g,Mt,re,D,a]),ci=v.useCallback(function(R){!ee.current||!ee.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),dn())},[ee,dn]),gr=v.useCallback(function(){I({type:"focus"})},[]),ds=v.useCallback(function(){I({type:"blur"})},[]),di=v.useCallback(function(){C||(b$()?setTimeout(dn,0):dn())},[C,dn]),kt=function(M){return r?null:M},vr=function(M){return T?null:kt(M)},Ge=function(M){return E?null:kt(M)},yr=function(M){_&&M.stopPropagation()},_o=v.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=R.refKey,H=M===void 0?"ref":M,X=R.role,ae=R.onKeyDown,Ve=R.onFocus,tt=R.onBlur,_n=R.onClick,Qt=R.onDragEnter,fs=R.onDragOver,Xn=R.onDragLeave,xr=R.onDrop,ps=Ju(R,j$);return _e(_e(ah({onKeyDown:vr(Rn(ae,ci)),onFocus:vr(Rn(Ve,gr)),onBlur:vr(Rn(tt,ds)),onClick:kt(Rn(_n,di)),onDragEnter:Ge(Rn(Qt,Fe)),onDragOver:Ge(Rn(fs,Je)),onDragLeave:Ge(Rn(Xn,et)),onDrop:Ge(Rn(xr,En)),role:typeof X=="string"&&X!==""?X:"presentation"},H,ee),!r&&!T?{tabIndex:0}:{}),ps)}},[ee,ci,gr,ds,di,Fe,Je,et,En,T,E,r]),A=v.useCallback(function(R){R.stopPropagation()},[]),$=v.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=R.refKey,H=M===void 0?"ref":M,X=R.onChange,ae=R.onClick,Ve=Ju(R,A$),tt=ah({accept:O,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:kt(Rn(X,En)),onClick:kt(Rn(ae,A)),tabIndex:-1},H,te);return _e(_e({},tt),Ve)}},[te,n,a,En,r]);return _e(_e({},N),{},{isFocused:q&&!r,getRootProps:_o,getInputProps:$,rootRef:ee,inputRef:te,open:kt(dn)})}function B$(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 Ex(){}const zC=5*1024*1024,go={"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"]},_x=Object.values(go).flat();function z$(e){var r;if(e.size>zC)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(go).includes(e.type)||_x.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${_x.join(", ")}`}}function ec(e){for(const t of e){const n=z$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function VC({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(go).reduce((n,r)=>(n[r]=go[r],n),{}),maxSize:zC,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(_C,{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"})]})]})})})}VC.Button=({onDrop:e})=>{const t=n=>{const r=ec(n);if(!r.isValid){Vs({description:r.error,variant:"error"});return}e(n)};return y.jsx(al,{onDrop:t,accept:Object.keys(go).reduce((n,r)=>(n[r]=go[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(_C,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function V$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=rs(),o=RD(t),a=Oe(),l=rl(),[c,d]=v.useState(""),[u,f]=v.useState("3rem"),[h,m]=v.useState(!1),[p,b]=v.useState([]),[g,x]=v.useState(0),[w,C]=v.useState(!1),[T,E]=v.useState(0),[_,j]=v.useState(null);v.useEffect(()=>{if(r.length>0){const D=r[r.length-1];D.id!==_&&(j(D.id),D.sender_type===$e.User&&(x(0),C(!1)))}},[r,_]),v.useEffect(()=>{let D;return w&&T>0&&(D=window.setTimeout(()=>{E(B=>B<=1?(C(!1),x(0),0):B-1)},1e3)),()=>clearTimeout(D)},[w,T]),Km("paste",D=>{const B=D.clipboardData.items,V=[];for(const ee of B){const te=ee.getAsFile();te&&V.push(te)}if(V.length>0&&!n){Vs({description:l(W.FileUploadDisabled),variant:"error"});return}if(V.length>0){const ee=ec(V);if(!ee.isValid){Vs({description:ee.error,variant:"error"});return}b([...p,...V])}});const P=async()=>{if(!c.trim()&&(!n||p.length===0))return;if(g>5&&!w){C(!0),E(3);return}if(w)return;m(!0);let D;if(n&&p.length>0){const[B,V]=await o.mutateAsync(p);vc(V)&&OD(B)&&(D=B.file_urls)}s==null||s.emit(Qn.MessageCreate,{content:c,files:D},B=>{d(""),e(B),m(!1),b([]),x(V=>V+1),i.current&&(i.current.style.height="3rem",f("3rem"))})},O=D=>{s==null||s.emit(Qn.MessageTyping,{content:D})};return y.jsxs(y.Fragment,{children:[w&&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(k.ErrorBackground),borderColor:a.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(k.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(k.ErrorText)},children:l(W.RateLimitMessage).replace("{seconds}",T.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(k.FooterBackground),borderRadius:a.getRadius()},onSubmit:D=>{D.preventDefault(),P(),D.currentTarget.reset()},children:[n&&p&&p.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(TC,{files:p,onDelete:D=>{b(p.filter((B,V)=>V!==D))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(vg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:u,maxHeight:"6rem"},placeholder:l(W.MessagePlaceholder),value:c,maxLength:2e3,onChange:D=>{const B=D.target.value;if(B.length<=2e3&&(d(B),O(B)),B.length>0&&D.currentTarget.scrollHeight>D.currentTarget.clientHeight){const V=`${D.currentTarget.scrollHeight}px`;D.currentTarget.style.height=V,f(V)}else D.currentTarget.style.height="3rem",f("3rem")},onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),D.stopPropagation(),P())}}),c.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:c.length>=2e3?a.getColor(k.ErrorText):a.getColor(k.FooterText),fontWeight:c.length>=2e3?"600":"normal"},children:2e3-c.length})]}),y.jsxs(be.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(VC.Button,{onDrop:D=>{if(D.length){const B=ec(D);if(!B.isValid){console.log("val",B),Vs({description:B.error,variant:"error"});return}b([...p,...D])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:h||!c.trim()&&p.length===0||w,children:h?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):w?y.jsx("span",{className:"text-xs font-bold",children:T}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function U$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var d,u;const{widget:o,setOpen:a}=Nt(),l=Oe(),c=To();return y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:l.getColor(k.HeaderBackground),color:l.getColor(k.HeaderText),borderBottom:`1px solid ${l.getColor(k.HeaderBorder)}`,borderTopLeftRadius:l.getRadius(),borderTopRightRadius:l.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(XL,{name:e.agent_name,avatar:e.agent_avatar,textColor:l.getColor(k.HeaderText)}):y.jsx("div",{style:{color:l.getColor(k.HeaderText)},className:"font-medium",children:((u=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:u.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(PI,{onChatClose:s}),c&&y.jsx("button",{type:"button",style:{color:l.getColor(k.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(V$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:f=>{i(f)}}),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:l.getColor(k.FooterText),borderTop:`1px solid ${l.getColor(k.FooterBorder)}`,backgroundColor:l.getColor(k.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 H$({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(k.StarInactiveColor),fill:n.getColor(k.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(k.StarActiveColor),fill:n.getColor(k.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(k.StarActiveColor),fill:n.getColor(k.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 q$({onOk:e}){const t=Oe(),n=rl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=AD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const p=setInterval(()=>{l(b=>b<=1?(clearInterval(p),e(!0),0):b-1)},1e3);return()=>clearInterval(p)}},[s]);const f=ng({comment:Yu()}),h=lC({init:{comment:""},schema:f,action:async p=>{const[b,g]=await c.mutateAsync({rating:r,comment:p.comment});if(vc(g)){o(!0);return}cC(b,{form:h})}}),m=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(k.RatingSuccessBackground):t.getColor(k.RatingHeaderBackground),color:s?t.getColor(k.RatingSuccessText):t.getColor(k.RatingHeaderText),borderBottom:`1px solid ${t.getColor(k.HeaderBorder)}`},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?W.RatingHeaderThanks:W.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(k.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(k.HeaderText)},children:n(W.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(k.FooterText)},children:n(W.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(k.FooterText)},children:n(W.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:m,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.ButtonBackground),color:t.getColor(k.ButtonText),borderRadius:t.getRadius()},children:n(W.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(k.FooterText)},children:n(W.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(k.RatingRateConversationText)},children:n(W.RatingRateConversation)}),y.jsx(H$,{rating:r,onChange:p=>{i(p),p>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(k.FooterText)},children:n(W.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(k.ErrorText)},children:n(W.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:h.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(k.InputText)},children:n(W.RatingComment)}),y.jsx(vg,{id:"comment",onChange:h.handleChange,onBlur:h.handleBlur,value:h.values.comment,placeholder:n(W.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(k.InputBorder),backgroundColor:t.getColor(k.InputBackground),color:t.getColor(k.InputText),borderRadius:t.getRadius()},error:h.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:p=>{r<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.ButtonBackground),color:t.getColor(k.ButtonText),borderRadius:t.getRadius()},children:n(W.RatingSubmit)}),y.jsx(on,{onClick:m,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.GreeterBackground),color:t.getColor(k.GreeterText),borderRadius:t.getRadius()},children:n(W.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(k.FooterText),borderTop:`1px solid ${t.getColor(k.FooterBorder)}`,backgroundColor:t.getColor(k.FooterBackground)},children:[y.jsx("span",{children:n(W.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 W$({children:e}){const{widget:t}=Nt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function G$({children:e}){const t=rs(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function Q$(){const{widget:e,setOpen:t,setIsHaveChat:n}=Nt(),r=Oe(),i=rs(),s=il(),o=Pc(),a=To(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,h]=v.useState(!1),[m,p]=v.useState([]),b=()=>{if(l){c({...l,status:gs.Closed});return}g()},g=w=>{w||t(!1),Vp((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),p([]),Up(e.client_id,po(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(Qn.ChatView,{},w=>{if(w===null){t(!1),n(!1),Up(e.client_id,po(s)),u([]),p([]),Vp((e==null?void 0:e.link_id)||""),o.push("registration");return}c(w),n(!0)})},[]);const x=v.useCallback(w=>{l&&![gs.Closed,gs.Deleted].includes(l.status)&&u([...d,w])},[d,l]);return v.useEffect(()=>{if(!i)return;const w=j=>{const P={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(m.length>0){p(O=>[...O,P]);return}j.is_shortcut?p([P]):x(P),h(!1)},C=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)??gs.Open}),x({content:` _ _${j.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:$e.Activity,activity_type:bi.AdminJoin,sender_name:j.name})},T=()=>{h(!0)},E=()=>{b()},_=({is_customer_uploadable:j})=>{c(l?{...l,is_customer_uploadable:j}:null)};return i.on(st.MessageAgentCreate,w),i.on(st.ChatUserAssignee,C),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,w),i.off(st.ChatUserAssignee,C),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[x]),v.useEffect(()=>{!i||!l||i.emit(Qn.MessageList,{},w=>{u(w)})},[i,l]),v.useEffect(()=>{const w=setTimeout(()=>{h(!1)},2e3);return()=>clearTimeout(w)},[f]),v.useEffect(()=>{if(!e||m.length===0)return;let w=0;e.writing_timeout&&(w=[...m[0].content].length/e.writing_timeout,w<0&&(w=0));const C=setTimeout(()=>{x(m[0]),p(m.slice(1))},w*1e3);return()=>clearTimeout(C)},[m,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 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(k.Background),borderRadius:r.getRadius()},children:l.status===gs.Closed?y.jsx(q$,{onOk:g}):y.jsx(U$,{chat:l,isTyping:f,messages:d,shortcutMessages:m,onNewMessage:x,onChatClose:b})})})]}):null}function Y$(){return qL(),null}function K$(){return y.jsxs(G$,{children:[y.jsx(yk,{defaultOpen:!0,children:y.jsx(W$,{children:y.jsx(Q$,{})})}),y.jsx(Y$,{})]})}const X$=[{path:"/chat",component:K$,name:"chat"}],UC=[...X$],HC=[...KL],Z$=[...UC,...HC];function J$(){return y.jsx(oP,{future:{v7_startTransition:!0},children:y.jsxs(lP,{children:[UC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t)),HC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}function eB({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=Nt(),{data:a,isLoading:l}=h2(e);return v.useEffect(()=>{Array.isArray(a)&&g2(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:y.jsx(DL,{children:y.jsx(CD,{children:y.jsx(J$,{})})})}const tB=new K_;function nB({container:e,link_id:t,defaultValues:n,soundPath:r}){Xw(e).render(y.jsxs(t2,{client:tB,children:[y.jsx(eB,{link_id:t,defaultValues:n,soundPath:r}),y.jsx(CL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]}))}window.widget=nB});export default rB();
|